Planner Server: Add support for planning partial paths when planning through poses#5687
Conversation
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
|
@armgits please take a look at the failing linting / precommit jobs. The copyright would be yours / your company's (if done for a company) if its code you wrote. If you copy+pasted it with minimum modifications from another file in Nav2, keep that original copyright. |
There was a problem hiding this comment.
Do you think we shuold add a new field to the action definition that indicates if the output path is partial or not? https://github.com/ros-navigation/navigation2/blob/main/nav2_msgs/action/ComputePathThroughPoses.action
I think that would be important for an application to be aware of.
Otherwise, mostly just small things for my preference for conciseness!
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
|
LGTM! I think the new Action API field is the only missing element (+ the BT node to parse it to put in an output port; 3 lines) |
I was thinking if adding a new error code could do the same thing... Otherwise adding a new field to the result works too, I'm fine with either way to indicate a partial path in result.
|
|
If the setting is 'true' that it is value to return a partial one, then I think that's not an error code-situation (i.e. a failure). I think we should add a field if a partial one was used and/or maybe even include the index of the goals that the final output represents?
Yeah, just use the |
So this would be a boolean field to indicate partial plan + a list of indices in the order of poses given in goal request? Would the final index just before obstacle work instead? |
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
I think just the final index would work. Optionally: you could have this in a single field for the index of the goal -- whereas its set to -1 when it includes all goals. It could be an enum in the message definition like these https://github.com/ros-navigation/navigation2/blob/main/nav2_msgs/action/ComputePathThroughPoses.action#L11 (obviously needs to be signed) which can be set by default and overrided only when the failure condition happens. Then any use case of this can just check if |
This sounds perfect, I'll add this field to the action API. |
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Abhishekh Reddy <[email protected]>
…lbacks Signed-off-by: Abhishekh Reddy <[email protected]>
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Abhishekh Reddy <[email protected]>
072f2da to
d949c9b
Compare
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
SteveMacenski
left a comment
There was a problem hiding this comment.
Otherwise, assuming the tests cover the code sufficiently, this looks good to me! Just some touch up details and this is good to ship 🚢
Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Abhishekh Reddy <[email protected]>
Signed-off-by: Abhishekh Reddy <[email protected]>
|
@armgits check out the docs PR, I asked for a small change there and otherwise once CI passes we can merge! |
Codecov Report❌ Patch coverage is
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Just waiting on doc updates! CI's happy |
…through poses (ros-navigation#5687) * Added a new state variable to track whether partial planning is allowed Signed-off-by: Abhishekh Reddy <[email protected]> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Updated unit test with partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Added support for planning partial paths when planning through poses Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new unit test for planning through poses Signed-off-by: Abhishekh Reddy <[email protected]> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Updated assertions in test cases to prevent segfaults Signed-off-by: Abhishekh Reddy <[email protected]> * Updated copyright Signed-off-by: Abhishekh Reddy <[email protected]> * Disable partial planning by default Signed-off-by: Abhishekh Reddy <[email protected]> * Trimmed empty lines Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new line at the end of file Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new result field for last reached pose index to the action Signed-off-by: Abhishekh Reddy <[email protected]> * Updated BT node with last reached pose index field Signed-off-by: Abhishekh Reddy <[email protected]> * Reduced line length for formatting Signed-off-by: Abhishekh Reddy <[email protected]> * Fixed last reachable index calculation Signed-off-by: Abhishekh Reddy <[email protected]> * Added placeholder value for last_reached_index field in remaining callbacks Signed-off-by: Abhishekh Reddy <[email protected]> * Set default value for last_reached_index field Signed-off-by: Abhishekh Reddy <[email protected]> * Added description for ALL_GOALS enum Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Abhishekh Reddy <[email protected]> * Added output port in ComputePathThroughPoses Signed-off-by: Abhishekh Reddy <[email protected]> --------- Signed-off-by: Abhishekh Reddy <[email protected]> Co-authored-by: Steve Macenski <[email protected]>
…through poses (ros-navigation#5687) * Added a new state variable to track whether partial planning is allowed Signed-off-by: Abhishekh Reddy <[email protected]> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Updated unit test with partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Added support for planning partial paths when planning through poses Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new unit test for planning through poses Signed-off-by: Abhishekh Reddy <[email protected]> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <[email protected]> * Updated assertions in test cases to prevent segfaults Signed-off-by: Abhishekh Reddy <[email protected]> * Updated copyright Signed-off-by: Abhishekh Reddy <[email protected]> * Disable partial planning by default Signed-off-by: Abhishekh Reddy <[email protected]> * Trimmed empty lines Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new line at the end of file Signed-off-by: Abhishekh Reddy <[email protected]> * Added a new result field for last reached pose index to the action Signed-off-by: Abhishekh Reddy <[email protected]> * Updated BT node with last reached pose index field Signed-off-by: Abhishekh Reddy <[email protected]> * Reduced line length for formatting Signed-off-by: Abhishekh Reddy <[email protected]> * Fixed last reachable index calculation Signed-off-by: Abhishekh Reddy <[email protected]> * Added placeholder value for last_reached_index field in remaining callbacks Signed-off-by: Abhishekh Reddy <[email protected]> * Set default value for last_reached_index field Signed-off-by: Abhishekh Reddy <[email protected]> * Added description for ALL_GOALS enum Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Abhishekh Reddy <[email protected]> * Added output port in ComputePathThroughPoses Signed-off-by: Abhishekh Reddy <[email protected]> --------- Signed-off-by: Abhishekh Reddy <[email protected]> Co-authored-by: Steve Macenski <[email protected]> Signed-off-by: Decwest <[email protected]>
Basic Info
Description of contribution in a few bullet points
allow_partial_planningDescription of documentation updates required from your changes
The new parameter needs to be added to planner server configuration guide
Partial plan indicator
last_reached_indexin the action result field needs to be added as an output port to ComputePathThroughPoses behavior tree plugin configuration guideDescription of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.