How to implement menus with rviz plugins?
I would like to ask for a bit of guidance regarding working with Rviz.
My ultimate objective is to implement a menu in Rviz to be interactive with my main program.
I have already accomplished that, following the Rviz Tutorials on Interactive Markers. I am not sure completely what the InteractiveMarkerServer is but I could accomplish having a menu that affected other parts of my code.
I have also accomplished to follow the first two tutorials on Rviz Plugins. So I could see a marker displaying data from a Topic and also a Panel that could send topics.
Now, even though I have already implemented the menu, I am wondering if I can create a Rviz Plugin that contains a Menu inside. And I would like to ask:
- Is implementing an interactive menu inside a plugin a good (or feasable) idea?
If it is, should I go for :
2.1 Putting an InteractiveMarkerServer inside a rviz::Display subclass? 2.2 Putting somehow a menu inside a rviz::Panel. (And if so, how ?)
2.3 Implementing a rviz::Tool (as the tutorial I haven't tried yet)
I am hoping to dedicate all day tomorrow to implement this, so I will appreciate some guidance on how to proceed.