how to plot one topic against another in ros
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?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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?
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.
There is a way to do that (Called XY plots) in PlotJuggler:
Asked: 2013-07-07 15:18:28 -0500
Seen: 876 times
Last updated: Jan 30 '18