Rosrun can't find osrf_gear on kinetic, Ubuntu 16.04

I get the following error attempting to run per the instructions on the wiki:

rosrun osrf_gear gear.py -f `catkin_find --share osrf_gear`/config/comp_conf2.yaml ~/helloworld_ws/src/ariac_example/config/sample_gear_conf.yaml -o /tmp
[rospack] Error: package 'osrf_gear' not found

I have build osrf_gear from source. Here is the output of rospack profile after I source the setup.bash file in my ariac workspace cloned from bitbucket:

$ rospack profile                                                                                                                                                                       
Full tree crawl took 0.010773 seconds.
Directories marked with (*) contain no manifest.  You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only
-------------------------------------------------------------
0.009860   /opt/ros/kinetic/share
0.000401   /home/dheater/src/ariac_ws/src
0.000171 * /opt/ros/kinetic/share/OpenCV-3.1.0-dev
0.000029 * /opt/ros/kinetic/share/OpenCV-3.1.0-dev/haarcascades
0.000029 * /opt/ros/kinetic/share/OpenCV-3.1.0-dev/3rdparty
0.000025 * /opt/ros/kinetic/share/doc
0.000010 * /opt/ros/kinetic/share/OpenCV-3.1.0-dev/lbpcascades
0.000005 * /opt/ros/kinetic/share/OpenCV-3.1.0-dev/3rdparty/lib
0.000005 * /opt/ros/kinetic/share/doc/liborocos-kdl

rospack find finds osrf_gear.

$ rospack find osrf_gear
/home/dheater/src/ariac_ws/src/osrf_gear

Hints as to why rosrun can’t seem to find the osrf_gear package?

Hi Daniel,

Can you post the output of catkin_find --share osrf_gear?

$ catkin_find --share osrf_gear
 /home/dheater/src/ariac_ws/devel/share/osrf_gear
 /home/dheater/src/ariac_ws/src/osrf_gear

How did you build our software? It looks like you’re using a “devel space” (see http://www.ros.org/reps/rep-0128.html#development-space). You might try installing and using the install space, as that’s what I did most of my testing with. If there is an issue with the devel space we should fix it, but using the install space might be a good workaround in the meantime.

Yep. I was using the development space. I installed using catkin_make install -DCMAKE_INSTALL_PREFIX=/opt/ros/kinetic and its finding osrf_gear now.

Thanks!

Cool, I’ll open an issue to track the devel space problem:

Also, I’d recommend using a local install location, i.e. simply don’t specify CMAKE_INSTALL_PREFIX and it will default to a folder called install next to the src and build folders.

I don’t recommend installing to /opt, but you can if you know what you’re doing :smile:.