Skip to content

Commit e0ae6de

Browse files
authored
Add rmw_zenoh_cpp as RMW vendor and update dist (#1487)
**Changes:** - **`lib/rmw.js`** - Added `ZENOH: 'rmw_zenoh_cpp'` to `RMWNames` constants - Added missing `iron`, `jazzy`, and `kilted` distro entries to `DefaultRosRMWNameMap` (all default to `rmw_fastrtps_cpp`) - Added safe fallback to `getRMWName()` — returns `rmw_fastrtps_cpp` when the distro is not in the map and `RMW_IMPLEMENTATION` is unset, preventing `undefined` from causing incorrect feature gating - **`test/test-subscription-content-filter.js`** - Updated `isContentFilteringSupported()` to exclude `rmw_zenoh_cpp`, which does not support content filtering **Context:** `rmw_zenoh_cpp` was promoted to Tier 1 in ROS 2 Kilted Kaiju and is actively referenced in `rclpy` tests for conditional behavior. rclnodejs was missing it entirely from its RMW vendor registry. The `DefaultRosRMWNameMap` was also missing entries for multiple known distros (`iron`, `jazzy`, `kilted`), and `getRMWName()` had no fallback for unmapped distros. Fix: #1486
1 parent e90e098 commit e0ae6de

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

lib/rmw.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@ const RMWNames = {
1919
CONNEXT: 'rmw_connext_cpp',
2020
CYCLONEDDS: 'rmw_cyclonedds_cpp',
2121
GURUMDDS: 'rmw_gurumdds_cpp',
22+
ZENOH: 'rmw_zenoh_cpp',
2223
};
2324

2425
const DefaultRosRMWNameMap = new Map();
2526
DefaultRosRMWNameMap.set('eloquent', RMWNames.FASTRTPS);
2627
DefaultRosRMWNameMap.set('foxy', RMWNames.FASTRTPS);
2728
DefaultRosRMWNameMap.set('galactic', RMWNames.CYCLONEDDS);
2829
DefaultRosRMWNameMap.set('humble', RMWNames.FASTRTPS);
30+
DefaultRosRMWNameMap.set('iron', RMWNames.FASTRTPS);
31+
DefaultRosRMWNameMap.set('jazzy', RMWNames.FASTRTPS);
32+
DefaultRosRMWNameMap.set('kilted', RMWNames.FASTRTPS);
2933
DefaultRosRMWNameMap.set('rolling', RMWNames.FASTRTPS);
3034

3135
const RMWUtils = {
@@ -34,7 +38,8 @@ const RMWUtils = {
3438
getRMWName: function () {
3539
return process.env.RMW_IMPLEMENTATION
3640
? process.env.RMW_IMPLEMENTATION
37-
: DefaultRosRMWNameMap.get(DistroUtils.getDistroName());
41+
: DefaultRosRMWNameMap.get(DistroUtils.getDistroName()) ||
42+
RMWNames.FASTRTPS;
3843
},
3944
};
4045

test/test-subscription-content-filter.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const SUBSCRIBER_WAIT_TIME = 1000;
1515
function isContentFilteringSupported() {
1616
return (
1717
DistroUtils.getDistroId() >= DistroUtils.getDistroId('humble') &&
18-
RMWUtils.getRMWName() != RMWUtils.RMWNames.CYCLONEDDS
18+
RMWUtils.getRMWName() != RMWUtils.RMWNames.CYCLONEDDS &&
19+
RMWUtils.getRMWName() != RMWUtils.RMWNames.ZENOH
1920
);
2021
}
2122

0 commit comments

Comments
 (0)