A Rust SDK for controlling Booster robots based on Booster Robotics C++ SDK.
This library is currently in early development. The core architecture and types are defined, but none of it has been tested on
an actual robot yet. Specifically, the dds module's Zenoh communication layer is untested.
use booster_sdk::client::B1LocoClient;
use booster_sdk::types::{RobotMode, Hand};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Initialize and create client
let client = B1LocoClient::new().await?;
// Change to walking mode
client.change_mode(RobotMode::Walking).await?;
// Move forward
client.move_robot(0.5, 0.0, 0.0).await?;
// Wave hand
client.wave_hand(Hand::Right).await?;
// Lie down when done
client.lie_down().await?;
Ok(())
}Python bindings for the SDK are available using PyO3. These bindings are very experimental!
- Python 3.10 or higher
- Rust toolchain (for building from source)
The Python package can be built using pixi:
pixi run py-build-wheelThis will create a wheel file in booster_sdk_py/dist/ that can be installed with pip install booster_sdk_py/dist/*.whl.
from booster_sdk import B1LocoClient, RobotMode, Hand
# Initialize client with optional timeout
client = B1LocoClient(timeout_secs=5.0)
# Change to walking mode
client.change_mode(RobotMode.WALKING)
# Move forward
client.move_robot(0.5, 0.0, 0.0)
# Wave hand
client.wave_hand(Hand.RIGHT)
# Lie down when done
client.lie_down()The Python bindings expose the same high-level API as the Rust SDK, including robot mode control, locomotion, hand/gripper control, and coordinate frame transformations.
Setting up the DDS communication layer to work with Booster robots involves configuring Zenoh. Please refer to the DDS Setup Guide for detailed instructions.
This SDK is currently in early development. Contributions are welcome! Please open issues or pull requests for bug fixes, features, or documentation improvements.