Home | Tutorials | Wiki | Issues
Ask Your Question

Make gazebo camera ignore certain objects

asked 2015-01-23 01:57:54 -0500

tropic gravatar image

I have a robot model with a camera in gazebo. The camera is observing the world but some objects I would like the camera to ignore so they are not captured in the image output.

Is it possible to have a gazebo camera ignore certain objects e.g. perceive them as transparent or black e.g. by giving the objects a specific prefix in their name or something else?

edit retag flag offensive close merge delete


This can be done but it will affect the whole rendering of the object, not only in the camera. If you then want to see the collision you can do so from the client

AndreiHaidu gravatar imageAndreiHaidu ( 2015-01-23 09:23:02 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-01-26 11:45:52 -0500

nkoenig gravatar image

You'll have to write a plugin that modifies a visual's visibility flags. Here is the relevant API call. You should use GZ_VISIBILITY_GUI, which will cause a visual to draw in the GUI but not in a camera sensor.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-01-23 01:57:54 -0500

Seen: 725 times

Last updated: Jan 26 '15