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

Overlay multiple workspace in ROS2 Foxy

asked 2021-07-23 13:18:51 -0500

Ktysai gravatar image

Hi guys!

I'm less than average in ROS and pretty noob in ROS2 :)

I want to play a little bit with some packages in Foxy and after several install due to some n00bs error I want to build more workspaces in order to limit the damage.

I have these workspaces: ros2_ws turtlebot3_ws dev_ws

How can I make a package from 'dev_ws' to use a package from 'turtlebot3_ws'? I've tried several ways to make the overlay but no succes!

thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-23 17:31:38 -0500

shonigmann gravatar image

If you source (e.g. . ~/turtlebot3_ws/install/setup.bash) the workspaces where the dependency is prior to building/running things from your dev_ws, it should have the desired effect.

Note that new paths are added to the front of the various path variables, so whatever you've sourced most recently will have priority (e.g. if you have a package that you are building from source in one directory, but have also installed using apt, sourcing the directory will ensure that the source version will be used).

edit flag offensive delete link more

Comments

A concrete example of this kind of daisy chaining of workspaces can also be seen used in practice from the Dockerfile for the Nav2 project, where both an underlay and overlay workspace are built one after the other on top of the installed ros folder:

https://github.com/ros-planning/navig...

ruffsl gravatar image ruffsl  ( 2021-07-23 23:49:17 -0500 )edit

Thank you! @shonigmann, after bashing my heard against the keyboard I've seen a similar path. The explanations are a cool bonus! :)

@ruffsl I have to look more careful at that code, is not that readable for me at the moment.

Ktysai gravatar image Ktysai  ( 2021-07-24 18:04:36 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-07-23 13:18:51 -0500

Seen: 1,175 times

Last updated: Jul 23 '21