This example uses the cmake build system with an
instance of Drake installed using the
APT package
manager.
First, run the install_prereqs script to download and install the
drake-dev.deb package from the latest
release. Most content
installs to /opt/drake. This script also installs the necessary packages for
this example.
setup/install_prereqsSee below for alternative versions of Drake to download.
To build the drake_cmake_installed_apt example:
mkdir build
cd build
cmake ..
makeTo run the drake_cmake_installed_apt tests:
cd build
ctest .By default, the install_prereqs script gets the latest version of Drake
(usually last night's build). Ignore this if that version is desired.
Otherwise, the following are alternative options for which version of Drake to
download.
To use any of these options, instead of running install_prereqs,
run the code for whichever option you prefer below. Each option
installs Drake into /opt/drake.
- A date-stamped version
Replace 20260401 with the desired date.
curl -O https://drake-packages.csail.mit.edu/drake/nightly/drake-dev_0.0.20260401-1_amd64-noble.deb
sudo apt-get install --no-install-recommends ./drake-dev_0.0.20260401-1_amd64-noble.debSee Apt Nightly Releases for more information.
- A stable release
Stable release packages are available as GitHub release attachments. Replace
1.51.1 below with the desired release, being sure to use -L to follow
redirects properly:
curl -LO https://github.com/RobotLocomotion/drake/releases/download/v1.51.1/drake-dev_1.51.1-1_amd64-noble.deb
sudo apt-get install --no-install-recommends ./drake-dev_1.51.1-1_amd64-noble.debSee Apt Stable Releases for more information.