-
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 1 commit
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,7 @@ | ||
| #Determine if the current path is still valid | ||
|
|
||
| nav_msgs/Path path | ||
| uint8 max_cost | ||
SteveMacenski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
| bool is_valid | ||
| int32[] invalid_pose_indices | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -705,7 +705,7 @@ void PlannerServer::isPathValid( | |||||
| { | ||||||
| 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) { | ||||||
SteveMacenski marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| } 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!
Uh oh!
There was an error while loading. Please reload this page.