-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add ispathvalid maxcost #4873
Add ispathvalid maxcost #4873
Conversation
Signed-off-by: mini-1235 <[email protected]>
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.
Overall, looks very good to me, just small ~5 minute worth of nitpicks and we can merge this!
nav2_behavior_tree/include/nav2_behavior_tree/plugins/condition/is_path_valid_condition.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: mini-1235 <[email protected]>
Hi, thanks for reviewing @SteveMacenski, I have fixed the problem you have mentioned above and raised a PR on the documentation side, can you please take another look on it? Also the mppi test failed for some reason, but it passed on my machine, can you help on it 😄 |
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.
Small changes for setting the limit to be inscribed inflated by default, but otherwise LGTM!
nav2_behavior_tree/include/nav2_behavior_tree/plugins/condition/is_path_valid_condition.hpp
Outdated
Show resolved
Hide resolved
nav2_behavior_tree/plugins/condition/is_path_valid_condition.cpp
Outdated
Show resolved
Hide resolved
nav2_planner/src/planner_server.cpp
Outdated
cost == nav2_costmap_2d::INSCRIBED_INFLATED_OBSTACLE)) | ||
{ | ||
response->is_valid = false; | ||
break; | ||
} else if (cost == nav2_costmap_2d::LETHAL_OBSTACLE) { | ||
} else if (cost == nav2_costmap_2d::LETHAL_OBSTACLE || cost > request->max_cost) { |
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.
} else if (cost == nav2_costmap_2d::LETHAL_OBSTACLE || cost > request->max_cost) { | |
} else if (cost == nav2_costmap_2d::LETHAL_OBSTACLE || cost >= request->max_cost) { |
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.
I think we treat NO_INFORMATION(255)
as FREE_SPACE
here, so I should convert 255 to 0 / do a simple && cost!=FREE_SAPCE
here, am I 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.
This is a good point - I think if we add in max_cost, we should also add in a bool service argument for unknown_valid
and we check if the cost is larger than the max cost and if unknown should be considered valid or invalid (collision). It would need to be exposed from the BT node and so forth as well - but easy enough!
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: mini-1235 <[email protected]>
Signed-off-by: Steve Macenski <[email protected]>
One sec - lets let CI turn over again, a bunch of weird unusual tests failed and I want to make sure it wasn't just a fluke. Retriggering |
* Add ispathvalid maxcost Signed-off-by: mini-1235 <[email protected]> * Fix problems as requested Signed-off-by: mini-1235 <[email protected]> * Set default as 253, Add considered unknown as obstacle Signed-off-by: mini-1235 <[email protected]> * Edit comment Signed-off-by: mini-1235 <[email protected]> * Update nav2_planner/src/planner_server.cpp Signed-off-by: Steve Macenski <[email protected]> --------- Signed-off-by: mini-1235 <[email protected]> Signed-off-by: Steve Macenski <[email protected]> Co-authored-by: Steve Macenski <[email protected]>
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Add new parameter description https://docs.nav2.org/configuration/packages/bt-plugins/conditions/IsPathValid.html
Description of how this change was tested
Wrote a new test to test this and also tested on custom simulation env
Future work that may be required in bullet points
For Maintainers: