ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

How to get the robot trajectory plot in RViz2 by Slam toolbox

asked 2022-06-15 04:26:16 -0500

JehanJay gravatar image

I am using slam_toolbox for mapping from Ros2 bag files. The slam toolbox generates the map exceptionally well. Also using the slam toolbox plugin or by using the commands given in the Git repo it is of course possible to generate the pose graph file to be used in localization mode afterward.

I am using Ros2 Galactic and the question is as follows:

Even though the map is generated by the Slam toolbox, the trajectory path (preferably with a line) is not shown in Rviz2 with Slam toolbox. However, instead of a line, the trajectory is shown with multiple dots which is not what I needed.

Is there a way to fix this issue and get the trajectory path n RViz2 with a line in the generating Map itself?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2022-06-15 11:53:48 -0500

What is a trajectory but a set of via points? I'm not sure what the issue is, that's no different than any other path and you can certainly draw lines between them if you choose.

edit flag offensive delete link more


The requirement is, a visual evaluation to show the robot trajectory in rviz on top of the map.

Yes, it generates using the MarkerArray from the topic /slam_toolbox/graph_visualization but it would be much better to see the trajectory if graph edges are added to this graph visualization marker. Is this feature not implemented or is there an alternative way of seeing the robot path on top of the map using TF data?

JehanJay gravatar image JehanJay  ( 2022-06-21 04:14:03 -0500 )edit
1 This was added to Galactic yesterday, actually, backported from ROS 1.

stevemacenski gravatar image stevemacenski  ( 2022-06-22 13:14:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2022-06-15 04:26:16 -0500

Seen: 43 times

Last updated: Jun 15