To compensate for @felix k's answer, rqt
saves so-called perspective
when it's run on rqt_gui
and closed. (I just found that it's not documented) things that are saved include:
- plugins opened
- plugins' size and positions within the container window (
rqt_gui
)
rqt_gui
's size and position with respect to the computer's desktop
To run rqt_gui
, you just run:
$ rqt (Groovy and later)
$ rosrun rqt_gui rqt_gui (Fuerte)
Running rqt_gui
is the recommended usage of rqt
, although you can run each rqt
plugin individually.
In response to the RViz
example in your question, rqt_gui
does NOT save the configuration of each plugins as I listed above; instead it's up to how each plugin is implemented. And the feature of rqt
variant of Rviz
, rqt_rviz, is the same with what RViz
has, because rqt_rviz
embeds RViz
, which doesn't save the .config
file that was used the last time (if I remember correctly). You can open an enhancement request here.
Originally posted by 130s with karma: 10937 on 2013-06-20
This answer was ACCEPTED on the original site
Post score: 3
Original comments
Comment by da-na on 2013-06-20:
thank you IsaacSaito for your detailed answer :)
Comment by Dirk Thomas on 2013-06-22:
Actually every plugin can save its intrinsic state and restore it again. Some plugins store things like checked checkboxes and values of input fields. rqt_publisher e.g. restores the list of message types to be published to reuse the once setup publishers.
Comment by cshannon on 2015-10-11:
Hi Dirk. Would you be able to briefly describe the procedure for saving the intrinsic state (specifically the config) of an Rviz plugin? Thank you very much for your time.
Comment by Dirk Thomas on 2015-10-12:
Every plugin can persist information through these two callbacks: https://github.com/ros-visualization/qt_gui_core/blob/1eaff5a7586e78ec4f5bf501d9a3172a5da07b06/qt_gui/src/qt_gui/plugin.py#L50-L68
Comment by Dirk Thomas on 2015-10-12:
The rqt_rviz
plugin would need to implement those order to store / restore information.
Comment by cshannon on 2015-10-12:
Thank you!
Comment by cshannon on 2015-11-01:
Hi Dirk, can you please let me know the file/file location in which to place the two callbacks for the rqt_rviz plugin? I'm not finding an rviz.cpp file. Thanks again.
Comment by Dirk Thomas on 2015-11-01:
https://github.com/ros-visualization/rqt_robot_plugins/blob/master/rqt_rviz/src/rqt_rviz/rviz.cpp
Comment by 2ROS0 on 2016-08-16:
Where does it save the default perspective? I can't seem to find it. But it does save it for sure because restarting rqt returns to the state it was exited in.
Comment by 130s on 2016-08-17:
@2ROS0 http://answers.ros.org/question/53721/set-rqt_gui-perspectives-from-command-line/?answer=53746#post-id-53746