Skip to content

Commit

Permalink
CUT_THEIR_PASSを無視
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Jan 13, 2025
1 parent a709ea1 commit 34541d2
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions crane_robot_skills/src/attacker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
// 止まっているボールを相手が持っているとき
Expand Down

0 comments on commit 34541d2

Please sign in to comment.