Skip to content

Commit a3aaed9

Browse files
authored
Full v1.5 parity (#4)
1 parent 6b68b61 commit a3aaed9

42 files changed

Lines changed: 4798 additions & 715 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 116 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,123 @@
11
name: Release
22

33
on:
4-
workflow_dispatch:
4+
workflow_dispatch:
55

66
permissions:
7-
contents: read
7+
contents: read
88

99
jobs:
10-
build:
11-
name: Build wheels (${{ matrix.platform.id }})
12-
runs-on: ${{ matrix.platform.runner }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
platform:
17-
# manylinux_2_28 x86_64 (cp310-cp313)
18-
- id: manylinux_2_28-x86_64
19-
runner: ubuntu-22.04
20-
target: x86_64-unknown-linux-gnu
21-
manylinux: "2_28"
22-
maturin_args: >-
23-
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
24-
-i python3.10 -i python3.11 -i python3.12 -i python3.13
25-
26-
# manylinux_2_28 aarch64 (cp310-cp313)
27-
- id: manylinux_2_28-aarch64
28-
runner: ubuntu-22.04
29-
target: aarch64-unknown-linux-gnu
30-
manylinux: "2_28"
31-
maturin_args: >-
32-
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
33-
-i python3.10 -i python3.11 -i python3.12 -i python3.13
34-
35-
# macOS arm64 (cp310)
36-
- id: macos-arm64-cp310
37-
runner: macos-14
38-
target: aarch64-apple-darwin
39-
python: "3.10"
40-
manylinux: ""
41-
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
42-
43-
# macOS arm64 (cp311)
44-
- id: macos-arm64-cp311
45-
runner: macos-14
46-
target: aarch64-apple-darwin
47-
python: "3.11"
48-
manylinux: ""
49-
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
50-
51-
# macOS arm64 (cp312)
52-
- id: macos-arm64-cp312
53-
runner: macos-14
54-
target: aarch64-apple-darwin
55-
python: "3.12"
56-
manylinux: ""
57-
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
58-
59-
# macOS arm64 (cp313)
60-
- id: macos-arm64-cp313
61-
runner: macos-14
62-
target: aarch64-apple-darwin
63-
python: "3.13"
64-
manylinux: ""
65-
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
66-
67-
steps:
68-
- uses: actions/checkout@v4
69-
70-
# Only needed for macOS builds (Linux manylinux builds run inside the container and
71-
# actions/setup-python won't affect those).
72-
- name: Setup Python (macOS only)
73-
if: startsWith(matrix.platform.runner, 'macos')
74-
uses: actions/setup-python@v5
75-
with:
76-
python-version: ${{ matrix.platform.python }}
77-
78-
- name: Build wheels
79-
uses: PyO3/maturin-action@v1
80-
with:
81-
command: build
82-
target: ${{ matrix.platform.target }}
83-
manylinux: ${{ matrix.platform.manylinux }}
84-
args: ${{ matrix.platform.maturin_args }}
85-
86-
- name: Upload wheels
87-
uses: actions/upload-artifact@v4
88-
with:
89-
name: wheels-${{ matrix.platform.id }}
90-
path: dist/*.whl
91-
92-
publish:
93-
runs-on: ubuntu-22.04
94-
needs: build
95-
environment: release
96-
permissions:
97-
id-token: write
98-
steps:
99-
- uses: actions/download-artifact@v4
100-
with:
101-
pattern: wheels-*
102-
merge-multiple: true
103-
path: dist/
104-
105-
- name: Install uv
106-
uses: astral-sh/setup-uv@v5
107-
108-
- name: Publish to PyPI
109-
run: uv publish dist/*
10+
build:
11+
name: Build wheels (${{ matrix.platform.id }})
12+
runs-on: ${{ matrix.platform.runner }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
platform:
17+
# manylinux_2_28 x86_64 (cp310-cp313)
18+
- id: manylinux_2_28-x86_64
19+
runner: ubuntu-22.04
20+
target: x86_64-unknown-linux-gnu
21+
manylinux: "2_28"
22+
maturin_args: >-
23+
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
24+
-i python3.10 -i python3.11 -i python3.12 -i python3.13
25+
26+
# manylinux_2_28 aarch64 (cp310-cp313)
27+
- id: manylinux_2_28-aarch64
28+
runner: ubuntu-22.04
29+
target: aarch64-unknown-linux-gnu
30+
manylinux: "2_28"
31+
maturin_args: >-
32+
--release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi
33+
-i python3.10 -i python3.11 -i python3.12 -i python3.13
34+
35+
# macOS arm64 (cp310)
36+
- id: macos-arm64-cp310
37+
runner: macos-14
38+
target: aarch64-apple-darwin
39+
python: "3.10"
40+
manylinux: ""
41+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
42+
43+
# macOS arm64 (cp311)
44+
- id: macos-arm64-cp311
45+
runner: macos-14
46+
target: aarch64-apple-darwin
47+
python: "3.11"
48+
manylinux: ""
49+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
50+
51+
# macOS arm64 (cp312)
52+
- id: macos-arm64-cp312
53+
runner: macos-14
54+
target: aarch64-apple-darwin
55+
python: "3.12"
56+
manylinux: ""
57+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
58+
59+
# macOS arm64 (cp313)
60+
- id: macos-arm64-cp313
61+
runner: macos-14
62+
target: aarch64-apple-darwin
63+
python: "3.13"
64+
manylinux: ""
65+
maturin_args: --release --manifest-path booster_sdk_py/Cargo.toml --out dist --compatibility pypi -i python
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
# Only needed for macOS builds (Linux manylinux builds run inside the container and
71+
# actions/setup-python won't affect those).
72+
- name: Setup Python (macOS only)
73+
if: startsWith(matrix.platform.runner, 'macos')
74+
uses: actions/setup-python@v5
75+
with:
76+
python-version: ${{ matrix.platform.python }}
77+
78+
- name: Build wheels
79+
uses: PyO3/maturin-action@v1
80+
with:
81+
command: build
82+
target: ${{ matrix.platform.target }}
83+
manylinux: ${{ matrix.platform.manylinux }}
84+
args: ${{ matrix.platform.maturin_args }}
85+
86+
- name: Upload wheels
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: wheels-${{ matrix.platform.id }}
90+
path: dist/*.whl
91+
92+
publish-crate:
93+
runs-on: ubuntu-22.04
94+
environment: release
95+
needs: build
96+
steps:
97+
- uses: actions/checkout@v4
98+
- uses: prefix-dev/setup-pixi@v0.9.1
99+
with:
100+
pixi-version: v0.63.2
101+
- name: Publish to crates.io
102+
run: pixi run cargo publish -p booster_sdk
103+
env:
104+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
105+
106+
publish-pypi:
107+
runs-on: ubuntu-22.04
108+
needs: build
109+
environment: release
110+
permissions:
111+
id-token: write
112+
steps:
113+
- uses: actions/download-artifact@v4
114+
with:
115+
pattern: wheels-*
116+
merge-multiple: true
117+
path: dist/
118+
119+
- name: Install uv
120+
uses: astral-sh/setup-uv@v5
121+
122+
- name: Publish to PyPI
123+
run: uv publish dist/*

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ members = ["booster_sdk", "booster_sdk_py"]
33
resolver = "2"
44

55
[workspace.package]
6-
version = "0.1.0-alpha.6"
6+
version = "0.1.0-alpha.7"
77
edition = "2024"
88
authors = ["Team whIRLwind"]
99
license = "MIT OR Apache-2.0"

README.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
# Booster Robotics Rust SDK
1+
# Booster Robotics SDK
22

33
[![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/IntelligentRoboticsLab/booster_sdk#license)
44
[![Crates.io](https://img.shields.io/crates/v/booster_sdk.svg)](https://crates.io/crates/booster_sdk)
55
[![Downloads](https://img.shields.io/crates/d/booster_sdk.svg)](https://crates.io/crates/booster_sdk)
66
[![Docs](https://docs.rs/booster_sdk/badge.svg)](https://docs.rs/booster_sdk/latest/booster_sdk/)
77
[![PyPI](https://img.shields.io/pypi/v/booster_sdk.svg)](https://pypi.org/project/booster-sdk/)
88

9-
A Rust SDK for controlling Booster robots based on [Booster Robotics C++ SDK](https://github.com/BoosterRobotics/booster_robotics_sdk).
9+
This project is a Rust reimplementation of the original [Booster Robotics C++ SDK (`booster_robotics_sdk`)](https://github.com/BoosterRobotics/booster_robotics_sdk) for controlling Booster robots.
10+
11+
In addition to the Rust crate, this repository also provides Python bindings built on top of the Rust implementation.
1012

1113
## 🚧 Project Status
1214

13-
This library is currently in early development. The core architecture and types are defined, but none of it has been tested on
14-
an actual robot yet. The DDS transport layer is implemented using RustDDS.
15+
This library is currently in active development and has been tested on a real robot.
1516

1617
## API Examples
1718

@@ -45,29 +46,19 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
4546

4647
## Experimental Python Bindings
4748

48-
Python bindings for the SDK are available using [PyO3](https://github.com/PyO3/pyo3). These bindings are very experimental!
49-
50-
### Requirements
51-
52-
- Python 3.10 or higher
53-
- Rust toolchain (for building from source)
54-
55-
### Installation
56-
57-
The Python package can be built using pixi:
49+
Python wheels are available on [PyPI](https://pypi.org/project/booster-sdk/):
5850

5951
```bash
60-
pixi run py-build-wheel
52+
pip install booster-sdk
6153
```
6254

63-
This will create a wheel file in `booster_sdk_py/dist/` that can be installed with `pip install booster_sdk_py/dist/*.whl`.
64-
6555
### Python API Example
6656

67-
Note: Python bindings are intentionally minimal and expose a subset of the Rust API.
57+
Note: Python bindings are experimental.
6858

6959
```python
70-
from booster_sdk import BoosterClient, GripperCommand, Hand, RobotMode
60+
from booster_sdk.client.booster import BoosterClient
61+
from booster_sdk.types import GripperCommand, Hand, RobotMode
7162

7263
client = BoosterClient()
7364

@@ -81,12 +72,8 @@ client.move_robot(0.5, 0.0, 0.0)
8172
client.publish_gripper_command(GripperCommand.open(Hand.RIGHT))
8273
```
8374

84-
The Python bindings currently cover basic mode changes, locomotion, and gripper control.
85-
86-
# DDS Setup
87-
88-
The Rust SDK communicates directly over DDS (RustDDS). Please refer to the [DDS Setup Guide](docs/dds_setup.md) for detailed instructions.
75+
The Python bindings currently cover core control flows, including locomotion, gripper control, AI/LUI RPC calls, vision RPC calls, and X5 camera RPC calls.
8976

9077
## Contributing
9178

92-
This SDK is currently in early development. Contributions are welcome! Please open issues or pull requests for bug fixes, features, or documentation improvements.
79+
This SDK is in active development. Contributions are welcome! Please open issues or pull requests for bug fixes, features, or documentation improvements.

booster_sdk/examples/gripper_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! Run with: cargo run --example `gripper_control`
66
7-
use booster_sdk::client::{BoosterClient, commands::GripperCommand};
7+
use booster_sdk::client::loco::{BoosterClient, GripperCommand};
88
use booster_sdk::types::{Hand, RobotMode};
99

1010
#[tokio::main]

booster_sdk/examples/locomotion_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! Run with: cargo run --example `locomotion_control`
66
7-
use booster_sdk::client::BoosterClient;
7+
use booster_sdk::client::loco::BoosterClient;
88
use booster_sdk::types::RobotMode;
99
use tokio::time::Duration;
1010

booster_sdk/examples/look_around.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//!
55
//! Run with: cargo run --example `look_around`
66
7-
use booster_sdk::client::BoosterClient;
7+
use booster_sdk::client::loco::BoosterClient;
88
use tokio::time::Duration;
99

1010
#[tokio::main]

0 commit comments

Comments
 (0)