Skip to content

Instantly share code, notes, and snippets.

@iamrajee
Last active February 18, 2020 06:48
Show Gist options
  • Save iamrajee/6a36972f70be5e62143785e96b37224f to your computer and use it in GitHub Desktop.
Save iamrajee/6a36972f70be5e62143785e96b37224f to your computer and use it in GitHub Desktop.
// ====================== test container ====================== //
{
auto test_container = std::make_unique<Merger>("test container");
{
auto test_container2 = std::make_unique<SerialContainer>("test container2");
// ====================== Move to Home ====================== //
{
auto stage = std::make_unique<stages::MoveTo>("move home", sampling_planner);
stage->setGroup(arm_group_name_);
stage->setGoal(arm_home_pose_);
stage->restrictDirection(stages::MoveTo::FORWARD);
test_container2->insert(std::move(stage));
}
// ====================== Open Hand ====================== //
{
auto stage = std::make_unique<stages::MoveTo>("open hand", sampling_planner);
stage->setGroup(hand_group_name_);
stage->setGoal(hand_open_pose_);
stage->restrictDirection(stages::MoveTo::FORWARD);
// t.add(std::move(stage));
test_container2->insert(std::move(stage));
}
test_container.add(std::move(test_container2)); //by replacing add with insert dint helped
}
{
auto test_container2 = std::make_unique<SerialContainer>("test container2");
// ====================== Move to Home 2 ====================== //
{
auto stage = std::make_unique<stages::MoveTo>("move home2", sampling_planner);
stage->setGroup(arm2_group_name_);
stage->setGoal(arm2_home_pose_);
stage->restrictDirection(stages::MoveTo::FORWARD);
test_container2->insert(std::move(stage));
}
// ====================== Open Hand 2 ====================== //
{
auto stage = std::make_unique<stages::MoveTo>("open hand2", sampling_planner);
stage->setGroup(hand2_group_name_);
stage->setGoal(hand2_open_pose_);
stage->restrictDirection(stages::MoveTo::FORWARD);
// t.add(std::move(stage));
test_container2->insert(std::move(stage));
}
test_container.add(std::move(test_container2)); //by replacing add with insert dint helped
}
t.add(std::move(test_container)); //t is task
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment