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

These two options represent the same time. In code, you should definitely use ros::Time::now(). It will get you the current ROS time that is being published to /clock without most of the overhead involved with subscribing to the topic yourself. Plus, it looks a lot better in your code.