-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
include/libada/detail/Ada-impl.hpp
Outdated
? getAccelerationLimits() | ||
: accelerationLimits; | ||
auto sentVelocityLimits | ||
= (velocityLimits.squaredNorm() == 0.0 |
There was a problem hiding this comment.
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?
include/libada/detail/Ada-impl.hpp
Outdated
= (velocityLimits.squaredNorm() == 0.0 | ||
|| (std::size_t)velocityLimits.size() | ||
!= mArm->getMetaSkeleton()->getNumDofs()) | ||
? mArm->getMetaSkeleton()->getVelocityUpperLimits() |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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()
?
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
make format
Before merging a pull request