Gazebo | Ignition | Community
Ask Your Question

How can I activate/deactivate sensors in Gazebo?

asked 2015-08-20 19:55:26 -0600

Neil Traft gravatar image

Is it possible, from ROS, to send a message to Gazebo to turn on/off a sensor by name?

Peeking at the source code, I see the sensors themselves have a setActive(bool) function. Is there an existing way to access this via messages, or would I need to write my own SensorPlugin?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-08-21 09:57:42 -0600

nkoenig gravatar image

A sensor will turn off when the <always_on> SDF element is false, and there are no subscribers to the sensor's output stream.

If you want to control a sensor, then you'll have to write a sensor plugin.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-08-20 19:55:26 -0600

Seen: 762 times

Last updated: Aug 21 '15