Skip to main content

WaferHandler

Struct WaferHandler 

Source
pub struct WaferHandler { /* private fields */ }

Implementations§

Source§

impl WaferHandler

Source

pub fn new(cfg: &Config) -> Result<Self, ConfigError>

Source

pub fn arm(&self) -> &Arm

Source

pub fn bands(&self) -> &[Band; 2]

Source

pub fn slip_limit(&self) -> f64

The highest in-plane acceleration “wafer-slip” allows, m/s^2.

Trait Implementations§

Source§

impl Machine for WaferHandler

Source§

fn frame_momentum(&self, s: &[f64]) -> Option<FrameMomentum>

In the machine’s frame (x, y in the plane, z up, the column’s axis at the origin): each link, the effector and the wafer at their centres moving in the plane and up with the stroke, turning at their links’ rates; the column and the rotors spinning about z; the rest of what the stroke lifts at the axis.

Source§

fn base_shift( &self, tool_pose: &[f64], pivot: [f64; 3], shift: &[f64; 6], out: &mut [f64], )

The wafer centre at (r cos theta, r sin theta, z) moves with the base by its translation and tilt (as the default moves a point), told along and across the radial line: r by the move along u(theta), theta by the move across it over r, z by the move up.

Source§

fn inverse(&self, tool: &[f64], motors: &mut [f64])

NaN where the reach is beyond the arm’s: the controller never asks for one (see unreachable).

Source§

fn feedforward_torque(&self, pos: &[f64], acc: &[f64], out: &mut [f64])

Rigid, loss-free, at rest: M q’’ at the joints over the ratio, plus the rotor’s own J_rotor i q’‘; the stroke’s (m q’’ - weight) / i + J_rotor i q’’.

Source§

fn feedforward_torque_moving( &self, pos: &[f64], vel: &[f64], acc: &[f64], out: &mut [f64], )

With the speed: the joints’ motion (joint_motion), M q’’ + h at the joints over the ratio, plus the rotor’s own J_rotor i q’’.

Source§

fn steady_friction(&self, pos: &[f64], vel: &[f64], out: &mut [f64])

The rigid model at q’’ = 0: per joint the motor shaft’s friction (with the gearbox’s drag) at i q’ and the joint’s own friction (bearings, the Z guides and the nut’s preload) through the gearbox: f(q’) / (i loss).

Source§

fn rigid_checks( &self, pos: &[f64], vel: &[f64], acc: &[f64], out: &mut Vec<f64>, )

The rating checks’ values in the rigid model at a tool pose, speed and acceleration (rating_checks’ order): the screw’s speed, force and d n (its life NaN); “wafer-slip” NaN: the plan’s rows are linear in the acceleration and the speed squared along the path, and the size of the wafer’s acceleration, a vector’s length, is not (it is judged, and sim-cli optimise keeps it, the cycle’s axis limits are sized for it); “effector-direction” NaN (the rigid model has none); the bands’ tension swings (band_shares), linear in the acceleration.

Source§

fn substeps_wanted( &self, s: &[f64], _torque: &[f64], dt: f64, _substeps: u32, ) -> u32

A stop met within the step (HardStop::substeps, RotaryJoint::stop_substeps).

Source§

fn set_tool_force(&mut self, force: &[f64]) -> bool

The push acts on the arm’s coordinates beyond the gearboxes (pushed, on the bands’ too where they are elastic) and on the lift’s load, in either model; its power is the budget’s crash row.

Source§

fn after_step(&mut self, s: &mut [f64], _dt: f64)

The joints’ gearboxes’ hysteresis states move on to where the step ended (Gearbox::commit).

Source§

fn adopt_state(&self, old: &dyn Machine, old_state: &[f64]) -> Vec<f64>

As Machine::adopt_state, but where the model keeps its states (a changed ratio, not rigid against elastic) the links, the bands’ stretch and the stroke stay as they were, and each elastic gearbox keeps its twist and its rotor’s speed at the link (scaled by the new over the old dr/dmotor): rebuilt at rest, the bands’ lag during a move (0.14 mm at the wafer) was dropped and rang anew, 0.134 mm off a run left alone after a 1 % change of the ratio.

Source§

fn set_part_temperatures(&mut self, rises: &[f64])

The gearboxes, in the order of thermal_parts.

Source§

fn modes(&self, tool_pose: &[f64]) -> Vec<Mode>

The lowest modes at a tool pose, with the motors held where they are: the bands’ (beta, gamma) and, with elastic gearboxes, the column’s and the upper arm’s on their gearboxes’ stiffness; the rigid model’s joints held fast.

Source§

fn trains(&self, tool_pose: &[f64]) -> Vec<Option<Train>>

With effects.joint_elasticity: per motor its gearbox’s spring between the rotor and the rest of the motor’s rigid inertia at the pose, M_kk over the ratio squared with the other joints held and the bands rigid (RotaryJoint::train); the lift’s with the screw’s stiffness at its height (train_at), whose frequency is the column’s mode on it (modes).

Source§

fn twist(&self, torque: &[f64], acc: &[f64], out: &mut [f64])

The gearboxes’ static twist under what reaches them, the rotor’s own acceleration taken off (Gearbox:: static_twist), per motor in motor radians; zeros with rigid gearboxes. The lift’s takes the screw’s far end.

Source§

fn twist_at(&self, angle: &[f64], torque: &[f64], acc: &[f64], out: &mut [f64])

twist with the lift’s spring where its nut is, the rotor’s angle over the ratio (Gearbox::at): what identify::fit_joints takes for a trace of this machine.

Source§

fn condition(&self, tool_pose: &[f64]) -> Option<f64>

How far the reach’s motor is from the singular full extension: 1 / sin(phi), the most dr/dphi over this one (1 with the wrist over the column, without bound at full extension); infinite out of reach.

Source§

fn setpoint_slack(&self) -> f64

What the gearboxes can sag at rest (rest_sag).

Source§

fn rating_checks(&self) -> Vec<RatingCheck>

The stroke’s ball screw (speed, d n, buckling, static load, life); the wafer’s hold (“wafer-slip”, against the hold at rest over ratings.wafer_slip_safety_factor); the effector’s direction at a station (“effector-direction”, against ratings.direction_tolerance_rad); each band’s tension swing against ratings.band_max_pretension_share of its pretension (“elbow-band-slack”, “wrist-band-slack”).

Source§

fn thermal_parts(&self) -> Vec<ThermalPart>

The two gearboxes, where there are gearboxes (not on a direct drive); the stroke’s coupling warms nothing.

Source§

fn scene(&self, s: &[f64], out: &mut Scene)

The machine with the arm’s plane at the stroke’s height z: the column below it with motor 1 and its gearbox at its foot, motor 2 and its gearbox at its top, the Z motor beside it; the upper arm, the forearm, the effector and the wafer; a bar on each motor turned by its rotor angle and its speed above it.

Source§

fn scene_point(&self, tool_pose: &[f64]) -> Option<[f64; 3]>

The wafer centre at the effector’s height.

Source§

fn collision_bodies(&self, s: &[f64]) -> Vec<Aabb>

The wafer, where scene draws it, and the effector as the box around its strip.

Source§

fn axes(&self) -> &[AxisInfo]

Source§

fn motors(&self) -> &[MotorInfo]

Source§

fn forward(&self, motors: &[f64], tool: &mut [f64])

Source§

fn state_len(&self) -> usize

Source§

fn equilibrium(&self, tool: &[f64], state: &mut Vec<f64>, torque: &mut [f64])

The state at rest at a tool pose, and the motor torques that hold it there.
Source§

fn derivatives(&self, s: &[f64], torque: &[f64], out: &mut [f64])

Source§

fn tool_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])

Source§

fn set_tool_velocity(&self, s: &mut [f64], vel: &[f64])

Gives a state at rest (see equilibrium) the tool speeds vel: everything that moves with the tool, motors included, moves along as the kinematics say.
Source§

fn motor_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])

Source§

fn energy(&self, s: &[f64]) -> f64

Kinetic plus potential energy, for the conservation check.
Source§

fn set_payload_attached(&mut self, attached: bool)

Source§

fn set_brake_engaged(&mut self, engaged: bool)

Told every step whether the drives are disabled, for machines with holding brakes.
Source§

fn set_dwelling(&mut self, dwelling: bool)

Told every step whether the cycle dwells at a target, for machines with a process force there.
Source§

fn resonance_hz(&self, tool_pose: &[f64]) -> Option<f64>

The lowest structural resonance at a tool pose, for a controller that sets its input shaper by it. None where the machine has none to tell.
Source§

fn unreachable(&self, tool: &[f64], _slack: f64) -> Option<&'static str>

Why a tool pose within the axis ranges cannot be gone to, as a translation key: out of reach of the kinematics, outside the working envelope, beyond a joint’s stop. slack (m) widens the envelope at its edges, as it widens the axis ranges for a setpoint at rest. None where it can; machines whose workspace is the box of their axis ranges keep this default.
Source§

fn signal_infos(&self) -> Vec<SignalInfo>

Signals beyond axis and motor positions, speeds and torques, which every machine gets for free: first those of base_signals, then those of effect_signals.
Source§

fn base_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)

The machine’s own signals but those of the effect views; cheap enough to be asked for every step.
Source§

fn effect_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)

The signals of the effect views (TORQUE_PARTS, LOSS_PREFIX, ENERGY_PARTS, FRICTION_SIGNALS, belt stretch), appended after those of base_signals. They cost about one more evaluation of the machine’s derivatives, so they are asked for only where they are recorded or added up.
Source§

fn loss_powers(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)

The loss powers alone, the signals power.* in their order among the signals, without the rest of effect_signals: what warms the parts every step (thermal_parts). Empty where the machine reports none.
§

fn motor_linear(&self, _motor: usize) -> bool

Whether motor motor is a linear motor: its angle, speed and torque signals are then m, m/s and N, and the “motor-speed” verdict’s value is m/s. False by default, a rotary motor.
§

fn scale_state(&self, state: &[f64], pos: &mut [f64], vel: &mut [f64])

What a load-side scale reads: the carriage (the tool) against the frame it is mounted on, so a frame’s sway and a tool’s lean are not in it. By default the tool state, in the room, as tool_state reports it.
§

fn rigid_motor_torque( &self, angle: &[f64], speed: &[f64], acc: &[f64], out: &mut [f64], )

The motor torques of the same rigid, loss-free model at motor angles, speeds and accelerations: what fitting a trace in the motors’ own coordinates needs (identify::fit_joints). By default through the tool: its pose by forward, its speed and acceleration by central differences along the motors’ motion over ±0.1 ms, then feedforward_torque_moving. A machine whose feedforward_torque_moving leaves out the speed terms of a kinematics that is not linear overrides this.
§

fn rigid_split_torque( &self, angle: &[f64], speed: &[f64], acc: &[f64], _rotor_acc: &[f64], out: &mut [f64], )

rigid_motor_torque with the load at angle, speed, acc (where the rigid model puts the motors for it) and the rotors at their own acceleration rotor_acc: what an elastic train (twist) needs. By default the rigid torques at the load’s motion, the rotors turning with it.
§

fn rigid_tensions( &self, _tool_pos: &[f64], _tool_acc: &[f64], _out: &mut Vec<f64>, )

The tension of each belt section (N, in the order of belt_sections) that the loss-free rigid model of feedforward_torque gives at a tool pose and acceleration: what the belt has to pull on the moved masses (not on the pulleys and rotors, which the motors turn), shared out so that the belt keeps its length. Linear in the acceleration. Appends nothing where the machine has no belt sections to tell.
§

fn rigid_tensions_moving( &self, tool_pos: &[f64], tool_vel: &[f64], tool_acc: &[f64], out: &mut Vec<f64>, )

rigid_tensions with the tool’s velocity too, for machines whose carriages accelerate with the speed (a delta’s rods turn: h’’ = J^-1 (p’’ - J_x^-1 w)). By default the speed does not matter.
§

fn tension_band(&self) -> Option<[f64; 2]>

The band [least, most] (N) the time-optimal plan keeps rigid_tensions within, where the machine has it from its own parts (cables between winches and a platform); None: ratings.belt_min_tension_n and belt_max_tension_n.
§

fn rigid_guide_loads( &self, _tool_pos: &[f64], _tool_acc: &[f64], _out: &mut Vec<[f64; 2]>, )

The load of each guide that reports axis.<id>.guide_load (N, in that order) in the loss-free rigid model at a tool pose and acceleration, as [rest, moving] for the load rest + |moving|: moving linear in the acceleration and zero without. The time-optimal plan keeps it within ratings.guide_max_load_n. Appends nothing where the machine does not tell.
§

fn rigid_friction( &self, _tool_pos: &[f64], _tool_dir: &[f64], _out: &mut Vec<[f64; 2]>, )

The steady friction of the guides (and other sliding contacts the motors drive, not the motors’ own shafts and gearboxes) as torque at each motor (in the order of motors), while the tool at tool_pos moves along tool_dir (its rate per unit of path): [c, b] for c + b v at the speed v along the path, positive where the motor has to give positive torque against it. For the time-optimal plan. Appends nothing where the machine does not tell.
§

fn rigid_friction_rise( &self, _tool_pos: &[f64], _tool_dir: &[f64], _out: &mut Vec<Vec<[f64; 2]>>, )

What rigid_friction’s c + b v leaves out near a standstill, the Stribeck rise: per motor a [level, speed] for each contact it drives, the torque level exp(-(v / speed)^2) more at the speed v along the path (the friction is then c + sum level exp(..) + b v; level signed as c, speed in the path’s units, above 0). For the time-optimal plan, which holds the room for it at the most it takes over the speeds up to v. Appends nothing where the machine has no rise (the default).
The rigid bodies whose inertial parameters a trace can be fitted for (identify::fit_joints), by name: the links of a URDF chain. None by default.
Changes link link’s inertial parameters about its joint’s frame, from those it was built with: mass, first moment and inertia all times factor, then moment (kg m, in its frame) added to the first moment with mass and inertia about the frame kept. The rigid torques are linear in each, which the fit takes its columns from. (1, [0; 3]) restores it. Nothing by default.
§

fn contact_axes(&self) -> usize

How many contact coordinates an obstacle’s push acts on (set_tool_force): by default the tool’s axes. A machine whose parts that can touch do not move with its tool alone (a load swinging under it, a dancer the web holds) gives coordinates of their own.
§

fn contact_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])

The contact coordinates and their rates at state s: by default the tool’s (tool_state). The rates are linear in the state’s rates.
§

fn contact_placed(&self, _s: &[f64], at: &[f64], out: &mut Vec<f64>)

A state from s with the contact coordinates at at, the parts placed there for the slopes of an obstacle’s clearance along them: by default the rest at the tool pose at (equilibrium).
§

fn push_substeps(&self) -> u32

How many times finer still than the simulation’s own refinement under a push on the contact coordinates (Sim’s PUSH_SUBSTEPS) a base step with one is to be taken: where the contact’s spring holds a coordinate far lighter than the load’s (a leaning axis pushed through its lever). 1 by default.
§

fn valves(&self) -> Vec<(String, f64)>

Actuators that a valve moves and no drive (pneumatic cylinders): each one’s id and the valve command it starts with (+1 extend, -1 retract, 0 the closed centre of a 5/3 valve), for a cycle segment’s valves and wait. None by default.
§

fn set_valve(&mut self, _valve: usize, _command: f64)

Told every step the command of valve valve (of valves); the valve switches after its own delay.
§

fn end_sensors(&self, _valve: usize) -> [bool; 2]

Valve valve’s end-position sensors, [retracted, extended], each after its delay.
§

fn memory(&self) -> Vec<f64>

What the machine carries from one step to the next outside state (the gearboxes’ hysteresis anchors that after_step moves on, a numerical inverse’s last solution), as a fixed count of numbers: a snapshot of the simulation keeps them and sets them back with set_memory. None by default.
§

fn set_memory(&mut self, _memory: &[f64])

Sets back what memory gave.
§

fn mode_shape(&self, _tool_pose: &[f64]) -> Option<(f64, Vec<f64>)>

The mode resonance_hz reports at a tool pose: its frequency in Hz and its shape, a direction in the state (as long as it, positions only, rates zero). The equilibrium at that pose plus a small amplitude times the shape, drawn with scene, shows how the machine moves in that mode; one unit of amplitude moves the tool by 1 m along its first axis. None where the machine tells no resonance.
§

fn modes_small_amplitude(&self, tool_pose: &[f64]) -> Vec<Mode>

The same modes as modes for small vibrations: where a joint’s gearbox has hysteresis (gearbox_lost_motion), the stiffness it shows at a reversal is K1 + sigma, not the large-amplitude K1 modes uses. A shaper for the move’s own swing takes modes (the twists of the move are far above the hysteresis loop); one for the residual ringing below about 1e-4 rad at the joint takes these. By default the same as modes.
§

fn sway_modes(&self, tool_pose: &[f64]) -> Vec<Mode>

The modes an input shaper that follows the pose takes beyond the first (profile.shaper_modes, the shaping optimiser’s second shaper), lowest first: by default modes. A machine whose modes hold modes the shaper does not act on (a crane’s bounce of the load on its rope) gives the ones it does (the swing, and the hook block’s upper swing).
§

fn belt_wraps(&self, _tool_pose: &[f64]) -> Vec<f64>

With effects.belt_wrap: the angle (rad) by which the belt wraps each driven pulley at a tool pose, from the places of the pulleys and idlers, in the order of motors; NaN for a motor that drives no belt. Empty where the machine gives no belt geometry or the effect is off: then ratings.belt_teeth_in_mesh stands for the teeth in mesh.
§

fn refuses_pick(&self, _tool_pose: &[f64]) -> Option<&'static str>

Why the payload cannot be picked up with the tool at rest at tool_pose (a cycle segment that attaches it), as a translation key: the machine’s own physical reason (a hook block that would hang inside the payload). None where it can, by default.
§

fn cam(&self) -> Option<CamMaster>

An electronic cam the controller runs as the cycle: the master’s motion, None for a machine whose cycle is its [[cycle.segment]]. Each pass is one period of the master once it is up to speed; a stop runs it down.
§

fn cam_at(&self, _master: f64, _out: &mut [[f64; 4]])

With cam: each tool axis (the slaves) at the master position master, as [s, s’, s’‘, s’‘’], the rates over the master.
§

fn cam_curve(&self) -> Option<Arc<dyn Fn(f64, &mut [[f64; 4]]) + Send + Sync>>

With cam: the curve cam_at reads, apart from the machine, so that it still reads the same once the config has changed (the input shaper reads the plan of past cycles off it). None without a cam.
§

fn gantry_motors(&self) -> Option<[usize; 2]>

A dual-drive gantry: the two motors that drive its axis side by side, the master first, for the drives’ synchronisation (gantry.sync). None without one.
§

fn signals(&self, state: &[f64], torque: &[f64], out: &mut Vec<f64>)

Every signal of signal_infos.
§

fn collision_capsules(&self, _state: &[f64]) -> Vec<Capsule>

The slanted parts of the machine that can hit an obstacle (rods, arms, shafts), as capsules in scene coordinates at state, beside the boxes of collision_bodies. None by default.
§

fn self_collision_capsules(&self, state: &[f64]) -> Vec<Capsule>

The capsules the planning check of the machine’s own parts looks at (collision::check_path): by default those of collision_capsules. A machine whose links are not checked against obstacles can add them here.
§

fn connected_bodies( &self, _state: &[f64], _boxes: usize, _capsules: usize, ) -> Option<Vec<(usize, usize)>>

Which of the machine’s own parts belong together and so are not checked against each other, at state, with boxes boxes (collision_bodies) and capsules capsules (self_collision_capsules): pairs of indices into the boxes followed by the capsules. None, the default, takes the rule that parts which touch, overlap or lie closer than profile.min_clearance_m to each other at the first pose checked are joined (a carriage on its rail, a link at its joint) and every other pair is checked; that cannot see a collision of parts already in contact at that pose. A machine that knows its parts’ adjacency tells it exactly. The step of the simulation is not touched: parts do not push each other there.
§

fn friction_contacts(&self) -> Vec<FrictionContact>

The friction contacts for the friction view. Empty where the machine tells none.
§

fn friction_curve(&self, _i: usize, _speed: f64, _load_scale: f64) -> [f64; 3]

The steady sliding force of contact i at speed, with its levels scaled by load_scale, split into [Coulomb, viscous, stiction]. It opposes a positive speed.
§

fn friction_rotary(&self, _i: usize) -> bool

Whether contact i is a rotary one (a joint’s bearings): its speed signal is an angular speed (rad/s) and its parts torques (N m), where a sliding one has m/s and N. The friction view draws the labels of its kind.
§

fn friction_speed_limit(&self, _i: usize, _motor_speed: &[f64]) -> Option<f64>

The speed (m/s, or rad/s for a rotary contact) up to which the friction view draws contact i’s curve, where the machine knows it from the highest speed of each motor’s rotor, motor_speed (rad/s, from its drive); None: the owner axis’s speed limit, or the fastest axis’s.
§

fn belt_sections(&self) -> Vec<BeltSection>

The belt sections for the belt view. Empty where the machine tells none.
§

fn thermal_values(&self, _id: &str) -> Option<(f64, f64)>

The resistance to ambient (K/W) and the time constant (s) of the thermal part id, where the machine works them out from the part’s own size (a belt: its surface and mass) in place of the config’s thermal.<kind>_resistance_k_w and thermal.<kind>_time_constant_s; None: the config’s.

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> 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, 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.