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
/*!
# `URScript` for Rust
A library enabling efficient and effective control of UR e-series cobots, in both `std` and `no_std` environments.
This library currently provides:
* Support for `no-std` environemnts
* Preproccessing of variables related to `URScript`
* Implementation of the pose type seen in `URScript`
This library is aiming to provide:
* Formatting of variables and functions in a way compatible with `URScript`
* Preproccessing of some functions and variables
* Implementation of all types related to `URScript`
* Async helper functions
* Ability to deserialize data from UR5 robot into strings or variables
## Example
```
# #[cfg(any(feature = "std", feature = "libm"))]
use ur_script::vars::pose::*;
use core::f32::consts::PI;
# #[cfg(any(feature = "std", feature = "libm"))]
let home = Pose::new_pose(0., 1., 2., 0., PI, 0.);
# #[cfg(any(feature = "std", feature = "libm"))]
let wobj_diagonal = Pose::new_pos(0., 2., 3.);
# #[cfg(any(feature = "std", feature = "libm"))]
let target1 = wobj_diagonal*home;
# #[cfg(any(feature = "std", feature = "libm"))]
let target2 = wobj_diagonal*target1;
# #[cfg(any(feature = "std", feature = "libm"))]
println!("{}", target2);
```
## Compatibility
The `ur_script` crate is tested for:
* rustc 1.65.0
* [URScript 5.12](https://www.universal-robots.com/download/manuals-e-series/script/script-manual-e-series-sw-512)
*/
// pub mod functions;
// #[cfg(feature = "tcp")]
// pub mod control;
pub use Pose;