Skip to content

Commit a3bb702

Browse files
authored
Add ROS 2 Lyrical Luth (#1496)
- feat(lyrical): add ROS 2 Lyrical Luth support across CI, runtime, and types - ci(linux-x64): add Lyrical matrix entry on `ubuntu:26.04` using the beta `ros2-lyrical-2026-04-30-resolute-x86_64.tar.bz2`; share apt-source + binary-tarball install path with Rolling; skip `ros-${distro}-test-msgs` / `ros-${distro}-mrpt-msgs` for tarball lanes; run IDL message tests for Rolling and Lyrical - ci(linux-arm64): add Lyrical matrix entry on `ubuntu:26.04` using `ros2-lyrical-2026-04-30-resolute-aarch64.tar.bz2`; bypass `ros-tooling/setup-ros` for Lyrical and install via apt-source + tarball + rosdep - ci(windows): add Lyrical matrix entry using `ros2-lyrical-2026-04-30-windows-AMD64.zip`; normalize the extracted ROS folder so `setup.bat` is found regardless of zip layout; keep `run_tests: false` because optional message packages may be missing - feat(node): allow `getClientsInfoByService` and `getServersInfoByService` on Lyrical (`DistroId.LYRICAL`) instead of Rolling-only - feat(subscription): allow `isContentFilterSupported` on Lyrical or newer instead of Rolling-only - feat(action client): enable feedback-subscription content-filter optimization on Lyrical or newer - feat(rosidl): emit `is_rosidl_buffer` / `owns_rosidl_buffer` for primitive sequences on Lyrical or newer (Rolling ABI inherited by Lyrical) - refactor(native): change Rolling-only `#if ROS_VERSION >= 5000` and post-Kilted `#if ROS_VERSION > 2505` guards to explicit `#if ROS_VERSION >= 2605` (Lyrical or newer) in graph, subscription, action client, lifecycle, and utilities bindings - types(distro): expand public `DistroName` and `DistroId` declarations to include `iron`, `jazzy`, `kilted`, `lyrical`, and `FUTURE` - test(graph): expect service endpoint graph APIs to be supported starting at Lyrical - test(subscription content filter): expect content-filter support starting at Lyrical Fix: #1458
1 parent 03518c3 commit a3bb702

16 files changed

Lines changed: 145 additions & 67 deletions

.github/workflows/linux-arm64-build-and-test.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- humble
2727
- jazzy
2828
- kilted
29+
- lyrical
2930
include:
3031
# Humble Hawksbill (May 2022 - May 2027)
3132
- docker_image: ubuntu:jammy
@@ -36,6 +37,13 @@ jobs:
3637
# Kilted Kaiju (May 2025 - Dec 2026)
3738
- docker_image: ubuntu:noble
3839
ros_distribution: kilted
40+
# Lyrical Luth (May 2026 - May 2031, beta)
41+
# NOTE: the tarball URL below is a date-stamped beta snapshot and must
42+
# be refreshed manually until upstream publishes a stable "latest"
43+
# download (or until GA).
44+
- docker_image: ubuntu:26.04
45+
ros_distribution: lyrical
46+
ros_tar_url: "https://github.com/ros2/ros2/releases/download/release-lyrical-beta-20260430/ros2-lyrical-2026-04-30-resolute-aarch64.tar.bz2"
3947

4048
steps:
4149
- name: Setup Node.js ${{ matrix.node-version }} on ${{ matrix.architecture }}
@@ -45,16 +53,48 @@ jobs:
4553
architecture: ${{ matrix.architecture }}
4654

4755
- name: Setup ROS2
56+
if: ${{ matrix.ros_distribution != 'lyrical' }}
4857
uses: ros-tooling/setup-ros@v0.7
4958
with:
5059
required-ros-distributions: ${{ matrix.ros_distribution }}
5160

61+
- name: Enable ROS2 apt repository (lyrical)
62+
if: ${{ matrix.ros_distribution == 'lyrical' }}
63+
run: |
64+
apt-get update
65+
apt-get install -y software-properties-common curl
66+
67+
# Enable required repositories for the lyrical beta tarball; see:
68+
# https://docs.ros.org/en/lyrical/Installation/Ubuntu-Install-Debs.html
69+
add-apt-repository universe
70+
ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F'"' '{print $4}')
71+
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
72+
dpkg -i /tmp/ros2-apt-source.deb
73+
apt-get update
74+
apt-get install -y build-essential cmake tar bzip2 python3 python3-rosdep python3-colcon-common-extensions
75+
76+
- name: Install ROS2 from binary tarball (lyrical)
77+
if: ${{ matrix.ros_distribution == 'lyrical' }}
78+
run: |
79+
curl -sL "${{ matrix.ros_tar_url }}" -o /tmp/ros2-lyrical.tar.bz2
80+
mkdir -p /opt/ros/lyrical
81+
tar xf /tmp/ros2-lyrical.tar.bz2 --strip-components=1 -C /opt/ros/lyrical
82+
rm /tmp/ros2-lyrical.tar.bz2
83+
84+
rosdep init || true
85+
rosdep update
86+
rosdep install --rosdistro lyrical --from-paths /opt/ros/lyrical/share --ignore-src -y --skip-keys "cyclonedds fastcdr fastdds iceoryx_binding_c rmw_connextdds rti-connext-dds-7.3.0 rti-connext-dds-7.7.0 urdfdom_headers python3-pyqt6.qtsvg rosidl_buffer_py pybind11"
87+
5288
- name: Install test-msgs and mrpt_msgs on Linux
89+
if: ${{ matrix.ros_distribution != 'lyrical' }}
90+
run: |
91+
sudo apt install -y ros-${{ matrix.ros_distribution }}-test-msgs ros-${{ matrix.ros_distribution }}-mrpt-msgs
92+
93+
- name: Install Electron test dependencies
5394
run: |
54-
sudo apt install ros-${{ matrix.ros_distribution }}-test-msgs ros-${{ matrix.ros_distribution }}-mrpt-msgs
5595
# Adjust dependencies based on Ubuntu version
5696
LIBASOUND_PKG="libasound2"
57-
if grep -q "24.04" /etc/os-release; then
97+
if grep -Eq "24\.04|26\.04" /etc/os-release; then
5898
LIBASOUND_PKG="libasound2t64"
5999
fi
60100
sudo apt install -y xvfb libgtk-3-0 libnss3 $LIBASOUND_PKG libgbm-dev

.github/workflows/linux-x64-build-and-test.yml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
- humble
2727
- jazzy
2828
- kilted
29+
- lyrical
2930
- rolling
3031
include:
3132
# Humble Hawksbill (May 2022 - May 2027)
@@ -37,6 +38,14 @@ jobs:
3738
# Kilted Kaiju (May 2025 - Dec 2026)
3839
- docker_image: ubuntu:noble
3940
ros_distribution: kilted
41+
# Lyrical Luth (May 2026 - May 2031, beta)
42+
# NOTE: the tarball URL below is a date-stamped beta snapshot and must
43+
# be refreshed manually until upstream publishes a stable "latest"
44+
# download (or until GA), at which point it can be replaced with the
45+
# stable URL similar to the rolling nightly redirect.
46+
- docker_image: ubuntu:26.04
47+
ros_distribution: lyrical
48+
ros_tar_url: "https://github.com/ros2/ros2/releases/download/release-lyrical-beta-20260430/ros2-lyrical-2026-04-30-resolute-x86_64.tar.bz2"
4049
# Rolling Ridley (No End-Of-Life) - migrated to Ubuntu 26.04 (resolute)
4150
# to follow the Lyrical Luth target platform.
4251
# See: https://docs.ros.org/en/jazzy/Releases/Release-Lyrical-Luth.html
@@ -51,40 +60,45 @@ jobs:
5160
architecture: ${{ matrix.architecture }}
5261

5362
- name: Setup ROS2
54-
if: ${{ matrix.ros_distribution != 'rolling' }}
63+
if: ${{ matrix.ros_distribution != 'rolling' && matrix.ros_distribution != 'lyrical' }}
5564
uses: ros-tooling/setup-ros@v0.7
5665
with:
5766
required-ros-distributions: ${{ matrix.ros_distribution }}
5867

59-
- name: Install ROS2 Rolling Nightly
60-
if: ${{ matrix.ros_distribution == 'rolling' }}
68+
- name: Enable ROS2 apt repository (rolling / lyrical)
69+
if: ${{ matrix.ros_distribution == 'rolling' || matrix.ros_distribution == 'lyrical' }}
6170
run: |
6271
apt-get update
6372
apt-get install -y software-properties-common curl
6473
65-
# Enable required repositories (per https://docs.ros.org/en/rolling/Installation/Alternatives/Ubuntu-Install-Binary.html)
74+
# Enable required repositories. The same setup applies to both the
75+
# rolling nightly tarball and the lyrical beta tarball; see the
76+
# per-distro install docs for reference:
77+
# rolling: https://docs.ros.org/en/rolling/Installation/Alternatives/Ubuntu-Install-Binary.html
78+
# lyrical: https://docs.ros.org/en/lyrical/Installation/Ubuntu-Install-Debs.html
6679
add-apt-repository universe
6780
ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F'"' '{print $4}')
6881
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo ${UBUNTU_CODENAME:-${VERSION_CODENAME}})_all.deb"
6982
dpkg -i /tmp/ros2-apt-source.deb
70-
71-
# Install prerequisites and apt packages BEFORE nightly tarball
7283
apt-get update
7384
apt-get install -y build-essential cmake tar bzip2 python3 python3-rosdep python3-colcon-common-extensions
7485
75-
# Extract nightly binary AFTER apt packages so nightly's newer libs overwrite apt's older ones
76-
curl -sL "${{ matrix.ros_tar_url }}" -o /tmp/ros2-nightly.tar.bz2
77-
mkdir -p /opt/ros/rolling
78-
tar xf /tmp/ros2-nightly.tar.bz2 --strip-components=1 -C /opt/ros/rolling
79-
rm /tmp/ros2-nightly.tar.bz2
86+
- name: Install ROS2 from binary tarball (rolling / lyrical)
87+
if: ${{ matrix.ros_distribution == 'rolling' || matrix.ros_distribution == 'lyrical' }}
88+
run: |
89+
# Extract binary tarball AFTER apt packages so its newer libs overwrite apt's older ones
90+
curl -sL "${{ matrix.ros_tar_url }}" -o /tmp/ros2-${{ matrix.ros_distribution }}.tar.bz2
91+
mkdir -p /opt/ros/${{ matrix.ros_distribution }}
92+
tar xf /tmp/ros2-${{ matrix.ros_distribution }}.tar.bz2 --strip-components=1 -C /opt/ros/${{ matrix.ros_distribution }}
93+
rm /tmp/ros2-${{ matrix.ros_distribution }}.tar.bz2
8094
8195
# Install any remaining runtime dependencies using rosdep
8296
rosdep init || true
8397
rosdep update
84-
rosdep install --rosdistro rolling --from-paths /opt/ros/rolling/share --ignore-src -y --skip-keys "cyclonedds fastcdr fastdds iceoryx_binding_c rmw_connextdds rti-connext-dds-7.3.0 rti-connext-dds-7.7.0 urdfdom_headers python3-pyqt6.qtsvg rosidl_buffer_py pybind11"
98+
rosdep install --rosdistro ${{ matrix.ros_distribution }} --from-paths /opt/ros/${{ matrix.ros_distribution }}/share --ignore-src -y --skip-keys "cyclonedds fastcdr fastdds iceoryx_binding_c rmw_connextdds rti-connext-dds-7.3.0 rti-connext-dds-7.7.0 urdfdom_headers python3-pyqt6.qtsvg rosidl_buffer_py pybind11"
8599
86100
- name: Install test-msgs and mrpt_msgs on Linux
87-
if: ${{ matrix.ros_distribution != 'rolling' }}
101+
if: ${{ matrix.ros_distribution != 'rolling' && matrix.ros_distribution != 'lyrical' }}
88102
run: |
89103
sudo apt install -y ros-${{ matrix.ros_distribution }}-test-msgs ros-${{ matrix.ros_distribution }}-mrpt-msgs
90104
@@ -101,18 +115,7 @@ jobs:
101115
102116
- uses: actions/checkout@v6
103117

104-
- name: Build and test rclnodejs (nightly)
105-
if: ${{ matrix.ros_distribution == 'rolling' }}
106-
run: |
107-
uname -a
108-
source /opt/ros/rolling/setup.bash
109-
npm i
110-
npm run lint
111-
npm test
112-
npm run clean
113-
114118
- name: Build and test rclnodejs
115-
if: ${{ matrix.ros_distribution != 'rolling' }}
116119
run: |
117120
uname -a
118121
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
@@ -121,10 +124,10 @@ jobs:
121124
npm test
122125
npm run clean
123126
124-
- name: Test with IDL ROS messages against rolling
125-
if: ${{ matrix.ros_distribution == 'rolling' }}
127+
- name: Test with IDL ROS messages (rolling / lyrical)
128+
if: ${{ matrix.ros_distribution == 'rolling' || matrix.ros_distribution == 'lyrical' }}
126129
run: |
127-
source /opt/ros/rolling/setup.bash
130+
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
128131
npm i
129132
npm run test-idl
130133
npm run clean

.github/workflows/windows-build-and-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
ros_distribution:
1919
- jazzy
2020
- kilted
21+
- lyrical
2122
- rolling
2223
include:
2324
- ros_distribution: jazzy
@@ -26,6 +27,11 @@ jobs:
2627
- ros_distribution: kilted
2728
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-kilted-20250728/ros2-kilted-20250728-windows-release-amd64.zip"
2829
run_tests: false
30+
# Lyrical Luth (May 2026 - May 2031, beta)
31+
# Reference: https://docs.ros.org/en/lyrical/Installation/Windows-Install-Binary.html
32+
- ros_distribution: lyrical
33+
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-lyrical-beta-20260430/ros2-lyrical-2026-04-30-windows-AMD64.zip"
34+
run_tests: false
2935
- ros_distribution: rolling
3036
ros_zip_url: "https://github.com/ros2/ros2/releases/download/release-rolling-nightlies/ros2-rolling-nightly-windows-amd64.zip"
3137
run_tests: false
@@ -52,9 +58,21 @@ jobs:
5258
choco install 7zip -y
5359
Invoke-WebRequest -Uri "${{ matrix.ros_zip_url }}" -OutFile ros2.zip
5460
7z x ros2.zip -y -oC:\pixi_ws
61+
if (!(Test-Path C:\pixi_ws\ros2-windows\setup.bat)) {
62+
$setupScript = Get-ChildItem -Path C:\pixi_ws -Recurse -Filter setup.bat | Select-Object -First 1
63+
if ($null -eq $setupScript) {
64+
throw "Unable to find ROS 2 setup.bat after extracting ${{ matrix.ros_zip_url }}"
65+
}
66+
Move-Item -Path $setupScript.Directory.FullName -Destination C:\pixi_ws\ros2-windows
67+
}
5568
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/ros2/ros2/refs/heads/${{ matrix.ros_distribution }}/pixi.toml" -OutFile C:\pixi_ws\pixi.toml
5669
Push-Location C:\pixi_ws
5770
pixi install
71+
if (Test-Path C:\pixi_ws\ros2-windows\preinstall_setup_windows.py) {
72+
Push-Location C:\pixi_ws\ros2-windows
73+
pixi run python preinstall_setup_windows.py
74+
Pop-Location
75+
}
5876
Pop-Location
5977
6078
- name: Prebuild - Setup VS Dev Environment

lib/action/client.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,13 @@ class ActionClient extends Entity {
9494
};
9595

9696
// Enable feedback subscription content filter optimization.
97-
// Only supported on ROS2 Rolling and only effective when the native
98-
// binding provides the required functions AND the RMW implementation
99-
// actually supports content filtering on the feedback subscription.
97+
// Only supported on ROS2 Lyrical or newer and only effective when the
98+
// native binding provides the required functions AND the RMW
99+
// implementation actually supports content filtering on the feedback
100+
// subscription.
100101
this._enableFeedbackMsgOptimization =
101102
this._options.enableFeedbackMsgOptimization === true &&
102-
DistroUtils.getDistroId() >= DistroUtils.DistroId.ROLLING &&
103+
DistroUtils.getDistroId() >= DistroUtils.DistroId.LYRICAL &&
103104
typeof rclnodejs.actionConfigureFeedbackSubFilterAddGoalId === 'function';
104105

105106
let type = this.typeClass.type();

lib/node.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,7 +1587,7 @@ class Node extends rclnodejs.ShadowNode {
15871587
* @returns {Array} - list of clients
15881588
*/
15891589
getClientsInfoByService(service, noDemangle = false) {
1590-
if (DistroUtils.getDistroId() < DistroUtils.DistroId.ROLLING) {
1590+
if (DistroUtils.getDistroId() < DistroUtils.DistroId.LYRICAL) {
15911591
console.warn(
15921592
'getClientsInfoByService is not supported by this version of ROS 2'
15931593
);
@@ -1621,7 +1621,7 @@ class Node extends rclnodejs.ShadowNode {
16211621
* @returns {Array} - list of servers
16221622
*/
16231623
getServersInfoByService(service, noDemangle = false) {
1624-
if (DistroUtils.getDistroId() < DistroUtils.DistroId.ROLLING) {
1624+
if (DistroUtils.getDistroId() < DistroUtils.DistroId.LYRICAL) {
16251625
console.warn(
16261626
'getServersInfoByService is not supported by this version of ROS 2'
16271627
);

lib/subscription.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ class Subscription extends Entity {
147147

148148
/**
149149
* Check if content filtering is supported for this subscription.
150-
* Requires ROS 2 Rolling or later.
150+
* Requires ROS 2 Lyrical or later.
151151
* @returns {boolean} True if the subscription instance supports content filtering; otherwise false.
152152
*/
153153
isContentFilterSupported() {
154-
if (DistroUtils.getDistroId() < DistroUtils.DistroId.ROLLING) {
154+
if (DistroUtils.getDistroId() < DistroUtils.DistroId.LYRICAL) {
155155
return false;
156156
}
157157
return rclnodejs.isContentFilterSupported(this.handle);

rosidl_gen/templates/message-template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ function generateMessage(data) {
266266
const currentTypedArrayElementType = getTypedArrayElementName(spec.baseType);
267267

268268
// ROS 2 Rolling (ros2/rosidl#941) added is_rosidl_buffer / owns_rosidl_buffer
269-
// to every primitive sequence struct. Emit the extra fields only for
270-
// primitive-package types on Rolling+.
269+
// to every primitive sequence struct. Lyrical inherits the same ABI change.
270+
// Emit the extra fields only for primitive-package types on Lyrical+.
271271
const DistroUtils = require('../../lib/distro.js');
272272
const needsRosidlBufferFields =
273273
isPrimitivePackage(spec.baseType) &&
274-
DistroUtils.getDistroId() >= DistroUtils.getDistroId('rolling');
274+
DistroUtils.getDistroId() >= DistroUtils.DistroId.LYRICAL;
275275

276276
// Track required modules
277277
let existedModules = [];

src/rcl_action_client_bindings.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ Napi::Value ActionSendCancelRequest(const Napi::CallbackInfo& info) {
250250
return Napi::Number::New(env, static_cast<double>(sequence_number));
251251
}
252252

253-
#if ROS_VERSION >= 5000 // ROS2 Rolling
253+
#if ROS_VERSION >= 2605 // ROS2 Lyrical or newer
254254
Napi::Value ActionConfigureFeedbackSubFilterAddGoalId(
255255
const Napi::CallbackInfo& info) {
256256
Napi::Env env = info.Env();
@@ -309,7 +309,7 @@ Napi::Value ActionConfigureFeedbackSubFilterRemoveGoalId(
309309

310310
return Napi::Boolean::New(env, true);
311311
}
312-
#endif // ROS_VERSION >= 5000
312+
#endif // ROS_VERSION >= 2605
313313

314314
#if ROS_VERSION >= 2505 // ROS2 >= Kilted
315315
Napi::Value ConfigureActionClientIntrospection(const Napi::CallbackInfo& info) {
@@ -369,14 +369,14 @@ Napi::Object InitActionClientBindings(Napi::Env env, Napi::Object exports) {
369369
exports.Set("configureActionClientIntrospection",
370370
Napi::Function::New(env, ConfigureActionClientIntrospection));
371371
#endif // ROS_VERSION >= 2505
372-
#if ROS_VERSION >= 5000 // ROS2 Rolling
372+
#if ROS_VERSION >= 2605 // ROS2 Lyrical or newer
373373
exports.Set(
374374
"actionConfigureFeedbackSubFilterAddGoalId",
375375
Napi::Function::New(env, ActionConfigureFeedbackSubFilterAddGoalId));
376376
exports.Set(
377377
"actionConfigureFeedbackSubFilterRemoveGoalId",
378378
Napi::Function::New(env, ActionConfigureFeedbackSubFilterRemoveGoalId));
379-
#endif // ROS_VERSION >= 5000
379+
#endif // ROS_VERSION >= 2605
380380
return exports;
381381
}
382382

src/rcl_graph_bindings.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ typedef rcl_ret_t (*rcl_get_info_by_topic_func_t)(
3333
const char* topic_name, bool no_mangle,
3434
rcl_topic_endpoint_info_array_t* info_array);
3535

36-
#if ROS_VERSION > 2505
36+
#if ROS_VERSION >= 2605
3737
typedef rcl_ret_t (*rcl_get_info_by_service_func_t)(
3838
const rcl_node_t* node, rcutils_allocator_t* allocator,
3939
const char* service_name, bool no_mangle,
4040
rcl_service_endpoint_info_array_t* info_array);
41-
#endif // ROS_VERSION > 2505
41+
#endif // ROS_VERSION >= 2605
4242

4343
Napi::Value GetPublisherNamesAndTypesByNode(const Napi::CallbackInfo& info) {
4444
Napi::Env env = info.Env();
@@ -264,7 +264,7 @@ Napi::Value GetSubscriptionsInfoByTopic(const Napi::CallbackInfo& info) {
264264
"subscriptions", rcl_get_subscriptions_info_by_topic);
265265
}
266266

267-
#if ROS_VERSION > 2505
267+
#if ROS_VERSION >= 2605
268268
Napi::Value GetInfoByService(
269269
Napi::Env env, rcl_node_t* node, const char* service_name, bool no_mangle,
270270
const char* type, rcl_get_info_by_service_func_t rcl_get_info_by_service) {
@@ -300,9 +300,9 @@ Napi::Value GetInfoByService(
300300

301301
return ConvertToJSServiceEndpointInfoList(env, &info_array);
302302
}
303-
#endif // ROS_VERSION > 2505
303+
#endif // ROS_VERSION >= 2605
304304

305-
#if ROS_VERSION > 2505
305+
#if ROS_VERSION >= 2605
306306
Napi::Value GetClientsInfoByService(const Napi::CallbackInfo& info) {
307307
RclHandle* node_handle = RclHandle::Unwrap(info[0].As<Napi::Object>());
308308
rcl_node_t* node = reinterpret_cast<rcl_node_t*>(node_handle->ptr());
@@ -322,7 +322,7 @@ Napi::Value GetServersInfoByService(const Napi::CallbackInfo& info) {
322322
return GetInfoByService(info.Env(), node, service_name.c_str(), no_mangle,
323323
"servers", rcl_get_servers_info_by_service);
324324
}
325-
#endif // ROS_VERSION > 2505
325+
#endif // ROS_VERSION >= 2605
326326

327327
Napi::Object InitGraphBindings(Napi::Env env, Napi::Object exports) {
328328
exports.Set("getPublisherNamesAndTypesByNode",
@@ -341,12 +341,12 @@ Napi::Object InitGraphBindings(Napi::Env env, Napi::Object exports) {
341341
Napi::Function::New(env, GetPublishersInfoByTopic));
342342
exports.Set("getSubscriptionsInfoByTopic",
343343
Napi::Function::New(env, GetSubscriptionsInfoByTopic));
344-
#if ROS_VERSION > 2505
344+
#if ROS_VERSION >= 2605
345345
exports.Set("getClientsInfoByService",
346346
Napi::Function::New(env, GetClientsInfoByService));
347347
exports.Set("getServersInfoByService",
348348
Napi::Function::New(env, GetServersInfoByService));
349-
#endif // ROS_VERSION > 2505
349+
#endif // ROS_VERSION >= 2605
350350
return exports;
351351
}
352352

src/rcl_lifecycle_bindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Napi::Value CreateLifecycleStateMachine(const Napi::CallbackInfo& info) {
7171
const rosidl_service_type_support_t* gs =
7272
GetServiceTypeSupport("lifecycle_msgs", "GetState");
7373

74-
#if ROS_VERSION >= 5000 // ROS2 Rolling
74+
#if ROS_VERSION >= 2605 // ROS2 Lyrical or newer
7575
rcl_lifecycle_state_machine_options_t options =
7676
rcl_lifecycle_get_default_state_machine_options();
7777
options.enable_com_interface = info[1].As<Napi::Boolean>().Value();

0 commit comments

Comments
 (0)