-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Planner Server: Add support for planning partial paths when planning through poses #5687
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
Planner Server: Add support for planning partial paths when planning through poses #5687
Conversation
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
|
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
|
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 <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
...ehavior_tree/include/nav2_behavior_tree/plugins/action/compute_path_through_poses_action.hpp
Show resolved
Hide resolved
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
…lbacks Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
|
@armgits, your PR has failed to build. Please check CI outputs and resolve issues. |
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, assuming the tests cover the code sufficiently, this looks good to me! Just some touch up details and this is good to ship 🚢
...ehavior_tree/include/nav2_behavior_tree/plugins/action/compute_path_through_poses_action.hpp
Show resolved
Hide resolved
Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
Signed-off-by: Abhishekh Reddy <helloarm@pm.me>
|
@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 <helloarm@pm.me> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated unit test with partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added support for planning partial paths when planning through poses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new unit test for planning through poses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated assertions in test cases to prevent segfaults Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated copyright Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Disable partial planning by default Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Trimmed empty lines Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new line at the end of file Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new result field for last reached pose index to the action Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated BT node with last reached pose index field Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Reduced line length for formatting Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Fixed last reachable index calculation Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added placeholder value for last_reached_index field in remaining callbacks Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Set default value for last_reached_index field Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added description for ALL_GOALS enum Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added output port in ComputePathThroughPoses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> --------- Signed-off-by: Abhishekh Reddy <helloarm@pm.me> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
…through poses (ros-navigation#5687) * Added a new state variable to track whether partial planning is allowed Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated unit test with partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added support for planning partial paths when planning through poses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new unit test for planning through poses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added partial planning parameter Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated assertions in test cases to prevent segfaults Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated copyright Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Disable partial planning by default Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Trimmed empty lines Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new line at the end of file Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added a new result field for last reached pose index to the action Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Updated BT node with last reached pose index field Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Reduced line length for formatting Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Fixed last reachable index calculation Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added placeholder value for last_reached_index field in remaining callbacks Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Set default value for last_reached_index field Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added description for ALL_GOALS enum Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Abhishekh Reddy <helloarm@pm.me> * Added output port in ComputePathThroughPoses Signed-off-by: Abhishekh Reddy <helloarm@pm.me> --------- Signed-off-by: Abhishekh Reddy <helloarm@pm.me> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Decwest <fumiyaonishi1016@gmail.com>
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-*.