https://github.com/andy-leo10/my_metapkg
How to work with a meta-pkg in ROS2
https://github.com/andy-leo10/my_metapkg
meta-pkg ros2 variants
Last synced: 4 months ago
JSON representation
How to work with a meta-pkg in ROS2
- Host: GitHub
- URL: https://github.com/andy-leo10/my_metapkg
- Owner: Andy-Leo10
- Created: 2024-10-31T01:29:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-27T23:05:51.000Z (over 1 year ago)
- Last Synced: 2025-10-09T03:17:05.893Z (8 months ago)
- Topics: meta-pkg, ros2, variants
- Language: CMake
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Usage of Meta Package
A metapackage in ROS2 is primarily used for grouping related packages together. It doesn't compile the dependent packages automatically; instead, it serves as a convenient way to manage and install a set of related packages. When you build a metapackage, it doesn't trigger the build of its dependencies. You need to build the dependent packages separately.
To build all the packages in your workspace, including the dependencies listed in your metapackage, you should run:
```
cd ~/ros2_ws
colcon build
source install/setup.bash
```
This will build all the packages in your workspace, including robot_description and rrbot_description.
If you want to ensure that the dependencies are built when you build the metapackage, you can specify the dependencies explicitly in the colcon build command:
```
cd ~/ros2_ws
colcon build --packages-up-to my_metapkg
source install/setup.bash
```
This command will build my_metapkg and all its dependencies (robot_description and rrbot_description).
Ensuring Binary Dependencies are Installed:
To ensure that the binary dependencies are installed, you can use rosdep to install them:
```
cd ~/ros2_ws
rosdep install --from-paths src/my_metapkg --ignore-src -r -y
```