ur_script/lib.rs
1#![no_std]
2
3/*!
4# `URScript` for Rust
5
6A library enabling efficient and effective control of UR e-series cobots, in both `std` and `no_std` environments.
7
8This library currently provides:
9* Support for `no-std` environemnts
10* Preproccessing of variables related to `URScript`
11* Implementation of the pose type seen in `URScript`
12
13This library is aiming to provide:
14* Formatting of variables and functions in a way compatible with `URScript`
15* Preproccessing of some functions and variables
16* Implementation of all types related to `URScript`
17* Async helper functions
18* Ability to deserialize data from UR5 robot into strings or variables
19
20## Example
21
22```
23# #[cfg(any(feature = "std", feature = "libm"))]
24use ur_script::vars::pose::*;
25use core::f32::consts::PI;
26
27# #[cfg(any(feature = "std", feature = "libm"))]
28let home = Pose::new_pose(0., 1., 2., 0., PI, 0.);
29# #[cfg(any(feature = "std", feature = "libm"))]
30let wobj_diagonal = Pose::new_pos(0., 2., 3.);
31# #[cfg(any(feature = "std", feature = "libm"))]
32let target1 = wobj_diagonal*home;
33# #[cfg(any(feature = "std", feature = "libm"))]
34let target2 = wobj_diagonal*target1;
35
36# #[cfg(any(feature = "std", feature = "libm"))]
37println!("{}", target2);
38```
39
40## Compatibility
41
42The `ur_script` crate is tested for:
43* rustc 1.65.0
44* [URScript 5.12](https://www.universal-robots.com/download/manuals-e-series/script/script-manual-e-series-sw-512)
45*/
46
47#![deny(
48 missing_docs,
49 nonstandard_style,
50 unused_variables,
51 unused_mut,
52 unused_parens,
53 unused_qualifications,
54 rust_2018_idioms,
55 rust_2018_compatibility,
56 future_incompatible,
57 missing_copy_implementations
58)]
59
60pub mod vars;
61// pub mod functions;
62
63// #[cfg(feature = "tcp")]
64// pub mod control;
65
66#[cfg(any(feature = "std", feature = "libm"))]
67pub use vars::pose::Pose;