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

Revision history [back]

click to hide/show revision 1
initial version

In the current SVN (experimental version of rosbridge):

svn co http://brown-ros-pkg.googlecode.com/svn/trunk/experimental/rosbridge

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:

con.publish('/heads','std_msgs/Header',{seq:42,frame_id:'foo',stamp:{}})

results in something like:

seq: 43                                                                                             
stamp:                                                                                              
  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).