Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ros2 Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-ros2-knowledge-patch-nevaberry-plugins)
---
name: ros2-knowledge-patch
description: ROS 2
version: "Kilted Kaiju"
license: MIT
metadata:
author: Nevaberry
---
# ROS 2 Knowledge Patch
Load this skill when updating ROS 2 dependencies, middleware, client code,
executors, interfaces, launch files, or bag workflows.
Use the topic references for the full guidance and examples.
## Reference index
| Reference | Topics |
| --- | --- |
| [Compatibility, middleware, and builds](references/compatibility-middleware-builds.md) | Windows environments, RMW support, Connext, Fast DDS rename, isolated test fixtures, DDS topic instances, CMake linking |
| [Client libraries and execution](references/client-libraries-execution.md) | Python generic annotations, experimental EventsExecutor, subordinate nodes, Callback Group Events Executor, numeric array parameter ranges |
| [Interfaces and launch](references/interfaces-launch.md) | Navigation goal arrays, Rust generation, NV12, dynamic typesupport, compound launch paths |
| [Rosbag2 and actions](references/rosbag2-actions.md) | Action introspection and recording, multiple-bag playback, timestamp order, snapshots, sorting, topic size, log levels |
## Breaking changes and deprecations
### Fast DDS dependency rename
Update references to the `fastrtps` dependency package to `fastdds`.
The RMW implementation names stay the same.
Deployments that load XML profiles need to check the renamed environment variables.
### Connext Micro deprecation
`rmw_connextddsmicro` stops receiving updates in Kilted and is scheduled
for removal in a future release.
### Dynamic typesupport
`rosidl_dynamic_typesupport` removes `float128` support.
Update dynamic type descriptions that use it.
### CMake dependency linking
Replace the deprecated `ament_target_dependencies()` macro with
`target_link_libraries()` and exported CMake targets.
Use the plain signature if the target already uses it, including when
`ament_add_gtest()` calls it internally.
```cmake
find_package(rclcpp REQUIRED)
target_link_libraries(my_node PUBLIC rclcpp::rclcpp)
```
## Dependencies and middleware
### Windows workspace environments
Kilted's Windows installation uses Pixi/Conda and pip for dependencies.
Dependencies are installed per workspace, so each workspace has its own environment.
### RMW support and Connext dependency
`rmw_zenoh_cpp` is Tier 1 in Kilted, subject to the support tier of its platform.
`rmw_fastrtps_cpp` remains the default RMW.
Kilted's `rmw_connextdds` targets Connext DDS 7.3.0.
## Actions and bag workflows
### Inspect and record actions
Use `ros2 action echo /fibonacci` to inspect the `/fibonacci` action.
Rosbag2 can record and replay action data using the generic action-client
support added to `rclcpp`.
### Play several bags together
Repeat `-i` or `--input`:
```sh
ros2 bag play -i bag1 -i bag2
```
### Choose playback timestamp order
Use publication order with:
```sh
ros2 bag play bag1 --message-order sent
```
The default `received` orders playback by reception timestamp.
### Collect snapshots
Each snapshot trigger writes a new bag file.
Code that collects snapshots should expect a separate file for each trigger.
### Inspect bag contents and size
`ros2 bag info --sort` can sort topics, services, and actions by name,
type, or recorded message count.
Combine the size contribution option with verbose output to see each topic's
contribution to the bag size:
```sh
ros2 bag info -v --size-contribution bag1
```
### Set bag log levels
`ros2 bag play` and `ros2 bag record` accept `--log-level`:
```sh
ros2 bag play bag1 --log-level debug
```
## Client libraries and execution
### Callback Group Events Executor
Lyrical adds `rclcpp::executors::EventsCBGExecutor`, an event-driven C++
executor supporting multiple threads and multiple ROS time sources.
Add your node to the executor before spinning it.
```cpp
#include <rclcpp/rclcpp.hpp>
int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<rclcpp::Node>("example");
rclcpp::executors::EventsCBGExecutor executor;
executor.add_node(node);
executor.spin();
rclcpp::shutdown();
}
```
For composable nodes, select the executor with `--executor-type events-cbg`
on `component_container`:
```sh
ros2 run rclcpp_components component_container --executor-type events-cbg
```
Pass the same option through `args` in an XML launch file; see the
[client libraries reference](references/client-libraries-execution.md) for the example.
### Experimental Python executor
`rclpy` offers an experimental `EventsExecutor` based on the event-driven C++ executor.
### Numeric array parameter ranges
In Lyrical, `rclcpp` applies parameter descriptor range constraints to each
element of integer and double array parameters.
This declaration accepts only even integers from 2 through 10 in `my_integer_array`:
```cpp
rcl_interfaces::msg::ParameterDescriptor descriptor;
descriptor.integer_range.resize(1);
auto & range = descriptor.integer_range.at(0);
range.from_value = 2;
range.to_value = 10;
range.step = 2;
node->declare_parameter("my_integer_array", std::vector<int64_t>{2, 4, 6, 8, 10}, descriptor);
```
### Python generic annotations
Annotate service clients with request and response types, action clients with
goal, result, and feedback types, and futures with their result type.
The [client libraries reference](references/client-libraries-execution.md)
contains the annotation example and subordinate-node behavior.
## Interfaces and launch
Use `nav_msgs/msg/Goals` to represent an array of navigation goals in a single message.
`rosidl_rust` is included in the default interface code generators.
The common image encodings include NV12, allowing images from
hardware-accelerated decoders to carry that encoding directly.
In `PathJoinSubstitution`, nest a list to concatenate strings and substitutions
into one path component. With `model` set to `my_model`, this resolves to
`robot_description/urdf/my_model.xacro`:
```python
PathJoinSubstitution([
'robot_description', 'urdf', [LaunchConfiguration('model'), '.xacro'],
])
```