Setting up rviz for the navigation stack
It is good practice to visualize all possible data which what the navigation stack does. In this section, we will show you the visualization topic that you must add to rviz
to see the correct data sent by the navigation stack. Discussions on each visualization topic that the navigation stack publishes are given next.
The 2D pose estimate
The 2D pose estimate (P shortcut) allows the user to initialize the localization system used by the navigation stack by setting the pose of the robot in the world.
The navigation stack waits for the new pose of a new topic with the name initialpose
. This topic is sent using the rviz
windows where we previously changed the name of the topic.
You can see in the following screenshot how you can use initialpose
. Click on the 2D Pose Estimate button, and click on the map to indicate the initial position of your robot. If you don't do this at the beginning, the robot will start the auto-localization process and try to set an...