-
Notifications
You must be signed in to change notification settings - Fork 481
Closed
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requested
Description
I'm trying to understand how to correctly manage errors in a LifecycleNode.
From what I understood currently the on_error callback is called in two cases:
- when a transition callback returns
lifecycle_msgs::msg::Transition::TRANSITION_CALLBACK_ERROR - when an uncaught exception is thrown inside a transition callback
But according to ROS2 design page the node should be able to enter in error processing transition also from ACTIVE state.
Now I have two problems:
- Understand who generated the error that called
on_errorsince the only argument of theon_errorcallback isconst rclcpp_lifecycle::State& previous_state - Understand how to trigger an error from
ACTIVEstate (for example from a thread acquiring data from a device, when the device disconnects)
I think that the lifecycle demo should have an example of on_error callback together with the other.
Metadata
Metadata
Assignees
Labels
duplicateThis issue or pull request already existsThis issue or pull request already existsquestionFurther information is requestedFurther information is requested