Ask Your Question

How do I prevent workspace chaining?

asked 2018-02-21 16:24:28 -0500

felixcra gravatar image

updated 2018-02-22 04:32:54 -0500

I have two catkin workspaces. One of them where I work, and one where I just want to mess around. Unfortunately the second one extends my primary workspace. I want to have them as independent as possible. How can I have them both just extend /opt/ros/kinetic.

edit retag flag offensive close merge delete


Was your edit intended to highlight a particular part of your question?

gvdhoorn gravatar image gvdhoorn  ( 2018-02-22 05:01:10 -0500 )edit

If it's unclear how to remove the current dependency, you'll need to rebuild both your workspaces. Delete the devel and build folders and run catkin again.

gvdhoorn gravatar image gvdhoorn  ( 2018-02-22 05:02:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-21 16:59:28 -0500

gvdhoorn gravatar image

updated 2018-02-21 17:01:37 -0500

Two options (off the top of my head):

  1. don't have one sourced when you're building the other (ie: don't have source /some/path/to/catkin_ws/devel/setup.bash in your .bashrc (or similar file))
  2. use catkin_tools and initialise the configuration of the respective workspaces with the --extend option to explicitly extend (or really: overlay) /opt/ros/kinetic

Edit: perhaps three: sourceing a setup file should override whatever vars are already present in your environment, so if you'd source /opt/ros/kinetic/setup.bash before building either workspace it should (implicitly) extend /opt/ros/kinetic. I'm not sure how reliable that is though, so personally I would probably go for option 1 or 2 (actually I do both: I have 50 workspaces and none of those are sourced automatically).

edit flag offensive delete link more


+1 for the catkin config --extend /opt/ros/kinetic approach

joq gravatar image joq  ( 2018-02-21 19:32:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2018-02-21 16:24:28 -0500

Seen: 239 times

Last updated: Feb 22 '18