Coder Social home page Coder Social logo

robot-plan-runner's Introduction

CMake Project with an Installed Drake

This uses the CMake find_package(drake) mechanism to find an installed instance of Drake.

Instructions

These instructions are only supported for Ubuntu 18.04 (Bionic).

###############################################################
# Install Prerequisites
###############################################################
# Various system dependencies
sudo ../scripts/setup/linux/ubuntu/bionic/install_prereqs

# (Optionally) Install GTest
# You could also explicitly pull gtest into the CMake build directly:
#     https://github.com/google/googletest/tree/master/googletest
sudo apt-get install libgtest-dev
ls
mkdir ~/gtest && cd ~/gtest && cmake /usr/src/gtest && make
sudo cp *.a /usr/local/lib

###############################################################
# Install Drake to /opt/drake
###############################################################

# 1) A specific version (date-stamped)
# curl -O https://drake-packages.csail.mit.edu/drake/nightly/drake-20191015-bionic.tar.gz

# 2) The latest (usually last night's build)
curl -O https://drake-packages.csail.mit.edu/drake/nightly/drake-latest-bionic.tar.gz
sudo tar -xvzf drake-latest-bionic.tar.gz -C /opt

# 3) Manual Installation
# git clone https://github.com/RobotLocomotion/drake.git
# (mkdir drake-build && cd drake-build && cmake -DCMAKE_INSTALL_PREFIX=/opt/drake ../drake && make)

# 4) Manual Installation w/ Licensed Gurobi
# Install & setup gurobi (http://drake.mit.edu/bazel.html?highlight=gurobi#install-on-ubuntu)
# git clone https://github.com/RobotLocomotion/drake.git
# (mkdir drake-build && cd drake-build && cmake -DCMAKE_INSTALL_PREFIX=/opt/drake -DWITH_GUROBI=ON ../drake && make)

###############################################################
# Build Everything
###############################################################
git clone https://github.com/RobotLocomotion/drake-external-examples.git
cd drake-external-examples
mkdir drake_cmake_installed-build && cd drake_cmake_installed-build
cmake -DCMAKE_PREFIX_PATH=/opt/drake ../drake_cmake_installed
make

###############################################################
# Execute
###############################################################
# A demo
/opt/drake/bin/drake-visualizer &
(cd src/particles && exec ./uniformly_accelerated_particle)

# (Optionally) Run Tests
make test

Examples

Drake specific Examples:

Developer Testing

If you are a Drake Developer making build or API changes that may affect the downstream interface, please test this locally on your system.

These build instructions are adapted from those above, but will use an existing source tree of Drake (but not installing it to /opt/drake), build this project, and then run all available tests:

# Build development version of Drake, ensuring no old artifacts are present.
cd drake  # Where you are developing.
rm -rf ../drake-build && mkdir ../drake-build && cd ../drake-build
cmake ../drake  # Configure Gurobi, Mosek, etc, if needed.
# Build locally.
make
# Record the build's install directory.
drake_install=${PWD}/install

# Build this project using a development version of Drake.
cd ..
# Clone this repository if you have not already.
git clone https://github.com/RobotLocomotion/drake-external-examples.git
cd drake-external-examples
# Follow "Install Prerequisites" in the instructions linked above if you
# have not already.
mkdir drake_cmake_installed-build && cd drake_cmake_installed-build
cmake -DCMAKE_PREFIX_PATH=${drake_install} ../drake_cmake_installed
make
ctest

robot-plan-runner's People

Contributors

pangtao22 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.