ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

rqt gui plugin cpp save and restore settings

asked 2016-08-05 17:24:47 -0500

2ROS0 gravatar image


I am in the process of writing a plugin for rqt in C++ (yes, I did read the note that highly recommended writing in python) but I have other reasons for writing this in C++.

I'm using the rqt_image_view plugin as a reference. I noticed a couple of functions saveSettings and restoreSettings. The former saves all current values from the GUI into a qt_gui_cpp::Settings object and the latter sets the GUI with values from a Settings object.

I am not sure why these particular functions would be called? I tracked it back to the plugin_bridge.cpp file in the qt_gui_cpp. I'm still not sure as a plugin developer, for rqt, why would I need these functions - what state am I trying to save and restore?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-09-09 21:47:37 -0500

130s gravatar image

I've written a good amount of rqt tutorials but just realized that there's not much info on these 2 methods.

When you run a GUI, close, and re-open, a lot of times you want to resume the configuration from the last run (e.g. value in the pulldown menu, pane size etc.) In these 2 methods you can specify what components restore the config from the last run (in other words, no config gets restored unless defined in these 2 methods, and the GUI always start with default config).

edit flag offensive delete link more


What do you mean by "the next run"? Where are the parameters stored in between runs. Does the software close and restart between runs? Thanks

2ROS0 gravatar image 2ROS0  ( 2016-09-23 00:18:53 -0500 )edit

This thread may help you.

130s gravatar image 130s  ( 2016-09-23 03:37:30 -0500 )edit

Question Tools

1 follower


Asked: 2016-08-05 17:24:47 -0500

Seen: 853 times

Last updated: Sep 09 '16