update
This commit is contained in:
@@ -77,6 +77,7 @@ public:
|
||||
{
|
||||
robot::NodeHandle nh;
|
||||
std::string error;
|
||||
runner_.disableCostmapLockForTesting(); // costmap placeholder
|
||||
ok_ = runner_.configure(nh, dummyCostmap(), name, error);
|
||||
error_ = error;
|
||||
}
|
||||
@@ -110,6 +111,7 @@ TEST(PlannerRunner, RefusesNullCostmap)
|
||||
// định "sập hay không" cho từng plugin tự lo.
|
||||
robot::NodeHandle nh;
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
std::string error;
|
||||
|
||||
EXPECT_FALSE(runner.configure(nh, nullptr, "TestPlannerOk", error));
|
||||
@@ -121,6 +123,7 @@ TEST(PlannerRunner, ConfiguresWithoutAnInitialPlanner)
|
||||
{
|
||||
robot::NodeHandle nh;
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
std::string error;
|
||||
|
||||
ASSERT_TRUE(runner.configure(nh, dummyCostmap(), "", error)) << error;
|
||||
@@ -143,6 +146,7 @@ TEST(PlannerRunner, ConfigureFailsWhenTheInitialPlannerCannotBeLoaded)
|
||||
{
|
||||
robot::NodeHandle nh;
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
std::string error;
|
||||
|
||||
EXPECT_FALSE(runner.configure(nh, dummyCostmap(), "TestPlannerMissingLibrary", error));
|
||||
@@ -200,6 +204,7 @@ TEST(PlannerRunner, PlannerReportingInitializeFailureIsRejected)
|
||||
// Bản cũ chỉ log rồi đi tiếp với planner chưa khởi tạo xong.
|
||||
robot::NodeHandle nh;
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
std::string error;
|
||||
|
||||
EXPECT_FALSE(runner.configure(nh, dummyCostmap(), "TestPlannerInitFails", error));
|
||||
@@ -227,6 +232,7 @@ TEST(PlannerRunner, RefusesEmptyPlannerName)
|
||||
TEST(PlannerRunner, SwapBeforeConfigureIsRefused)
|
||||
{
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
EXPECT_FALSE(runner.swapPlanner("TestPlannerOk"));
|
||||
}
|
||||
|
||||
@@ -326,6 +332,7 @@ TEST(PlannerRunner, StartPlanWithoutAnActivePlannerFails)
|
||||
{
|
||||
robot::NodeHandle nh;
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
std::string error;
|
||||
ASSERT_TRUE(runner.configure(nh, dummyCostmap(), "", error)) << error;
|
||||
|
||||
@@ -408,6 +415,7 @@ TEST(PlannerRunner, DestructorJoinsWhileAPlanIsInFlight)
|
||||
std::string error;
|
||||
{
|
||||
PlannerRunner runner;
|
||||
runner.disableCostmapLockForTesting(); // costmap của test là placeholder, không dereference được
|
||||
ASSERT_TRUE(runner.configure(nh, dummyCostmap(), "TestPlannerOk", error)) << error;
|
||||
EXPECT_TRUE(runner.startPlan(makePose(0.0, 0.0), makePose(2.0, 0.0), nullptr, 1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user