Ask Your Question
2

rxplot using custom messages

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

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 imageMartin Günther ( 2011-05-18 03:26:14 -0600 )edit

1 Answer

Sort by » oldest newest most voted
5

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

Miguel Prada gravatar image

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

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 imagePatrick Bouffard ( 2011-05-19 05:19:49 -0600 )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 imageGideon ( 2011-09-01 07:37:07 -0600 )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 imageMiguel Prada ( 2011-09-01 19:30:17 -0600 )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: 2011-05-18 01:39:31 -0600

Seen: 551 times

Last updated: May 19 '11