Skip to content

Commit

Permalink
Add failing test showing that model framedata calculation is incorrect
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey committed Jun 5, 2024
1 parent 84054fa commit 27deae9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/common_test/kinematic_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ struct KinematicFeaturesList : gz::physics::FeatureList<
gz::physics::GetJointFromModel,
gz::physics::JointFrameSemantics,
gz::physics::LinkFrameSemantics,
gz::physics::ShapeFrameSemantics
gz::physics::ShapeFrameSemantics,
gz::physics::ModelFrameSemantics
> { };

using KinematicFeaturesTestTypes =
Expand Down Expand Up @@ -207,6 +208,8 @@ TYPED_TEST(KinematicFeaturesTest, LinkFrameSemanticsPose)
ASSERT_NE(nullptr, linkCol);

gz::math::Pose3d actualModelPose(1, 0, 0, 0, 0, 0);
auto modelFrameData = model->FrameDataRelativeToWorld();
EXPECT_EQ(actualModelPose, gz::math::eigen3::convert(modelFrameData.pose));
auto baseLinkFrameData = baseLink->FrameDataRelativeToWorld();
auto baseLinkPose = gz::math::eigen3::convert(baseLinkFrameData.pose);
gz::math::Pose3d actualLinkLocalPose(0, 1, 0, 0, 0, 0);
Expand Down
1 change: 1 addition & 0 deletions test/common_test/worlds/pose_offset.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<link name="base">
<pose>0 1 0 0 0 0</pose>
<inertial>
<pose>0 0 3 0 0 0</pose>
<mass>100</mass>
</inertial>
<collision name="base_collision">
Expand Down

0 comments on commit 27deae9

Please sign in to comment.