Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,795 changes: 2,597 additions & 198 deletions Cargo.lock

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["booster_sdk", "booster_sdk_py", "examples/rust/*"]
resolver = "2"

[workspace.package]
version = "0.1.3"
version = "0.1.4"
edition = "2024"
authors = ["Team whIRLwind"]
license = "MIT OR Apache-2.0"
Expand All @@ -27,6 +27,11 @@ booster_sdk = { path = "booster_sdk" }
tokio = { version = "1.42", features = ["full"] }
futures = "0.3"
rustdds = "0.13.1"
byteorder = "1.5"
zenoh = { version = "1.9", default-features = false, features = [
"transport_tcp",
"transport_udp",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,33 @@ SDK 1.7 additions include:
- audio device enumeration and Bluetooth scan/connect/disconnect/forget APIs;
- hand-eye calibration start, status, result, and apply APIs.

## Zenoh Transport

Clients speak native DDS by default. With the `zenoh` cargo feature (always enabled in the
Python wheel) they can instead talk Zenoh, publishing the same CDR payloads on the keys
[`zenoh-plugin-dds`](https://github.com/eclipse-zenoh/zenoh-plugin-dds) bridges DDS topics to
(`rt/LocoApiTopicReq`, `rt/LocoApiTopicResp`, ...). This works against the DDS bridge on a robot
and against simulators that serve those keys directly.

Set `BOOSTER_SDK_ZENOH_ENDPOINT` to switch every client created with default options:

```bash
BOOSTER_SDK_ZENOH_ENDPOINT=tcp/127.0.0.1:7447 python examples/python/locomotion.py
```

Or pick the transport explicitly in Rust:

```rust
use booster_sdk::client::BoosterClient;
use booster_sdk::dds::{RpcClientOptions, ZenohConfig};

let options = RpcClientOptions::default().with_zenoh(ZenohConfig::client("tcp/127.0.0.1:7447"));
let client = BoosterClient::with_options(options)?;
```

Opening a Zenoh session blocks, so inside Tokio create clients on the multi-threaded runtime.
Raw DDS readers (`DdsNode::subscribe_reader`) are only available on the DDS transport.

## Contributing

This SDK is in active development. Contributions are welcome! Please open issues or pull requests for bug fixes, features, or documentation improvements.
6 changes: 6 additions & 0 deletions booster_sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ tracing = { workspace = true }
uuid = { workspace = true }
typed-builder = { workspace = true }
rustdds = { workspace = true }
byteorder = { workspace = true, optional = true }
zenoh = { workspace = true, optional = true }

[features]
# Talk to the robot over Zenoh, on the keys `zenoh-plugin-dds` bridges DDS topics to.
zenoh = ["dep:zenoh", "dep:byteorder"]

[dev-dependencies]
tracing-subscriber = { workspace = true }
8 changes: 7 additions & 1 deletion booster_sdk/src/dds/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
//! DDS communication layer primitives for the Booster Robotics SDK.
//! Communication layer primitives for the Booster Robotics SDK.
//!
//! Clients talk native DDS by default, or Zenoh with the `zenoh` feature (see [`TransportConfig`]).

pub mod messages;
pub mod node;
pub mod operation;
pub mod qos;
pub mod rpc;
pub mod topics;
pub mod transport;
#[cfg(feature = "zenoh")]
mod zenoh_transport;

pub use messages::*;
pub use node::*;
pub use operation::*;
pub use rpc::*;
pub use topics::*;
pub use transport::*;
Loading
Loading