Skip to content

Commit

Permalink
STOPのときにキーパーがボールを排出しないように変更
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Jan 15, 2025
1 parent 13306f4 commit 89e46a3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions crane_robot_skills/src/goalie.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// https://opensource.org/licenses/MIT.

#include <crane_robot_skills/goalie.hpp>
#include <robocup_ssl_msgs/msg/referee.hpp>

namespace crane::skills
{
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 89e46a3

Please sign in to comment.