Drake Documentation

repository·master·Indexed 25 days ago

https://github.com/robotlocomotion/drake

A model-based design and verification framework for robotics providing tools for modeling, simulating, and controlling complex robotic systems. Includes features such as a custom AutoDiff implementation, Drake Gym for reinforcement learning, and support for LCM-based control stacks. Documentation covers C++ and Python APIs, simulation examples like Acrobot and Allegro Hand, and guides for using the Bazel build system.

Tokens
135.1K
Snippets
220
Records
1K
Agent score
88%

What's inside Drake

  1. Overview of ConstraintSolver prototype

    master

    The ConstraintSolver is a prototype solver for mixed linear complementarity problems (MLCPs) designed for rigid multi-body systems. It handles bilateral and unilateral constraints, as well as polyhedral approximations of friction cone constraints.

    Warning: This solver is currently located within an example and is not a supported main Drake feature. It is known to perform poorly for real robotic applications due to numerical ill-conditioning and lack of scalability with the number of constraints. It is intended for research or illustrative purposes rather than production robotics.

  2. Overview of Multibody Benchmarks

    master

    Drake provides several benchmarking programs to measure the performance of multibody operations and specific algorithms:

    • acrobot: Benchmarks plant operations under autodiff to detect performance regressions.
    • cassie: A medium-sized robot benchmark used to measure mass matrix, inverse dynamics, forward dynamics, and their AutoDiff derivatives. It is intended for local performance measurement and code tweaking rather than regression testing.
    • iiwa_relaxed_pos_ik: A benchmark specifically for InverseKinematics.
    • position_constraint: A benchmark for PositionConstraint.
  3. Overview of Drake

    master
    Drake is a C++ and Python toolbox designed for model-based design and verification in robotics. It focuses on analyzing robot dynamics and building control systems using optimization-based design. Unlike 'black box' simulators, Drake emphasizes exposing the mathematical structure of governing equations (such as sparsity, analytical gradients, and polynomial structure) to enable advanced planning, control, and uncertainty quantification.
  4. New Multibody Dynamics Features

    master

    Drake v0.14.0 introduces several improvements to multibody dynamics:

    • ABA Integration: MultibodyPlant::DoCalcTimeDerivatives() now uses the Articulated Body Algorithm (ABA).
    • Contact Properties: Added support for parsing Drake contact material properties via SDFormat/URDF.
    • Collision Filtering: URDF parsing now supports collision filter groups.
    • Frame Registration: All MultibodyPlant bodies now have a registered geometry frame.
    • Force Construction: You can now construct MultibodyForces before constructing a MultibodyPlant.
    • Visualization: Added support for ellipsoid rendering, textures for primitive objects (in RenderEngine*), and Graphviz visualization of MultibodyPlant topology.
  5. Supported Drake Configurations

    master

    Drake officially supports specific combinations of Operating Systems, Architectures, and Python versions.

    Key Constraints:

    • Python: Only CPython is officially supported. Using Anaconda may lead to compatibility issues.
    • Image Rendering: Features requiring image rendering (e.g., camera simulation) may require additional setup (see troubleshooting for GL initialization).
    • Gurobi Solver: Drake's pre-compiled binaries do not support the Gurobi solver. To use Gurobi, you must build Drake from source.

    Official Support Matrix:

    OSArchitecturePythonInstallation Method
    Ubuntu 24.04 LTSx86-64, arm643.12Pip, Binary, APT
    Ubuntu 24.04 LTSx86-64, arm643.13-3.14Pip
    Ubuntu 26.04 LTSx86-64, x86-64-v3, arm643.12-3.13Pip
    Ubuntu 26.04 LTSx86-64, x86-64-v3, arm643.14Pip, Binary, APT
    macOS Sequoia (15)arm643.13Pip
    macOS Sequoia (15)arm643.14Pip, Binary
    macOS Tahoe (26)arm643.13Pip
    macOS Tahoe (26)arm643.14Pip, Binary
    Amazon Linux 2023x86-64, arm643.12-3.14Pip
  6. Understand Drake's release and deprecation model

    master

    Drake uses a rolling release model rather than SemVer. New stable versions (numbered 1.x.y) are released approximately once per month.

    Key stability concepts:

    • Rolling Deprecation Window: When a feature is deprecated, it is typically finalized and removed 3+ minor versions later. This provides a roughly 3-month notice window.
    • Deprecation Announcements: Announcements are made in the release notes.
    • Language Warnings: C++ uses [[deprecated]] and Python uses warnings.warn to highlight changes, though these may not catch every instance.
    • Upgrade Recommendation: It is recommended to upgrade your pinned version of Drake at least every 3 months to stay ahead of deprecations.
  7. Understand the Drake Website directory structure

    master

    The Drake website is built using Jekyll. The following directory structure is relevant for managing or extending the website content:

    • doc/assets/: Static assets (CSS, JS).
    • doc/doxygen_cxx/: C++ API reference.
    • doc/images/: Images.
    • doc/_includes/: Jekyll include components (via Liquid). These can render Markdown.
    • doc/_layouts/: Jekyll HTML layouts. These cannot render Markdown.
    • doc/_pages/: Jekyll collection for additional root-level pages. These can render Markdown.
    • doc/pydrake/: Python API reference.
    • doc/_release-notes/: Jekyll collection containing the index of versioned releases.
    • doc/styleguide/: External Drake Style Guide.
    • doc/third_party/: Third party assets.
    • doc/index.md: The home page.
  8. New features in Multibody Dynamics and Geometry

    master

    v1.55.0 introduces several updates to Multibody Dynamics:

    • Inactive proximity geometry: Support for 'inactive' proximity geometry in collision filters.
    • Meshcat deformables: The Meshcat visualizer now supports deformables.
    • CENIC joint locking: CENIC now supports joint locking.
    • Bug Fixes: Fixed scalar converting MultibodyPlant vis-a-vis DeformableModel, CENIC constraint handling for small time steps, and eliding identity frames in joint parsing.
  9. New features in Drake v0.36.0

    master

    Dynamical Systems

    • Added systems::sensors::OptitrackReceiver.
    • systems::framework::BasicVector and systems::DiscreteValues now include value methods that return VectorX.
    • DiagramBuilder now fails-fast if used after the Build() method is called.

    Mathematical Program

    • Added IrisInConfigurationSpace with Ibex geometry optimization.
    • Added GetGraphvizString to GraphOfConvexSets.

    Multibody Dynamics and Geometry

    • Added several Meshcat visualizers: MeshcatPointCloudVisualizer, MeshcatContactVisualizer, and recording methods for MeshcatVisualizerCpp.
    • Added Meshcat primitives: SetLine, SetLineSegments, SetTriangleMesh, and SetObject(TriangleSurfaceMesh).

    Miscellaneous

    • Added improved support for reading and writing YAML-serialized files.
    • All package URIs within Drake's publicly accessible data now use the package://drake/... prefix.
  10. New features in Drake v1.42.0

    master

    Dynamical Systems

    • DiagramBuilder::Disconnect: New method added to disconnect components.
    • SimulatorConfig::start_time: Added start_time to the simulator configuration.

    Mathematical Program

    • OSQP: The OSQP solver now always reports primal and dual values regardless of the solver status.

    Multibody Dynamics and Geometry

    • Added point-to-specific-geometries distance query.

    Planning

    • Added JointLimits active DoF selecting constructors.

    pydrake (Python bindings)

    • Added binding for CollisionFilterScope.
    • Added binding for DofMask operator [].
  11. Understand Drake dependency hierarchy

    master

    Drake's directory structure is designed to prevent circular dependencies. The logical dependency order is:

    1. Core Libraries: The foundation of the repository.
    2. drake/examples: Logically follows all core libraries.
    3. test directories: Located throughout the code, these are logically last and are allowed to depend on any other directory (including examples), provided the dependency is explicitly declared in the build system rules.