Robotics StackExchange | Archived questions

Can't make visibility flags work properly with Depth Camera

I followed the instructions given here to try to make my model invisible to the DepthCamera. I was able to make it invisible, indeed, setting it's visibility flag to GZVISIBILITYGUI only. However, when I set this flag alone, my model becomes unselectable. Since I still need it to be selectable, I tried to set both flags (GZVISIBILITYGUI | GZVISIBILITYSELECTABLE), but when I do that, my model becomes VISIBLE.

I have a simple Visual plugin to see these flags when loading the model:

#include "gztarget_vplugin.hh"
using namespace gazebo;

GZ_REGISTER_VISUAL_PLUGIN(TargetVisual)

void TargetVisual::Load(rendering::VisualPtr _parent, sdf::ElementPtr /*_sdf*/)
{
    this->visual = _parent;
    this->visual->SetVisibilityFlags(GZ_VISIBILITY_GUI | GZ_VISIBILITY_SELECTABLE);
}

I've just started playing with Gazebo, so I'm afraid I'm doing something wrong. Does anyone have any clue of why that is happening? Thanks.

Asked by guiccbr on 2016-04-25 19:25:51 UTC

Comments

Answers