Catkin Workspace Appending Workspace to End of ROS_PACKAGE_PATH
After the latest update to hydro, I am having trouble with my ROSPACKAGEPATH. Instead of
/home/dlu/Robots/Catkin/hydro_nav/src:/opt/ros/hydro/share:/opt/ros/hydro/stacks
which allows me to use my custom source navigation, instead after sourcing /home/dlu/Robots/Catkin/hydro_nav/devel/setup.bash, I get
/opt/ros/hydro/share:/opt/ros/hydro/stacks:/home/dlu/Robots/Catkin/hydro_nav/src
Why has our lord Catkin forsaken me so?
Asked by David Lu on 2013-11-05 05:19:31 UTC
Answers
Weird. I have hydro as well, and when I call the setup.bash in my workspace it pre-pends it like you are looking to do. I also find it interesting that if I source /opt/ros/hydro/setup.bash again, I am left with only /opt/ros/hydro/share:/opt/ros/hydro/stacks and without my workspace path.
You can always add it manually:
export ROS_PACKAGE_PATH=/home/dlu/Robots/Catkin/hydro_nav/src:$ROS_PACKAGE_PATH
Asked by teddybouch on 2013-11-05 07:24:03 UTC
Comments
When you source a setup.* file since Groovy it will always overwrite your environment. The environment of your workspace uses the environment which was set when you invoked CMake the first time and prepends the workspace specific paths.
Asked by Dirk Thomas on 2013-11-05 07:28:49 UTC
Setup files for catkin set the environment, they do not extend the environment. To get that behavior you need to do source setup.bash --extend. With catkin workspaces you should only ever need to source one thing, the end of your workspace chain.
Asked by William on 2013-11-05 07:30:54 UTC
Comments
Can you please provide a sequence of commands which reproduce the problem?
Asked by Dirk Thomas on 2013-11-05 07:29:32 UTC
What version of catkin?
Asked by William on 2013-11-05 07:37:29 UTC
I apologize for the inconvenience. Despite replicating it on two computers earlier, I cannot replicate it now.
Asked by David Lu on 2013-11-05 11:46:39 UTC