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

Close Rqt Plugin from a button

asked 2017-02-24 15:42:49 -0500

Kuro9206 gravatar image

Hello everyone

I want to know how I can close my rqt plugin when I push a button on it.

I tried with exit(0) but it close the plugin like if it was an error in a thread (My plugin doesn't use threads) and the last thing I tried was widget.close() but this one close the widget but rqt main window continues running.

I will appreciate any help.Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-02-24 16:11:46 -0500

Dirk Thomas gravatar image

You might want to try calling the method shutdown_plugin on the plugin instance.

edit flag offensive delete link more

Comments

Hello Dirk Thomas I connect the button with shutdown_plugin() but it doesn't work. Freeze the plugin and seconds later the terminal show the following [FATAL] [1487975743.765361534]: ASSERTION FAILED file = /opt/ros/indigo/include/ros/publisher.h line = 102 cond = false message = [FATAL] [..]..

Kuro9206 gravatar image Kuro9206  ( 2017-02-24 16:42:41 -0500 )edit

Since the error message is truncated I can't say much but it looks a lot like that your plugin is actually trying to close but does something wrong during that. Maybe it doesn't close all handles correctly?

Dirk Thomas gravatar image Dirk Thomas  ( 2017-02-24 17:01:36 -0500 )edit

Hello Dirk Thomas, I remove the subscribers in the shutdown function and it works. Thank you for your help

Kuro9206 gravatar image Kuro9206  ( 2017-02-27 14:43:44 -0500 )edit

Great, please mark the answer as "correct" so that others can easily find the question / answer.

Dirk Thomas gravatar image Dirk Thomas  ( 2017-02-27 15:00:08 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2017-02-24 15:42:49 -0500

Seen: 794 times

Last updated: Feb 24 '17