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에서 보기