File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -792,8 +792,14 @@ void MultibodyTree<T>::CreateJointImplementations() {
792792 Mobilizer<T>* mobilizer = owned_mobilizer.get ();
793793 mobilizer->set_model_instance (joint.model_instance ());
794794 mobilizer->set_is_ephemeral (joint.is_ephemeral ());
795- // TODO(sherm1) Merge issue: do we need this?
796- // mobilizer->set_is_floating_base_mobilizer(is_floating_base_mobilizer);
795+
796+ // Mark floating base bodies as needed. Note the strict definition:
797+ // (1) the inboard joint must have six degrees of freedom, and
798+ // (2) that joint must be ephemeral (added automatically).
799+ bool is_floating_base_mobilizer =
800+ mobilizer->has_six_dofs () && mobilizer->is_ephemeral ();
801+ mobilizer->set_is_floating_base_mobilizer (is_floating_base_mobilizer);
802+
797803 AddMobilizer (std::move (owned_mobilizer)); // ownership->tree
798804 DRAKE_DEMAND (mobilizer->index () == mobod.index ());
799805 // Record the joint to mobilizer map.
You can’t perform that action at this time.
0 commit comments