DAIRLab / dairlib

MIT License
65 stars 26 forks source link

dairlib

Warning! This is very much "development-level" code and is provided as-is. APIs are likely to be unstable and, while we hope for the documentation to be thorough and accurate, we make no guarantees.

Current Continuous Integration Status

Below are the basic build instructions for the main branch of dairlib without any modifications. Build variations to include SNOPT/GUROBI/ROS or a specific version of Drake are details in install/README.md

1. Download dairlib

Clone dairlib into the your workspace, e.g. "my-workspace/dairlib".

git clone https://github.com/DAIRLab/dairlib.git

2. Install prerequisites (with sudo)

This script just calls the corresponding install_prereqs script from Drake (currently only for ubuntu 22.04)

sudo ./install/install_prereqs_jammy.sh

3. Build with bazel

bazel build ...

We use bazel as our build system. bazel build ... builds everything in dairlib. To build specific binaries, use bazel build <path>/<to>/<target>

4. LCM and libbot

sudo apt install lcm libbot2

Installs a local copy of lcm and libbot2 using sudo apt install lcm libbot2. The prerequisites installation should add the proper apt repo for these. If not, add https://drake-apt.csail.mit.edu/jammy jammy main to your apt sources

Other Setup Instructions

IDE setup

JetBrains IDEs have worked well for us and are available for free to students. For C++ development using the CLion Bazel plugin, see https://drake.mit.edu/clion.html and replace drake with dairlib in the "Setting up Drake in CLion" section.

Notes for macOS

Use the corresponding macOS-specific installation script provided by Drake.

I.e., in the Drake workspace, run:

./setup/mac/install_prereqs.sh

Included Modules

Cassie Locomotion Controllers

See examples/Cassie/README.md for general standing/walking/running/jumping controllers for Cassie in addition to a Cassie simulation with reflected inertia, motor/encoder models.

Impact-Invariant Control

See examples/impact_invariant_control/README.md for examples specific to impact invariant control

Operational Space Controller

See systems/controllers/osc for an example of a general Operational Space Controller with support for many task space objectives such as

We have tested that our OSC works for the following robot platforms: Cassie, Franka Panda, and TriFinger.

Contact-Implicit MPC (C3)

WIP

See systems/controllers/c3_controller.cc

Trajectory Optimization (DIRCON)

A modern Drake implementation of the DIRCON constrained trajectory optimization algorithm. Currently under construction. See /examples/PlanarWalker/run_gait_dircon.cc for a simple example of the hybrid DIRCON algorithm. The more complete example set (from the paper) currently exists on an older version of Drake https://github.com/mposa/drake/tree/hybrid-merge

Based off the publication

Michael Posa, Scott Kuindersma, Russ Tedrake. "Optimization and Stabilization of Trajectories for Constrained Dynamical Systems." Proceedings of the International Conference on Robotics and Automation (ICRA), 2016.

Available online at https://posa.seas.upenn.edu/wp-content/uploads/Posa16a.pdf