From 4940ea6dd700fc6505b40a7cf6b38b5895120a11 Mon Sep 17 00:00:00 2001 From: Jeremy Nimmer Date: Wed, 27 Mar 2024 18:41:10 -0700 Subject: [PATCH] WIP try a default of zero --- multibody/plant/multibody_plant.h | 6 ++---- multibody/tree/rigid_body.cc | 4 +--- multibody/tree/rigid_body.h | 6 ++---- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/multibody/plant/multibody_plant.h b/multibody/plant/multibody_plant.h index 5dfc07433845..fc94693add8a 100644 --- a/multibody/plant/multibody_plant.h +++ b/multibody/plant/multibody_plant.h @@ -1159,8 +1159,7 @@ class MultibodyPlant : public internal::MultibodyTreeSystem { /// @param[in] M_BBo_B /// The SpatialInertia of the new rigid body to be added to `this` /// %MultibodyPlant, computed about the body frame origin `Bo` and expressed - /// in the body frame B. When not provided, defaults to a nominal non-zero - /// value. + /// in the body frame B. When not provided, defaults to ... /// @returns A constant reference to the new RigidBody just added, which will /// remain valid for the lifetime of `this` %MultibodyPlant. const RigidBody& AddRigidBody( @@ -1206,8 +1205,7 @@ class MultibodyPlant : public internal::MultibodyTreeSystem { /// @param[in] M_BBo_B /// The SpatialInertia of the new rigid body to be added to `this` /// %MultibodyPlant, computed about the body frame origin `Bo` and expressed - /// in the body frame B. When not provided, defaults to a nominal non-zero - /// value. + /// in the body frame B. When not provided, defaults to ... /// @returns A constant reference to the new RigidBody just added, which will /// remain valid for the lifetime of `this` %MultibodyPlant. /// @throws std::exception if additional model instances have been created diff --git a/multibody/tree/rigid_body.cc b/multibody/tree/rigid_body.cc index 8a2c8f88431c..57cc1948d426 100644 --- a/multibody/tree/rigid_body.cc +++ b/multibody/tree/rigid_body.cc @@ -65,9 +65,7 @@ RigidBody::RigidBody(const std::string& body_name, template SpatialInertia RigidBody::MakeNominalSpatialInertiaForConstructor() { - const double mass = 1.0; - const double radius = 0.0625; - return SpatialInertia::SolidSphereWithMass(mass, radius); + return SpatialInertia::Zero(); } template diff --git a/multibody/tree/rigid_body.h b/multibody/tree/rigid_body.h index d2b1db5bc9cd..99332be3a7b3 100644 --- a/multibody/tree/rigid_body.h +++ b/multibody/tree/rigid_body.h @@ -197,8 +197,7 @@ class RigidBody : public MultibodyElement { /// A name associated with this body. /// @param[in] M_BBo_B /// Spatial inertia of this body B about the frame's origin `Bo` and - /// expressed in the body frame B. When not provided, defaults to a nominal - /// non-zero value. + /// expressed in the body frame B. When not provided, defaults to ... /// @note See @ref multibody_spatial_inertia for details on the monogram /// notation used for spatial inertia quantities. explicit RigidBody(const std::string& body_name, @@ -214,8 +213,7 @@ class RigidBody : public MultibodyElement { /// The model instance associated with this body. /// @param[in] M_BBo_B /// Spatial inertia of this body B about the frame's origin `Bo` and - /// expressed in the body frame B. When not provided, defaults to a nominal - /// non-zero value. + /// expressed in the body frame B. When not provided, defaults to ... /// @note See @ref multibody_spatial_inertia for details on the monogram /// notation used for spatial inertia quantities. RigidBody(const std::string& body_name, ModelInstanceIndex model_instance,