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

rxplot using custom messages

asked 2011-05-18 01:39:31 -0500

Arturo Ribes gravatar image

Hi,

I have built my own message type, containing some float32 arrays of variable size and a Header. It works ok and I can record and visualize them using rxbag, but when I try to plot it using rxplot /topicname/field[0] I cannot see anything. However, I see plot axes getting scaled properly, but no line is showing up. Even the header.seq cannot be seen.

How can I plot custom messages?

Best,

Arturo.

edit retag flag offensive close merge delete

Comments

Could you edit your question to include the message definition? And perhaps provide a link to a rosbag you recorded?
Martin Günther gravatar image Martin Günther  ( 2011-05-18 03:26:14 -0500 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2011-05-19 03:21:58 -0500

Miguel Prada gravatar image

updated 2011-05-19 03:24:09 -0500

Are you properly time stamping your messages? I found rxplot doesn't like plotting messages that contain a header (and thus a timestamp) when the time stamp in the header is left blank.

If there's no header at all it won't complain, but if there is a header in your message type the time stamp should be filled for rxplot to plot it correctly.

Well, in fact, it probably is plotting it correctly, if you consider that the correct plot contains every data point in the same moment in time (guess it's time 0).

edit flag offensive delete link more

Comments

I've noticed the same thing. Probably worth filing a ticket on rxplot. The best behaviour in the case of a 'blank' header is probably to do the same as if there was no header at all (and perhaps spit out a warning).
Patrick Bouffard gravatar image Patrick Bouffard  ( 2011-05-19 05:19:49 -0500 )edit
Could you point me to an example of filling in a time stamp? I am having the same issue, everything is being plot at t=0. Thanks
Gideon gravatar image Gideon  ( 2011-09-01 07:37:07 -0500 )edit
You just need to fill the header.stamp field in the message with either ros::Time::now() or rospy.Time.now(), if the code building the message is written in C++ or Python respectively. That should be enough.
Miguel Prada gravatar image Miguel Prada  ( 2011-09-01 19:30:17 -0500 )edit

Question Tools

Stats

Asked: 2011-05-18 01:39:31 -0500

Seen: 634 times

Last updated: May 19 '11