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

Make sure acceleration limits match velocity limits #46

Merged
merged 4 commits into from
Sep 15, 2020

Conversation

egordon
Copy link
Collaborator

@egordon egordon commented Sep 3, 2020

Fixing a quick bug introduced from the last PR.

We only need the first 6 joints of the acceleration limits (to match the size of the velocity limits).


Before creating a pull request

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

Before merging a pull request

  • Add unit test(s) for this change

@egordon egordon self-assigned this Sep 14, 2020
? getAccelerationLimits()
: accelerationLimits;
auto sentVelocityLimits
= (velocityLimits.squaredNorm() == 0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

This condition is a bit of a doozy -- maybe pull it out into a separate variable?

= (velocityLimits.squaredNorm() == 0.0
|| (std::size_t)velocityLimits.size()
!= mArm->getMetaSkeleton()->getNumDofs())
? mArm->getMetaSkeleton()->getVelocityUpperLimits()
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that the current implementations of Ada::getVelocityLimits() and Ada::getAccelerationLimits() return the limits of the whole robot, including the fingers. I'm not especially familiar with this codebase, but are you using those finger limits at all? If not, why not change those methods (and maybe some other Ada methods, to be consistent) to just operate on the arm rather than the whole robot?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are not using the finger limits, so I agree that just sticking with the arm limits should work just fine. Changed.

@egordon egordon requested a review from brianhou September 15, 2020 00:02
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.

Looks fine to me. I wonder whether other methods (e.g., getCurrentConfiguration) should be updated to consistently call methods on mArm, but that could also be done in a future PR.

: accelerationLimits;
bool velLimitsInvalid
= (velocityLimits.squaredNorm() == 0.0)
|| velocityLimits.size() != getVelocityLimits().size();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I wonder if getVelocityLimits().size() should instead be path->getStateSpace()->getDimension()?

@egordon egordon merged commit d878d3f into master Sep 15, 2020
@egordon egordon deleted the egordon/fix_accel branch September 15, 2020 00:35
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.

2 participants