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.