-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Primary state error transitions #436
base: rolling
Are you sure you want to change the base?
Primary state error transitions #436
Conversation
// raise_error() can be called from an inactive or active state. | ||
if(count == 32){ | ||
RCLCPP_ERROR(get_logger(),"An error has arisen in the node and it needs reconfiguration."); | ||
raise_error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check if the current state in ACTIVE before raise_error() ?
* TRANSITION_CALLBACK_ERROR or any uncaught exceptions to "finalized" | ||
*/ | ||
rclcpp_lifecycle::node_interfaces::LifecycleNodeInterface::CallbackReturn | ||
on_error(const rclcpp_lifecycle::State & state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indent is not correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for that. Fixed
…tion Signed-off-by: thebyohazard <[email protected]>
8c40675
to
c2b2cb9
Compare
Signed-off-by: thebyohazard <[email protected]>
What is the state of this PR? |
not sure, @thebyohazard any update you would do? |
This PR shows an example of the new self-transitioning functionality implemented in required PRs ros2/rcl_interfaces#97, ros2/rcl#618, and ros2/rclcpp#1064. Ideally, I think the lifecycle_service_client should react to the lifecycle_talker having an error rather than just knowing it will happen as that would be more true to a real world example, but for a demo and proof of concept, maybe it's better to keep it simpler.