Skip to content

Fix compiling error on ROS2 rolling#1392

Merged
minggangw merged 1 commit intoRobotWebTools:developfrom
minggangw:fix-1391
Feb 12, 2026
Merged

Fix compiling error on ROS2 rolling#1392
minggangw merged 1 commit intoRobotWebTools:developfrom
minggangw:fix-1391

Conversation

@minggangw
Copy link
Member

@minggangw minggangw commented Feb 12, 2026

This PR fixes a compilation error when building against ROS2 Rolling by adapting to a breaking API change in the ROS2 lifecycle state machine initialization. The ROS2 Rolling API now requires a clock parameter for rcl_lifecycle_state_machine_init, which was not present in earlier versions.

Changes:

  • Added version-specific code path for ROS2 Rolling (ROS_VERSION >= 5000) that includes the new clock parameter requirement
  • Updated JavaScript code to pass the node's clock handle to the native lifecycle state machine creation function

Fix: #1391

Copilot AI review requested due to automatic review settings February 12, 2026 05:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a compilation error when building against ROS2 Rolling by adapting to a breaking API change in the ROS2 lifecycle state machine initialization. The ROS2 Rolling API now requires a clock parameter for rcl_lifecycle_state_machine_init, which was not present in earlier versions.

Changes:

  • Added version-specific code path for ROS2 Rolling (ROS_VERSION >= 5000) that includes the new clock parameter requirement
  • Updated JavaScript code to pass the node's clock handle to the native lifecycle state machine creation function

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/rcl_lifecycle_bindings.cpp Added new conditional compilation block for ROS2 Rolling that extracts clock handle from the third parameter and passes it to rcl_lifecycle_state_machine_init
lib/lifecycle.js Updated createLifecycleStateMachine call to include this._clock.handle as the third parameter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coveralls
Copy link

Coverage Status

coverage: 85.565% (+0.02%) from 85.544%
when pulling a84967e on minggangw:fix-1391
into 70cfe1f on RobotWebTools:develop.

@minggangw minggangw merged commit c81c497 into RobotWebTools:develop Feb 12, 2026
21 of 22 checks passed
minggangw added a commit that referenced this pull request Feb 14, 2026
This PR fixes a compilation error when building against ROS2 Rolling by adapting to a breaking API change in the ROS2 lifecycle state machine initialization. The ROS2 Rolling API now requires a clock parameter for `rcl_lifecycle_state_machine_init`, which was not present in earlier versions.

**Changes:**
- Added version-specific code path for ROS2 Rolling (ROS_VERSION >= 5000) that includes the new clock parameter requirement
- Updated JavaScript code to pass the node's clock handle to the native lifecycle state machine creation function

Fix: #1391
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiling failed on ROS2 rolling

2 participants

Comments