Robotics StackExchange | Archived questions

how to draw a parameter vs time graph?

Is there any tool integrated with ROS which can be used to draw a graph showing a parameter change with time? Thanks in advance.

Asked by Mind_hunter on 2015-01-20 00:58:50 UTC

Comments

Answers

I believe you are looking for rqt_plot. It can plot a value versus time.

Asked by tonybaltovski on 2015-01-20 01:58:38 UTC

Comments

I am afraid @Mind_hunter is not looking for rqt_plot as its purpose is drawing a value of a numeric topic/message type vs. time, not a rosparam

Asked by Wolf on 2015-01-20 02:14:24 UTC

ya right i am looking for drawing a value of a numeric message type vs time .

Asked by Mind_hunter on 2015-01-20 11:40:27 UTC

There aren't any tools in ROS for plotting parameters over time, and there's a fairly good reason for this: ROS parameters should not change very often. If you're changing parameters to communicate data between nodes, you should probably be using a topic instead.

That said, if you have a legitimate reason for wanting to capture and plot the value of a parameter over time, you could create a simple node which checks the value of your parameter, and publishes it on a topic. (roscpp has the getParamCached() function, which would be particularly good for this.) Once you have your parameter published on a topic, you can plot it with rqt_plot and log changes using rosbag.

Asked by ahendrix on 2015-01-20 04:04:04 UTC

Comments

Sorry i was talking about the value of message variable with respect to time not ros parameter. I think i should have used topic/message value instead of word "parameter".

Asked by Mind_hunter on 2015-01-20 11:36:44 UTC