Parallelize motion primitive generation and add trajectory_distinctness_ratio#5866
Merged
SteveMacenski merged 14 commits intoros-navigation:mainfrom Jan 26, 2026
Merged
Conversation
bf868af to
cf1cb4c
Compare
Collaborator
Author
|
I have to fix #5837 first, I am having mypy issue on this PR :( |
SteveMacenski
approved these changes
Jan 15, 2026
Member
SteveMacenski
left a comment
There was a problem hiding this comment.
Feel free to merge once you're happy with mypy
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
| # Loop through the local trajectories with the same target heading | ||
| for prev_pos, prev_len in trajectories_by_heading[target_heading]: | ||
| dist = np.linalg.norm(target_point - prev_pos) | ||
| if dist < self.trajectory_distinctness_ratio * min(current_length, prev_len): |
Member
There was a problem hiding this comment.
Should this check happen in _is_minimal_trajectory?
Collaborator
Author
There was a problem hiding this comment.
Sure, like adding a new argument to _is_minimal_trajectory?
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
...r/lattice_primitives/sample_primitives/5cm_resolution/1m_turning_radius/all_trajectories.png
Show resolved
Hide resolved
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
...r/lattice_primitives/sample_primitives/5cm_resolution/1m_turning_radius/all_trajectories.png
Show resolved
Hide resolved
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
SteveMacenski
approved these changes
Jan 26, 2026
Prathmesh2931
pushed a commit
to Prathmesh2931/navigation2
that referenced
this pull request
Jan 27, 2026
…ss_ratio (ros-navigation#5866) * Parallelize motion primitive generation Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Precommit Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Lint Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add trajectory distinctness ratio Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Move check to is_minimal_trajectory Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Drop previous length Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix test Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update readme Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * retrigger ci due to timeout Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update nav2_smac_planner/lattice_primitives/README.md Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update readme Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add old_5cm_resolution Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Remove output.json Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
Pana1v
pushed a commit
to Arnav-panjla/navigation2
that referenced
this pull request
Feb 21, 2026
…ss_ratio (ros-navigation#5866) * Parallelize motion primitive generation Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Precommit Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Lint Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add trajectory distinctness ratio Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Move check to is_minimal_trajectory Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Drop previous length Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Fix test Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update readme Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * retrigger ci due to timeout Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Update nav2_smac_planner/lattice_primitives/README.md Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> * Update readme Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Add old_5cm_resolution Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> * Remove output.json Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> --------- Signed-off-by: mini-1235 <mauricepurnawan@gmail.com> Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.