Solved by Expert Tutors
Solved by Expert Tutors

The motion of the robot in XY-c oordinate is provided by the following equations:x(t+1)=x(i)+v*∆t* cos(pheta(i))

  • y(i+1)=y(i)+v*∆t* sin(pheta(i))
  • pheta(i+1)=pheta(i)+r*∆t


  • x,y represent the coordinate in jQuery224015580500307876655_1597722484936 and jQuery2240954084251016825_1597722593688 directions, respectively;
  • - pheta represents the heading angle;
  • - v represents the translational velocity;
  • - r represents the angular velocity;
  • - ∆t represents the discretization step size.

In this question we suppose ∆t=1 (sec).

Write a function called MobileRobot_Motion.m that simulates the motion of robot for 30 sec and finally illustrates the robot's motion path in XY-coordinate.

The inputs to this function are the following information:

- Initial position of the robot in x- and y- coordinate (i.e., x(1) , y(1)); - Initial heading of the robot in range of −45o ≤ pheta(1) ≤ 45o

- Translational velocity in range of 0.1 ≤ v ≤ 3;

- Angular velocity in range of 0.1 ≤r ≤ 3;

For example:

for x(1)=0 , y(1)=0,pheta(1)=10,v=mobile robot.PNGgraph.PNG1 ,r=2

MobileRobot_Motion (0,0,10,1,2) illustrates the following path for the motion of the robot in XY-coordinate:

You should provide documentation for your function (see lecture note, page 23-25).


- To implement the equation of motion given above, you can use the same technique you have used for implementing the cooling equationin Exercise5, Workshop 3.

- In your code, you should consider the validity of the arguments, especiallyfor the input variables given in the certain ranges. See examples of lecture 4, page 14 and 22.

- Be aware that MATLAB default for trigonometric functions is radian, i.e.: sin(), cos () are based on radian. You should use the equivalent functions if your calculations are based on degree (see MATLAB help).

- You should simulate the equation of motion for 30 sec; this is very similar to what you have done for cooling equation in Workshop 3: simulating for 100 minutes.

- See documentation of plot() by typing doc plot in the command window for different options such as Marker and Color so that you can generate a similar figure to one given above.

mobile robot.PNG

Step-by-step answer

The student who asked this found it Helpful

entesque dat, ulxl0taciniaat, ulFusce du

tesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat

iscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus

acinia pulvi

risus an



ur laoree


a molestie

s a molestie consequat, ultrices ac magna. Fusce

et, cons

, dictum

gue vel laoreet ac,

amet, consectetur adipiscing elit. Nam

m ipsum dolor sit amet, consectetur

dictum vitae odio. Donec aliquet. Lore


icitur laoreet. N

molestie consequat

, dictum vitae odi

llentesque dapib

Subscribe to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Let our 24/7 matlab tutors help you get unstuck! Ask your first question.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes