Skip to main content

Crate syact

Crate syact 

Source
Expand description

§syact

A library that defines actuators and their interaction with each other.

This library is intended to define bindings that can then be implemented by device-specific library, making their components available for use by general libraries like sybot.

§In Action

use syact::prelude::*;

// Position of components
const POS : PositionMM = PositionMM(10.0);

// Create a new linear_axis (implements SyncActuator as their sub-component does)
let mut linear_axis = LinearAxis::new_belt_axis(
    // Some Demo-Actuator implementing (also implements SyncActuator)
    DemoActuator::new(), 
    Millimeters(0.5)    // The radius is set to 0.5, which means for each radian the motor moves, the linear_axis moves for 0.5 mm
);    

linear_axis.overwrite_abs_pos(POS);

assert!((linear_axis.pos() - POS).abs() < Millimeters(0.001));      // Check with small tolerance requred for stepper motors

§Further libraries

  • Basic libraries
    • syunit: Flexible unit system and basis for many traits in this library, furthermore embedded into it in the units module
    • sykin: Basic kinematic equations
  • Advanced libraries
    • sybot: Follow up library that defines robots out of traits in this library
  • Device-specific libraries
    • systep: Stepper motors and drivers library, implementing embedded-hal

§Issues and requests

If you encounter any issues or if you have any request for new features, feel free to create an issue at the GitHub repo.

Re-exports§

pub use parent::ActuatorParent;
pub use parent::RatioActuatorParent;
pub use sync::SyncActuator;
pub use sync::SyncActuatorState;
pub use sync::SyncActuatorBlocking;
pub use sync::SyncActuatorNB;
pub use syunit as units;

Modules§

comps
Common components and their implementations, like gears, linear axes etc.
data
Structs for storing characteristics of stepper motors and so on
meas
Functions and Structs for taking measurements with a robot for e.g. position calculation
parent
Component parent relations and their implementation
prelude
Embed unit system library
sync
Everything about actuators that work synchronously

Macros§

merge_actuator_traits
Helper macro for merging multiple Actuator traits into one, useful for group implementation

Enums§

ActuatorError
General Error type for SyncActuators
InterruptReason
Reasons why an interrupt was triggered

Traits§

AdvancedActuator
An advanced actuator allows applying loads that alter the actuators movement
AsyncActuator
A component which is asynchronous because of its hardware properties, e.g. a simple DC-Motors
DefinedActuator
An actuator that has a defined time to move for a PTP (Point-To-Point) movement
Interruptible
Represents an interruptible component, meaning Interruptors can be attached to modify the movement process
Interruptor
A trait for structs that help interrupting or watching movement processes, the most common use are measurement systems