0
$\begingroup$

Rosanswers logo

Hello everyone, I am plotting a message using rxplot and all the data is at t = 0. I have been poking around this forum and I found a conversation saying that time stamp data must be filled in (which isnt mentioned in the tutorial for rxplot, maybe this should be mentioned). Do I have to go through each node that publishes a message and time stamp it (i.e in main before spin doing something like topic.header.stamp = ros::Time::now(); ) Do I stamp it when it is received by another node? I have messages being sent all over the place so I am hesitant to do this, so I want to make sure this is what I need to do before hand.

Thanks

Gideon


Originally posted by Gideon on ROS Answers with karma: 239 on 2011-09-01

Post score: 2


Original comments

Comment by brice rebsamen on 2011-10-13:
Strange, I am plotting messages that don't have a header in rxplot, and they are plotted just fine. From what I see, messages do not need a Header. I am beginning to design a new ROS-based system, so I'd like to have this confirmed before I create all my messages.

Comment by mmwise on 2011-09-01:
can you post the code for what you're trying to do?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think I figured it out. I prepended my message with

uint32 seq time stamp string frame_id

and inside my publisher method I have something like

planner::TargetStates msg

after filling in all of the fields and before publishing time stamp the message with

msg.header.stamp = ros::Time::now();

Then rxplot works and generates plots over time. I hope this helps fellow rostards like myself

Cheers

Gideon


Originally posted by Gideon with karma: 239 on 2011-09-01

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by Gideon on 2011-09-01:
Sweet, thanks

Comment by Thomas D on 2011-09-01:
Do you even need to prepend the message with a frame_id? I think if you add a 'Header header' as the first field in your custom message then you can fill in the timestamp using the call you found of 'msg.header.stamp = ros::Time::now()'.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.