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

Revision history [back]

click to hide/show revision 1
initial version

As far as I know the built-in rqt_reconfigure (the gui for dynamic reconfigure) only really has support for sliders (and maybe pull down menus and check boxes but I'm not sure).

But, you don't have to limit yourself to using rqt or even dynamic reconfigure. You can really use ROS with any GUI library you like (C++ or Python ones will be easiest of course).

For example, if you use python, you can use TkInter (the easiest Python GUI library in my opinion/experience, also it ships with Python by default most of the time) and make the callback for the button press publish a message to a topic.

Here is a quick example of a Tkinter button:

from Tkinter import *

master = Tk()

def callback():
    print "click!"

b = Button(master, text="OK", command=callback)  
b.pack()

mainloop()

You would just make the callback function publish a ROS message instead of printing "click!". More info about Tkinter buttons can be found here.