Ask Your Question
0

how to plot one topic against another in ros

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

robzz gravatar image

updated 2013-07-07 15:19:19 -0500

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
2

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

lindzey gravatar image

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

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

Comments

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 imagerobzz ( 2013-07-09 21:23:36 -0500 )edit
1

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

Davide Faconti gravatar image

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

https://facontidavide.github.io/PlotJ...

https://github.com/facontidavide/Plot...

edit flag offensive delete link more

Comments

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 imagejayess ( 2018-01-30 10:23:43 -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

Stats

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

Seen: 251 times

Last updated: Jan 30 '18