-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
added result codes for global planner #3146
Conversation
@jwallace42, please properly fill in PR template in the future. @SteveMacenski, use this instead.
|
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.
Generally speaking, LGTM with some refinement
nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/compute_path_to_pose_action.hpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/action/compute_path_to_pose_action.cpp
Outdated
Show resolved
Hide resolved
Alright, I cleaned it up a quite a bit. I haven't explicitly made a list for all the runtime errors that planners could through. I can try to work on that next. I was trying to get a rough structure out there :). |
As for errors, smac is currently the only planner that throws anything.
The other planners don't throw any runtime errors. |
This pull request is in conflict. Could you fix it @jwallace42? |
Sure, but there are other error conditions that might be helpful to know about, even if they don't exist as exceptions right now. For instance, NavFn has off map checks. Also, lets do 1 subsystem at a time, so lets keep this with planning, open a different PR for controllers. This just makes reviewing less error prone |
nav2_behavior_tree/plugins/action/compute_path_to_pose_action.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/action/compute_path_to_pose_action.cpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/action/compute_path_to_pose_action.cpp
Outdated
Show resolved
Hide resolved
So, the list is currently int16 START_OCCUPIED=2 I assume we will also want to add this to the compute path through poses action? |
Codecov ReportBase: 82.85% // Head: 82.92% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #3146 +/- ##
==========================================
+ Coverage 82.85% 82.92% +0.07%
==========================================
Files 339 333 -6
Lines 15242 15113 -129
==========================================
- Hits 12628 12533 -95
+ Misses 2614 2580 -34
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@SteveMacenski let me know if there is anything else you might want me to do here(what do we want to do for code cov). I can also create a separate pr for the ComputePathThroughPoses error codes. |
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.
Generally speaking LGTM!
nav2_behavior_tree/include/nav2_behavior_tree/plugins/action/compute_path_to_pose_action.hpp
Outdated
Show resolved
Hide resolved
I think the order of throwing order should be
@doisyg any thoughts? |
Once this gets in I will clean that pr up :). |
hm, I don't have a strong opinion on this. Maybe it is more logical to have the outside map test before the occupied one ? dk |
Well, if you are outside the map, it can't be occupied and vis versa. So, the ordering of occupied vs outside doesn't matter because they mutually exclusive. |
Agreed! |
Good question! I propose:
As critical failures are highest priority (system cannot operate or request is totally invalid via occupation). Then we have the codes that relate to real run-time failures unable to find paths. Between invalid path and timeout, I don't have a strong opinion, but timeout seems "less serious" than total failure to me. But the larger problem of how to do we take the "most serious one" isn't easy. A TF failure could happen in the planner after some start/goal outside map checks, but if we through from map checks, then we'd never know. I'd be interested to know what you would have in mind for this. Though, many of these are easier (e.g. do outside map checks before occupation checks). |
The planners now throw errors in the order stated above. I think that order above should be a rough guideline. In the particular instance you mentioned I think even if we were able to collect all the exception at once and choose we would still need the handle the first exception thrown. |
Got it - well if they're all in that order, then I think the last thing is to switch that order in the message definition + make a note in the message that that is the expected priority order |
This reverts commit 7be609e.
* added result codes for global planner * code review * code review * cleanup * cleanup * update smac lattice planner * update planner instances * cleanup * updates * renaming * fixes * cpplint * uncrusitfy * code review * navfn exceptions * theta_star_planner * fix code review * wrote timeout exception * consistent exception throwing across planners * code review * remove * uncrusitfy * uncrusify * catch exception * expect throw * update string of exceptions * throw with coords * removed start == goal error code * code review * code review * uncrustify * code review * message order * remove remarks * update xml * update xml * Update nav2_behavior_tree/nav2_tree_nodes.xml Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Future work that may be required in bullet points
For Maintainers: