0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by NikolasE on Gazebo Answers with karma: 13 on 2015-10-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

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.


Originally posted by chapulina with karma: 7504 on 2015-10-13

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by NikolasE on 2015-10-13:
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?

Comment by chapulina on 2015-10-13:
I think you'll need to create a plugin.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.