首页/目录/全部文章

全部文章

八个专题的源码、算法与协议笔记都在这里。

笔记列表

examples 源码详细分析

examples 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/examples
子包数量:22


1. 定位

examples 目录含 22 个 ROS 2 包,工作区路径见下。


2. 子包列表

包名 版本 说明
examples_rclcpp_async_client 0.15.5 Example of an async service client
examples_rclcpp_cbg_executor 0.15.5 Example for multiple Executor instances in one process, usin…
examples_rclcpp_minimal_action_client 0.15.5 Minimal action client examples
examples_rclcpp_minimal_action_server 0.15.5 Minimal action server examples
examples_rclcpp_minimal_client 0.15.5 Examples of minimal service clients
examples_rclcpp_minimal_composition 0.15.5 Minimalist examples of composing nodes in the same process
examples_rclcpp_minimal_publisher 0.15.5 Examples of minimal publisher nodes
examples_rclcpp_minimal_service 0.15.5 A minimal service server which adds two numbers
examples_rclcpp_minimal_subscriber 0.15.5 Examples of minimal subscribers
examples_rclcpp_minimal_timer 0.15.5 Examples of minimal nodes which have timers
examples_rclcpp_multithreaded_executor 0.15.5 Package containing example of how to implement a multithread…
examples_rclcpp_wait_set 0.15.5 Example of how to use the rclcpp::WaitSet directly.
examples_rclpy_executors 0.15.5 Examples of creating and using exectors to run multiple node…
examples_rclpy_guard_conditions 0.15.5 Examples of using guard conditions.
examples_rclpy_minimal_action_client 0.15.5 Examples of minimal action clients using rclpy.
examples_rclpy_minimal_action_server 0.15.5 Examples of minimal action servers using rclpy.
examples_rclpy_minimal_client 0.15.5 Examples of minimal service clients using rclpy.
examples_rclpy_minimal_publisher 0.15.5 Examples of minimal publishers using rclpy.
examples_rclpy_minimal_service 0.15.5 Examples of minimal service servers using rclpy.
examples_rclpy_minimal_subscriber 0.15.5 Examples of minimal subscribers using rclpy.
examples_rclpy_pointcloud_publisher 0.15.5 Example on how to publish a Pointcloud2 message
launch_testing_examples 0.15.5 Examples of simple launch tests

3. 在 ROS 2 Humble 栈中的关系

最小示例节点


4. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

5. 小结

examples 为含 22 个子包的源码树,是 ROS 2 Humble 发行版的一部分。

geometry2 源码详细分析

geometry2 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/geometry2
子包数量:15


1. 定位

坐标变换库 tf2:Buffer + Listener + Broadcaster,替代 ROS 1 tf。含 Eigen/KDL/Bullet 转换与 tf2_ros Python/C++ API。


2. 子包列表

包名 版本 说明
examples_tf2_py 0.25.20 Has examples of using the tf2 Python API.
geometry2 0.25.20 A metapackage to bring in the default packages second genera…
test_tf2 0.25.20 tf2 unit tests
tf2 0.25.20 tf2 is the second generation of the transform library, which…
tf2_bullet 0.25.20 tf2_bullet
tf2_eigen 0.25.20 tf2_eigen
tf2_eigen_kdl 0.25.20 Conversion functions between: - Eigen and KDL
tf2_geometry_msgs 0.25.20 tf2_geometry_msgs
tf2_kdl 0.25.20 KDL binding for tf2
tf2_msgs 0.25.20 tf2_msgs
tf2_py 0.25.20 The tf2_py package
tf2_ros 0.25.20 This package contains the C++ ROS bindings for the tf2 libra…
tf2_ros_py 0.25.20 This package contains the ROS Python bindings for the tf2 li…
tf2_sensor_msgs 0.25.20 Small lib to transform sensor_msgs with tf. Most notably, Po…
tf2_tools 0.25.20 tf2_tools

3. 核心组件

15 包:核心 tf2(BufferCore)、tf2_rostf2_geometry_msgstf2_py。与 robot_state_publisher 配合发布 static TF。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. tf2/buffer_core.h 2. tf2_ros/transform_listener 3. tf2_msgs

6. 小结

geometry2 为含 15 个子包的源码树,是 ROS 2 Humble 发行版的一部分。

launch_ros 源码详细分析

launch_ros 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/launch_ros
子包数量:4


1. 定位

ROS 2 launch 扩展Node action、LifecycleNode、ros2 launch CLI、参数/ remapping 集成。


2. 子包列表

包名 版本 说明
launch_ros 0.19.13 ROS specific extensions to the launch tool.
launch_testing_ros 0.19.13 A package providing utilities for writing ROS2 enabled launc…
ros2launch 0.19.13 The launch command for ROS 2 command line tools.
test_launch_ros 0.19.13 Tests for ROS specific extensions to the launch tool.

3. 核心组件

4 包:launch_ros、ros2launch、launch_testing_ros。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. launch_ros/actions/node.py 2. ros2launch

6. 小结

launch_ros 为含 4 个子包的源码树,是 ROS 2 Humble 发行版的一部分。

launch 源码详细分析

launch 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/launch
子包数量:7


1. 定位

通用 launch 描述与执行引擎(与 ROS 无关部分):Python launch API、XML/YAML frontend、测试框架 launch_testing


2. 子包列表

包名 版本 说明
launch 1.0.14 The ROS launch tool.
launch_pytest 1.0.14 A package to create tests which involve launch files and mul…
launch_testing 1.0.14 A package to create tests which involve launch files and mul…
launch_testing_ament_cmake 1.0.14 A package providing cmake functions for running launch tests…
launch_xml 1.0.14 XML frontend for the launch package.
launch_yaml 1.0.14 YAML frontend for the launch package.
test_launch_testing 1.0.14 Tests for the launch_testing package.

3. 核心组件

7 包:launch 核心 Action/Substitution、launch_xml/launch_yaml frontend、launch_testing 多进程测试。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. launch/launch/description.py 2. launch/actions 3. launch_testing

6. 小结

launch 为含 7 个子包的源码树,是 ROS 2 Humble 发行版的一部分。

libyaml_vendor 源码详细分析

libyaml_vendor 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/libyaml_vendor
子包数量:1


1. 定位

Vendor / 第三方依赖打包包:通过 ExternalProject 或系统包 shim 为 ROS 2 构建提供固定版本的 libyaml,本身几乎无 ROS 业务逻辑。


2. 子包列表

包名 版本 说明
libyaml_vendor 1.2.2 Vendored version of libyaml.

3. 核心组件

典型结构:CMakeLists.txt 下载/查找库 + package.xml 导出 find_package 依赖。消费方在 package.xml<depend> 本 vendor 包即可。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

6. 小结

libyaml_vendor 为单包仓库,提供 libyaml_vendor 功能。

message_filters 源码详细分析

message_filters 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/message_filters
子包数量:1


1. 定位

message_filters 目录含 1 个 ROS 2 包,工作区路径见下。


2. 子包列表

包名 版本 说明
message_filters 4.3.16 A set of ROS2 message filters which take in messages and may…

3. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


4. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

5. 小结

message_filters 为单包仓库,提供 message_filters 功能。

mimick_vendor 源码详细分析

mimick_vendor 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/mimick_vendor
子包数量:1


1. 定位

Vendor / 第三方依赖打包包:通过 ExternalProject 或系统包 shim 为 ROS 2 构建提供固定版本的 mimick,本身几乎无 ROS 业务逻辑。


2. 子包列表

包名 版本 说明
mimick_vendor 0.2.8 Wrapper around mimick, it provides an ExternalProject build …

3. 核心组件

典型结构:CMakeLists.txt 下载/查找库 + package.xml 导出 find_package 依赖。消费方在 package.xml<depend> 本 vendor 包即可。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

6. 小结

mimick_vendor 为单包仓库,提供 mimick_vendor 功能。

orocos_kdl_vendor 源码详细分析

orocos_kdl_vendor 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/orocos_kdl_vendor
子包数量:2


1. 定位

Metapackage / 聚合仓库:目录 orocos_kdl_vendor 包含 2 个相关包,见下表。


2. 子包列表

包名 版本 说明
orocos_kdl_vendor 0.2.5 Wrapper around orocos_kdl, providing nothing but a dependenc…
python_orocos_kdl_vendor 0.2.5 Wrapper around PyKDL, providing nothing but a dependency on …

3. 核心组件

典型结构:CMakeLists.txt 下载/查找库 + package.xml 导出 find_package 依赖。消费方在 package.xml<depend> 本 vendor 包即可。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

6. 小结

orocos_kdl_vendor 为含 2 个子包的源码树,是 ROS 2 Humble 发行版的一部分。

performance_test_fixture 源码详细分析

performance_test_fixture 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/performance_test_fixture
子包数量:1


1. 定位

performance_test_fixture 目录含 1 个 ROS 2 包,工作区路径见下。


2. 子包列表

包名 版本 说明
performance_test_fixture 0.0.9 Test fixture and CMake macro for using osrf_testing_tools_cp…

3. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


4. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

5. 小结

performance_test_fixture 为单包仓库,提供 performance_test_fixture 功能。

pybind11_vendor 源码详细分析

pybind11_vendor 源码详细分析

工作区路径:/home/cp/work2/ros2Learn/ros2_humble/src/ros2/pybind11_vendor
子包数量:1


1. 定位

Vendor / 第三方依赖打包包:通过 ExternalProject 或系统包 shim 为 ROS 2 构建提供固定版本的 pybind11,本身几乎无 ROS 业务逻辑。


2. 子包列表

包名 版本 说明
pybind11_vendor 2.4.2 Wrapper around pybind11.

3. 核心组件

典型结构:CMakeLists.txt 下载/查找库 + package.xml 导出 find_package 依赖。消费方在 package.xml<depend> 本 vendor 包即可。


4. 在 ROS 2 Humble 栈中的关系

ros2总览.md 分层图。


5. 推荐阅读顺序

  1. 阅读各子包 package.xml 2. 入口源码 3. 下游依赖方

6. 小结

pybind11_vendor 为单包仓库,提供 pybind11_vendor 功能。