Gazebo | Ignition | Community
Ask Your Question

Querying simulation time in a plugin

asked 2013-04-07 23:14:38 -0500

walkerbrianpatrick gravatar image

Hello, New to Gazebo, and I am trying to check the simulation time as part of my robot operation. Any advice on how to get started?

I have tried creating a common::Time object, which can get the wall time, but it doesn't have access to simulation time.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-10 16:14:32 -0500

nkoenig gravatar image


A plugin can access the World, which has a GetSimTime() function:

You can also subscribe to ~/world_stats which publishes messages of type WorldStatistics:

edit flag offensive delete link more

Question Tools


Asked: 2013-04-07 23:14:38 -0500

Seen: 1,956 times

Last updated: Apr 10 '13