Skip to main content

Crate use_joint

Crate use_joint 

Source
Expand description

§use-joint

Primitive robot joint vocabulary for RustUse.

This crate provides descriptive joint names, kinds, limits, axes, and indexes. It does not solve kinematics, enforce robot-specific constraints, control motors, or simulate motion.

§Example

use use_joint::{JointAxis, JointIndex, JointKind, JointLimit, JointName};

let name = JointName::new("shoulder-pan")?;
let kind = "revolute".parse::<JointKind>()?;
let axis = "z".parse::<JointAxis>()?;
let limit = JointLimit::new(Some(-1.57), Some(1.57))?;
let index = JointIndex::new(0);

assert_eq!(name.as_str(), "shoulder-pan");
assert_eq!(kind.to_string(), "revolute");
assert_eq!(axis.to_string(), "z");
assert_eq!(limit.maximum(), Some(1.57));
assert_eq!(index.get(), 0);

§License

Licensed under either the MIT license or Apache License, Version 2.0. Primitive robot joint vocabulary.

Structs§

JointIndex
A zero-based joint index label.
JointLimit
Optional descriptive joint limits.
JointName
A non-empty joint name.

Enums§

JointAxis
Descriptive joint axis labels.
JointAxisParseError
Error returned when parsing joint axes fails.
JointKind
Descriptive robot joint vocabulary.
JointKindParseError
Error returned when parsing joint kinds fails.
JointLimitError
Errors returned while constructing joint limits.
JointTextError
Errors returned while constructing joint text values.