ros2 / ros2/rclcpp

Lifecycle features: add information about previous transition to "on_error" callback

Open
#549 0 comments 0 reactions 1 assignee View on GitHub

@Karsten1987 is already working on this.

Since Sep 6, 2018.

bug
Dominant language
C++
Stars
805
Forks
564
Avg merge
1d 17h
Merged PRs (30d)
27

Description

Feature request

Feature description

The on_error callback parameter "State" is not useful to understand where the error has been raised. "Transition" indeed should be more useful.

Implementation considerations

Since "on_error" is called only when an unhandled exception is raised from a transition and when a transition returns an error value, it is important to know which transition was in error.
Knowing the previous State is not useful. For example from "inactive" State there are two possible transitions, "cleanup" and "activate", with the current implementation you cannot understand which of them raised the error.

ref: https://answers.ros.org/question/302073/ros2-managed-node-on_error/

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.