Skip to main content

Initialization

BoosterRobot is the development entry point for physical Booster robots and virtual robot simulation environments, providing all APIs for connecting to robots, reading sensor data, and sending control commands.

Signature:

BoosterRobot(
network_interface: str = "",
virtual_robot_name: str = "",
*,
timeout: float = 5.0,
callback_workers: int = 4,
enable_tf_listener: bool = True,
**kwargs: Any,
) -> BoosterRobot

Description:

Create and initialize a Booster robot client.

Only one BoosterRobot instance should be created and reused for the same robot. Each instance independently establishes a ROS node, data subscriptions, and underlying control publishing channels; creating duplicates not only wastes resources, but multiple control publishers coexisting may also cause command conflicts.

Parameters:

Parameter

Type

Default

Description

network_interface

str

""

Reserved parameter, currently fixed to use the default value "".

virtual_robot_name

str

""

Virtual robot name, only needs to be filled in multi-virtual robot mode.

timeout

float

5.0

Timeout for initialization, service discovery, and data readiness waiting (seconds).

callback_workers

int

4

Number of worker threads for sensor callbacks, must be >= 1. For high-frequency subscription scenarios (such as subscribing to multiple sensors simultaneously), this can be increased appropriately.

enable_tf_listener

bool

True

Whether to start TF listener. If disabled, get_transform() will not be available.

**kwargs

—

—

Advanced low-level options, passed via keyword arguments, generally no need to set. Supports the following keys:
• domain_id (int): ROS 2 domain ID (ROS_DOMAIN_ID). When there are multiple robots in the same local network, specifying a different ID for each robot can avoid message crosstalk. If not set, the environment variable value is used.
• dds_profile (str): FastRTPS DDS configuration file path (XML format), used to customize QoS, network transport, and other low-level parameters.

Returns:

BoosterRobot

The initialized robot client instance.

Raises:

ValueError: callback_workers is less than 1.

LocoClientInitError: Robot motion control service was not discovered within the specified timeout.

Example:

from boosteros.robots.booster import BoosterRobot

robot = BoosterRobot()
robot_info = robot.robot_info
print(robot_info)
# Example output: RobotInfo(manufacturer='Booster Robotics', model='Booster K1', name='vr1', serial_number='rivt9', ...)