Gazebo | Ignition | Community
Ask Your Question
0

Querying simulation time in a plugin

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

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
1

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

nkoenig gravatar image

Hello,

A plugin can access the World, which has a GetSimTime() function: http://gazebosim.org/api/1.5.0/classgazebo11physics11World.html#ab767393cb972e31d86a3b935e3eed569

You can also subscribe to ~/world_stats which publishes messages of type WorldStatistics: http://gazebosim.org/msgs/1.5.0/world_stats8proto.html

edit flag offensive delete link more

Question Tools

Stats

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

Seen: 1,968 times

Last updated: Apr 10 '13