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

Get the current time

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

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
3

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

gvdhoorn gravatar image

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

ros::Time::now()

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

2 followers

Stats

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

Seen: 3,519 times

Last updated: Oct 21 '15