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 8, 2023
1 parent bc74936 commit 4d9ed52
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1616,7 +1616,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerUpsampleTrajectoryTaskTest
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(input->isAborted(), false);
EXPECT_EQ(input->isSuccessful(), true);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(input->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(*input), 1);
data.setData("input_data", input->data_storage.getData("output_data"));
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 18);
}
auto profiles = std::make_shared<ProfileDictionary>();
auto problem = std::make_unique<PlanningTaskComposerProblem>(env_, manip_, data, profiles, "abc");
Expand All @@ -1750,7 +1750,7 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerIterativeSplineParameteriz
EXPECT_EQ(node_info->isAborted(), false);
EXPECT_EQ(input->isAborted(), false);
EXPECT_EQ(input->isSuccessful(), true);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 18);
EXPECT_TRUE(input->task_infos.getAbortingNode().is_nil());
}

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

// Serialization
Expand Down Expand Up @@ -2014,14 +2014,14 @@ TEST_F(TesseractTaskComposerPlanningUnit, TaskComposerRuckigTrajectorySmoothingT
UpsampleTrajectoryTask task("abc", "input_data", "output_data", true);
EXPECT_EQ(task.run(*input), 1);
data.setData("input_data", input->data_storage.getData("output_data"));
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 17);
EXPECT_EQ(input->data_storage.getData("output_data").as<CompositeInstruction>().size(), 18);

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

Expand Down

0 comments on commit 4d9ed52

Please sign in to comment.