Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
After bugfix, there is one more waypoint in any plan using Upsample task
  • Loading branch information
thettasch committed Nov 17, 2023
1 parent cc0dc2c commit e6c1446
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerUpsampleTrajectoryTaskTest
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(context->isAborted(), false);
EXPECT_EQ(context->isSuccessful(), true);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(context->task_infos.getAbortingNode().is_nil());
}

Expand Down Expand Up @@ -1736,7 +1736,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerIterativeSplineParameteriz
UpsampleTrajectoryTask task("abc", "input_data", "output_data", true);
EXPECT_EQ(task.run(*context), 1);
data->setData("input_data", context->data_storage->getData("output_data"));
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
}
auto profiles = std::make_shared<ProfileDictionary>();
auto problem = std::make_unique<PlanningTaskComposerProblem>(env_, manip_, profiles, "abc");
Expand All @@ -1750,7 +1750,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerIterativeSplineParameteriz
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(context->isAborted(), false);
EXPECT_EQ(context->isSuccessful(), true);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(context->task_infos.getAbortingNode().is_nil());
}

Expand Down Expand Up @@ -1874,7 +1874,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerTimeOptimalParameterizatio
UpsampleTrajectoryTask task("abc", "input_data", "output_data", true);
EXPECT_EQ(task.run(*context), 1);
data->setData("input_data", context->data_storage->getData("output_data"));
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
}
auto profiles = std::make_shared<ProfileDictionary>();
auto problem = std::make_unique<PlanningTaskComposerProblem>(env_, manip_, profiles, "abc");
Expand All @@ -1888,7 +1888,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerTimeOptimalParameterizatio
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(context->isAborted(), false);
EXPECT_EQ(context->isSuccessful(), true);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(context->task_infos.getAbortingNode().is_nil());

// Serialization
Expand Down Expand Up @@ -2015,7 +2015,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerRuckigTrajectorySmoothingT
auto context = std::make_unique<TaskComposerContext>(std::move(problem), std::move(data2));
UpsampleTrajectoryTask task("abc", "input_data", "output_data", true);
EXPECT_EQ(task.run(*context), 1);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);

auto data3 = std::make_unique<TaskComposerDataStorage>();
data3->setData("input_data", context->data_storage->getData("output_data"));
Expand All @@ -2024,7 +2024,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerRuckigTrajectorySmoothingT
TimeOptimalParameterizationTask task2("abc", "input_data", "output_data", true);
EXPECT_EQ(task2.run(*context2), 1);
data->setData("input_data", context2->data_storage->getData("output_data"));
EXPECT_EQ(context2->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context2->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
}
auto profiles = std::make_shared<ProfileDictionary>();
auto problem = std::make_unique<PlanningTaskComposerProblem>(env_, manip_, profiles, "abc");
Expand All @@ -2038,7 +2038,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerRuckigTrajectorySmoothingT
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(context->isAborted(), false);
EXPECT_EQ(context->isSuccessful(), true);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(context->data_storage->getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(context->task_infos.getAbortingNode().is_nil());
}

Expand Down

0 comments on commit e6c1446

Please sign in to comment.