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: f64Parts 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: f64Seconds 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: f64The verdict pick-tracking: the most the tool may be from the part along the belt during a grip, m.
picked: u64§missed: u64Implementations§
Source§impl Conveyor
impl Conveyor
Sourcepub fn from_config(
cfg: &Config,
axes: usize,
) -> Result<Option<Self>, ConfigError>
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.
Sourcepub fn carry_on(&mut self, old: &Self)
pub fn carry_on(&mut self, old: &Self)
Goes on where old was: its next part, and the parts it picked and missed.
Sourcepub fn offered_per_minute(&self) -> f64
pub fn offered_per_minute(&self) -> f64
Parts a minute the belt brings.
Sourcepub fn position(&self, k: u64, t: f64) -> f64
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).
Sourcepub fn parts_on_belt(&self, t: f64, pass: Option<&Pass>) -> Vec<(u64, f64)>
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.
Sourcepub fn plan(
&mut self,
axes: &[AxisInfo],
now: f64,
from: &[f64],
reachable: &dyn Fn(&[f64]) -> bool,
shaping: &(Vec<f64>, f64),
) -> Option<Pass>
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.