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

time stamp ros_info

asked 2014-09-30 10:06:45 -0600

hvn gravatar image


I've been using ROS_INFO instead of printf, and wonder which time is being printed. The time being printed at start is 5.339. I can't imagine this is system time, so what is it and which standard is it in? (seconds, milliseconds).


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-30 10:47:26 -0600

Wolf gravatar image

updated 2014-09-30 14:19:44 -0600

Are you using Gazebo and your node with use_sim_time set true?

The ros:Time API wraps the system Time so that in simulation Nodes can use the sim time of the /clock topic as their ros::Time, see . Source of the sim time maybe rosbags or simulators like Gazebo. If your simulation is been active for approx. 5 sec, this time in your ROS_INFO log would be senseful....

Edit: If you start gazebo it sets the parameter use_sim_time true; you can see it beeing true by command line:

rosparam get /use_sim_time

Because it is true each node started after gazebo will not use system time as ros time but the simulation time published to clock topic. You can see the clock topic being published with:

rostopic echo /clock

This means each attempt to retrieve ros::Time in your nodes will result in the simulation time, not system time! Therefore your logs will be stamped with the simulation time!

edit flag offensive delete link more


I am using Gazebo, but not use_sim_time. So what does that mean for me ? In addition: the start time was 5.339 and the end time was 12.54.

hvn gravatar image hvn  ( 2014-09-30 11:30:49 -0600 )edit

Please see the edit

Wolf gravatar image Wolf  ( 2014-09-30 14:20:00 -0600 )edit

Thank you for the edit. Can you tell me in what units the simulation time is (us, ms, s ?)

hvn gravatar image hvn  ( 2014-09-30 15:19:40 -0600 )edit

Time is in seconds: Standard units are expressed in REP 103

tfoote gravatar image tfoote  ( 2014-09-30 19:20:56 -0600 )edit

Question Tools

1 follower


Asked: 2014-09-30 10:06:45 -0600

Seen: 3,854 times

Last updated: Sep 30 '14