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.
mainbranch build and unit tests (Ubuntu Jammy 22.04):mainbranch build and unit tests (Ubuntu Noble 24.04):- Experimental build against Drake's
masterbranch (Jammy):
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 detailed in install/README.md.
Clone dairlib into your workspace, e.g. "my-workspace/dairlib".
git clone https://github.com/DAIRLab/dairlib.git
This script calls the corresponding prerequisite installation script from Drake.
sudo ./install/install_prereqs_ubuntu.sh
bazel build ...
We use Bazel with Bzlmod as our build system. bazel build ... builds everything in dairlib. To build specific binaries, use bazel build <path>/<to>/<target>.
By default, dairlib uses the Drake version pinned in MODULE.bazel. To build against a local Drake checkout, use:
bazel build --override_module=drake=/home/user/my-workspace/drake <path>/<to>/<target>
sudo apt install lcm libbot2
This installs local copies of lcm and libbot2. The prerequisites installation should add the proper apt repo for these. If not, add the Drake apt source for your Ubuntu codename, e.g. https://drake-apt.csail.mit.edu/jammy jammy main.
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.
Use the corresponding macOS-specific installation script provided by Drake.
I.e., in the Drake workspace, run:
./setup/mac/install_prereqs.sh
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.
See examples/impact_invariant_control/README.md for examples specific to impact invariant control
See systems/controllers/osc for an example of a general Operational Space Controller with support for many task space objectives such as
- center of mass tracking
- joint space tracking
- task space position tracking
- task space orientation tracking
We have tested that our OSC works for the following robot platforms: Cassie, Franka Panda, and TriFinger.
Refer to c3 repo
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