Skip to main content

update_command

Signature:

SoccerKickManager.update_command(direction: float, power: float) -> None

Description:

Set the target kick direction and power, controlling the robot to complete a kick toward the specified direction.

Parameters:

Parameter

Type

Default

Description

direction

float

Required

Kick direction as a yaw angle relative to the robot's current coordinate frame, in rad; 0.0 is straight ahead, positive values are to the left.

power

float

Required

Kick power, in the range 1.0 to 10.0.

Returns:

None

Raises:

ValueError: direction is not a valid number, or power is not in the range 1.0 to 10.0.

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)