Skip to main content

set_gait

Signature:

BoosterRobot.set_gait(gait: RobotGaitName) -> None

Description:

Set the gait to be used in "walk" mode. If currently in "walk" mode, switches immediately; otherwise, records the target gait and applies it on the next set_mode("walk") call.

Parameters:

Parameter

Type

Default

Description

gait

RobotGaitName

Required

Target gait name, see "Robot Meta-Information / RobotGaitName".

Returns:

None

Raises:

ValueError: gait is not supported.

RuntimeError: Gait switch failed or timed out.

Example:

from boosteros.robots.booster import BoosterRobot

robot = BoosterRobot()
robot.set_gait("soccer")
robot.set_mode("walk")
gait = robot.get_gait()
print(gait)
# Example output: soccer