Gazebo | Ignition | Community
Ask Your Question
0

Meaning of visibility Flags

asked 2015-10-13 07:00:45 -0600

NikolasE gravatar image

updated 2015-10-13 07:49:14 -0600

Hello!

I'd like to see the endpoints of laserscanner in a camera to simulate a line laser attached to my robot. The laser is however only visible in the gazebo-GUI, but not in a simulated camera image.

I had a look around and found the LaserVisual.cc ( https://bitbucket.org/osrf/gazebo/src/439c127c6f494d8208b082c8832610ea2f67ce8c/gazebo/rendering/LaserVisual.cc?at=default&fileviewer=file-view-default ) which looks as if it is responsible for drawing the visualization of the laser scan.

My main finding was this line

this->SetVisibilityFlags(GZ_VISIBILITY_GUI);

that looks as if it is used to select who can see this visualization. Before I start to recompile the whole gazebo, I'd like to ask if it would be enough to set this flag to GZ_VISIBILITY_ALL to get the cameras to see the laser visualization.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-10-13 07:42:15 -0600

chapulina gravatar image

The short answer is that should work. For a reference, this is the visibility mask for cameras:

this->viewport->setVisibilityMask(GZ_VISIBILITY_ALL &
    ~(GZ_VISIBILITY_GUI | GZ_VISIBILITY_SELECTABLE));

You could also try to change the visibility mask of your camera instead of the flags for the visual.

edit flag offensive delete link more

Comments

Thanks! Is it possible to change the mask of the camera or the laser via parameters? Or do I really have to create my own plugin?

NikolasE gravatar imageNikolasE ( 2015-10-13 07:48:07 -0600 )edit

I think you'll need to create a plugin.

chapulina gravatar imagechapulina ( 2015-10-13 16:53:05 -0600 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-10-13 07:00:45 -0600

Seen: 730 times

Last updated: Oct 13 '15