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

Get the current time

asked 2015-10-21 03:57:59 -0600

commandos23 gravatar image

How can I get current time in ros, because I want to have two dimensional array, one dimension would be int, another current time, and I want to have function and loop which will go through array, and keep one int value for some exact period of time, for ex. 60sec number will be 100, then next 80sec number will be 80 etc. p.s. sorry for bad tags

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-10-21 05:24:25 -0600

gvdhoorn gravatar image

From wiki/roscpp/Overview/Time - Getting the Current Time:


Get the current time as a ros::Time instance:

ros::Time begin = ros::Time::now();

via Google: "ros get current time"

edit flag offensive delete link more

Question Tools



Asked: 2015-10-21 03:57:59 -0600

Seen: 3,382 times

Last updated: Oct 21 '15