Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Matlab assignment. Mission Details: In order to simulate the motion of a light-seeking robot, we need to define the robots search algorithm: In this simulation,

image text in transcribedimage text in transcribedMatlab assignment.

Mission Details: In order to simulate the motion of a light-seeking robot, we need to define the robots search algorithm: In this simulation, we are assuming that the robot has the ability to compute distance travelled from an initial position but has no inclination on the mapping of the room. Here is the algorithm: 1) 2) 3) Every 0.01 seconds the robot will check whether it is either within 0.1 m of a wall or if it is within 0.1 m of the light source. If it is within 0.1 m of a wall, it will rotate CCW 190 and then move forward for 0.2 seconds before rechecking (new angle - initial direction +190) If it is within 0.1 m of a light source, it will stop and the simulation will end If neither checks are true, the robot will move forward for 0.01 s and then recheck 4) Here are some further details of the simulation: Robot forward speed 0.5 m/s Time it takes robot to rotate 0 (assume instantaneous) Initial (x, y) coordinates of robot- (2, 3) Initial (x, y) coordinates of light source (7,4) nitial direction of robot 180 CCW from x-axis Simulation room dimensions - 12x6 meters A random number between 150 and 210 can be generated using: (150-210) *rand(1,1) + 150; (12,6) Direction CCW from x-axis (0,0) Specifically, you should write Matlab script that: Uses a separate Matlab function with inputs (i.e. parameters) of x, y, dt, direction and speed to calculate a new position for each timestep ( this was discussed in class) Plots the track of the robot as it searches for the light-source Calculates the search time required for the robot to find the light source Mission Details: In order to simulate the motion of a light-seeking robot, we need to define the robots search algorithm: In this simulation, we are assuming that the robot has the ability to compute distance travelled from an initial position but has no inclination on the mapping of the room. Here is the algorithm: 1) 2) 3) Every 0.01 seconds the robot will check whether it is either within 0.1 m of a wall or if it is within 0.1 m of the light source. If it is within 0.1 m of a wall, it will rotate CCW 190 and then move forward for 0.2 seconds before rechecking (new angle - initial direction +190) If it is within 0.1 m of a light source, it will stop and the simulation will end If neither checks are true, the robot will move forward for 0.01 s and then recheck 4) Here are some further details of the simulation: Robot forward speed 0.5 m/s Time it takes robot to rotate 0 (assume instantaneous) Initial (x, y) coordinates of robot- (2, 3) Initial (x, y) coordinates of light source (7,4) nitial direction of robot 180 CCW from x-axis Simulation room dimensions - 12x6 meters A random number between 150 and 210 can be generated using: (150-210) *rand(1,1) + 150; (12,6) Direction CCW from x-axis (0,0) Specifically, you should write Matlab script that: Uses a separate Matlab function with inputs (i.e. parameters) of x, y, dt, direction and speed to calculate a new position for each timestep ( this was discussed in class) Plots the track of the robot as it searches for the light-source Calculates the search time required for the robot to find the light source

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

What is Accounting?

Answered: 1 week ago

Question

Define organisation chart

Answered: 1 week ago

Question

What are the advantages of planning ?

Answered: 1 week ago