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

install rqt plugin with rosbuild

asked 2013-06-21 03:32:52 -0500

Daniel Robin Reuter gravatar image

updated 2013-06-21 04:31:26 -0500

130s gravatar image


I am currently trying to write a plugin for rqt. But we are using fuerte in our project, which means that we can not use catkin. I followed the tutorial (sorry that I could not provide the link, but this program gave an error that I have not enough karma to post links) until the point were I need to install the plugin because it is not explained how to do this in rosbuild. Has anyone done that before and could tell me how to do this?


Daniel Reuter

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-06-23 23:16:24 -0500

Daniel Robin Reuter gravatar image

After some search in the rqt_rviz package I finally was able to let rqt_gui detect my C++ plugin. I will try to describe what I needed to do (those things are only useful for c++ plugins) and what sometimes really confused me (correct me if I got something wrong, I will use the package name rqt_something and the classes name will be MyGUIClass):

  • The package name (rqt_something) must also be the namespace (rqt_something::MyGUIClass)
  • In the plugin.xml the very first line must be changed to <library path="lib/librqt_something">
  • The second line does also differ from the example (because we are using c++)

    <class name="rqt_seneka/MyGUIClass" type="rqt_something::MyGUIClass" base_class_type="rqt_gui_cpp::Plugin">

  • You must add the following lines in the CMakeLists.txt before the rosbuild_add_library and after invoking the moc:

    rosbuild_include(pluginlib hide_plugin_symbols)

    pluginlib_hide_plugin_symbols(rqt_something MyGUIClass)

This should work with the example code from the (C++ specific tutorial). If you want to use a .ui file (in this case myguiclass_widget.ui) you should put in in the resource folder and add the following lines to your CMakeLists.txt:

qt_wrap_ui(ui_MyGUIClass ui_MyGUIClass_HDRS ui_MyGUIClass_SRCS resource/myguiclass_widget.ui)


#Here comes the moc-part

#Add ${ui_MyGUIClass_HDRS} to the sources of the library as done in this example
rosbuild_add_library(${PROJECT_NAME} ${rqt_something_SRCS} ${rqt_something_MOCS} ${ui_MyGUIClass_HDRS})

I hope I did not forget anything. Maybe somebody could link to this question in the tutorials.

edit flag offensive delete link more


@Daniel Robin Reuter I'm glad that you figured it out! I added a link here to this QA thread. Also, please consider "upvote" other answers if they helped you ;)

130s gravatar image 130s  ( 2013-06-24 19:54:22 -0500 )edit

What if we are using python plugins?

goshawk gravatar image goshawk  ( 2014-07-15 11:59:17 -0500 )edit

@goshawk if you are using python you should not have any problems. If you experience any problems don't hesitate on asking me :)

Daniel Robin Reuter gravatar image Daniel Robin Reuter  ( 2014-07-15 12:38:02 -0500 )edit

@Daniel Robin Reuter I made my rqt plugin using python & QT designer to build my .ui. The only problem is that I can't see the first instance of the plugin even though it shows it as running under the running tab. But when I launch another one I can see the plugin and I can close the first instance.

goshawk gravatar image goshawk  ( 2014-08-01 16:37:40 -0500 )edit

@goshawk Could you please open a new question and provide the console output?

Daniel Robin Reuter gravatar image Daniel Robin Reuter  ( 2014-08-04 04:35:46 -0500 )edit

answered 2013-06-21 07:06:40 -0500

130s gravatar image

updated 2013-06-21 08:24:17 -0500

You can refer to many rqt plugins in fuerte branch as examples (note all plugins reside in rqt stack - there weren't separate stack/metapackage for rqt plugins then). Except for rqt_image_view and rqt_rviz that are written in C++, all others are implemented in python.

Although I haven't tested, you probably don't even need to build your rqt plugins if they are written in python and not doing "special". In that case all you need is to export your plugins to plugin loader of pluginlib that's done by following:

  • export tag in manifest.xml that refers to plugin.xml
  • plugin.xml

The only difference between catkinized rqt plugin and rosbuild one in terms of rqt is CMakeLists.txt (note that the general difference between rosbuilt and catkin packages is valid too). And the simplest CMakeLists.txt among those plugins looks like this:

cmake_minimum_required(VERSION 2.4.6)

You might be aware that rqt isn't fully available on fuerte, or at least the development and support is not active for it. So I'm sorry that the documentation will be unlikely done for fuerte. Ask further if anything is unclear but those examples should give much insight.

edit flag offensive delete link more


Thank you for your answer. I will search for the answer in the fuerte branch tomorrow. What I was worried about was the part were the plugin gets installed because it gets installed to paths defined in catkin. I was able to compile the plugin and got a static library but rqt_gui did not find it.

Daniel Robin Reuter gravatar image Daniel Robin Reuter  ( 2013-06-23 09:58:17 -0500 )edit

@Daniel Robin Reuter you compiled your rqt plugin on fuerte by rosmake right?

130s gravatar image 130s  ( 2013-06-23 15:00:19 -0500 )edit

Question Tools

1 follower


Asked: 2013-06-21 03:32:52 -0500

Seen: 1,766 times

Last updated: Jun 23 '13