Skip to main content

ros2_xmake_examples 文档

本文档集提供两套索引,同一套示例可从不同角度检索。

ROS 2 学习路线

通信基础

知识点示例文档
Topic 发布/订阅demo_xmake_pubsub01_pubsub
Service 请求/响应demo_xmake_service02_service
Action 目标/反馈/结果demo_xmake_action08_action
QoS 服务质量配置demo_xmake_qos12_qos

节点与执行

知识点示例文档
定时器与日志demo_xmake_timer03_timer_logging
参数系统demo_xmake_params05_params
生命周期节点demo_xmake_lifecycle09_lifecycle
执行器与多线程demo_xmake_executor18_executor
组件与插件demo_xmake_component07_component

接口与数据

知识点示例文档
自定义 msg/srv/actiondemo_xmake_interfaces06_interfaces
图像处理管线demo_xmake_image19_image
数据录制回放demo_xmake_rosbag20_rosbag

机器人系统

知识点示例文档
坐标变换 TF2demo_xmake_tf215_tf2
URDF 机器人模型demo_xmake_robot_description16_robot_description
RViz 可视化demo_xmake_rviz_markers17_rviz_markers
导航插件demo_xmake_nav_plugin21_nav_plugin
硬件驱动接口demo_xmake_hardware22_hardware

系统集成

知识点示例文档
Launch 多节点编排demo_xmake_launch10_launch
C++/Python 混合demo_xmake_mixed11_mixed
库构建与下游消费demo_xmake_cpp04_library
测试框架demo_xmake_testing13_testing
CMake 互操作downstream_cmake_consumer14_cmake_interop
DDS/RMW 配置demo_xmake_dds_config23_dds_config

调试与性能优化

知识点示例文档
高级日志与诊断demo_xmake_logging24_logging_diagnostics
性能追踪demo_xmake_tracing25_tracing
内存与 CPU 分析(纯文档)26_profiling
通信基准测试demo_xmake_benchmark27_benchmark

xmake 构建特性索引

基础构建

xmake 特性首次出现文档
set_kind("binary") 构建可执行文件demo_xmake_pubsub01
add_ros_deps() ROS 依赖解析demo_xmake_pubsub01
同包多 target 定义demo_xmake_pubsub01
set_kind("static") 静态库demo_xmake_cpp04
set_kind("shared") 共享库demo_xmake_cpp04
add_headerfiles() 头文件导出demo_xmake_cpp04
{visibility = "public"} 公开依赖demo_xmake_cpp04

数据文件安装

xmake 特性首次出现文档
约定目录自动安装 (launch/, config/)demo_xmake_params05
install_ros_data() 显式安装demo_xmake_launch10
urdf/meshes 自动安装demo_xmake_robot_description16

高级特性

xmake 特性首次出现文档
rosidl 集成 (msg/srv/action)demo_xmake_interfaces06
install_ros_plugin() 插件注册demo_xmake_component07
CMake Config 自动生成downstream_cmake_consumer14
xmake + setup.py 混合构建demo_xmake_mixed11
xmake test targetdemo_xmake_testing13
phony target (纯数据包)demo_xmake_dds_config23
系统库 + ROS 包混合依赖demo_xmake_image19
add_cxflags() 编译器标志(纯文档)26
diagnostic_updater 依赖demo_xmake_logging24
launch/ 自动安装 + 可选依赖demo_xmake_tracing25
同包多 target + 条件编译demo_xmake_benchmark27