@@ -1703,15 +1703,16 @@ GTEST_TEST(MultibodyPlantTest, ReversedWeldError) {
1703
1703
" extra" , default_model_instance (), SpatialInertia<double >());
1704
1704
plant.WeldFrames (extra.body_frame (), plant.world_frame ());
1705
1705
1706
+ /* TODO(sherm1) This shouldn't throw at all. */
1707
+
1706
1708
// The important property of this message is that it reports some identifier
1707
1709
// for the involved objects, so at least the developer can map those back to
1708
1710
// objects and deduce what API call was in error. If the details of the
1709
1711
// message change, update this check to match. If in future the error can be
1710
1712
// caught at the WeldFrames() step, so much the better. Modify this test to
1711
1713
// reflect that.
1712
- DRAKE_EXPECT_THROWS_MESSAGE (
1713
- plant.Finalize (),
1714
- " .*already has a joint.*extra_welds_to_world.*joint.*not allowed.*" );
1714
+ DRAKE_EXPECT_THROWS_MESSAGE (plant.Finalize (),
1715
+ " .*Link.*not assigned a mobilizer.*" );
1715
1716
}
1716
1717
1717
1718
// Utility to verify the subset of output ports we expect to be direct a
@@ -3508,7 +3509,7 @@ GTEST_TEST(SetRandomTest, SetDefaultWhenNoDistributionSpecified) {
3508
3509
// explicitly added).
3509
3510
const Body<double >& body1 =
3510
3511
plant.AddRigidBody (" free body 1" , SpatialInertia<double >::MakeUnitary ());
3511
- plant.AddJoint <QuaternionFloatingJoint>(" " + body1.name (),
3512
+ plant.AddJoint <QuaternionFloatingJoint>(body1.name (),
3512
3513
plant.world_body (), {}, body1, {});
3513
3514
const std::string acrobot_file_name =
3514
3515
" drake/multibody/benchmarks/acrobot/acrobot.sdf" ;
@@ -4421,16 +4422,16 @@ GTEST_TEST(MultibodyPlantTest, GetNames) {
4421
4422
names = plant->GetPositionNames (false /* add_model_instance_prefix */ ,
4422
4423
false /* always_add_suffix */ );
4423
4424
EXPECT_THAT (names, testing::ElementsAreArray (
4424
- {" iiwa_joint_1" , " iiwa_joint_2" ,
4425
- " iiwa_joint_3" , " iiwa_joint_4" ,
4426
- " iiwa_joint_5" , " iiwa_joint_6" ,
4427
- " iiwa_joint_7" , " iiwa_link_0_qw" ,
4425
+ {" iiwa_joint_1" , " iiwa_joint_2" ,
4426
+ " iiwa_joint_3" , " iiwa_joint_4" ,
4427
+ " iiwa_joint_5" , " iiwa_joint_6" ,
4428
+ " iiwa_joint_7" , " iiwa_link_0_qw" ,
4428
4429
" iiwa_link_0_qx" , " iiwa_link_0_qy" ,
4429
4430
" iiwa_link_0_qz" , " iiwa_link_0_x" ,
4430
4431
" iiwa_link_0_y" , " iiwa_link_0_z" ,
4431
- " iiwa_joint_1" , " iiwa_joint_2" ,
4432
- " iiwa_joint_3" , " iiwa_joint_4" ,
4433
- " iiwa_joint_5" , " iiwa_joint_6" ,
4432
+ " iiwa_joint_1" , " iiwa_joint_2" ,
4433
+ " iiwa_joint_3" , " iiwa_joint_4" ,
4434
+ " iiwa_joint_5" , " iiwa_joint_6" ,
4434
4435
" iiwa_joint_7" }));
4435
4436
4436
4437
names = plant->GetVelocityNames (iiwa0_instance);
@@ -4511,16 +4512,16 @@ GTEST_TEST(MultibodyPlantTest, GetNames) {
4511
4512
names = plant->GetVelocityNames (false /* add_model_instance_prefix */ ,
4512
4513
false /* always_add_suffix */ );
4513
4514
EXPECT_THAT (names, testing::ElementsAreArray (
4514
- {" iiwa_joint_1" , " iiwa_joint_2" ,
4515
- " iiwa_joint_3" , " iiwa_joint_4" ,
4516
- " iiwa_joint_5" , " iiwa_joint_6" ,
4517
- " iiwa_joint_7" , " iiwa_link_0_wx" ,
4515
+ {" iiwa_joint_1" , " iiwa_joint_2" ,
4516
+ " iiwa_joint_3" , " iiwa_joint_4" ,
4517
+ " iiwa_joint_5" , " iiwa_joint_6" ,
4518
+ " iiwa_joint_7" , " iiwa_link_0_wx" ,
4518
4519
" iiwa_link_0_wy" , " iiwa_link_0_wz" ,
4519
4520
" iiwa_link_0_vx" , " iiwa_link_0_vy" ,
4520
4521
" iiwa_link_0_vz" , " iiwa_joint_1" ,
4521
- " iiwa_joint_2" , " iiwa_joint_3" ,
4522
- " iiwa_joint_4" , " iiwa_joint_5" ,
4523
- " iiwa_joint_6" , " iiwa_joint_7" }));
4522
+ " iiwa_joint_2" , " iiwa_joint_3" ,
4523
+ " iiwa_joint_4" , " iiwa_joint_5" ,
4524
+ " iiwa_joint_6" , " iiwa_joint_7" }));
4524
4525
4525
4526
names = plant->GetStateNames (iiwa0_instance);
4526
4527
EXPECT_THAT (names, testing::ElementsAreArray (
@@ -4590,26 +4591,26 @@ GTEST_TEST(MultibodyPlantTest, GetNames) {
4590
4591
names =
4591
4592
plant->GetStateNames (false /* add_model_instance_prefix */ );
4592
4593
EXPECT_THAT (names, testing::ElementsAreArray (
4593
- {" iiwa_joint_1_q" , " iiwa_joint_2_q" ,
4594
- " iiwa_joint_3_q" , " iiwa_joint_4_q" ,
4595
- " iiwa_joint_5_q" , " iiwa_joint_6_q" ,
4596
- " iiwa_joint_7_q" , " iiwa_link_0_qw" ,
4594
+ {" iiwa_joint_1_q" , " iiwa_joint_2_q" ,
4595
+ " iiwa_joint_3_q" , " iiwa_joint_4_q" ,
4596
+ " iiwa_joint_5_q" , " iiwa_joint_6_q" ,
4597
+ " iiwa_joint_7_q" , " iiwa_link_0_qw" ,
4597
4598
" iiwa_link_0_qx" , " iiwa_link_0_qy" ,
4598
4599
" iiwa_link_0_qz" , " iiwa_link_0_x" ,
4599
4600
" iiwa_link_0_y" , " iiwa_link_0_z" ,
4600
- " iiwa_joint_1_q" , " iiwa_joint_2_q" ,
4601
- " iiwa_joint_3_q" , " iiwa_joint_4_q" ,
4602
- " iiwa_joint_5_q" , " iiwa_joint_6_q" ,
4603
- " iiwa_joint_7_q" , " iiwa_joint_1_w" ,
4604
- " iiwa_joint_2_w" , " iiwa_joint_3_w" ,
4605
- " iiwa_joint_4_w" , " iiwa_joint_5_w" ,
4606
- " iiwa_joint_6_w" , " iiwa_joint_7_w" ,
4601
+ " iiwa_joint_1_q" , " iiwa_joint_2_q" ,
4602
+ " iiwa_joint_3_q" , " iiwa_joint_4_q" ,
4603
+ " iiwa_joint_5_q" , " iiwa_joint_6_q" ,
4604
+ " iiwa_joint_7_q" , " iiwa_joint_1_w" ,
4605
+ " iiwa_joint_2_w" , " iiwa_joint_3_w" ,
4606
+ " iiwa_joint_4_w" , " iiwa_joint_5_w" ,
4607
+ " iiwa_joint_6_w" , " iiwa_joint_7_w" ,
4607
4608
" iiwa_link_0_wx" , " iiwa_link_0_wy" ,
4608
4609
" iiwa_link_0_wz" , " iiwa_link_0_vx" ,
4609
4610
" iiwa_link_0_vy" , " iiwa_link_0_vz" ,
4610
- " iiwa_joint_1_w" , " iiwa_joint_2_w" ,
4611
- " iiwa_joint_3_w" , " iiwa_joint_4_w" ,
4612
- " iiwa_joint_5_w" , " iiwa_joint_6_w" ,
4611
+ " iiwa_joint_1_w" , " iiwa_joint_2_w" ,
4612
+ " iiwa_joint_3_w" , " iiwa_joint_4_w" ,
4613
+ " iiwa_joint_5_w" , " iiwa_joint_6_w" ,
4613
4614
" iiwa_joint_7_w" }));
4614
4615
4615
4616
names = plant->GetActuatorNames (iiwa0_instance);
0 commit comments