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

rqt cpp plugin won't load

asked 2012-12-04 04:20:36 -0600

Chuck Claunch gravatar image

updated 2012-12-04 10:29:25 -0600

I've been attempting to create a cpp plugin for rqt and am having trouble. I managed to create a base plugin and in trying to get ros messages to the plugin, my callback never gets called. That being said, I decided to go back to the tutorial (tried to post a link to it but failed) and build the complete basic plugin from scratch and just add a subscriber. Upon doing that I cannot get rqt to load the plugin. It shows in the plugins list but is not clickable (suggests I need to build it). I copied the code verbatim from the tutorial (although not positive if the CMakeLists.txt I did is correct or not) and it builds a library file. I'd really like to make the sample tutorial work as I'm not certain how my other plugin is working but the sample isn't. Any ideas or suggestions would be appreciated.

Update: So we found the issue, apparently the rqt_gui cpp architecture is not calling any kind of rosspin() so that's why the callback isn't happening. Does this mean any C++ based rqt plugin will have to handle and thread its own rosspin()?

edit retag flag offensive close merge delete

Comments

What OS, version of ROS (Fuerte/Groovy etc.) btw?

130s gravatar image 130s  ( 2012-12-04 22:40:22 -0600 )edit

It's Ubuntu 12.04 and Fuerte.

Chuck Claunch gravatar image Chuck Claunch  ( 2012-12-05 04:18:07 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-12-05 04:19:09 -0600

Chuck Claunch gravatar image

So it turns out it was really just me not understanding that I needed to do a rosspin to get the callbacks to run. So I set up a timer in Qt and ran the spinOnce() function inside that to get my stuff running. It works now!

edit flag offensive delete link more

Comments

1

Actually you do not need to call any spin() function since rqt plugins are realized as nodelets which do that for you. Please provide more info about your plugin to find out why it does not work for you.

Dirk Thomas gravatar image Dirk Thomas  ( 2012-12-05 05:58:13 -0600 )edit

Hi, im having the same issue on groovy. Tried the tutorials and did rosmake my_package. However, when I run rqt, I cannot click on "My first C++ plugin".

aswin gravatar image aswin  ( 2013-01-23 15:45:05 -0600 )edit

Question Tools

Stats

Asked: 2012-12-04 04:20:36 -0600

Seen: 668 times

Last updated: Dec 05 '12