Rviz_Plugin: Add InteractiveMarkerDisplay to displayGroup programmatically

asked 2016-12-12 11:07:46 -0500

Equanox gravatar image

I'm writing a rviz plugin and would like to have InteractiveMarkers grouped together. I can add it to my rviz::Display using.

this->addChild(m_interactiveMarkerDisplay);

But i rather like to add rviz::InteractiveMarkerDisplay to a rviz::displayGroup object.

void MyRvizDisplay::onInitialize()
{
  m_interactiveMarkerDisplay->initialize( context_ );
  m_displayGroup->initialize(context_);

  this->addChild(m_displayGroup);

  m_displayGroup->addChild(m_interactiveMarkerDisplay);
}

Though, the InteractiveMarkerDisplay does not appear as child element. Maybe i'm missing some initialization on the m_interactiveMarkerDisplay object?

There is also a

m_displayGroup->addDisplay(m_interactiveMarkerDisplay);

method. But here i get a SegFault.

Thanks for your help.

edit retag flag offensive close merge delete