Section 10.6 Homework: Initial TurtleSim Simulation Navigation
TurtleSim is a lightweight ROS2 simulator that displays a simple turtle-shaped robot in a 2D window and accepts velocity commands over the
cmd_vel topic. It is the standard first hands-on introduction to a live ROS2 graph because it requires no physical hardware.
Subsection 10.6.1 Assignment
-
Launch the TurtleSim node and confirm it appears in the output of
ros2 node list. -
Use
ros2 topic pubto manually publish aTwistmessage to the turtleβscmd_veltopic and observe the turtle move. -
Write a publisher node, following the pattern practiced in this chapter, that drives the turtle in a simple square or circular path using timed velocity commands.
-
Use
ros2 topic echoon the turtleβs pose topic while your node runs, and record how the reported \((x, y, \theta)\) values change as the turtle moves.
Subsection 10.6.2 Purpose
This assignment is meant to connect every concept introduced in Chapters 9 and 10, from the ROS2 graph and command-line tools to publisher nodes and callback-driven subscribers, in a single working, observable system before you move on to more complex robot software.
You have attempted of activities on this page.
