## ROS2机器人应用简明教程4工区

162
0
2020年10月8日 17时53分

• source /opt/ros/foxy/setup.bash

• rosdep install -i –from-path src –rosdistro foxy -y

• colcon build

• source install/setup.bash

install:

1. You also have the option of sourcing an “overlay” – a secondary workspace where you can add new packages without interfering with the existing ROS 2 workspace that you’re extending, or “underlay”. Your underlay must contain the dependencies of all the packages in your overlay. Packages in your overlay will override packages in the underlay. It’s also possible to have several layers of underlays and overlays, with each successive overlay using the packages of its parent underlays.
2. Sourcing the local_setup of the overlay will only add the packages available in the overlay to your environment. setup sources the overlay as well as the underlay it was created in, allowing you to utilize both workspaces.So, sourcing your main ROS 2 installation’s setup and then the dev_ws overlay’s local_setup, like you just did, is the same as just sourcing dev_ws’s setup, because that includes the environment of the underlay it was created in.

• https://www.bilibili.com/video/bv1dv411B7KY