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

The reference velocity of swingFootTask is wrongly overwritten. #41

Open
Saeed-Mansouri opened this issue Jun 9, 2022 · 2 comments
Open
Labels
bug Something isn't working

Comments

@Saeed-Mansouri
Copy link

Saeed-Mansouri commented Jun 9, 2022

Hi @stephane-caron,

After updating the reference velocity of swingFootTask in updateSwingFoot(), you wrongly overwrite it in the single support phase by running updateFootForceDifferenceControl() of the stabilizer. As you can see in a log file, the reference velocity of swingFootTask is zero which is incorrect. By fixing this issue, I have seen a significant improvement in tracking the swing foot trajectory. You can see this improvement in the following graphs. (I should mention that I have applied #29 )

Tracking the vertical swing foot trajectory by zero reference velocity:
old_swingFoot

Tracking the vertical swing foot trajectory by correct reference velocity:
new_swingFoot

@gergondet
Copy link
Member

Hi @Saeed-Mansouri

Do you mind opening a PR with the change you applied?

Thanks

@stephane-caron
Copy link
Collaborator

@Saeed-Mansouri nice catch! 🎣 👍

The guilty overwrite is here:

  if(contactState_ != ContactState::DoubleSupport || inTheAir_)
  {
    dfzForceError_ = 0.;
    dfzHeightError_ = 0.;
    vdcHeightError_ = 0.;
    leftFootTask->refVelB({{0., 0., 0.}, {0., 0., 0.}});  // don't do if swing foot!
    rightFootTask->refVelB({{0., 0., 0.}, {0., 0., 0.}});  // don't do if swing foot!
    return;
  }

stephane-caron added a commit to stephane-caron/lipm_walking_controller that referenced this issue Jun 22, 2022
Thanks to @Saeed-Mansouri for pointing it out! Please hereby receive the
"LIPM Walking Controller Best Debugger Award", in recognition for your
contributions to the bug hunting and discussions around the project :)

See jrl-umi3218#41
@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

3 participants