Skip to content
No description, website, or topics provided.
C++ Python Other
Branch: master
Clone or download
yminchen Add benchmark example for dircon (#107)
**Detail changes**:
Dircon:
- fix a bug. Use the jacobian that doesn't skip any constraints in the equations of motion
- fix bugs in the index of decision variable when adding constraint 
- pass in surface normal into constructor of dircon_position_data
- add surface (e.g. ground) incline feature to dircon_position_data
- use linear constraint instead of LorentzConeConstraint for friction cone (to increase speed)
- add a utility function to detect if a MBP is quaternion floating based
- add unit norm quaternion constraint and also add a slack variable in dynamic constraint 

Example:
- Trajectory optimization of Cassie squating
Latest commit ea86f21 Nov 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
attic Updates for latest verison of drake. (#102) Sep 30, 2019
common Changed drake dependencies to drake_shared_library to uniformly suppo… Jun 14, 2019
director Adding option to specify state when tracking COM data, also updated B… Sep 29, 2019
examples Add benchmark example for dircon (#107) Nov 6, 2019
install Updates for latest verison of drake. (#102) Sep 30, 2019
lcm Adding skeleton code for saving/loading trajectories (#104) Oct 31, 2019
lcmtypes Adding skeleton code for saving/loading trajectories (#104) Oct 31, 2019
multibody Add benchmark example for dircon (#107) Nov 6, 2019
signalscope After Drake PR, added springs to MBP Cassie model. Feb 21, 2019
solvers Changed drake dependencies to drake_shared_library to uniformly suppo… Jun 14, 2019
systems Add benchmark example for dircon (#107) Nov 6, 2019
third_party/spruce Added spruce as third-party element within dairlib, removing problema… Feb 5, 2019
tools ROS Publishers and Subscribers (#85) Jul 25, 2019
.bazelproject Pre-dynamic walking working commit. Most examples build with Bazel. May 20, 2018
.bazelrc ROS Publishers and Subscribers (#85) Jul 25, 2019
.cirrus.yml Osc testing and debugging (#94) Aug 10, 2019
.dairlib-find_resource-sentinel Added and incorporated find resource utilities. See cassie_utils.h fo… Jun 14, 2018
.gitignore Bug fix in OSC (cost weight) (#110) Nov 4, 2019
BUILD.bazel Switching to a pegged revision of drake (as default) (#36) Feb 19, 2019
LICENSE Update LICENSE May 31, 2018
LICENSE_DRAKE.TXT License update. Jun 1, 2018
README.md ROS Publishers and Subscribers (#85) Jul 25, 2019
WORKSPACE Reverted to Drake v0.11.0, due to error in multibody simulation. Oct 29, 2019
environ.bzl Switching to a pegged revision of drake (as default) (#36) Feb 19, 2019
noros.bazelrc ROS Publishers and Subscribers (#85) Jul 25, 2019

README.md

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

  • master branch build and unit tests: Build Status
  • Experimental build against Drake's master branch: Build Status

Complete Build Instructions

Download dairlib

  1. Clone dairlib into the your workspace, e.g. "my-workspace/dairlib".
git clone https://github.com/DAIRLab/dairlib.git
  1. Download and setup SNOPT

dairlib, by default, assumes that users have access to SNOPT(https://web.stanford.edu/group/SOL/snopt.htm), though it is not required. If you do not have SNOPT, you will need to edit .bazelrc and change build --define=WITH_SNOPT=ON to build --define=WITH_SNOPT=OFF

For users at Penn, download SNOPT (https://www.seas.upenn.edu/~posa/snopt/snopt7.6.tar.gz) and add the following line to your ~/.bashrc

export SNOPT_PATH=<the directory you downloaded to>/snopt7.6.tar.gz

There is no need to extract the tar.

Build Drake

The library is meant to be built with Drake (see http://drake.mit.edu/ for more details). There are two ways to use Drake within dairlib:

Option 1: use pegged revision

The only specific action needed here is to install all of Drake's prerequisites. There are two choices

  1. (Experimental) In dairlib/install, run the appropriate install_prereqs_xxx.sh. This is untested on mac, and has not been tested to get every dependency for a fresh install.
  2. Download a source copy of drake, and install pre-requisites as described here: http://drake.mit.edu/from_source.html

bazel will automatically download the pegged revision, specified in the WORKSPACE file. dairlib developers hope to keep this pegged revision current, and ensure that the pegged version will always work with a specific version of dairlib.

This option is recommended for users who are not currently editing any source code in Drake itself.

Option 2: source install of Drake

Install Drake from source into "my-workspace"/drake http://drake.mit.edu/from_source.html. You do not need to build it, but prerequisites should also be installed. You will need git to start.

To tell dairlib to use your local install, set the environment variable DAIRLIB_LOCAL_DRAKE_PATH, e.g.

export DAIRLIB_LOCAL_DRAKE_PATH=/home/user/my-workspace/drake

Other dependencies

These dependencies are necessary for some advanced visualization and process management. Many examples will work without a full installation of Director or libbot, but (for lab members), these are ultimately recommended.

LCM and libbot

Install a local copy of lcm and libbot2 using sudo apt install lcm libbot2. The prerequisites installation from Drake should add the proper repo for these. (This likely require's Drake's prerequisites to be installed from a source copy).

ROS

To integrate with ROS (tested on ROS Melodic), the following steps are required.

  1. Install ROS http://wiki.ros.org/ROS/Installation
  2. Do not forget to setup your environment. For instance, add these lines to ~/.bashrc
export ROS_MASTER_URI=http://localhost:11311
source /opt/ros/melodic/setup.bash 
  1. Install additional dependencies
sudo apt install python-rosinstall-generator python-catkin-tools
  1. Build the ROS workspace using catkin. From dairlib/,
cd tools/workspace/ros
./compile_ros_workspace.sh
  1. Set the environment variable DAIRLIB_WITH_ROS to ON. For instance, add to ~/.bashrc
export DAIRLIB_WITH_ROS=ON

Notes for macOS

  1. Be sure to have Xcode 9.0 or later installed with Command Line Tools. If you receive a clang: error: cannot specify -o when generating multiple output files message during the build process, re-run install_prereqs.sh, and be sure that it runs fully before termination, as this will reconfigure Xcode to work with Drake.

Build dairlib

Build what you want via Bazel. From dairlib, bazel build ... will build the entire project. Drake will be built as an external dependency.

Included Modules

A list of included modules

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

Docker (experimental)

Docker support is currently experimental. See install/bionic/Dockerfile for an Ubuntu Dockerfile. Docker is being used in conjuction with Cirrus Continuous Integration, and should be better supported in the future.

You can’t perform that action at this time.