0
$\begingroup$

Rosanswers logo

Hi everyone,

For my training with ROS, I would like to create an additional workspace (e.g. in ~/catkin_ws2/) next to an existing one (~/catkin_ws/). Assuming that ROS Indigo was already installed on my computer, I followed the ROS tutorials to setup another catkin workspace :

$ mkdir -p ~/catkin_ws2/src/ $ cd ~/catkin_ws2/src/ $ catkin_init_workspace </code></pre> Then I run `catkin_make` in `~/catkin_ws2/` and added the lines <pre><code>source /opt/ros/indigo/setup.bash source /home/myhome/catkin_ws2/devel/setup.bash </code></pre> at the end of my .bashrc file in `/home/myhome/`. I specify that I already did all of this with the previous workspace.<br> But when I echoed the `$ROS_PACKAGE_PATH`, there were still the path of `~/catkin_ws/` in it. Why is it still here since I didn't tell to ROS that the first workspace still exists ? Many thanks for your replies. --- [Originally posted](https://answers.ros.org/question/203851/several-and-independent-workspaces/) by [anonymous21729](https://answers.ros.org/users/21729/anonymous21729/) on ROS Answers with karma: 15 on 2015-02-26 Post score: 0
$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

That means that the workspace in ~/catkin_ws/ was sourced when you built the workspace in ~/catkin_ws2/. You'll have to clear the build, devel, and install folders of ~/catkin_ws2/ and in a new terminal (without sourcing stuff in your ~/.bashrc) source /opt/ros/indigo/setup.bash and then build ~/catkin_ws2/ with catkin_make.


Originally posted by William with karma: 17335 on 2015-02-26

This answer was ACCEPTED on the original site

Post score: 3

$\endgroup$

Your Answer

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