@@ -245,16 +245,6 @@ enum class DiscreteContactApproximation {
245245 kLagged,
246246};
247247
248- // / The kind of joint to be used to connect base bodies to world at Finalize().
249- // / See @ref mbp_working_with_free_bodies "Working with free bodies"
250- // / for definitions and discussion.
251- // / @see SetBaseBodyJointType() for details.
252- enum class BaseBodyJointType {
253- kQuaternionFloatingJoint , // /< 6 dofs, unrestricted orientation.
254- kRpyFloatingJoint , // /< 6 dofs using 3 angles; has singularity.
255- kWeldJoint , // /< 0 dofs, fixed to World.
256- };
257-
258248// / @cond
259249// Helper macro to throw an exception within methods that should not be called
260250// post-finalize.
@@ -1267,6 +1257,10 @@ class MultibodyPlant final : public internal::MultibodyTreeSystem<T> {
12671257 const systems::OutputPort<T>& get_generalized_contact_forces_output_port (
12681258 ModelInstanceIndex model_instance) const ;
12691259
1260+ // TODO(sherm1) Modify the next comment to explain that unmodeled joints will
1261+ // have NaN reaction force entries here. (Joints can be unmodeled because
1262+ // they were removed or because they are internal to a composite body.)
1263+
12701264 // / Reports joint reaction forces as an @ref AbstractValue "abstract-valued"
12711265 // / output port containing an `std::vector<SpatialForce<T>>` of size
12721266 // / num_joints().
@@ -1766,6 +1760,7 @@ class MultibodyPlant final : public internal::MultibodyTreeSystem<T> {
17661760 // / @param[in] model_instance (optional) the index of the model instance to
17671761 // / which `joint_type` is to be applied.
17681762 // / @throws std::exception if called after Finalize().
1763+ // / @see GetBaseBodyJointType(), Finalize()
17691764 void SetBaseBodyJointType (
17701765 BaseBodyJointType joint_type,
17711766 std::optional<ModelInstanceIndex> model_instance = {});
@@ -1778,7 +1773,7 @@ class MultibodyPlant final : public internal::MultibodyTreeSystem<T> {
17781773 // / This can be called any time -- pre-finalize it returns the joint type
17791774 // / that will be used by Finalize(); post-finalize it returns the joint type
17801775 // / that _was_ used if there were any base bodies in need of a joint.
1781- // / @see SetBaseBodyJointType()
1776+ // / @see SetBaseBodyJointType(), Finalize()
17821777 BaseBodyJointType GetBaseBodyJointType (
17831778 std::optional<ModelInstanceIndex> model_instance = {}) const ;
17841779
@@ -5195,7 +5190,7 @@ class MultibodyPlant final : public internal::MultibodyTreeSystem<T> {
51955190
51965191 // / Returns a constant reference to the *world* body.
51975192 const RigidBody<T>& world_body () const {
5198- return internal_tree ().world_body ();
5193+ return internal_tree ().world_link ();
51995194 }
52005195
52015196 // / Returns a constant reference to the *world* frame.
@@ -5206,7 +5201,7 @@ class MultibodyPlant final : public internal::MultibodyTreeSystem<T> {
52065201 // / Returns the number of RigidBody elements in the model, including the
52075202 // / "world" RigidBody, which is always part of the model.
52085203 // / @see AddRigidBody().
5209- int num_bodies () const { return internal_tree ().num_bodies (); }
5204+ int num_bodies () const { return internal_tree ().num_links (); }
52105205
52115206 // / Returns `true` if plant has a rigid body with unique index `body_index`.
52125207 bool has_body (BodyIndex body_index) const {
0 commit comments