yahboom
HomeLearn
Solution
Blog
Online Store
About Us
EN/中文
WLR722 LiDAR📖
1. Lidar Usage
  • 1. PC Software View Lidar
  • 2. Ros Driver Lidar
2. Cartographer Algorithm
  • 1. Cartographer 2D Mapping
  • 2. Cartographer 3D Mapping
3. Lego Loam Algorithm
  • 1. Compile Lego Loam Algorithm
  • 2. Lego Loam Algorithm Mapping
4. Lio Sam Algorithm
  • 1. Compile Lio Sam Algorithm
  • 2. Lio Sam Algorithm Mapping
5. Autoware Algorithm
  • 1. Compile Autoware Algorithm
  • 2. Autoware Navigation Lidar Adaptation
6. ROS2 Basic Course
  • 1.Introduction to ROS2
  • 2.ROS2 install Humble
  • 3.ROS2 development environment
  • 4.ROS2 workspace
  • 5.ROS2 function package
  • 6.ROS2 node
  • 7.ROS2 topic communication
  • 8.ROS2 service communication
  • 9.ROS2 action communication
  • 10.ROS2 custom interface message
  • 11.ROS2 parameter service case
  • 12.ROS2 meta-function package
  • 13.ROS2 distributed communication
  • 14.ROS2 DDS
  • 15.ROS2 time related API
  • 16.ROS2 common command tools
  • 17.ROS2 rviz2 use
  • 18.ROS2 rqt toolbox
  • 19.ROS2 Launch startup file configuration
  • 20.ROS2 recording and playback tool
  • 21.ROS2 URDF model
  • 22.ROS2 Gazebo simulation platform
  • 23.ROS2 TF2 coordinate transformation
Download
  • 3D_Model_File
  • Source Code
  • PC Software
  • Data Manual
Download ZIP

Welcome to WLR722 LiDAR repository

12.ROS2 meta-function package

12.ROS2 meta-function package

 

1. Introduction to Metapackages

Completing a systemic function may involve multiple packages. For example, implementing a robot navigation module might include sub-packages such as mapping, positioning, and path planning. So, when installing this module, does the user need to install each package individually?

Obviously, installing packages one by one is inefficient. ROS2 provides a way to bundle different packages into a single package. When installing a module, the packaged package, also known as a metapackage, can be directly invoked.

A metapackage is a file management system concept in Linux. It's a virtual package in ROS2. It doesn't contain any substantive content, but it relies on other packages. This method allows packages to be grouped together. Think of it like a table of contents like a book, telling you which sub-packages are within a package and where to download them.

For example, the command "sudo apt install ros-humle-desktop" installs ROS 2 using a meta-package. This meta-package depends on several other ROS 2 packages, and these dependencies are installed along with the package.

A classic example of a meta-package: navigation2

  • navigation2 GitHub repository: GitHub - ros-navigation/navigation2: ROS 2 Navigation Framework and System

2. Purpose

This package facilitates installation. We only need this one package to organize and install other related packages.

3. Implementation

  1. Create a new package
xxxxxxxxxx
ros2 pkg create pkg_metapackage

2、Modify the package.xml file and add the packages that the execution depends on

xxxxxxxxxx
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
  <name>pkg_metapackage</name>
  <version>0.0.0</version>
  <description>TODO: Package description</description>
  <maintainer email="1461190907@qq.com">root</maintainer>
  <license>TODO: License declaration</license>
​
  <buildtool_depend>ament_cmake</buildtool_depend>
​
  <exec_depend>pkg_interfaces</exec_depend>
  <exec_depend>pkg_helloworld_py</exec_depend>
  <exec_depend>pkg_topic</exec_depend>
  <exec_depend>pkg_service</exec_depend>
  <exec_depend>pkg_action</exec_depend>
  <exec_depend>pkg_param</exec_depend>
​
  <test_depend>ament_lint_auto</test_depend>
  <test_depend>ament_lint_common</test_depend>
​
  <export>
    <build_type>ament_cmake</build_type>
  </export>
</package>
​
  1. The contents of the file CMakeLists.txt are as follows
xxxxxxxxxx
cmake_minimum_required(VERSION 3.5)
project(pkg_metapackage)
​
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()
​
find_package(ament_cmake REQUIRED)
​
ament_package()
  1. Compile the meta-package
  • No actual executable files will be generated
xxxxxxxxxx
colcon build --packages-select pkg_metapackage

image-20250905150959368

 

ROS2 parameter service case
ROS2 distributed communication

COMPANY

  • About us
  • Team Style
  • Blog

LEARNING & EXPLORATION

  • Tutorials
  • Edge AI hardware
  • Educational robots
  • Embedded intelligent hardware

WHERE TO BUY

  • Yahboom Online Store
  • Amazon
  • Alibaba
  • AliExpress
  • Mercado

TECHNOLOGY SUPPORT

  • Email: support@yahboom.com

BE A DISTRIBUTOR

  • Email: sales@yahboom.com
QR Code
QR Code

Copyright © 2017-2026 Yahboom. All Rights Reserved.

EN/中文