How to implement menus with rviz plugins?

asked 2021-02-03 04:35:02 -0500

Kansai gravatar image

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:

  1. Is implementing an interactive menu inside a plugin a good (or feasable) idea?
  2. 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.

edit retag flag offensive close merge delete