0
$\begingroup$

Rosanswers logo

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!


Originally posted by Ktysai on ROS Answers with karma: 112 on 2021-07-23

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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).


Originally posted by shonigmann with karma: 1567 on 2021-07-23

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by ruffsl on 2021-07-23:
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/navigation2/blob/5c61644651c4eab882b042e073d0f5964f03a501/Dockerfile#L111

Comment by Ktysai on 2021-07-24:
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.

$\endgroup$

Your Answer

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