Rviz open panel through plugin tool
Hi,
I am currently developing a rviz plugin tool (myTool, inherited from rviz::Tool) and a rviz panel (myPanel, inherited from rviz::Panel). They come together, so I want to open myPanel as soon as myTool is added to the tool bar in rviz. But I couldn't find a way to do it.
I am able to achieve the reverse. i.e. when I add myPanel through menu option in rviz, myTool is automatically added into the tool bar in rviz. This is done by the following code in myPanel.cpp
vis_manager_->getToolManager()->addTool("myTool");
It would be nice if there is a similar way to open myPanel through code in myTool.cpp.
Or maybe there's a more elegant way to do this?
Thanks!