Drake v1.31.0

Back to Release Notes

Announcements

  • A MultibodyPlant running in discrete-time mode now uses sampled output ports (#21623).
    • This is a major change to the output ports of a discrete-time MultibodyPlant for dynamics outputs (forces, accelerations, contacts, etc.). The kinematics outputs (positions, velocities, poses, etc.) are unchanged. Refer to the new plant API documentation titled “Discrete system dynamics” and “Output port sampling” for details.
    • A quick summary of major impacts:
      • By default, a discrete-time MultibodyPlant now has extra abstract State in the Context to support the sampling. If you need a minimal-state representation for motion planning, optimization, etc. then you can set the config option use_sampled_output_ports=false, or use a continuous-time plant instead.
      • By default, setting the positions of a discrete-time plant in the Context will not have any effect on the dynamics-related output ports, e.g., the contact results will not change. If you need to see changes to outputs without stepping the plant, then you can set the config option use_sampled_output_ports=false, or use a continuous-time plant instead. Or, you can call ExecuteForcedEvents() to force a dynamics step and then the outputs will change.
      • Simulations that use the dynamics output ports (e.g., that visualize contact results, or report external torques) will run substantially faster.
      • The port semantics now have a solid mathematical foundation. Previously, they were pseudo-sampled in a way that traded off correctness for speed. This new implementation is both faster and more correct.
  • Some significant bugs are fixed in solvers::OsqpSolver and solvers::MosekSolver (#21579).
    • A parsing bug in OsqpSolver which sometimes led to the wrong optimization program being solved by OsqpSolver. Valid programs encountering this bug would have silently solved the incorrect problem. This bug might show up for quadratic programs with cross terms in the quadratic cost.
    • A parsing bug in OsqpSolver which sometimes led to the error ERROR in validate_data: P is not upper triangular. Valid programs encountering this bug would have had their result.get_solution_result() set to InvalidInput and not solved.
    • A parsing bug in MosekSolver which sometimes led to the error MOSEK error 1415 (MSK_RES_ERR_QOBJ_UPPER_TRIANGLE): Only elements in the lower triangle of the quadratic term in the objective should be specified. Valid programs encountering this bug would have had their result.get_solution_result() set to SolverSpecificError and not solved.

Breaking changes since v1.30.0

  • MultibodyPlant running in discrete-time mode now uses sampled output ports (#21623).
    • This might require a few config tweaks or adjustments in your code.
    • See the announcement above for details.
  • ContactResults no longer reports hydroelasatic quadrature data (#21683).
  • HydroelasticContactInfo<Expression> is now empty (#21618)
    • Now it only provides for the default lifecycle operations (default constructor, destructor, copy, move, assign) but no longer has any accessors. (They were already vacuously empty, even previously.)

Refer to our Drake Stability Guidelines for our policy on API changes.

Changes since v1.30.0

Dynamical Systems

New features

  • Add bindings for systems/estimators and acrobot w/ encoders example (#21610)
  • Offer warn_deprecated=false option on System<T> port getters (#21631)
  • Add System<T>::ExecuteForcedEvents (#21664)

Fixes

  • Fix VectorSystem terrible computational performance (#21707)

Mathematical Program

New features

  • Support passing an initial_guess to GraphOfConvexSets::SolveConvexRestriction (#21506)
  • Add solvers::SemidefiniteRelaxationOptions (#21500)
  • Add solvers::CommonSolverOption::kStandaloneReproductionFileName and add support for it to ClarabelSolver (#21607)
  • Support parsing a solvers::LorentzConeConstraint from a formula (#21612)
  • Add option to specify a separate solver (and associated solver options) for GraphOfConvexSets preprocessing (#21641)
  • Support use_in_transcription in GraphOfConvexSets::AddCost (#21650)
  • Warn the user if a solvers::PositiveSemidefiniteConstraint constraint has 1 or 2 rows (#21657)
  • Improve the warning message when the Hessian type is indefinite in solvers::QuadraticConstraint (#21553)
  • Implement support in GraphOfConvexSets for creating slack variables on edges (#21403)
  • Maybe use axis-aligned bounding box intersection checks in solvers::CalcPairwiseIntersections (#21593)

Fixes

  • Relax solvers::UnrevisedLemkeSolver::ComputeZeroTolerance() internal tolerance for ARM (#21713)
  • Throw instead of asserting (debug-only) for solvers::QuadraticCost size check (#21583)
  • Fix parsing bugs in solvers::OsqpSolver and solvers::MosekSolver (see Announcements) (#21579)
  • Allow specifying a subspace along which to draw samples from a geometry::optimization::HPolyhedron (#21667)

Multibody Dynamics and Geometry

New features

  • Discrete MultibodyPlant uses sampled output ports (#21623)
  • Parse glTF files into RenderEngineGl (#21520)
  • Add multibody::ContactResults non-default constructor (#21685)
  • Add MultibodyPlant::CalcCenterOfMassTranslationalAccelerationInWorld() (#21710)

Fixes

  • multibody::CalcSpatialInertia handles Convex shapes correctly (#21693)
  • Fix wrong index bug in calculating convex hulls (#21655)
  • Relax multibody::SpatialVector::IsApprox default tolerance for ARM (#21713)
  • Fix name clash when parsing collision filter groups (#21529)
  • Correctly filter geometry contacts in MultibodyPlant under joint locking (#21611)
  • Make cache dependency tickets in MultibodyTree more precise (#21590)
  • Avoid slowdown of SceneGraph::GetDirectFeedthroughs() (#21630)
  • Improve accuracy of cache dependency tickets in MultibodyPlant (#21589)
  • Don’t call multibody::CalcSpatialInertia unless needed in mujoco file parsing (#21665)
  • Sort the result of geometry::QueryObject<T>::ComputeSignedDistancePairwiseClosestPoints (#21698)
  • Sort the result of geometry::QueryObject<T>::ComputeSignedDistanceToPoint (#21709)

Planning

New features

  • Add Edges accessor to GcsTrajectoryOptimization::EdgesBetweenSubgraphs (#21504)
  • Support symbolic evaluation of nonconvex derivative constraints in GcsTrajectoryOptimization (#21505)
  • Add path energy cost to KinematicTrajectoryOptimization (#21587)

Fixes

  • Add tolerance argument to GcsTrajectoryOptimization::UnwrapToContinousTrajectory, and adjust the default value to 1e-8 (#21629)
  • Fix segmentation fault in GcsTrajectoryOptimization::AddRegions (#21658)
  • Revise CollisionChecker parallel edge checks for improved performance (#21645)
  • Remove duplicate sort of signed distance pair results from SceneGraphCollisionChecker (#21702)

Tutorials and examples

  • None

Miscellaneous features and fixes

  • None

pydrake bindings

New features

  • None

Fixes

  • Add missing bindings for GcsTrajectoryOptimization::UnwrapToContinousTrajectory (#21622)

Build system

  • Upgrade Bazel to latest release 7.2.1 (#21676)
  • Add support for numpy 2.0 (#21582, #21684)

Build dependencies

  • Add mujoco_menagerie as a test-only dependency (#21649)
  • Upgrade abseil_cpp_internal to latest commit (#21670)
  • Upgrade crate_universe to latest releases (#21671)
  • Upgrade gz_math_internal to latest release 7.5.0 (#21674)
  • Upgrade mujoco_menagerie_internal to latest commit (#21670)
  • Upgrade mypy_internal to latest release 1.10.1 (#21670)
  • Upgrade pybind11 to latest commit (#21584)
  • Upgrade pycodestyle to latest release 2.12.0 (#21670)
  • Upgrade ros_xacro_internal to latest release 2.0.11 (#21670)
  • Upgrade rules_python to latest release 0.33.2 (#21670)
  • Upgrade tinygltf_internal to latest release 2.9.0 (#21569, #21670)
  • Upgrade typing_extensions_internal to latest release 4.12.2 (#21670)
  • Upgrade vtk_internal to latest commit (#21670)

Newly-deprecated APIs

  • drake::multibody::HydroelasticContactInfo constructors taking quadrature_point_data (#21683)
  • drake::multibody::HydroelasticContactInfo::quadrature_point_data (#21683)
  • drake::multibody::MultibodyPlant::EvalPointPairPenetrations (#21608)
  • drake::multibody::MultibodyPlant::get_geometry_poses_output_port (#21609)
  • drake::multibody::MultibodyPlant output port named “spatial_velocities” (#21609)
  • drake::multibody::MultibodyPlant output port named “spatial_accelerations” (#21609)
  • drake::systems::VectorSystem constructors without a direct_feedthrough argument (#21707)
  • Bazel label //multibody/plant:deformable_contact_info (#21689)
  • Bazel label //multibody/plant:hydroelastic_contact_info (#21689)
  • Bazel label //multibody/plant:hydroelastic_traction (#21689)
  • Bazel label //multibody/plant:point_pair_contact_info (#21689)
  • Bazel label //multibody/plant:hydroelastic_quadrature_point_data (#21689)
  • The lack of semicolons after these macros is deprecated and we plan to re-enforce this requirement in a future release (#21634):
    • DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS
    • DRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS
    • DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS
    • DRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS
    • DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARS
    • DRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS

Removal of deprecated items

  • repo.bzl build integration mechanism (#21651)
    • The replacement for the removal of the deprecated repo.bzl here is shown at this example: https://github.com/RobotLocomotion/drake-external-examples/tree/main/drake_bazel_download
  • mosek_repository() bazel rule without a mirrors argument (#21651)

Notes

This release provides pre-compiled binaries named drake-1.31.0-{jammy|noble|mac-arm64}.tar.gz. See Stable Releases for instructions on how to use them.

Drake binary releases incorporate a pre-compiled version of SNOPT as part of the Mathematical Program toolbox. Thanks to Philip E. Gill and Elizabeth Wong for their kind support.