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

source devel/setup.bash is still using install space

asked 2016-07-20 20:48:27 -0500

DM2 gravatar image

I'm not quite sure what's happening here. From ~/ros_catkin_ws I do source devel_isolated/setup.bash, but when I use things like rosrun or roslaunch, it uses the install space programs at /opt/ros/indigoeg.

roslaunch scannerbot fileWriter.launch launches it from /opt/ros/indigo/share ... wherever... instead of the devel_isolated space where I clearly want it to launch. This used to work for me (roslaunch would launch things from the devel_isolated space).

Any ideas? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-17 13:14:00 -0500

lucasw gravatar image

updated 2017-03-17 13:24:19 -0500

I ran into this but then tried to reproduce it in a stripped down workspace (only a single package), but then it worked as expected:

source /opt/ros/jade/setup.bash
echo $ROS_PACKAGE_PATH
/opt/ros/jade/share:/opt/ros/jade/stacks
cd ~/catkin_ws
rm -rf build devel install
catkin_make
...

source devel/setup.bash 
echo $ROS_PACKAGE_PATH
/home/lucasw/catkin_ws/src:/opt/ros/jade/share:/opt/ros/jade/stacks

catkin_make install
source install/setup.bash 
echo $ROS_PACKAGE_PATH
/home/lucasw/catkin_ws/install/share:/home/lucasw/catkin_ws/install/stacks:/opt/ros/jade/share:/opt/ros/jade/stacks

source devel/setup.bash 
echo $ROS_PACKAGE_PATH
/home/lucasw/catkin_ws/src:/opt/ros/jade/share:/opt/ros/jade/stacks

In my larger workspace I've tried repairing ROS_PACKAGE_PATH by hand export ROS_PACKAGE_PATH=/home/lucasw/catkin_ws/src:/opt/ros/jade/share:/opt/ros/jade/stacks, but then when I attempt to roslaunch something:

multiple files named [bar.launch] in package [foo]:
- /home/lucasw/catkin_ws/install/share/foo/launch/bar.launch
- /home/lucasw/catkin_ws/src/foo/launch/bar.launch
Please specify full path instead

Where is it getting that install path from?

edit flag offensive delete link more

Comments

1

The install path is coming in through CMAKE_PREFIX_PATH . I'm not sure of all of the details, but catkin sometimes uses the CMAKE_PREFIX_PATH to find packages, executables and launch files.

ahendrix gravatar image ahendrix  ( 2017-03-17 15:44:26 -0500 )edit

source /opt/ros/kinetic/setup.bash

echo $CMAKE_PREFIX_PATH

/opt/ros/kinetic # seems good

source devel/setup.bash # after having run catkin_make install in past

echo $CMAKE_PREFIX_PATH

/home/lucasw/catkin_ws/install:/home/lucasw/catkin_ws/devel:/opt/ros/kinetic

lucasw gravatar image lucasw  ( 2017-03-17 17:02:16 -0500 )edit

If I rm -rf build devel install and catkin_make all over then I get a nice prefix path, and I can switch between install and devel fine. Things go wrong after I make a trivial change to any package CMakeLists.txt, then catkin_make again.

lucasw gravatar image lucasw  ( 2017-03-17 17:16:43 -0500 )edit

In kinetic in the above situation running catkin_make after catkin_make install and making a CMakeLists.txt change somehow corrupts includes and the build can fail entirely, requiring a complete rm -rf build devel install again.

lucasw gravatar image lucasw  ( 2017-03-17 17:18:46 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2016-07-20 20:48:27 -0500

Seen: 976 times

Last updated: Mar 17 '17