update_ball
Signature:
SoccerKickManager.update_ball(x: float, y: float) -> None
Description:
Update the ball position in the robot's current coordinate frame so that the automatic kick sequence executes based on the latest ball position.
Parameters:
Parameter | Type | Default | Description |
|---|---|---|---|
|
| Required | X coordinate of the ball in the robot's current coordinate frame, in m; positive is forward. |
|
| Required | Y coordinate of the ball in the robot's current coordinate frame, in m; positive is to the left. |
Returns:
None
Raises:
ValueError: x or y is not a valid number.
RuntimeError: Failed to send the kick command.
Example:
from boosteros.robots.booster import BoosterRobot, SoccerKickManager
robot = BoosterRobot()
soccer_kick = SoccerKickManager(robot)
soccer_kick.start()
soccer_kick.update_command(direction=0.0, power=5.0)
soccer_kick.update_ball(x=0.6, y=0.0)