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

updating contact Refvel #37

Open
Saeed-Mansouri opened this issue Oct 6, 2021 · 1 comment
Open

updating contact Refvel #37

Saeed-Mansouri opened this issue Oct 6, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@Saeed-Mansouri
Copy link

Hello @stephane-caron

As far as I understood the contact.velRef is not updated in FootstepPlan::updateInitialTransform function. So I think that this is a bug of the LIPM. I like to suggest adding the following commands to the mentioned function.

for(auto & contact : contacts_)
  {
    contact.refVel = (X_delta.rotation()).inverse() * contact.refVel;
  }
@stephane-caron
Copy link
Collaborator

Good catch! 🎣

This velocity is only set in PlanInterpolator::runWalking_() and it should indeed be updated by FootstepPlan::updateInitialTransform(), otherwise ModelPredictiveControl::updateVelCost() uses the velocity in the wrong frame.

I agree with your fix. Here is how it checks for me:

  • Let's write v' the new contact.refVel after update and v the old one
  • We want v'_C' in the new contact frame C' to be the same as v_C in the old contact frame C
  • Old and new contact frame orientations are, by construction: R_0_C' = R_0_C * R_delta
  • Then v'_C' == v_C becomes R_0_C' * v'_0 == R_0_C * R_delta * v'_0 == R_0_C * v_0
  • That is v'_0 == R_delta^{-1} * v_0

stephane-caron added a commit to stephane-caron/lipm_walking_controller that referenced this issue Oct 23, 2021
stephane-caron added a commit to stephane-caron/lipm_walking_controller that referenced this issue Jun 22, 2022
@stephane-caron stephane-caron added the bug Something isn't working label Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants