ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

how to plot one topic against another in ros

asked 2013-07-07 15:18:28 -0600

robzz gravatar image

updated 2013-07-07 15:19:19 -0600

I have two topics publishing the std_msgs/Float32 message. Is there a way I can plot the data in one topic against the other?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-07-07 15:30:14 -0600

lindzey gravatar image

updated 2013-07-09 22:47:38 -0600

Check out rqt_plot.

This provides a scrolling plot of data from multiple topics on the same axis, as a function of time. If you needed topic1 vs topic2, I don't know of an easier solution than writing a quick python node that listens to both topics then plots the data after a specified time.

EDIT: I don't love it (would love another alternative!), but I use matplotlib. The documentation isn't easy to get started with, so I'd just look at the example code and plots in the gallery.

edit flag offensive delete link more


I've checked out rqt_plot, and as far as I can tell, it can't plot one topic vs. another. What would you use to plot in python?

robzz gravatar image robzz  ( 2013-07-09 21:23:36 -0600 )edit

answered 2018-01-30 05:43:10 -0600

Davide Faconti gravatar image

There is a way to do that (Called XY plots) in PlotJuggler:

edit flag offensive delete link more


Some more information about the package would make this answer more useful. That way people don't have to exit the site to find out what it does.

jayess gravatar image jayess  ( 2018-01-30 10:23:43 -0600 )edit

Question Tools


Asked: 2013-07-07 15:18:28 -0600

Seen: 862 times

Last updated: Jan 30 '18