Ask Your Question

Can rosbridge set the timestamp of stamped messages?

asked 2012-03-16 00:37:14 -0500

JBuesch gravatar image

Hello guys,

I am using rosbridge in my project and it would be great if the bridge could set the timestamps in messages passed through it as simple json messages. Is that supported somehow?

Cheers, J.B.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-03-19 09:30:26 -0500

tjay gravatar image

In the current SVN (experimental version of rosbridge):

svn co

I have added a feature so that if you send a header (or an object containing a header) with an empty stamp field, it will be replaced with the current rostime. In other words:


results in something like:

seq: 43                                                                                             
  secs: 1332141768                                                                                  
  nsecs: 325777053                                                                                  
frame_id: foo

Keep in mind that this is purely for cases where you don't need a very accurate timestamp. The proper thing to do is still to synchronize the client and ROS runtime's clocks.

If for some reason you don't want to run the SVN version of rosbridge, you can also use this patch until the binary version is updated (after more time and testing).

edit flag offensive delete link more

answered 2012-03-19 23:03:26 -0500

JBuesch gravatar image

Thank you so much! That will things easier for me. In my setup I have only one hard wired link between the sender and the bridge such that I don't anticipate much delay there and thus not afraid setting the stamp only at the bridge which will deliver decent enough accuracy.

Nevertheless I will keep your suggestion in mind in case there is something odd happening and whenever the setup will become more complex I will immediately switch to setting the stamp at the source.

Thanks again! Cheers

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2012-03-16 00:37:14 -0500

Seen: 1,140 times

Last updated: Mar 19 '12