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 callExecuteForcedEvents()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.
- 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
- Some significant bugs are fixed in
solvers::OsqpSolverandsolvers::MosekSolver(#21579).- A parsing bug in
OsqpSolverwhich 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
OsqpSolverwhich sometimes led to the errorERROR in validate_data: P is not upper triangular. Valid programs encountering this bug would have had theirresult.get_solution_result()set toInvalidInputand not solved. - A parsing bug in
MosekSolverwhich sometimes led to the errorMOSEK 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 theirresult.get_solution_result()set toSolverSpecificErrorand not solved.
- A parsing bug in
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.
ContactResultsno 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=falseoption onSystem<T>port getters (#21631) - Add
System<T>::ExecuteForcedEvents(#21664)
Fixes
- Fix
VectorSystemterrible computational performance (#21707)
Mathematical Program
New features
- Support passing an
initial_guesstoGraphOfConvexSets::SolveConvexRestriction(#21506) - Add
solvers::SemidefiniteRelaxationOptions(#21500) - Add
solvers::CommonSolverOption::kStandaloneReproductionFileNameand add support for it to ClarabelSolver (#21607) - Support parsing a
solvers::LorentzConeConstraintfrom a formula (#21612) - Add option to specify a separate solver (and associated solver options) for
GraphOfConvexSetspreprocessing (#21641) - Support
use_in_transcriptioninGraphOfConvexSets::AddCost(#21650) - Warn the user if a
solvers::PositiveSemidefiniteConstraintconstraint has 1 or 2 rows (#21657) - Improve the warning message when the Hessian type is indefinite in
solvers::QuadraticConstraint(#21553) - Implement support in
GraphOfConvexSetsfor 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::QuadraticCostsize check (#21583) - Fix parsing bugs in
solvers::OsqpSolverandsolvers::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
MultibodyPlantuses sampled output ports (#21623) - Parse glTF files into
RenderEngineGl(#21520) - Add
multibody::ContactResultsnon-default constructor (#21685) - Add
MultibodyPlant::CalcCenterOfMassTranslationalAccelerationInWorld()(#21710)
Fixes
multibody::CalcSpatialInertiahandlesConvexshapes correctly (#21693)- Fix wrong index bug in calculating convex hulls (#21655)
- Relax
multibody::SpatialVector::IsApproxdefault tolerance for ARM (#21713) - Fix name clash when parsing collision filter groups (#21529)
- Correctly filter geometry contacts in
MultibodyPlantunder joint locking (#21611) - Make cache dependency tickets in
MultibodyTreemore precise (#21590) - Avoid slowdown of SceneGraph::GetDirectFeedthroughs() (#21630)
- Improve accuracy of cache dependency tickets in
MultibodyPlant(#21589) - Don’t call
multibody::CalcSpatialInertiaunless 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
Edgesaccessor toGcsTrajectoryOptimization::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
CollisionCheckerparallel 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
Build dependencies
- Add
mujoco_menagerieas a test-only dependency (#21649) - Upgrade
abseil_cpp_internalto latest commit (#21670) - Upgrade
crate_universeto latest releases (#21671) - Upgrade
gz_math_internalto latest release 7.5.0 (#21674) - Upgrade
mujoco_menagerie_internal to latest commit (#21670) - Upgrade
mypy_internalto latest release 1.10.1 (#21670) - Upgrade
pybind11to latest commit (#21584) - Upgrade
pycodestyleto latest release 2.12.0 (#21670) - Upgrade
ros_xacro_internalto latest release 2.0.11 (#21670) - Upgrade
rules_pythonto latest release 0.33.2 (#21670) - Upgrade
tinygltf_internalto latest release 2.9.0 (#21569, #21670) - Upgrade
typing_extensions_internalto latest release 4.12.2 (#21670) - Upgrade
vtk_internalto latest commit (#21670)
Newly-deprecated APIs
drake::multibody::HydroelasticContactInfoconstructors 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::MultibodyPlantoutput port named “spatial_velocities” (#21609)drake::multibody::MultibodyPlantoutput port named “spatial_accelerations” (#21609)drake::systems::VectorSystemconstructors 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_SCALARSDRAKE_DEFINE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARSDRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARSDRAKE_DECLARE_CLASS_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARSDRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_SCALARSDRAKE_DEFINE_FUNCTION_TEMPLATE_INSTANTIATIONS_ON_DEFAULT_NONSYMBOLIC_SCALARS
Removal of deprecated items
repo.bzlbuild integration mechanism (#21651)- The replacement for the removal of the deprecated
repo.bzlhere is shown at this example: https://github.com/RobotLocomotion/drake-external-examples/tree/main/drake_bazel_download
- The replacement for the removal of the deprecated
mosek_repository()bazel rule without amirrorsargument (#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.