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.

Quellinformationen

Repository
guilyx/dotfiles
Letzte Quellaktivität
12. August 2026 um 19:39
Erkannte Sprache von SKILL.md
Englisch
Sterne
0
Forks
0

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
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.
Auf GitHub ansehen