Skip to main content

reset_odom

Signature:

BoosterRobot.reset_odom(x: float = 0.0, y: float = 0.0, theta: float = 0.0) -> None

Description:

Reset the robot odometer to a specified pose, and it is reset to the zero pose by default.

Available since v1.2.0, specifying target pose parameters is supported.

Parameters:

Parameter Name

Type

default value

Description

x

float

0.0

The x-coordinate of the target pose, in meters.

y

float

0.0

The y-coordinate of the target pose, in meters.

theta

float

0.0

The yaw angle of the target pose, in radians.

Returns:

None

Raises:

RuntimeError: The robot is not in walk mode.

Example:

from boosteros.robots.booster import BoosterRobot

robot = BoosterRobot()
robot.reset_odom()
robot.reset_odom(1.5, -2.0, 0.5)