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

Expose 'specified duration' variant of TOPP-RA in planner #92

Merged
merged 2 commits into from
Aug 24, 2024

Conversation

vonHartz
Copy link
Contributor

@vonHartz vonHartz commented Aug 1, 2024

As discussed here: #91

Copy link
Collaborator

@Lexseal Lexseal left a comment

Choose a reason for hiding this comment

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

too much code duplication. can be done with default duration argument + conditional

mplib/planner.py Outdated
instance = algo.TOPPRAsd(
[pc_vel, pc_acc], path, parametrizer="ParametrizeConstAccel"
)
instance.set_desired_duration(duration)
Copy link
Collaborator

Choose a reason for hiding this comment

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

seems to me this is the only change. would you mind just modifying the TOPP function above and add duration=None as default argument?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's correct.
Though you might want to know that TOPPRAsd is a bit less efficient than TOPRRA.
See: https://github.com/hungpham2511/toppra/blob/730aa8ad6854c7da01304ad1ed8c0819400862f4/toppra/algorithm/reachabilitybased/desired_duration_algorithm.py#L20
If that is not a concern for you, I'm happy to make the change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, nevermind. I'll do it with a conditional.

@vonHartz
Copy link
Contributor Author

Made the requested change. Let me know if there's anything else.

Copy link
Collaborator

@Lexseal Lexseal left a comment

Choose a reason for hiding this comment

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

LGTM

@KolinGuo KolinGuo merged commit cfbf2f3 into haosulab:main Aug 24, 2024
6 checks passed
@KolinGuo
Copy link
Member

Thanks for your contribution @vonHartz

@KolinGuo
Copy link
Member

Please use the nightly wheels if you need to use it for now. A new minor version release is planned in the coming weeks.

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.

3 participants