DAIRLab / dairlib

MIT License
65 stars 26 forks source link

Enable complex mpc walk #324

Closed ShaneRozenLevy closed 1 year ago

ShaneRozenLevy commented 1 year ago

Ideally should be multiple PRs, but this PR:

Per file changes, broken into the 3 main goals for this PR: MPC Formulation systems/controllers/kinematic_centroidal_mpc/kinematic_centroidal_mpc.*: Fixed mpc formulation, uses mode sequence, and interface changes to use other changes multibody/kinematic/kinematic_constraints.cc: Added a negation to properly constraint world point evaluator to foot position decision variable systems/controllers/kinematic_centroidal_mpc/kinematic_centroidal_constraints.*: Reworked constraint for fixed mpc formulation examples/Cassie/kinematic_centroidal_mpc/cassie_kcmpc_trajopt.cc: heavy rework given new code

Quality of life examples/Cassie/cassie_utils.*: Add helper function for getting joint names examples/Cassie/kinematic_centroidal_mpc/cassie_kinematic_centroidal_mpc.*: Cassie specific child class of kinematic_centroidal_mpc for reduced copies code in for examples examples/Cassie/kinematic_centroidal_mpc/kinematic_centroidal_mpc_gains.yaml: Gains yaml systems/controllers/kinematic_centroidal_mpc/kinematic_centroidal_gains.h: Gains class

Reference generation systems/controllers/kinematic_centroidal_mpc/kcmpc_reference_generator.*: Class for generating simple reference trajectory systems/controllers/kinematic_centroidal_mpc/gait.*: Class used for reference generation gait specification examples/Cassie/kinematic_centroidal_mpc/cassie_reference_utils.*: Broke out IK code for nominal stand to its own file systems/controllers/kinematic_centroidal_mpc/reference_generation_utils.* Utility file for reference generation class


This change is Reviewable

ShaneRozenLevy commented 1 year ago

examples/Cassie/kinematic_centroidal_mpc/cassie_kcmpc_trajopt.cc line 121 at r1 (raw file):

Previously, yangwill (William Yang) wrote…
although we try to keep our file structure consistent, it'd be nice to keep it all within the repo - which is best accomplished using paths relative to the repo. Generally, I've done this by always running binaries from the root of the repo - but open to other suggestions.

So I initially had a relative reference, but it didn't work with bazel run. At BDI we just had an environment variable for our workspace. I'll think a little more on this.