Starting from:

$25

ROS - Robot Programming  - Simulation - Solved

writing a ROS subscriber and publisher in C++. Review the code from the lecture, build it on your system and use it as a template for the assignment.

Assignments
 

a)    For this assignment you will have to program a turtle lawnmower algorithm. The turtle should start from the lower left corner and continue straight until it reaches the end and then turn in a small circular arc and continue in the opposite direction. This should go on until turtle covers the whole area. You can assume that the position of the turtle is known (turtle1/Pose) and that the size of the environment is known (an 11 × 11 square). We are not asking you to implement a complete coverage algorithm; detect when the robot is close to the edge, then make it turn, otherwise maintain straight heading. Your result should resemble Fig. 1.

In the following text box, report every command needed for reproducing your lawnmower in Turtlesim.

How did you manage to put the turtle in lower left corner? Write the command(s) in the following text box.

 

Figure 1: The result of the turtle lawnmower algorithm in TurtleSim.

b)    Inside the turtle_lawnmower package create a new folder called launch. Similarly to the laboratory exercise 3, write a launch file named firstname_lastname.launch which will run both turtlesim and the lawnmower node at once. One should be able to reproduce your result simply by running your launch file.

Exercise submission
 

Create a zip archive containing this pdf with the filled out answer and all other exercise files: your .cpp file(s), CMakeLists.txt, a screenshot of your result and your launch file. Upload on Moodle.

 

Laboratory exercise 8, Turtlebot lawnmower in C++                                                               

More products