Skip to content

Commit b112ad9

Browse files
authored
Support 1.5.2 (#9)
1 parent d1cad1b commit b112ad9

7 files changed

Lines changed: 70 additions & 4 deletions

File tree

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", "examples/rust/*"]
33
resolver = "2"
44

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

booster_sdk/src/client/loco.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,30 @@ impl BoosterClient {
372372
self.rpc.call_void(LocoApiId::ExitWbcGait, "").await
373373
}
374374

375+
/// Move both hand end-effectors to target postures simultaneously.
376+
pub async fn move_dual_hand_end_effector(
377+
&self,
378+
left_target_posture: &crate::types::Posture,
379+
right_target_posture: &crate::types::Posture,
380+
time_millis: i32,
381+
) -> Result<()> {
382+
let param = json!({
383+
"left_target_posture": left_target_posture,
384+
"right_target_posture": right_target_posture,
385+
"time_millis": time_millis,
386+
})
387+
.to_string();
388+
self.rpc
389+
.call_void(LocoApiId::MoveDualHandEndEffector, param)
390+
.await
391+
}
392+
393+
/// Start or stop a visual kick (side-foot kick).
394+
pub async fn visual_kick(&self, start: bool) -> Result<()> {
395+
let param = json!({ "start": start }).to_string();
396+
self.rpc.call_void(LocoApiId::VisualKick, param).await
397+
}
398+
375399
/// Publish a raw gripper control topic message.
376400
pub fn publish_gripper(&self, control: GripperControl) -> Result<()> {
377401
self.gripper_publisher.write(control)

booster_sdk/src/types/b1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ crate::api_id_enum! {
4141
UnloadCustomTrainedTraj = 2034,
4242
EnterWbcGait = 2035,
4343
ExitWbcGait = 2036,
44+
MoveDualHandEndEffector = 2037,
45+
VisualKick = 2038,
4446
}
4547
}
4648

booster_sdk_py/booster_sdk_bindings/booster_sdk_bindings.pyi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,19 @@ class BoosterClient:
10471047
"""Exit WBC gait mode."""
10481048
...
10491049

1050+
def move_dual_hand_end_effector(
1051+
self,
1052+
left_target_posture: Posture,
1053+
right_target_posture: Posture,
1054+
time_millis: int,
1055+
) -> None:
1056+
"""Move both hand end-effectors to target postures simultaneously."""
1057+
...
1058+
1059+
def visual_kick(self, start: bool) -> None:
1060+
"""Start or stop a visual kick (side-foot kick)."""
1061+
...
1062+
10501063
def publish_gripper_command(self, command: GripperCommand) -> None:
10511064
"""Publish low-level gripper command message."""
10521065
...

booster_sdk_py/src/client/booster.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1626,6 +1626,33 @@ impl PyBoosterClient {
16261626
wait_for_future(py, async move { client.exit_wbc_gait().await }).map_err(to_py_err)
16271627
}
16281628

1629+
fn move_dual_hand_end_effector(
1630+
&self,
1631+
py: Python<'_>,
1632+
left_target_posture: PyPosture,
1633+
right_target_posture: PyPosture,
1634+
time_millis: i32,
1635+
) -> PyResult<()> {
1636+
let client = Arc::clone(&self.client);
1637+
let left_target_posture: Posture = left_target_posture.into();
1638+
let right_target_posture: Posture = right_target_posture.into();
1639+
wait_for_future(py, async move {
1640+
client
1641+
.move_dual_hand_end_effector(
1642+
&left_target_posture,
1643+
&right_target_posture,
1644+
time_millis,
1645+
)
1646+
.await
1647+
})
1648+
.map_err(to_py_err)
1649+
}
1650+
1651+
fn visual_kick(&self, py: Python<'_>, start: bool) -> PyResult<()> {
1652+
let client = Arc::clone(&self.client);
1653+
wait_for_future(py, async move { client.visual_kick(start).await }).map_err(to_py_err)
1654+
}
1655+
16291656
fn publish_gripper_command(&self, command: PyGripperCommand) -> PyResult<()> {
16301657
let command: GripperCommand = command.into();
16311658
self.client

pixi.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ authors = ["Team whIRLwind"]
33
channels = ["conda-forge"]
44
name = "booster-sdk"
55
platforms = ["osx-arm64", "linux-64", "linux-aarch64"]
6-
version = "0.1.0-alpha.11"
6+
version = "0.1.0-alpha.12"
77

88
[environments]
99
py = ["wheel-build", "python-tasks"]

0 commit comments

Comments
 (0)