Handle exceptions in lifecycle transition callbacks#1696
Open
saikishor wants to merge 2 commits into
Open
Conversation
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Signed-off-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
Contributor
|
Tick the box to add this pull request to the merge queue (same as
|
saikishor
force-pushed
the
handle/exceptions/transition_cb
branch
from
July 17, 2026 08:19
1181676 to
8f0639c
Compare
ahcorde
approved these changes
Jul 17, 2026
Contributor
|
Pulls: #1696 |
Author
|
@ahcorde Is it also possible to backport this change? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In rclcpp_lifecycle the exceptions are properly handled here during transistion callbacks: https://github.com/ros2/rclcpp/blob/527275027cee68bf817a5d0824f15803114a4d2d/rclcpp_lifecycle/src/lifecycle_node_interface_impl.cpp#L514-L527
However, in rclpy currently, it simply crashes the node. I think it is better to be consistent between both the libraries, for this reason this PR is opened
Is this user-facing behavior change?
Yes, previously it crashes, but now the node ends up unconfigured
Did you use Generative AI?
Claude, to refine the added tests