-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add ispathvalid maxcost #4873
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
Changes from all commits
969c34c
4a81119
342378e
2c510d9
4dc0a19
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| #Determine if the current path is still valid | ||
|
|
||
| nav_msgs/Path path | ||
| uint8 max_cost 253 | ||
| bool consider_unknown_as_obstacle false | ||
| --- | ||
| bool is_valid | ||
| int32[] invalid_pose_indices |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -699,13 +699,19 @@ void PlannerServer::isPathValid( | |
| position.x, position.y, theta, footprint)); | ||
| } | ||
|
|
||
| if (cost == nav2_costmap_2d::NO_INFORMATION && request->consider_unknown_as_obstacle) { | ||
| cost = nav2_costmap_2d::LETHAL_OBSTACLE; | ||
| } else if (cost == nav2_costmap_2d::NO_INFORMATION) { | ||
| cost = nav2_costmap_2d::FREE_SPACE; | ||
| } | ||
|
|
||
| if (use_radius && | ||
| (cost == nav2_costmap_2d::LETHAL_OBSTACLE || | ||
| (cost >= request->max_cost || cost == nav2_costmap_2d::LETHAL_OBSTACLE || | ||
| 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 commentThe reason will be displayed to describe this comment to others. Learn more. I think this introduced a bug or at the very least an unexpected behavior compared to how it was. In this clause, use_radius is false so @mini-1235 can you double-check my logic? Thank you There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is true, but that's why this is a configuration of the request. If you set Do you recommend changing the default to 254? That seems sensible enough to me so it doesn't trigger anything unless the user meaningfully overrides it with another value of their selection. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes and that would not change anything for the case of where
I just didn't expect a change in behavior in my IsPathValid BT node, at least not without notes. |
||
| response->is_valid = false; | ||
| break; | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.