0
$\begingroup$

Rosanswers logo

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.


Originally posted by aland_t on ROS Answers with karma: 107 on 2014-01-30

Post score: 1


Original comments

Comment by aland_t on 2014-01-30:
I'm running groovy on Ubuntu 12.04 if that helps.

Comment by ahendrix on 2014-01-30:
Have you set your script as executable? Try chmod +x /home/alan/catkin_ws/src/rqt_mypkg/src/rqt_mypkg

Comment by aland_t on 2014-01-31:
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.

Comment by aland_t on 2014-01-31:
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.

Comment by 130s on 2014-02-02:
@atland_t you can modify your post to paste the error you got.

Comment by Dorian Scholz on 2014-09-12:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by Wolf with karma: 7555 on 2014-09-05

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Dirk Thomas on 2014-09-05:
The standalone argument should contain the fully qualified name: like in https://github.com/ros-visualization/rqt_common_plugins/blob/5f0d4e6f9aa31f14e35754b056c35a3e673e065b/rqt_graph/scripts/rqt_graph#L8

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.