Skip to content

Commit

Permalink
WIP try a default of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri committed Mar 28, 2024
1 parent b57008f commit 4940ea6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 2 additions & 4 deletions multibody/plant/multibody_plant.h
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,7 @@ class MultibodyPlant : public internal::MultibodyTreeSystem<T> {
/// @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<T>& AddRigidBody(
Expand Down Expand Up @@ -1206,8 +1205,7 @@ class MultibodyPlant : public internal::MultibodyTreeSystem<T> {
/// @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
Expand Down
4 changes: 1 addition & 3 deletions multibody/tree/rigid_body.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ RigidBody<T>::RigidBody(const std::string& body_name,

template <typename T>
SpatialInertia<double> RigidBody<T>::MakeNominalSpatialInertiaForConstructor() {
const double mass = 1.0;
const double radius = 0.0625;
return SpatialInertia<double>::SolidSphereWithMass(mass, radius);
return SpatialInertia<double>::Zero();
}

template <typename T>
Expand Down
6 changes: 2 additions & 4 deletions multibody/tree/rigid_body.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ class RigidBody : public MultibodyElement<T> {
/// 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,
Expand All @@ -214,8 +213,7 @@ class RigidBody : public MultibodyElement<T> {
/// 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,
Expand Down

0 comments on commit 4940ea6

Please sign in to comment.