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

How does rospy.get_time() work? Does it repeat if I restart roscore?

asked 2017-03-10 21:49:20 -0500

Joy16 gravatar image

I am trying to collect data of different images and store them under the name as rospy.get_time(). I want to know if I stop collecting this data and restart it later, is there a chance that I will be getting the same rospy.get_time()?

How does the rospy.get_time() work? Is it based on wall clock time( and I am assuming that it is my PC's time)? Why does it always start with "14xxxxxx.xxx".

Please clarify! Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-03-11 04:20:54 -0500

gvdhoorn gravatar image

updated 2017-03-11 04:22:19 -0500

Is it based on wall clock time

If you don't set use_sim_time, then: yes.

Why does it always start with "14xxxxxx.xxx".

Because it is a unix timestamp which is just an integer representing "the number of seconds that have elapsed since 00:00:00 Coordinated Universal Time (UTC), Thursday, 1 January 1970" (wikipedia/unix_timestamp).

Everything after 1400000000 is any point in time after 2014-05-13T16:53:20+00:00 (converted here).

Finally, see wiki/Clock for some more info.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-10 21:49:20 -0500

Seen: 1,952 times

Last updated: Mar 11 '17