Skip to content
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 AnytimePathShortening on top of Default RRTConnect #204

Open
wants to merge 4 commits into
base: ros2-devel
Choose a base branch
from

Conversation

amalnanavati
Copy link
Contributor

@amalnanavati amalnanavati commented Nov 14, 2024

Description

I've been noticing many more planning failures lately (summer onwards) than we had in our Jan study. It turns out, that when I switched our default planner to RRTConnect #181 (side-note: I should not have done it as part of an unrelated PR), I did not add path shortening. This was resulting in the outputted plans having large swivels, which out system rejected.

This PR addresses that.

Testing procedure

Empirically, I tried this with 8 bites of string cheese at various locations on the plate, and none of them had a planning failure.

Before opening a pull request

  • Format your code using black formatter python3 -m black .
  • Run your code through pylint and address all warnings/errors. The only warnings that are acceptable to not address is TODOs that should be addressed in a future PR. From the top-level ada_feeding directory, run: pylint --recursive=y --rcfile=.pylintrc ..

Before Merging

  • Squash & Merge

Copy link

@jjaime2 jjaime2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem trivial enough, only wonder if we should validate on cubed melon since we saw several failures on that food type during the showcase.

@siddhss5
Copy link

siddhss5 commented Nov 14, 2024 via email

@amalnanavati
Copy link
Contributor Author

Ah, the path shortening algorithm is what I missed. Thanks for the correction!

I added AnytimePathShortening to our MoveIt config (ada_ros2#50) and empirically tested it on 8 pieces of string cheese. The planning failures are all resolved and the plans don't have swivels (big win), but empirically planning takes ~1.5x longer.

I'm currently working on a script to benchmark the "move above food" plans in sim, to get quantitative guidance for tuning AnytimePathShortening parameters, and to protect against future regressions.

@amalnanavati amalnanavati changed the title Switch default to RRT* Add AnytimePathShortening on top of Default RRTConnect Nov 14, 2024
@siddhss5
Copy link

siddhss5 commented Nov 14, 2024 via email

@amalnanavati
Copy link
Contributor Author

Quantitatively benchmarking on 192 "above food" plans (varying x, y, fork roll, and fork pitch), I'm not yet seeing the gains of Path Shortening + RRTConnect above RRT*. I'll play around with the path shortening parameters more (here), but let me know if you have suggestions.

Planner Success Rate Median Path Length (rad) Success Rate w/ Path Length Cutoffs Median Elapsed Time
AnytimePathShortening[RRTConnect] 0.89 3.29 0.67 2.73
RRT* 0.96 0.78 0.93 2.70
RRTConnect 0.97 3.68 0.58 1.00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants