ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Simulation time can start any time. The use_sim_time
parameter tells the ROS nodes to expect time to come from the /clock
topic rather than the system as explained in the Clock wiki. If you're running a simulation, the simulator may start the clock at 0, but it could just as easily start at some other time. With rosbag
, the --clock
option publishes the time from the messages in the bag file. You can either manipulate those timestamps in the bag file (offline; the rosbag
API may help), or you can deal with it in a node (online). Either way, you'll have to save the stamp from the first message and subtract it from later messages, like you said.