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

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 http://wiki.ros.org/Clock. 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....

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 http://wiki.ros.org/Clock. 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!