From 34541d2775dc851ee70f126d0c76ce3a1b10e2ea Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Mon, 13 Jan 2025 14:54:11 +0900 Subject: [PATCH] =?UTF-8?q?CUT=5FTHEIR=5FPASS=E3=82=92=E7=84=A1=E8=A6=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crane_robot_skills/src/attacker.cpp | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/crane_robot_skills/src/attacker.cpp b/crane_robot_skills/src/attacker.cpp index e1a65488c..8e44788e4 100644 --- a/crane_robot_skills/src/attacker.cpp +++ b/crane_robot_skills/src/attacker.cpp @@ -95,22 +95,22 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base) return Status::RUNNING; }); - addTransition(AttackerState::ENTRY_POINT, AttackerState::CUT_THEIR_PASS, [this]() -> bool { - return not world_model()->isOurBallByBallOwnerCalculator() && - world_model()->ball.isMoving(0.2) && - world_model()->ball.isMovingTowards(robot()->pose.pos); - }); - - addTransition(AttackerState::CUT_THEIR_PASS, AttackerState::ENTRY_POINT, [this]() -> bool { - return world_model()->isOurBallByBallOwnerCalculator() or world_model()->ball.isStopped(0.2); - }); - - addStateFunction(AttackerState::CUT_THEIR_PASS, [this]() -> Status { - visualizer->addCircle(robot()->pose.pos, 0.25, 1, "blue", "white", 0.5); - receive_skill.setParameter("enable_redirect", false); - receive_skill.setParameter("policy", std::string("min_slack")); - return receive_skill.run(); - }); + // addTransition(AttackerState::ENTRY_POINT, AttackerState::CUT_THEIR_PASS, [this]() -> bool { + // return not world_model()->isOurBallByBallOwnerCalculator() && + // world_model()->ball.isMoving(0.2) && + // world_model()->ball.isMovingTowards(robot()->pose.pos); + // }); + // + // addTransition(AttackerState::CUT_THEIR_PASS, AttackerState::ENTRY_POINT, [this]() -> bool { + // return world_model()->isOurBallByBallOwnerCalculator() or world_model()->ball.isStopped(0.2); + // }); + // + // addStateFunction(AttackerState::CUT_THEIR_PASS, [this]() -> Status { + // visualizer->addCircle(robot()->pose.pos, 0.25, 1, "blue", "white", 0.5); + // receive_skill.setParameter("enable_redirect", false); + // receive_skill.setParameter("policy", std::string("min_slack")); + // return receive_skill.run(); + // }); addTransition(AttackerState::ENTRY_POINT, AttackerState::STEAL_BALL, [this]() -> bool { // 止まっているボールを相手が持っているとき