25
25
#include " drake/multibody/plant/hydroelastic_traction_calculator.h"
26
26
#include " drake/multibody/plant/make_discrete_update_manager.h"
27
27
#include " drake/multibody/plant/slicing_and_indexing.h"
28
+ #include " drake/multibody/topology/link_joint_graph.h"
28
29
#include " drake/multibody/tree/prismatic_joint.h"
29
30
#include " drake/multibody/tree/quaternion_floating_joint.h"
30
31
#include " drake/multibody/tree/revolute_joint.h"
@@ -312,7 +313,6 @@ MultibodyPlant<T>::MultibodyPlant(
312
313
// it less brittle.
313
314
visual_geometries_.emplace_back (); // Entries for the "world" body.
314
315
collision_geometries_.emplace_back ();
315
-
316
316
DeclareSceneGraphPorts ();
317
317
}
318
318
@@ -867,7 +867,7 @@ template <typename T>
867
867
std::vector<const Body<T>*> MultibodyPlant<T>::GetBodiesWeldedTo(
868
868
const Body<T>& body) const {
869
869
const std::set<BodyIndex> island =
870
- internal_tree ().multibody_graph ().FindBodiesWeldedTo (body.index ());
870
+ internal_tree ().link_joint_graph ().FindLinksWeldedTo (body.index ());
871
871
// Map body indices to pointers.
872
872
std::vector<const Body<T>*> sub_graph_bodies;
873
873
for (BodyIndex body_index : island) {
@@ -967,7 +967,7 @@ void MultibodyPlant<T>::SetFreeBodyPoseInAnchoredFrame(
967
967
DRAKE_MBP_THROW_IF_NOT_FINALIZED ();
968
968
this ->ValidateContext (context);
969
969
970
- if (!internal_tree ().get_topology ().IsBodyAnchored (frame_F.body ().index ())) {
970
+ if (!internal_tree ().get_topology ().IsLinkAnchored (frame_F.body ().index ())) {
971
971
throw std::logic_error (" Frame '" + frame_F.name () +
972
972
" ' must be anchored to the world frame." );
973
973
}
@@ -991,17 +991,17 @@ void MultibodyPlant<T>::CalcSpatialAccelerationsFromVdot(
991
991
internal_tree ().CalcSpatialAccelerationsFromVdot (
992
992
context, internal_tree ().EvalPositionKinematics (context),
993
993
internal_tree ().EvalVelocityKinematics (context), known_vdot, A_WB_array);
994
- // Permute BodyNodeIndex -> BodyIndex .
994
+ // Permute BodyNodeIndex -> LinkIndex .
995
995
// TODO(eric.cousineau): Remove dynamic allocations. Making this in-place
996
996
// still required dynamic allocation for recording permutation indices.
997
997
// Can change implementation once MultibodyTree becomes fully internal.
998
998
std::vector<SpatialAcceleration<T>> A_WB_array_node = *A_WB_array;
999
999
const internal::MultibodyTreeTopology& topology =
1000
1000
internal_tree ().get_topology ();
1001
1001
for (internal::BodyNodeIndex node_index (1 );
1002
- node_index < topology.get_num_body_nodes (); ++node_index) {
1003
- const BodyIndex body_index = topology.get_body_node (node_index).body ;
1004
- (*A_WB_array)[body_index ] = A_WB_array_node[node_index];
1002
+ node_index < topology.num_body_nodes (); ++node_index) {
1003
+ const LinkIndex link_index = topology.get_body_node (node_index).link ;
1004
+ (*A_WB_array)[link_index ] = A_WB_array_node[node_index];
1005
1005
}
1006
1006
}
1007
1007
@@ -1078,6 +1078,7 @@ void MultibodyPlant<T>::Finalize() {
1078
1078
if (geometry_source_is_registered ()) {
1079
1079
ApplyDefaultCollisionFilters ();
1080
1080
}
1081
+
1081
1082
FinalizePlantOnly ();
1082
1083
1083
1084
// Make the manager of discrete updates.
@@ -1316,7 +1317,7 @@ void MultibodyPlant<T>::ApplyDefaultCollisionFilters() {
1316
1317
}
1317
1318
// We explicitly exclude collisions within welded subgraphs.
1318
1319
std::vector<std::set<BodyIndex>> subgraphs =
1319
- internal_tree ().multibody_graph ().FindSubgraphsOfWeldedBodies ();
1320
+ internal_tree ().link_joint_graph ().FindSubgraphsOfWeldedLinks ();
1320
1321
for (const auto & subgraph : subgraphs) {
1321
1322
// Only operate on non-trivial weld subgraphs.
1322
1323
if (subgraph.size () <= 1 ) {
@@ -3494,7 +3495,7 @@ void MultibodyPlant<T>::RemoveUnsupportedScalars(
3494
3495
template <typename T>
3495
3496
std::vector<std::set<BodyIndex>>
3496
3497
MultibodyPlant<T>::FindSubgraphsOfWeldedBodies() const {
3497
- return internal_tree ().multibody_graph ().FindSubgraphsOfWeldedBodies ();
3498
+ return internal_tree ().link_joint_graph ().FindSubgraphsOfWeldedLinks ();
3498
3499
}
3499
3500
3500
3501
template <typename T>
0 commit comments