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

Clean up robot/util. #588

Merged
merged 23 commits into from
Oct 16, 2020
Merged

Clean up robot/util. #588

merged 23 commits into from
Oct 16, 2020

Conversation

sniyaz
Copy link

@sniyaz sniyaz commented Oct 5, 2020

This PR cleans up robot/util by deleting all of the planTo* methods. This requires us to rewrite the corresponding methods in ConcreteRobot and ConcreteManipulator to reroute through the new Planner API.

This PR also removes all CRRT functionality in both ConcreteRobot and ConcreteManipulator. This will be added back later once we actually decide how to integrate CRRT and AIKIDO. None of our demo code should rely on CRRT, so this is fine.

NOTE: This PR depends on #587 by @brianhou, due to the new planner adapter.


Before creating a pull request

  • Document new methods and classes
  • Format code with make format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@sniyaz sniyaz changed the title Clean up robot/util. Clean up robot/util. [DO NOT MERGE] Oct 5, 2020
@brianhou brianhou marked this pull request as draft October 5, 2020 02:32
@sniyaz sniyaz added this to the Aikido 0.5.0 milestone Oct 6, 2020
@sniyaz sniyaz marked this pull request as ready for review October 6, 2020 06:18
@sniyaz sniyaz changed the title Clean up robot/util. [DO NOT MERGE] Clean up robot/util. Oct 6, 2020
@sniyaz sniyaz requested a review from brianhou October 6, 2020 06:19
Copy link
Contributor

@brianhou brianhou left a comment

Choose a reason for hiding this comment

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

Found some time for a quick review! Broad strokes seem solid, although I'd also like to see a corresponding libada PR before merging.


// Create planning problem.
auto castedGoalState
= static_cast<const statespace::dart::MetaSkeletonStateSpace::State*>(
Copy link
Contributor

Choose a reason for hiding this comment

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

For some reason, I thought that we take the goal state as an Eigen::VectorXd instead. Is there a reason we take a State? What happens if this isn't actually a MetaSkeletonStateSpace::State?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, this is something I noticed as well. I'm not sure why we decided to take StateSpace::State* instead of MetaSkeletonStateSpace::State*. Since we're working with ConcreteRobot we must be working with MetaSkeletonStateSpace::State* (unless the user is doing something very stupid).

I agree that this design decision is a little funky (especially considering that we take a metaSkeleton as another argument), but changing it would break a lot of things just because of type issues. Maybe we can file an issue to clean this up later?

Copy link
Contributor

Choose a reason for hiding this comment

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

@aditya-vk does this seem ok for now?

@sniyaz
Copy link
Author

sniyaz commented Oct 6, 2020

@brianhou I tried to handle #447 by enforcing that any DART planner (and only a DART planner) has to satisfy these two invariants when plan() is called:

  1. The MetaSkeleton is locked during planning.
  2. The MetaSkeleton is reset after planning.

The only DART planner class that didn't need to be updated was the VFP offset planner (since the core VFP code does both of these anyway). LMK what you think of this solution: if we're happy with it, I can document this new invariant for DART planners somewhere.

This also means we don't have to worry about locking or saving state anywhere in ConcreteRobot or ConcreteManipulator, which is nice. I've taken that out.

Also, for what it's worth I tested simple_trajectories with all of these changes and things seem to work fine (so at least planToConfiguration isn't broken).

Base automatically changed from enhancement/brianhou/configurations-planner-adapter to master October 7, 2020 19:47
brianhou
brianhou previously approved these changes Oct 11, 2020
Copy link
Contributor

@brianhou brianhou left a comment

Choose a reason for hiding this comment

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

Seems generally fine to me, but would like @aditya-vk's eyes on this too.

@aditya-vk
Copy link
Contributor

Looks good to me. Has it been tested through libherb and herb3_demos to ensure everything works fine?

@sniyaz
Copy link
Author

sniyaz commented Oct 12, 2020

@aditya-vk Yup! The only other thing we're waiting on are the corresponding ADA changes. I'll chat with @egordon about those.

aditya-vk
aditya-vk previously approved these changes Oct 12, 2020
Copy link
Contributor

@aditya-vk aditya-vk left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@aditya-vk aditya-vk left a comment

Choose a reason for hiding this comment

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

Thanks for the checks with ADA and HERB!

@sniyaz sniyaz merged commit 92befdf into master Oct 16, 2020
@sniyaz sniyaz deleted the sniyaz_clean_util branch October 16, 2020 00:39
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