Ask Your Question
1

How to run a newly created rqt plugin?

asked 2014-01-30 05:59:18 -0600

aland_t gravatar image

updated 2015-05-27 12:17:01 -0600

I am trying to create an plugin for rqt. So far I have followed the tutorial "rqt/Tutorials/Create your new rqt plugin" on the ROS wiki exactly, but when I type "rosrun rqt_mypkg rqt_mypkg" I get the following message:

Couldn't find executable named rqt_mypkg below /home/alan/catkin_ws/src/rqt_mypkg
Found the following, but they're either not files, or not executables:
 /home/alan/catkin_ws/src/rqt_mypkg
 /home/alan/catkin_ws/src/rqt_mypkg/src/rqt_mypkg

I have no idea what is wrong. Please help.

edit retag flag offensive close merge delete

Comments

I'm running groovy on Ubuntu 12.04 if that helps.

aland_t gravatar imagealand_t ( 2014-01-30 06:01:21 -0600 )edit

Have you set your script as executable? Try chmod +x /home/alan/catkin_ws/src/rqt_mypkg/src/rqt_mypkg

ahendrix gravatar imageahendrix ( 2014-01-30 07:30:57 -0600 )edit

I tried this, but I received the message "chmod could not access" ...."No such file or directory". However, I did not notice this before, but if I run "rqt" the default rqt gui comes up. My plugin is listed under the Plugins tab. It throws a lot of errors when I click it though.

aland_t gravatar imagealand_t ( 2014-01-31 03:50:13 -0600 )edit
1

Ok, I have the plugin working if I just run "rqt" and open it from the plugins menu. "rosrun rqt_mypkg rqt_mypkg" still does not work.

aland_t gravatar imagealand_t ( 2014-01-31 04:52:07 -0600 )edit

@atland_t you can modify your post to paste the error you got.

130s gravatar image130s ( 2014-02-02 22:16:13 -0600 )edit

Can you change the title of this question to "how to run a newly created rqt plugin". The Answer of "Wolf" is correct, so you can close this afterwards. I also updated the tutorial to avoid this issue.

Dorian Scholz gravatar imageDorian Scholz ( 2014-09-12 08:38:05 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2014-09-05 01:24:48 -0600

Wolf gravatar image

updated 2014-09-09 01:12:56 -0600

You need to put a phyton script like the following into your package rqt_mypkg and name it after the package rqt_mypkg:

#!/usr/bin/env python

import sys

from rqt_gui.main import Main

main = Main()
sys.exit(main.main(sys.argv, standalone='rqt_mypkg'))

Now you can run you rosrun rqt_mypkg rqt_mypkg in oder for starting your plugin stand-alone, i. e. independent from rqt_gui; otherwise, you may want to load your plugin into rqt_gui....

Note, that the script file also needs to be executable; Maybe you need to run chmod +x rqt_mypkg in the folder where you have placed the rqt_mypkg script file. E. g. for an error msg like:

Couldn't find executable named rqt_mypkg below /home/alan/catkin_ws/src/rqt_mypkg
Found the following, but they're either not files, or not executables:
 /home/alan/catkin_ws/src/rqt_mypkg
 /home/alan/catkin_ws/src/rqt_mypkg/src/rqt_mypkg

go into the folder where the python script is placed in:

cd /home/alan/catkin_ws/src/rqt_mypkg/src/

and run there:

chmod +x rqt_mypkg
edit flag offensive delete link more

Comments

The standalone argument should contain the fully qualified name: like in https://github.com/ros-visualization/...

Dirk Thomas gravatar imageDirk Thomas ( 2014-09-05 11:19:55 -0600 )edit
0

answered 2014-09-04 16:01:16 -0600

updated 2014-09-08 18:53:44 -0600

130s gravatar image

I think that I have the same problems after following the tutorials of rqt

$ rosrun rqt_mypkg rqt_mypkg

[rosrun] Couldn't find executable named rqt_mypkg below /home/lili/catkin_ws/src/rqt_mypkg
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /home/lili/catkin_ws/src/rqt_mypkg
[rosrun]   /home/lili/catkin_ws/src/rqt_mypkg/build/devel/share/rqt_mypkg
[rosrun]   /home/lili/catkin_ws/src/rqt_mypkg/build/devel/lib/python2.7/dist-packages/rqt_mypkg
[rosrun]   /home/lili/catkin_ws/src/rqt_mypkg/build/catkin_generated/stamps/rqt_mypkg
edit flag offensive delete link more

Comments

2

Your post isn't an answer. Would you feel like opening a new question so that we can help?

130s gravatar image130s ( 2014-09-08 19:08:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2014-01-30 05:59:18 -0600

Seen: 1,877 times

Last updated: May 27 '15