# Rviz_Plugin: Add InteractiveMarkerDisplay to displayGroup programmatically

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_);

}


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.