How to open plugin when start RVIZ

asked 2022-04-03 12:46:56 -0500

Peisen Wong gravatar image

updated 2022-04-17 10:51:37 -0500

lucasw gravatar image

I have recently created a panel plugin in rviz, everything is working good but i just wonder is there a way to open the panel directly when i launch the rviz file? Because I currently can only open the panel through "add new panel" icon in rviz. Thx for ur help!

PS: My panel.cpp and panel.h is quite messy and long, i am not sure i should attach it here or not because it is working good. Notify me to upload the file if required. Just wondering is there a way to let the panel jump out initially when i launch the file. I considered about the launch file before but it seems not the solution.

edit retag flag offensive close merge delete

Comments

1

If you save out an .rviz config file after adding the panel and reload it, does it have your panel? If that works you can pass the .rviz file as an argument to rviz from a launch file or command line.

lucasw gravatar image lucasw  ( 2022-04-17 10:52:31 -0500 )edit

@lucasw the way you suggest is passing the -d flag and the path for the .rviz file right? Or is there also another way?

shrini96 gravatar image shrini96  ( 2022-07-13 04:35:01 -0500 )edit
1

Yes the -dflag with an .rviz file is what I was suggesting. There is another way but is much more work: create a standalone application that loads rviz and the plugin through C++ using librviz https://github.com/ros-visualization/... loads the plugin "rviz/Grid" but it could be any plugin (test it in regular rviz first of course, don't go straight to librviz)

lucasw gravatar image lucasw  ( 2022-07-13 08:05:52 -0500 )edit

Thanks a lot.

shrini96 gravatar image shrini96  ( 2022-07-13 09:13:17 -0500 )edit