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

Revision history [back]

click to hide/show revision 1
initial version

Look into catkin workspace overlaying.

In short: all your workspace need to form a chain, with the 'lowest' workspace (or layer) your regular ROS install, then the next one (probably /opt/ros/other) and so on.

Two ways to do this:

  • implicitly: make sure to source the setup.bash of the workspace you want to extend before running catkin_make (or catkin build) in the extending workspace
  • explicitly: use catkin config --extend (from catkin_tools)

See also Workspace Mechanics - Workspace Chaining / Extending in the catkin_tools documentation.

There are ways to do things slightly differently, but I'm not sure that will be much more convenient. See #q64702 for a related question and some explanation by @William.

Look into catkin workspace overlaying.

In short: all your workspace need to form a chain, with the 'lowest' workspace (or layer) your regular ROS install, then the next one (probably /opt/ros/other) and so on.

Two ways to do this:

  • implicitly: make sure to source the setup.bash of the workspace you want to extend before running catkin_make (or catkin build) in the extending workspace
  • explicitly: use catkin config --extend (from catkin_tools)

See also Workspace Mechanics - Workspace Chaining / Extending in the catkin_tools documentation.

There are ways to do things slightly differently, but I'm not sure that will be much more convenient. See #q64702 for a related question and some explanation by @William.


One possible explanation for your current situation is that instead of a single chain, you essentially have a tree with two leaves, with the split at workspace 2. That could explain why 1, 2 and 3 are properly overlayed, and 1, 2 and 4, but not 1, 2, 3 and 4.

Look into catkin workspace overlaying.

In short: all your workspace workspaces need to form a chain, with the 'lowest' workspace (or layer) your regular ROS install, then the next one (probably /opt/ros/other) and so on.on. That way package resolution will walk the chain, and should be able to find packages in no matter which workspace.

Two ways to do this:

  • implicitly: make sure to source the setup.bash of the workspace you want to extend before running catkin_make (or catkin build) in the extending workspace
  • explicitly: use catkin config --extend (from catkin_tools)

See also Workspace Mechanics - Workspace Chaining / Extending in the catkin_tools documentation.

There are ways to do things slightly differently, but I'm not sure that will be much more convenient. See #q64702 for a related question and some explanation by @William.


One possible explanation for your current situation is that instead of a single chain, you essentially have a tree with two leaves, with the split at workspace 2. That 2.

Resource resolution does not walk a tree, only a chain, so that could explain why 1, 2 and 3 are properly overlayed, and 1, 2 and 4, but not 1, 2, 3 and 4.