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

WIP: Use mc_rtc state observation pipeline and stabilizer #23

Closed
wants to merge 35 commits into from

Conversation

arntanguy
Copy link
Collaborator

This PR removes the state observation and stabilization related code in favor of those integrated in mc_rtc:

  • Avoids code duplication
  • Allows to easily test other state observation methods. We're planning to test @mehdi-benallegue's state-observation and in particular the TiltEstimator soon.

So far this has been successfully tested in simulation, including walking to random targets and stair climbing. Still some further cleanup required, and tests on the real robots. No review required at this point.

Copy link
Collaborator

@stephane-caron stephane-caron left a comment

Choose a reason for hiding this comment

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

Glad to see these components integrated up in mc_rtc 👍

// FIXME:
// - resets does not respect the foot plan position when pausing walking (feet come back align
// dragging on the floor)
// - Do we still need the posture tricks?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like the answer is yes, that's still how the controller implements Chest posture control (Section III.B). Without it, ankle compliance will comply uncompensated to the hip as we discussed last year stephane-caron#32, and that's extra work for the stabilizer (will likely fail the plank test then).

The indirect implementation via the anchor frame is not good, it's unnecessarily obscure. It is much better to do straight explicit feedback on the pelvis orientation like Kajita et al. proposed.

Copy link
Collaborator Author

@arntanguy arntanguy Nov 11, 2020

Choose a reason for hiding this comment

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

Thanks for the detailed description of the role of pelvis control.

Here I was more referring to the fact that you are resetting the reference posture at every single iteration. I know you were doing this to prevent the FSM from resetting the posture to the current one on state transitions. For LIPMWalking itself this is not an issue, however many people have made custom controllers based on this one, and when used in other contexts such as manipulation, or when one explicitely wants to looks somewhere this becomes annoying. It also interferes with some FSM behaviours, such as the Interrupt button in the FSM (the robot comes back to halfsitting instead of keeping its current posture). Anyways I'll change the logic of this in a subsequent PR.

// (6) updates that depend on realCom_
netWrenchObs_.update(realRobot(), supportContact());
stabilizer_.updateState(realCom_, realComd_, netWrenchObs_.wrench(), leftFootRatio_);
// XXX Default height is the same as that defined hidden in Stephan's
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// XXX Default height is the same as that defined hidden in Stephan's
// XXX Default height is the same as that defined hidden in Stephane's

😛

stabilizer().run();
pendulum().completeIPM(ctl.prevContact().p(), ctl.prevContact().normal());
pendulum().resetCoMHeight(ctl.plan.comHeight(), ctl.prevContact().p(), ctl.prevContact().normal());
controller().stabilizer()->target(pendulum().com(), pendulum().comd(), pendulum().comdd(), pendulum().zmp());
Copy link
Collaborator

Choose a reason for hiding this comment

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

😍

Since yaml-cpp does not support, nor intend to support YAML merge
anchors, this manually adds this ability to inherit from another robot's
plans configuration to avoid duplication

See jbeder/yaml-cpp#300
@arntanguy
Copy link
Collaborator Author

Closing in favor of #38

@arntanguy arntanguy closed this Mar 15, 2022
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.

None yet

5 participants