Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

'world' is protected, how do I get a pointer?

Hi, super dumb question... I'm writing a sensor plugin and I need access to SimTime(). How do I get a pointer to the world object? I see it in API (include/gazebo-9/gazebo/sensors/Sensor.hh) but it's protected.

'world' is protected, how do I get a pointer?

Hi, super dumb question... I'm writing a sensor plugin (subclass SensorPlugin) that wraps an Altimeter sensor and I need access to SimTime(). How do I get a pointer to the world object? object to call SimTime()? I see it in the sensor API (include/gazebo-9/gazebo/sensors/Sensor.hh) but it's protected.protected. Is there some magic global variable that I'm missing?