Skip to content

Commit

Permalink
fix: use output orientation as of now in orientation test
Browse files Browse the repository at this point in the history
Signed-off-by: Kotaro Yoshimoto <[email protected]>
  • Loading branch information
HansRobo committed Feb 9, 2024
1 parent abb064e commit 82008be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
9 changes: 5 additions & 4 deletions test_runner/random_test_runner/test/test_lanelet_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ TEST(LaneletUtils, toMapPose)
{
const traffic_simulator_msgs::msg::LaneletPose pose = makeLaneletPose(34621, 10.0);
EXPECT_NO_THROW(getLaneletUtils().toMapPose(pose));
// NOTE: orientation data is output as of #1103
EXPECT_POSE_NEAR(
getLaneletUtils().toMapPose(pose).pose,
geometry_msgs::build<geometry_msgs::msg::Pose>()
Expand All @@ -210,10 +211,10 @@ TEST(LaneletUtils, toMapPose)
.y(73735.0699484234)
.z(0.3034051453))
.orientation(geometry_msgs::build<geometry_msgs::msg::Quaternion>()
.x(0.0)
.y(0.0)
.z(-0.9719821398)
.w(0.2350547166)),
.x(-0.0091567745565503053)
.y(-0.0022143853886961245)
.z(-0.97193900717756765)
.w(0.23504428583514828)),
EPS);
}

Expand Down
18 changes: 10 additions & 8 deletions test_runner/random_test_runner/test/test_test_randomizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ TEST(TestRandomizer, generate_10NPC)
description.ego_start_position, makeLaneletPose(34705, 6.2940393113), EPS);
EXPECT_LANELET_POSE_NEAR(
description.ego_goal_position, makeLaneletPose(34642, 9.6945373700), EPS);
// NOTE: orientation data is output as of #1103
EXPECT_POSE_NEAR(
description.ego_goal_pose,
geometry_msgs::build<geometry_msgs::msg::Pose>()
Expand All @@ -61,10 +62,10 @@ TEST(TestRandomizer, generate_10NPC)
.y(73741.1526960728)
.z(0.0698702227))
.orientation(geometry_msgs::build<geometry_msgs::msg::Quaternion>()
.x(0.0)
.y(0.0)
.z(-0.9854984261)
.w(0.1696845662)),
.x(-0.0040560888625029243)
.y(-0.00069838333685736189)
.z(-0.98549007915725362)
.w(0.16968312905673485)),
EPS);
// npc data
EXPECT_EQ(description.npcs_descriptions.size(), size_t(10));
Expand Down Expand Up @@ -117,6 +118,7 @@ TEST(TestRandomizer, generate_8NPC)
description.ego_start_position, makeLaneletPose(34648, 11.3744011441), EPS);
EXPECT_LANELET_POSE_NEAR(
description.ego_goal_position, makeLaneletPose(34507, 55.3754803281), EPS);
// NOTE: orientation data is output as of #1103
EXPECT_POSE_NEAR(
description.ego_goal_pose,
geometry_msgs::build<geometry_msgs::msg::Pose>()
Expand All @@ -125,10 +127,10 @@ TEST(TestRandomizer, generate_8NPC)
.y(73815.1830249432)
.z(-2.9975350010))
.orientation(geometry_msgs::build<geometry_msgs::msg::Quaternion>()
.x(0.0)
.y(0.0)
.z(0.2345315792)
.w(0.9721085013)),
.x(-0.002510549540877986)
.y(0.01040596135909698)
.z(0.23451814178855812)
.w(0.97205280426591933)),
EPS);
// npc data
EXPECT_EQ(description.npcs_descriptions.size(), size_t(8));
Expand Down

0 comments on commit 82008be

Please sign in to comment.