Gazebo | Ignition | Community
Ask Your Question
0

How to get sim time in ignition gazebo

asked 2021-01-05 23:50:01 -0500

nlamprian gravatar image

Is it possible to get the sim time outside of the update callbacks in ignition gazebo? Ie is there an equivalent of physics::World::SimTime()?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-01-07 13:41:39 -0500

chapulina gravatar image

You could subscribe to the /clock topic. Otherwise, you can get it during an update and store at a local variable.

SimTime was kept out of ignition::gazebo::World on purpose, so users would get it from the update callbacks. More info on this tutorial.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2021-01-05 23:50:01 -0500

Seen: 120 times

Last updated: Jan 07