Skip to main content

Conveyor

Struct Conveyor 

Source
pub struct Conveyor {
Show 16 fields pub direction: Vec<f64>, pub speed: f64, pub ramp: f64, pub origin: Vec<f64>, pub length: f64, pub pitch: f64, pub arrivals: Vec<f64>, pub window: [f64; 2], pub lift: Vec<f64>, pub grip: f64, pub release: f64, pub place: Vec<f64>, pub place_velocity: Vec<f64>, pub tolerance: f64, pub picked: u64, pub missed: u64, /* private fields */
}
Expand description

The conveyor of [conveyor] and how far it has got: the parts picked and missed so far.

Fields§

§direction: Vec<f64>

Unit vector along the belt in tool coordinates, and the belt’s speed, m/s, which it reaches ramp seconds after the start at a constant acceleration.

§speed: f64§ramp: f64§origin: Vec<f64>

The tool pose that grips a part where it enters the belt (belt position 0), and the belt’s length from there.

§length: f64§pitch: f64

Parts pass the origin at n pitch + arrivals[j], n = 0, 1, …

§arrivals: Vec<f64>§window: [f64; 2]

The stretch of the belt, from the origin, in which the gripper may close: from its start to its end.

§lift: Vec<f64>

Added to a grip or place pose for the pose above it, which the tool comes from and lifts to.

§grip: f64

Seconds the tool moves with the part while the gripper closes, and with the place while it opens.

§release: f64§place: Vec<f64>

The place pose, and the velocity of the belt it lies on (zero for a fixed place).

§place_velocity: Vec<f64>§tolerance: f64

The verdict pick-tracking: the most the tool may be from the part along the belt during a grip, m.

§picked: u64§missed: u64

Implementations§

Source§

impl Conveyor

Source

pub fn from_config( cfg: &Config, axes: usize, ) -> Result<Option<Self>, ConfigError>

The conveyor of the config’s [conveyor] table, for a tool of axes axes; None without the table or with conveyor.enabled = false.

Source

pub fn carry_on(&mut self, old: &Self)

Goes on where old was: its next part, and the parts it picked and missed.

Source

pub fn belt(&self, t: f64) -> f64

How far the belt has run since the start at time t.

Source

pub fn arrival(&self, k: u64) -> f64

When part k passes the origin.

Source

pub fn offered_per_minute(&self) -> f64

Parts a minute the belt brings.

Source

pub fn position(&self, k: u64, t: f64) -> f64

Where part k is along the belt at time t, from the origin (negative before it gets there).

Source

pub fn part_pose(&self, k: u64, t: f64) -> Vec<f64>

The pose that grips part k at time t.

Source

pub fn parts_on_belt(&self, t: f64, pass: Option<&Pass>) -> Vec<(u64, f64)>

The parts on the belt at time t that are not in the gripper, with their positions along it: those not yet planned for, and the one of pass until its grip ends. What the scene draws.

Source

pub fn plan( &mut self, axes: &[AxisInfo], now: f64, from: &[f64], reachable: &dyn Fn(&[f64]) -> bool, shaping: &(Vec<f64>, f64), ) -> Option<Pass>

The next pass from from at rest at time now: for the first part that can be gripped inside the window, the parts before it counted as missed. A part the tool would grip before the window waits for it (the pass starts later); one it would grip beyond the window, or whose pass leaves reachable, is missed. None where a thousand parts in a row are missed: no part can be picked. Also while the belt is on its ramp.

shaping, from the input shaper (Controller::shaper_delays): per axis how far its setpoint lags a plan at a constant speed, s, and how long after the plan it arrives, s; zeros without shaping. The pass is planned for the part that far ahead on each axis, so that the shaped setpoint meets it, and grip and release are longer by the span, so that the shaped setpoint is on the part for the whole grip.

Source

pub fn gripping(&self, pass: &Pass, t: f64) -> Option<Vec<f64>>

The part in the gripper’s grip at time t of pass (from the grip’s start to its end): its pose.

Trait Implementations§

Source§

impl Clone for Conveyor

Source§

fn clone(&self) -> Conveyor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Conveyor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Conveyor

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Conveyor

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.