@@ -181,7 +181,7 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base)
181
181
world_model ()->getLargestGoalAngleRangeFromPoint (world_model ()->ball .pos );
182
182
// ボールが近い条件はいらないかも?
183
183
return robot ()->getDistance (world_model ()->ball .pos ) < 2.0 &&
184
- goal_angle_width * 180.0 / M_PI > 5 .;
184
+ goal_angle_width * 180.0 / M_PI > 5 . && not world_model ()-> ball . isMoving ( 1.0 ) ;
185
185
});
186
186
187
187
addTransition (AttackerState::GOAL_KICK, AttackerState::ENTRY_POINT, [this ]() -> bool {
@@ -304,7 +304,7 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base)
304
304
world_model ()->getLargestGoalAngleRangeFromPoint (world_model ()->ball .pos );
305
305
return robot ()->getDistance (world_model ()->ball .pos ) < 1.0 &&
306
306
x_diff_with_their_goal < world_model ()->field_size .x () * 0.5 &&
307
- goal_angle_width * 180.0 / M_PI > 1 .;
307
+ goal_angle_width * 180.0 / M_PI > 1 . && not world_model ()-> ball . isMoving ( 1.0 ) ;
308
308
});
309
309
310
310
addTransition (AttackerState::LOW_CHANCE_GOAL_KICK, AttackerState::ENTRY_POINT, [this ]() -> bool {
@@ -321,7 +321,7 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base)
321
321
double x_diff_with_their_goal =
322
322
std::abs (world_model ()->getTheirGoalCenter ().x () - world_model ()->ball .pos .x ());
323
323
return robot ()->getDistance (world_model ()->ball .pos ) < 1.0 &&
324
- x_diff_with_their_goal >= world_model ()->field_size .x () * 0.5 ;
324
+ x_diff_with_their_goal >= world_model ()->field_size .x () * 0.5 && not world_model ()-> ball . isMoving ( 1.0 ) ;
325
325
});
326
326
327
327
addTransition (
@@ -363,7 +363,7 @@ Attacker::Attacker(RobotCommandWrapperBase::SharedPtr & base)
363
363
364
364
addStateFunction (AttackerState::RECEIVE_BALL, [this ]() -> Status {
365
365
receive_skill.setParameter (" enable_redirect" , false );
366
- receive_skill.setParameter (" policy" , std::string (" closest " ));
366
+ receive_skill.setParameter (" policy" , std::string (" max_slack " ));
367
367
receive_skill.setParameter (" dribble_power" , 0.0 );
368
368
receive_skill.setParameter (" enable_software_bumper" , false );
369
369
return receive_skill.run ();
0 commit comments