Skip to main content

ros2-composition

ROS 2 component composition, intra-process communication, UniquePtr callbacks, loaned messages, and Nav2-style container bringup. Use when loading composable nodes, component_container, intra-process, loaned messages, iceoryx, or type adaptation.

ソース情報

リポジトリ
guilyx/dotfiles
ソースの最終更新活動
2026年8月12日 19:39
検出された SKILL.md の言語
英語
スター
0
フォーク
0

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
ros2-composition
description
ROS 2 component composition, intra-process communication, UniquePtr callbacks, loaned messages, and Nav2-style container bringup. Use when loading composable nodes, component_container, intra-process, loaned messages, iceoryx, or type adaptation.
# ROS 2 Composition and Zero-Copy ## Components Composable nodes: `rclcpp::Node` with `NodeOptions`, registered via: ```cpp RCLCPP_COMPONENTS_REGISTER_NODE(my_pkg::MyComponent) ``` CMake: `rclcpp_components_register_node` on a **SHARED** lib. Launch: `ComposableNodeContainer` or `ros2 component load`. No `rclcpp::init` / `spin` inside the component — the **container** spins. ## Containers (stack practice) | Container | Executor | Use | |-----------|----------|-----| | `component_container` | Single-threaded | Simple; no parallel callbacks | | `component_container_mt` | Multi-threaded | Need callback groups (Nav2-style servers) | | Isolated process per server | Separate container | Fault isolation / RT control away from perception | Composition ≠ free concurrency: ST container ignores your MT hopes (`ros2-executors`). ## Intra-process `NodeOptions.use_intra_process_comms(true)` on components that should zero-copy. Requires: - Sub callback `UniquePtr<Msg>` (not `SharedPtr`) - `publish(std::move(unique_msg))` - Compatible QoS; **same process only** ## Loaned messages (inter-process) `borrow_loaned_message()` needs RMW support; unbounded strings/sequences often disable loans; static `Type[N]` friendlier (`ros2-interfaces`). Measure — fallback is copy. ## Type adaptation `rclcpp::TypeAdapter` for native types in-process; still ROS msgs on the wire to others.
GitHubで見る