How to plot trajectory_msgs/JointTrajectory?

asked 2023-02-18 10:37:05 -0500

rhaschke gravatar image

I want to compare a planned trajectory to the actually executed one. While I can nicely plot sensor_msgs/JointState with rqt_plot or rqt_bag, these tools cannot handle trajectory_msgs/JointTrajectory. Of course, that's because the time evolution of the trajectory is contained in the single JointTrajectory message I want to display (instead of being spread in time across multiple messages, which is what these tools can handle). Is there any other (simple) option to visualize a joint trajectory? My workaround for now, is to re-publish the JointTrajectory goal to a MoveIt instance running fake controllers and recording the resulting joint trajectory (now in time) from /joint_states. However, that's laborious. I guess, people developing/debugging robot controllers, run into that issue frequently.

edit retag flag offensive close merge delete

Comments

This reads like a duplicate of #q58907.

Please see whether you can use the RQT plugin mentioned there. It doesn't appear to be released for Noetic, but you might/should be able to build it from source (with this).

If you can, please close your post here as a duplicate.

gvdhoorn gravatar image gvdhoorn  ( 2023-02-19 05:22:37 -0500 )edit