Embodied AI Glossary中文

Package (ROS)

功能包Common

The basic unit for organizing code in ROS — one package groups a set of related nodes and configuration.

A package is the basic unit for organizing and distributing code in ROS / ROS 2. A package typically contains source code, launch files, message definitions, and configuration parameters, along with a package.xml manifest describing its name, version, and dependencies; a C++ package also has a CMakeLists.txt, and a Python package has a setup.py. In ROS 2, ros2 pkg create scaffolds a new package, and colcon builds an entire workspace at once. Splitting code into packages lets others reuse just your camera driver or navigation module on its own, and lets rosdep automatically install dependencies based on package.xml. For newcomers reading an open-source robotics project, looking at what packages exist and what each one is responsible for is the fastest way in.

ExampleRunning ros2 pkg create my_robot_bringup --build-type ament_python generates the skeleton of a Python package.

Also called
ROS package, package
Related
ROS Workspace · colcon · rosdep · ament · Node (ROS) · Launch File
Sources
ROS 2 Documentation: Creating a package

See it in the full glossary →