1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! # 睿尔曼机械臂 Rust SDK
//!
//! [![Crates.io][crates-badge]][crates-url]
//! [![Docs.rs][doc-badge]][doc-url]
//! [![MIT licensed][mit-badge]][mit-url]
//!
//! [crates-badge]: https://img.shields.io/badge/crates-0.2.1-yellow
//! [crates-url]: https://crates.io/crates/realman
//! [doc-badge]: https://img.shields.io/badge/doc-latest-blue
//! [doc-url]: https://docs.rs/realman
//! [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg
//! [mit-url]: https://opensource.org/licenses/MIT
//!
//! 这是睿尔曼机械臂的 `Rust SDK` ,旨在帮助 `Rust` 开发者更好的对睿尔曼机械臂进行二次开发。
//!
//! `SDK` 是根据官网 `json` 协议开发。[官网链接](https://develop.realman-robotics.com/robot/json/getStartedJson.html)
//!
//! ## 使用方法
//!
//! ```toml
//! [dependencies]
//! realman = "0.2.1"
//! ```
//!
//! ## 三次点头示例
//!
//! ```rust
//! use realman::{traits::MotionTrait, ArmType, Realman, TrajectoryConnect};
//!
//! // get default client
//! let realman = Realman::default();
//!
//! // you can set it manually
//! // let realman = Realman::new("192.168.1.18", 8080);
//!
//! if let Ok(mut socket) = realman.connect() {
//! socket.movej(ArmType::Gen72([0; 7]), 50, 0, TrajectoryConnect::Now).ok();
//!
//! for _ in 0..3 {
//! socket.set_joint_step(&[6, -15000], 50).ok();
//! socket.set_joint_step(&[6, 15000], 50).ok();
//! }
//! }
//! ```
// 错误处理
/// 错误信息
pub use Error;
/// 指令集 Trait
// 数据类型
pub use *;
// 睿尔曼
/// 睿尔曼机械臂
pub use Realman;
// Transport
/// 机械臂传输
pub use Transport;
/// 结果类型
pub type Result<T> = Result;