Robotics StackExchange | Archived questions

switch between two catkin workspace

Hi, I have create two catkin workspace, A&B, I am currently work under catkin workspace B, but how do I go back to catkin workspace A. Meaning, every time I open a new terminal and do a "roscd", which will leads me to the directory of workspace A. (Now is directory of workspace B.) Thank you for reading this post.

Asked by mingcheng on 2020-01-06 04:13:54 UTC

Comments

Answers

You simply need to source the devel/setup.bash of the respective workspace. You can do this manually or you need to adapt the .bashrc every time you want to change the workspace you are working on (btw: last source setup.bash wins, there is no need/benefit in having multiple in your .bashrc, it rather leads to confusion).

Note that this is only true if you haven't set up chained workspaces.

Asked by mgruhler on 2020-01-07 06:42:15 UTC

Comments