Home | Tutorials | Wiki | Issues
Ask Your Question
0

How can I activate/deactivate sensors in Gazebo?

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

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
1

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

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

Stats

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

Seen: 519 times

Last updated: Aug 21 '15