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

rqt_gui_py.plugin PushButton event error

asked 2013-09-03 01:30:28 -0600

acp gravatar image

updated 2014-12-28 21:07:24 -0600

130s gravatar image

Hi all.

I have designed a very basic gui in QT5 designer. It consists of some pushbuttons. One of them has the quit event (name = quit).

void awc_gui::on_quit_clicked()
{
    qApp->quit();
}

This gui works fine in Qt5, but when I export the .ui file to my ~/catkin_ws/src/rqt_awc/resource$ folder

I can load the plugin in rqt, however the event doest work. I have been taken a look at some examples and I have tried the following in my plugin.py file

   self._widget.quit.click.connect(self._on_quit_click)
   def _on_quit_click(self):
       self._widget.quit.quit()

I open the rqt after I have compiled the package with catkin_make in the catkin working space. Then I get the following error:

 self._widget.quit.click.connect(self._on_quit_click)
                                                 ^
IndentationError: unindent does not match any outer indentation level

To be sincere I have no clue, any help will be appreciate it, and in advance thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-09-03 22:18:21 -0600

acp gravatar image

updated 2013-09-03 22:20:08 -0600

I got it work, I just have followed the plugin example in: https://github.com/ros-visualization/rqt_robot_plugins/blob/hydro-devel/rqt_robot_steering/src/rqt_robot_steering/robot_steering.py The tutorials are good but still they are missing some things, and definitely they can be improved. So as a beginner I recommend to follow the tutorial and use the robot.steering.py as an example and qt designer to create the .ui

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-09-03 01:30:28 -0600

Seen: 330 times

Last updated: Dec 28 '14