Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

explain your answer function - forwardOdom(distance, xStart, yStart) while (1) velocity 0.5; velmsg.Linear.Xvelocity; send(robot,velmsg); odomdata receive(odom,3); pose odomdata.Pose.Pose; x pose.Position.X; y - pose.Position.Y; if sart((x

explain your answer

image text in transcribed

image text in transcribedimage text in transcribed

function - forwardOdom(distance, xStart, yStart) while (1) velocity 0.5; velmsg.Linear.Xvelocity; send(robot,velmsg); odomdata receive(odom,3); pose odomdata.Pose.Pose; x pose.Position.X; y - pose.Position.Y; if sart((x -xStart).A2+(y yStart).A2) >- distance, velocity-0 velmsgLineatX = velocity; send(robot,velmsg); break end end % end while Given the function deined above, what would the following code command the TurtleBot robot to do? pose-odomdata.Pose.Pose; for k-1:4 xStart- pose.Position.X; yStart pose.Position.Y; forwardOdom(2, xStart, yStart); end Robot moves forward 4 meters O Robot moves forever Robot moves forward 2 meters O Robot does not move Robot moves forward 8 meters function - forwardOdom(distance, xStart, yStart) while (1) velocity 0.5; velmsg.Linear.Xvelocity; send(robot,velmsg); odomdata receive(odom,3); pose odomdata.Pose.Pose; x pose.Position.X; y - pose.Position.Y; if sart((x -xStart).A2+(y yStart).A2) >- distance, velocity-0 velmsgLineatX = velocity; send(robot,velmsg); break end end % end while Given the function deined above, what would the following code command the TurtleBot robot to do? pose-odomdata.Pose.Pose; for k-1:4 xStart- pose.Position.X; yStart pose.Position.Y; forwardOdom(2, xStart, yStart); end Robot moves forward 4 meters O Robot moves forever Robot moves forward 2 meters O Robot does not move Robot moves forward 8 meters

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

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

Students also viewed these Databases questions

Question

LO1 Explain how the workforce is changing in unpredicted ways.

Answered: 1 week ago

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago