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

Get feedback from custom rqt gui interaction made with C++

asked 2018-12-14 08:04:16 -0600

Kluun gravatar image

Hello,

I am trying to make a GUI for a project. The idea behind this is, that there are a view buttons and multiple text inputs. Dependent on what button the user pressed, an action will be taken, with the text input values. I use the rqt software frame and C++ program language to make a plugin. My system is a ubuntu 16.04LTS with ROS kinetic.

I followed the tutorial steps from http://wiki.ros.org/rqt/Tutorials/Wri... and the plugin is show-able in the rqt menu. I can open it wen roscore is active, with rqt command in the terminal.

The problem i got is, i don't know how to get a reaction from the buttons. I tried to make a function with the name on_ButtonA_clicked() (same type of function used in Qt program), but nothing happened. I looked at the examples linked in the rqt tutorials wiki page, but i that does not give me a clear solution.

Does anyone know how to make a function that reaction of a button press from the GUI or something comparable?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-22 02:43:29 -0600

Kluun gravatar image

Found my problem I did not use connect, signal and slot command.

To connect a button interaction with C++ a connection signal and slot command is required. Something like connect(ui_.button, SIGNAL(clicked()), this, SLOT(Load_object()));. The connection part connect the button with the action, signal set the type of trigger (this example it is a action wen clicked) and slot select the function, that will be activated.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-12-14 08:04:16 -0600

Seen: 395 times

Last updated: Jan 22 '19