Skip to content

Commit

Permalink
ゴールキーパーの修正 (#532)
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo authored Aug 17, 2024
1 parent 8bc4c14 commit 7523a63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crane_robot_skills/src/goalie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ void Goalie::inplay(bool enable_emit, const ConsaiVisualizerWrapper::SharedPtr &
phase = "";
const double BLOCK_DIST = getParameter<double>("block_distance");
phase += "ボールを待ち受ける";
// デフォルト位置設定
command.setTargetPosition(world_model()->getOurGoalCenter()).lookAt(Point(0, 0));
if (std::signbit(world_model()->ball.pos.x()) == std::signbit(world_model()->goal.x())) {
phase += " (自コート警戒モード)";
Segment ball_prediction_4s(ball.pos, ball.pos + ball.vel * 4.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ TheirPenaltyKickPlanner::calculateRobotCommand(
cmd.setTargetPosition(world_model->getOurGoalCenter());
cmd.lookAtBall();
cmd.setMaxVelocity(1.5);
cmd.disableRuleAreaAvoidance();
cmd.disableGoalAreaAvoidance();
} else {
[[maybe_unused]] auto status = goalie->run(visualizer);
}
Expand Down

0 comments on commit 7523a63

Please sign in to comment.