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

Revision history [back]

On Melodic the time has to come before the duration:

ros::Time t1 = beginTime + delta_t;
ros::Time t2 = t1 + delta_t;

The other post says the code is untested, so the ordering requirement may or may not have changed.

On Melodic the time has to come before the duration:

ros::Time t1 = beginTime + delta_t;
ros::Time t2 = t1 + delta_t;

http://wiki.ros.org/roscpp/Overview/Time#Time_and_Duration_Arithmetic shows the proper order (but doesn't say the opposite won't work).

The other post says the code is untested, so the ordering requirement may or may not have changed.

On Melodic the time has to come before the duration:

ros::Time t1 = beginTime + delta_t;
ros::Time t2 = t1 + delta_t;

http://wiki.ros.org/roscpp/Overview/Time#Time_and_Duration_Arithmetic shows the proper order (but doesn't say the opposite won't work).

The other post says the code is untested, so the ordering requirement may or may not have changed.

(Update- I fixed the other post to have the correct time + duration ordering)