Skip to main content
Version: ROS 2 Jazzy

Rviz Nav2 Tools

The Rviz configuration used by the clearpath_viz view_navigation.launch.py file includes several tools for interacting with Nav2. These tools require Rviz's Fixed Frame to be set to map. To set the fixed frame, use the toolbar on the left and open Displays > Global Options > Fixed Frame.

Initially the map frame may not be connected to the rest of the TF Tree. This is normal, and will be fixed when we use the 2D Pose Estimate tool. If map does not appear in the frame drop-down simply type the word map into the box and press ENTER.

To select a Nav2 tool, simply click on the button on the toolbar at the top of Rviz's main window

Rviz's toolbar with Nav2 tools

2D Pose Estimate

See Localization.

Publish Point

The Publish Point tool allows you to click on the map and publish the XYZ coordinates of that point to the clicked_point topic. In a terminal run the command

ros2 topic echo /a300_0000/clicked_point

Then select the Publish Point tool and click somewhere on the map. In the terminal you will see the location you clicked as a geometry_msgs/msg/PointStamped message:

header:
stamp:
sec: 1747855824
nanosec: 867726206
frame_id: map
point:
x: -0.12474524974822998
y: 0.002330044750124216
z: -0.001434326171875
Publishing a point

The Nav2 Goal tool allows you to set a goal pose for the robot. The Nav2 stack will then plan a path to the goal pose and attempt to drive the robot there.

You will see a red path line appear, indicating the robot's planned path, and the robot will start to drive along this path.

Navigation in simulation