Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Dec 2, 2024
1 parent 87ddca8 commit 23b8089
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions panther_docking/test/unit/test_panther_charging_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,18 @@ TEST_F(TestPantherChargingDock, GetStagingPoseLocal)
dock_pose->pose.position.y = 1.0;
dock_pose->pose.position.z = 0.0;
dock_pose->pose.orientation.w = 1.0;

dock_->setDockPose(dock_pose);
geometry_msgs::msg::PoseStamped pose;

geometry_msgs::msg::PoseStamped staging_pose;
ASSERT_THROW(
{ staging_pose = dock_->getStagingPose(pose.pose, kOdomFrame); },
opennav_docking_core::FailedToDetectDock);

dock_pose->header.frame_id = kOdomFrame;
dock_->setDockPose(dock_pose);

staging_pose = dock_->getStagingPose(pose.pose, kOdomFrame);
geometry_msgs::msg::PoseStamped pose;
geometry_msgs::msg::PoseStamped staging_pose = dock_->getStagingPose(pose.pose, kOdomFrame);

ASSERT_FLOAT_EQ(staging_pose.pose.position.x, 0.3);
ASSERT_FLOAT_EQ(staging_pose.pose.position.y, 1.0);
ASSERT_FLOAT_EQ(staging_pose.pose.position.z, 0.0);
}

// TODO: fill after nav2 tests
// TODO: @delihus fill after nav2 tests
// TEST_F(TestPantherChargingDock, GetStagingPoseGlobal){
// }

Expand Down

0 comments on commit 23b8089

Please sign in to comment.