Skip to content

Commit

Permalink
release: v0.2.20
Browse files Browse the repository at this point in the history
  • Loading branch information
rise0chen committed Nov 13, 2024
1 parent f9eda26 commit 0c81dd8
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 24 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license-file = "LICENSE"
name = "lebai_sdk"
repository = "https://github.com/lebai-robotics/lebai-sdk.rs"
version = "0.2.19"
version = "0.2.20"

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ keywords = ["protobuf"]
license = "MIT"
name = "lebai-proto"
repository = "https://github.com/lebai-robotics/lebai-sdk.rs"
version = "3.2.1"
version = "3.2.2"

[dependencies]
jsonrpsee = {version = "0.24", features = ["client-core", "macros"]}
Expand Down
7 changes: 1 addition & 6 deletions proto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
pub mod io;
pub mod kinematic;
pub mod led;
pub mod modbus;
pub mod posture;
pub mod task;
pub mod serde;

pub mod google {
pub mod protobuf {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion proto/src/kinematic.rs → proto/src/serde/kinematic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::lebai::kinematic;
use crate::posture::{CartesianPose, JointPose};
use crate::serde::posture::{CartesianPose, JointPose};
use serde::{Deserialize, Serialize};

#[derive(Deserialize, Serialize)]
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions proto/src/serde/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pub mod io;
pub mod kinematic;
pub mod led;
pub mod modbus;
pub mod posture;
pub mod task;
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ mod runtime;
pub mod lebai_sdk {
use super::*;
use cmod::Result;
use proto::kinematic::KinData;
use proto::lebai::claw::Claw;
use proto::lebai::dynamic::Payload;
use proto::lebai::posture::Position;
use proto::lebai::system::{EstopReason, PhyData, RobotState};
use proto::led::LedStyle;
use proto::posture::{CartesianPose, JointPose, Pose};
use proto::serde::kinematic::KinData;
use proto::serde::led::LedStyle;
use proto::serde::posture::{CartesianPose, JointPose, Pose};
use runtime::CompatExt as _;

#[cmod::function]
Expand Down Expand Up @@ -572,3 +572,5 @@ pub mod lebai_sdk {
}
}
}

pub use lebai_sdk::*;
4 changes: 2 additions & 2 deletions src/rpc/kinematic.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use super::Robot;
use cmod::Result;
use proto::google::protobuf::Empty;
use proto::kinematic::KinData;
use proto::lebai::db::LoadRequest;
use proto::lebai::kinematic::*;
use proto::posture::CartesianPose;
use proto::serde::kinematic::KinData;
use proto::serde::posture::CartesianPose;

impl Robot {
pub(crate) async fn load_tcp(&self, name: String, dir: Option<String>) -> Result<CartesianPose> {
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/led.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::Robot;
use cmod::Result;
use proto::lebai::db::LoadRequest;
use proto::lebai::led::*;
use proto::led::LedStyle;
use proto::serde::led::LedStyle;

impl Robot {
pub(crate) async fn load_led_style(&self, name: String, dir: Option<String>) -> Result<LedStyle> {
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ pub mod kinematic;
pub mod led;
pub mod modbus;
pub mod motion;
pub mod motor;
pub mod plugin;
pub mod posture;
pub mod serial;
pub mod motor;
pub mod signal;
pub mod storage;
pub mod system;
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/motion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use cmod::Result;
use proto::google::protobuf::Empty;
use proto::lebai::db::LoadRequest;
use proto::lebai::motion::*;
use proto::posture::{CartesianPose, JointPose, Pose};
use proto::serde::posture::{CartesianPose, JointPose, Pose};

impl Robot {
pub(crate) async fn pause_move(&self) -> Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion src/rpc/posture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use super::Robot;
use cmod::Result;
use proto::lebai::db::*;
use proto::lebai::posture::{self, *};
use proto::posture::{CartesianPose, JointPose, Pose};
use proto::serde::posture::{CartesianPose, JointPose, Pose};

impl Robot {
pub async fn kinematics_forward(&self, p: Pose) -> Result<CartesianPose> {
Expand Down
4 changes: 2 additions & 2 deletions src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use core::pin::Pin;
use core::task::{Context, Poll};
use pin_project_lite::pin_project;

#[cfg(all(not(target_family = "wasm"), feature="module"))]
#[cfg(all(not(target_family = "wasm"), feature = "module"))]
pub static RT: once_cell::sync::Lazy<tokio::runtime::Runtime> = once_cell::sync::Lazy::new(|| {
tokio::runtime::Builder::new_multi_thread()
.thread_name("lebai-sdk")
Expand Down Expand Up @@ -54,7 +54,7 @@ impl<T: Future> Future for Compat<T> {
type Output = T::Output;

fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
#[cfg(all(not(target_family = "wasm"), feature="module"))]
#[cfg(all(not(target_family = "wasm"), feature = "module"))]
let _guard = RT.enter();
self.project().inner.poll(cx)
}
Expand Down

0 comments on commit 0c81dd8

Please sign in to comment.