You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: locomotor/doc/ErrorHandling.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,15 +5,15 @@ Let's take a precise look at what the error handling functions look like.
5
5
using PlannerExceptionCallback = std::function<void (nav_core2::PlannerException, const ros::Duration&)>;
6
6
```
7
7
8
-
There are several standard extensions for the base `PlannerException` class in `nav_core2/exceptions.h`. When the function is called, you should be able to check the class of the exception against your known types and react accordingly. For instance,
8
+
There are several standard extensions for the base `PlannerException` class in `nav_core2/exceptions.h` that will be passed as an exception pointer. When the function is called, you should be able to check the class of the exception against your known types and react accordingly. For instance,
9
9
10
10
```
11
-
void SomeStateMachine::onGlobalPlanningException(nav_core2::PlannerException e,
@@ -33,12 +33,12 @@ void SomeStateMachine::onGlobalPlanningException(nav_core2::PlannerException e,
33
33
Importantly, the individual planners can implement their own extensions of `PlannerException` and have their version of `StateMachine` handle it however they like.
34
34
35
35
```
36
-
void LocomotorBrown::onGlobalPlanningException(nav_core2::PlannerException e,
Copy file name to clipboardExpand all lines: nav_core2/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ Now let's compare the old [nav_core::BaseLocalPlanner](https://github.com/ros-pl
46
46
## Exceptions
47
47
A hierarchical collection of [exceptions](include/nav_core2/exceptions.h) is provided to allow for reacting to navigation failures in a more robust and contextual way.
48
48

49
-
Each exception has a corresponding integer "result code" that can be used in ROS interfaces where passing the C++ object is infeasible.
49
+
Each exception has a corresponding integer "result code" that can be used in ROS interfaces where passing the C++ object is infeasible. Note that due to the hierarchy, the result_code will be for the child-most exception. For example, if you throw a `StartBoundsException` which has a corresponding result code of `6`, it could also be seen as a `InvalidStartPoseException`, `GlobalPlannerException`, `PlannerException` or `NavCore2Exception`, all of which would also have the result code of `6`.
50
50
51
51
## Bounds
52
52
For use in tracking `Costmap` changes and more, this package also provides an implementation of [bounding boxes](include/nav_core2/bounds.h). These are represented with the ranges `[min_x, max_x]` and `[min_y, max_y]` (inclusive).
0 commit comments