Clarify distinction between FAILURE and ERROR in CallbackReturn#3115
Open
Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Open
Clarify distinction between FAILURE and ERROR in CallbackReturn#3115Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Saigirish23 wants to merge 1 commit intoros2:rollingfrom
Conversation
ab11ffd to
bc0b58b
Compare
Collaborator
|
you commit is full of artifacts and garbage... |
fujitatomoya
requested changes
Mar 26, 2026
Comment on lines
+56
to
+72
| /// Return values for lifecycle transition callbacks. | ||
| /// | ||
| /// These values determine how the lifecycle node proceeds after a transition callback: | ||
| /// | ||
| /// - SUCCESS: The transition completed successfully and the node will proceed normally. | ||
| /// | ||
| /// - FAILURE: The transition failed in a recoverable way. The node remains in its current state, | ||
| /// and the transition may be retried or handled gracefully. | ||
| /// | ||
| /// - ERROR: The transition encountered a critical, unrecoverable error. This will trigger the | ||
| /// error handling mechanism (on_error callback), potentially leading to shutdown. | ||
| enum class CallbackReturn : uint8_t | ||
| { | ||
| SUCCESS = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_SUCCESS, | ||
| FAILURE = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_FAILURE, | ||
| ERROR = lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR | ||
| }; |
Collaborator
There was a problem hiding this comment.
kinda redundant with https://github.com/ros2/rcl_interfaces/blob/rolling/lifecycle_msgs/msg/Transition.msg? besides that, indent is off.
Author
There was a problem hiding this comment.
Thanks for the feedback! I’ll tidy up the commit, fix the indentation, and simplify the comment to avoid duplicating what’s already in Transition.msg.
bc0b58b to
3678343
Compare
Author
|
It looks like the failure is coming from missing builtin_interfaces target in CI (ubuntu_noble job), and not related to this change since it only updates comments. Please let me know if I should rebase or if this is a transient CI issue. |
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
This PR clarifies the distinction between
FAILUREandERRORinCallbackReturnwithin the lifecycle node interface.FAILURE: represents a recoverable failure where the node remains in its current state and the transition may be retried or handled gracefully.ERROR: represents a critical, unrecoverable failure that triggers the error handling mechanism (on_error), potentially leading to shutdown.This improves clarity for developers working with lifecycle nodes and aligns documentation with actual behavior.
Fixes #3086
Is this user-facing behavior change?
No. This change only improves documentation and does not modify runtime behavior.
Did you use Generative AI?
Yes. Generative AI (ChatGPT) was used to help draft and refine the documentation wording.
Additional Information
This change updates comments in
lifecycle_node_interface.hppto better explain lifecycle transition outcomes and reduce ambiguity betweenFAILUREandERROR.