ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi,
Time in ROS have a standard representation : http://wiki.ros.org/roscpp/Overview/Time
You can test is with some simple command :
roscore&
rostopic pub /topic_name geometry_msgs/PoseStamped "header: auto
pose:
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 0.0" -r 1 &
rostopic echo --offset /topic_name/header
The result of those commands will be :
seq: 6
stamp:
secs: -71
nsecs: 997840166
frame_id: ''
---
seq: 7
stamp:
secs: -72
nsecs: 998944997
frame_id: ''
---
seq: 8
stamp:
secs: -73
nsecs: 998456955
frame_id: ''
---
There is indeed 1 second of offset between messages (1 second because of the -r 1
in rostopic pub), displayed as a negative value because the message stamp is behind the current timestamp.
If you fill the stamp with 'now' value every 1 second, the duration will be -1 secs everytime.