-
Notifications
You must be signed in to change notification settings - Fork 31
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
introduce joint jerk bounds #76
Conversation
I don't think this implementation is correct. This is bounding the acceleration to be lower than For example with the Panda jerk bounds it limits the acceleration to half of the actual acceleration bounds but if the acceleration goes from the minimum bound ( |
Oh right, similar to the torque-derivative constraint that considers the current torques, we here need to involve the current joint accelerations for the jerk constraint.
and
|
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.
My main complaint would be to rename curAlphaD_
to prevAlphaD_
in both case and make sure to update it
src/QPConstr.cpp
Outdated
@@ -75,6 +76,7 @@ JointLimitsConstr::JointLimitsConstr(const std::vector<rbd::MultiBody> & mbs, | |||
alphaDDUpper_.resize(mb.nrDof()); | |||
alphaDDLower_.setConstant(-std::numeric_limits<double>::infinity()); | |||
alphaDDUpper_.setConstant(std::numeric_limits<double>::infinity()); | |||
curAlphaD_.resize(mb.nrDof()); |
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.
curAlphaD_.setZero();
src/QPConstr.cpp
Outdated
@@ -105,6 +124,8 @@ void JointLimitsConstr::update(const std::vector<rbd::MultiBody> & /* mbs */, | |||
|
|||
lower_ = lower_.cwiseMax(alphaDLower_); | |||
upper_ = upper_.cwiseMin(alphaDUpper_); | |||
lower_ = lower_.cwiseMax((alphaDDLower_ * step_) + curAlphaD_); | |||
upper_ = upper_.cwiseMin((alphaDDUpper_ * step_) + curAlphaD_); |
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.
curAlphaD_
needs to be updated (and I would rename it prevAlphaD_
I think this is clearer)
src/QPConstr.cpp
Outdated
@@ -238,6 +287,8 @@ void DamperJointLimitsConstr::update(const std::vector<rbd::MultiBody> & /* mbs | |||
} | |||
lower_ = lower_.cwiseMax(alphaDLower_); | |||
upper_ = upper_.cwiseMin(alphaDUpper_); | |||
lower_ = lower_.cwiseMax((alphaDDLower_ * step_) + curAlphaD_); | |||
upper_ = upper_.cwiseMin((alphaDDUpper_ * step_) + curAlphaD_); |
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.
Same remark regarding curAlphaD_
update and renaming to prevAlphaD_
Yes. This works to update the full
No. This would be wrong. You only need the first line to update |
Thanks @gergondet for your comments, I applied them all. |
Analogously to the existing joint acceleration bounds, this PR introduces joint jerk bounds.
For some robots these limits are defined by the manufacturer, see for example the panda manipulator.