Skip to content
Snippets Groups Projects
Commit 9c1524e9 authored by bpwilcox's avatar bpwilcox
Browse files

fix and re-enable goal checker test

parent f5f2f89d
No related branches found
No related tags found
No related merge requests found
ament_add_gtest(vtest velocity_iterator_test.cpp) ament_add_gtest(vtest velocity_iterator_test.cpp)
#ament_add_gtest(goal_checker goal_checker.cpp) ament_add_gtest(goal_checker goal_checker.cpp)
#target_link_libraries(goal_checker simple_goal_checker stopped_goal_checker) target_link_libraries(goal_checker simple_goal_checker stopped_goal_checker)
ament_add_gtest(twist_gen_test twist_gen.cpp) ament_add_gtest(twist_gen_test twist_gen.cpp)
target_link_libraries(twist_gen_test standard_traj_generator) target_link_libraries(twist_gen_test standard_traj_generator)
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "dwb_plugins/simple_goal_checker.hpp" #include "dwb_plugins/simple_goal_checker.hpp"
#include "dwb_plugins/stopped_goal_checker.hpp" #include "dwb_plugins/stopped_goal_checker.hpp"
#include "nav_2d_utils/conversions.hpp"
#include "nav2_util/lifecycle_node.hpp"
using dwb_plugins::SimpleGoalChecker; using dwb_plugins::SimpleGoalChecker;
using dwb_plugins::StoppedGoalChecker; using dwb_plugins::StoppedGoalChecker;
...@@ -61,9 +63,11 @@ void checkMacro( ...@@ -61,9 +63,11 @@ void checkMacro(
v.y = yv; v.y = yv;
v.theta = thetav; v.theta = thetav;
if (expected_result) { if (expected_result) {
EXPECT_TRUE(gc.isGoalReached(pose0, pose1, v)); EXPECT_TRUE(gc.isGoalReached(nav_2d_utils::pose2DToPose(pose0),
nav_2d_utils::pose2DToPose(pose1), nav_2d_utils::twist2Dto3D(v)));
} else { } else {
EXPECT_FALSE(gc.isGoalReached(pose0, pose1, v)); EXPECT_FALSE(gc.isGoalReached(nav_2d_utils::pose2DToPose(pose0),
nav_2d_utils::pose2DToPose(pose1), nav_2d_utils::twist2Dto3D(v)));
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment