From 89e46a3392681364e9371fa63be18e3ffbb699d8 Mon Sep 17 00:00:00 2001 From: Kotaro Yoshimoto Date: Wed, 15 Jan 2025 21:50:54 +0900 Subject: [PATCH] =?UTF-8?q?STOP=E3=81=AE=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?=E3=82=AD=E3=83=BC=E3=83=91=E3=83=BC=E3=81=8C=E3=83=9C=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=82=92=E6=8E=92=E5=87=BA=E3=81=97=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crane_robot_skills/src/goalie.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crane_robot_skills/src/goalie.cpp b/crane_robot_skills/src/goalie.cpp index 7b1da70a1..bdb81e54c 100644 --- a/crane_robot_skills/src/goalie.cpp +++ b/crane_robot_skills/src/goalie.cpp @@ -5,6 +5,7 @@ // https://opensource.org/licenses/MIT. #include +#include namespace crane::skills { @@ -35,9 +36,17 @@ Status Goalie::update() phase = "ペナルティキック"; inplay(false); break; - default: - inplay(true); + default: { + if ( + world_model()->play_situation.getRefereeCommandID() == + robocup_ssl_msgs::msg::Referee::COMMAND_STOP) { + // STOPのときにはボールを排出しない + inplay(false); + } else { + inplay(true); + } break; + } } visualizer->addPoint(robot()->pose.pos.x(), robot()->pose.pos.y(), 0, "white", 1., phase);