diff --git a/Cargo.lock b/Cargo.lock index f01231e..24be539 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -851,7 +851,7 @@ dependencies = [ [[package]] name = "lebai-proto" -version = "3.2.3" +version = "3.2.4" dependencies = [ "jsonrpsee", "pbjson", @@ -866,7 +866,7 @@ dependencies = [ [[package]] name = "lebai_sdk" -version = "0.2.21" +version = "0.2.22" dependencies = [ "async-lock", "cmod", diff --git a/Cargo.toml b/Cargo.toml index ad931ab..8c53349 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" license-file = "LICENSE" name = "lebai_sdk" repository = "https://github.com/lebai-robotics/lebai-sdk.rs" -version = "0.2.21" +version = "0.2.22" [workspace] members = [ diff --git a/proto/Cargo.toml b/proto/Cargo.toml index 50e8a34..b243590 100644 --- a/proto/Cargo.toml +++ b/proto/Cargo.toml @@ -6,7 +6,7 @@ keywords = ["protobuf"] license = "MIT" name = "lebai-proto" repository = "https://github.com/lebai-robotics/lebai-sdk.rs" -version = "3.2.3" +version = "3.2.4" [dependencies] jsonrpsee = {version = "0.24", features = ["client-core", "macros"]} diff --git a/proto/lebai-proto b/proto/lebai-proto index 3e38aa2..ffdeb18 160000 --- a/proto/lebai-proto +++ b/proto/lebai-proto @@ -1 +1 @@ -Subproject commit 3e38aa2d2788e2eb0a81c3feabce49d0027a6f4a +Subproject commit ffdeb18116ea93df2deb5cd64324ae616a76910d diff --git a/src/lib.rs b/src/lib.rs index 4220fcb..9420285 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,6 +84,11 @@ mod lebai_sdk { // Posture #[classmethod] + #[cmod::tags(args(p))] + pub async fn measure_manipulation(&self, p: JointPose) -> Result { + self.0.measure_manipulation(p).await + } + #[classmethod] #[cmod::tags(args(p), ret)] pub async fn kinematics_forward(&self, p: Pose) -> Result { self.0.kinematics_forward(p).await diff --git a/src/rpc/posture.rs b/src/rpc/posture.rs index 472117e..c47b734 100644 --- a/src/rpc/posture.rs +++ b/src/rpc/posture.rs @@ -5,6 +5,10 @@ use proto::lebai::posture::{self, *}; use proto::serde::posture::{CartesianPose, JointPose, Pose}; impl Robot { + pub async fn measure_manipulation(&self, p: JointPose) -> Result { + let ret = self.c.measure_manipulation(Some(p.into())).await.map_err(|e| e.to_string())?; + Ok(ret.manipulation) + } pub async fn kinematics_forward(&self, p: Pose) -> Result { let req = PoseRequest { pose: Some(p.into()) }; let pose = self.c.get_forward_kin(Some(req)).await.map_err(|e| e.to_string())?;