Turtlesim ROS 2 Sample Application¶
This tutorial describes how to:
Launch ROS nodes and graphic application for turtlesim.
List ROS topics.
Launch rqt graphic application so that the turtle can be controlled.
Launch rviz graphic application to view ROS topics.
Run the Turtlesim ROS 2 Sample application¶
To download and install the Turtlesim ROS 2 sample application run the command below:
Set up your ROS 2 environment
Run the Turtlesim ROS 2 sample application:
In the rqt application, navigate to Plugins > Services > Service Caller. To move ‘turtle1’, choose /turtle1/teleport_absolute from the service dropdown list. Ensure to update the x and y values from their original settings. Press the ‘Call’ button to execute the teleportation. To close the Service Caller window, click the ‘X’ button.
Expected Output: The Turtle has been relocated to the coordinates entered in the rqt application.
In the rviz application, navigate to Add > By topic. Check the option ‘Show Unvisualizable Topics’ to view hidden topics. You will now be able to view the hidden topics from ‘turtlesim’. To close the window, click the ‘Cancel’ button.
To close this tutorial, do the following:
Type
Ctrl-c
in the terminal where you executed the command for the tutorial.