Rosdep
rosdep install --from-paths src -y --ignore-src
Breaking that down:
--from-paths src
specifies the path to check forpackage.xml
files to resolve keys for-y
means to default yes to all prompts from the package manager to install without prompts--ignore-src
means to ignore installing dependencies, even if a rosdep key exists, if the package itself is also in the workspace.
Composition
ros2 run rclcpp_components component_container
ros2 component list
ros2 component load
ros2 component unload
ros2 run rclcpp_components component_container --ros-args -r __node:=MyContainer -r __ns:=/ns
ros2 component load /ComponentManager composition composition::Talker --node-name talker3 --node-namespace /ns2
Launch
For packages with launch files, it is a good idea to add an exec_depend
dependency on the ros2launch
package in your package’s package.xml
:
<exec_depend>ros2launch</exec_depend>
This helps make sure that the ros2 launch
command is available after building your package. It also ensures that all launch file formats are recognized.