pub struct Crane { /* private fields */ }Implementations§
Source§impl Crane
impl Crane
pub fn new(cfg: &Config) -> Result<Self, ConfigError>
pub fn load_mass(&self) -> f64
Sourcepub fn sway_omega(&self, length: f64) -> Option<f64>
pub fn sway_omega(&self, length: f64) -> Option<f64>
The small swing’s angular frequency of a rope of length L; None without gravity. The point load on a rope of mass
mu per metre: w^2 = g (m + mu L / 2) / (L (m + mu L / 3)) (sqrt(g / L) for a light rope); with the hook block and a
payload on its sling the lower root of m1 l1 l2 w^4 - (m1 + m2) g (l1 + l2) w^2 + (m1 + m2) g^2 = 0.
Sourcepub fn rope(&self, s: &[f64]) -> Rope
pub fn rope(&self, s: &[f64]) -> Rope
The rope’s geometry at a state, and with effects.rope_stretch its tension; the rigid rope’s tension comes from
the motion (motion), and is 0 here.
Sourcepub fn sway_amplitude(&self, s: &[f64]) -> f64
pub fn sway_amplitude(&self, s: &[f64]) -> f64
The sway’s amplitude, sqrt(d^2 + (d’ / w)^2) of the horizontal offset d at w = sqrt(g / L): where a free pendulum swinging like this would turn back.
Trait Implementations§
Source§impl Machine for Crane
impl Machine for Crane
Source§fn frame_momentum(&self, s: &[f64]) -> Option<FrameMomentum>
fn frame_momentum(&self, s: &[f64]) -> Option<FrameMomentum>
Bridge (at the middle of its girder), trolley, hook block, load on its sling and the rope (the free rope a point of its mass at its middle, moving with the mean of its ends’ material: the exact momentum of a linear velocity; the wound rope at the sheave) as points; the drives’ spin, and the wound rope’s turning with the drum, are left out.
Source§fn rating_checks(&self) -> Vec<RatingCheck>
fn rating_checks(&self) -> Vec<RatingCheck>
The rope’s highest tension against its rating, how far it fell below the least (none: no slack), the sway left at a dwell, and the rope’s pull on the hoist’s brake.
Source§fn inverse(&self, tool: &[f64], motors: &mut [f64])
fn inverse(&self, tool: &[f64], motors: &mut [f64])
Bridge and trolley under the load, the rope’s free length that the empty hook stretches to H - z.
Source§fn tool_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
fn tool_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
Where the drives put the hook (forward of their angles): the bridge’s x, the trolley’s y, the height the drum’s
rope gives the empty hook. The load’s sway and its bounce on the rope are not in the tool pose (a crane is
positioned by its drives, as its following error and settling say); they have their own signals and the verdict
residual-sway.
Source§fn set_tool_velocity(&self, s: &mut [f64], vel: &[f64])
fn set_tool_velocity(&self, s: &mut [f64], vel: &[f64])
Everything moves with the load: bridge and trolley under it, the drum paying out as the rope at its rest stretch.
Source§fn motor_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
fn motor_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
The motors’ angles: the rotors’ with the elastic drives (the bridge’s the mean of its two carriages’), else the travels times the ratios.
Source§fn feedforward_torque_moving(
&self,
pos: &[f64],
_vel: &[f64],
acc: &[f64],
out: &mut [f64],
)
fn feedforward_torque_moving( &self, pos: &[f64], _vel: &[f64], acc: &[f64], out: &mut [f64], )
The rigid model: the load carried along with the trolley (no sway), the rope at its rest stretch; the rope’s tension m (g + z’’) on the drum with its dV/dl share. Its speed asks nothing (the motor angles are linear in the pose but for the stretch).
Source§fn steady_friction(&self, pos: &[f64], vel: &[f64], out: &mut [f64])
fn steady_friction(&self, pos: &[f64], vel: &[f64], out: &mut [f64])
At a steady speed: the motor shaft’s friction and, through the gearbox as motion takes it, the wheels’ rolling
under the load hanging still.
Source§fn set_payload_attached(&mut self, attached: bool)
fn set_payload_attached(&mut self, attached: bool)
With the hook block and the floor a payload let go stays in the machine as a free body (free); a pick takes it
where it is when the sling reaches it (in_place), else this payload is gone and the next appears under the hook
block (appear). Without them it leaves with the grip, as the payload of a pick did.
Source§fn refuses_pick(&self, tool_pose: &[f64]) -> Option<&'static str>
fn refuses_pick(&self, tool_pose: &[f64]) -> Option<&'static str>
With the hook block and the floor: the payload stands on the floor under the hook block (after_step), so a hook
block hanging lower over the floor than the two boxes’ half heights (0.28 m, full::faces) would already be
inside it, which pushing it out would make energy.
Source§fn after_step(&mut self, s: &mut [f64], dt: f64)
fn after_step(&mut self, s: &mut [f64], dt: f64)
Pick and set-down are quasi-static: a load slung on the floor goes on as the hoist takes its weight up slowly,
and comes off as it is set down. So once the payload went on or off, the load moves along the rope to where the
rope’s free length holds the new mass at rest, L = l (1 + m g / EA), and its speed along the rope to the drum’s
(the rest across the rope, its sway, is kept). Not done, the rope would snatch the new load from rest (to twice its
weight) and fling the empty hook up off a slack rope. What that changes in the energy (the floor’s share of the
lift, some 0.1 J) is booked with power.other over this step.
With effects.floor_contact the floor is modelled where the load stands on it (motion: the floor force N >= 0,
N = -m a_z of the free load, which then stays at crane.floor_height_m): a payload’s mass goes on without a jump
of the rope (the floor carries it), the rope’s tension takes the weight over as the drum winds (the snatch of a
fast lift is the rope’s stretch at the drum’s speed, t = EA e / l, until t |u_z| = m g), and a slack rope on
lowering leaves the load standing. The load’s fall onto the floor is plastic: its downward speed is lost
(m v^2 / 2, booked with power.other). Above the floor the pick is quasi-static as before.
The standing load rubs on the floor with Coulomb friction mu_f N (motion), N the floor’s push; the plain rigid rope
respects the floor too: its load stands with the rope slack (the drum paying out, nothing pulls), and where the rope
comes taut (L > l) the load is lifted to l at once with its speed along the rope made the drum’s, a plastic
impact whose energy is booked with power.other. With the sling the payload’s point is the one that stands.
Source§fn memory(&self) -> Vec<f64>
fn memory(&self) -> Vec<f64>
What the gearboxes’ hysteresis carries between steps (elastic drives only).
Source§fn substeps_wanted(
&self,
s: &[f64],
_torque: &[f64],
dt: f64,
_substeps: u32,
) -> u32
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
fn set_tool_force(&mut self, force: &[f64]) -> bool
The push acts where the parts that touch are: on the hook’s point (with it the payload under it), and with the
hook block on the hook block’s and the payload’s at the sling’s end (push_on); its power is the crash row.
Source§fn contact_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
fn contact_state(&self, s: &[f64], pos: &mut [f64], vel: &mut [f64])
The hook’s point P (the payload hangs on it, 0.3 m below), and with the hook block the payload’s P2 = P1 + d.
Source§fn set_part_temperatures(&mut self, rises: &[f64])
fn set_part_temperatures(&mut self, rises: &[f64])
The gearboxes, in the order of thermal_parts.
Source§fn setpoint_slack(&self) -> f64
fn setpoint_slack(&self) -> f64
The payload’s own stretch on the longest rope (kinematic_stretch), and the default’s 0.1 mm.
Source§fn resonance_hz(&self, tool_pose: &[f64]) -> Option<f64>
fn resonance_hz(&self, tool_pose: &[f64]) -> Option<f64>
The load’s sway on its rope at the pose: sqrt(g / L) / (2 pi), L = H - z.
Source§fn modes(&self, tool_pose: &[f64]) -> Vec<Mode>
fn modes(&self, tool_pose: &[f64]) -> Vec<Mode>
The swing of resonance_hz and, with the hook block, the double pendulum’s upper mode (sway_omegas), with the
trolley held as resonance_hz has it (the swing has no damper of its own); the load’s bounce on the elastic rope
(and the sling), with effects.joint_elasticity the drives’ modes, with the motors held (held_modes); with
effects.bridge_skew the girder’s yaw (skew_modes). Lowest first.
Source§fn sway_modes(&self, tool_pose: &[f64]) -> Vec<Mode>
fn sway_modes(&self, tool_pose: &[f64]) -> Vec<Mode>
The swings alone (the shaper acts on them, not on the bounce, the drives or the skew): the load’s, and with the hook block the double pendulum’s upper one.
Source§fn effect_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
fn effect_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
Torque breakdown per motor: inertia (the axis’s own mass and rotor), gravity (the rope’s pull on the axis: the load’s weight on the hoist, the swing’s pull on the travel drives), friction (motor shaft, brake, gearbox loss, the wheels’ rolling), the rest (ripple, stops). Then the loss powers and the energies.
Source§fn scene(&self, s: &[f64], out: &mut Scene)
fn scene(&self, s: &[f64], out: &mut Scene)
The runway’s rails on their columns, the bridge’s girder, the trolley with its drum, each drive’s motor and gearbox, the rope coloured by its tension against the load’s weight, the hook and the load under it.
fn axes(&self) -> &[AxisInfo]
fn motors(&self) -> &[MotorInfo]
fn forward(&self, motors: &[f64], tool: &mut [f64])
fn state_len(&self) -> usize
Source§fn equilibrium(&self, tool: &[f64], state: &mut Vec<f64>, torque: &mut [f64])
fn equilibrium(&self, tool: &[f64], state: &mut Vec<f64>, torque: &mut [f64])
fn derivatives(&self, s: &[f64], torque: &[f64], out: &mut [f64])
Source§fn feedforward_torque(&self, pos: &[f64], acc: &[f64], out: &mut [f64])
fn feedforward_torque(&self, pos: &[f64], acc: &[f64], out: &mut [f64])
Source§fn set_memory(&mut self, memory: &[f64])
fn set_memory(&mut self, memory: &[f64])
memory gave.Source§fn set_dwelling(&mut self, dwelling: bool)
fn set_dwelling(&mut self, dwelling: bool)
Source§fn set_brake_engaged(&mut self, engaged: bool)
fn set_brake_engaged(&mut self, engaged: bool)
Source§fn contact_axes(&self) -> usize
fn contact_axes(&self) -> usize
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.Source§fn contact_placed(&self, s: &[f64], at: &[f64], out: &mut Vec<f64>)
fn contact_placed(&self, s: &[f64], at: &[f64], out: &mut Vec<f64>)
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).Source§fn signal_infos(&self) -> Vec<SignalInfo>
fn signal_infos(&self) -> Vec<SignalInfo>
base_signals, then those of effect_signals.Source§fn base_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
fn base_signals(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
Source§fn loss_powers(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
fn loss_powers(&self, s: &[f64], torque: &[f64], out: &mut Vec<f64>)
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.Source§fn thermal_parts(&self) -> Vec<ThermalPart>
fn thermal_parts(&self) -> Vec<ThermalPart>
Source§fn scene_point(&self, tool: &[f64]) -> Option<[f64; 3]>
fn scene_point(&self, tool: &[f64]) -> Option<[f64; 3]>
tool_pose, in scene coordinates, so that a front end can
draw a path of the tool into the scene. None for a machine that has no such mapping.Source§fn collision_bodies(&self, s: &[f64]) -> Vec<Aabb>
fn collision_bodies(&self, s: &[f64]) -> Vec<Aabb>
state. By
default the tool alone, as a point where scene_point puts it (none without that mapping); a machine names
the boxes of its scene that move with the tool through scene::scene_boxes.§fn base_shift(
&self,
tool_pose: &[f64],
pivot: [f64; 3],
shift: &[f64; 6],
out: &mut [f64],
)
fn base_shift( &self, tool_pose: &[f64], pivot: [f64; 3], shift: &[f64; 6], out: &mut [f64], )
tool_pose when the base moves by shift
(translation [x, y, z] in m and a small tilt [x, y, z] in rad about pivot, in the frame of FrameMomentum),
written into out (as long as the axes). By default the axes x, y, z take the move of the tool point at the
pose’s x, y, z, u + theta x (r - pivot), and a rotary axis with an id of BASE_AXES[1], or c (about z), the
tilt; a machine whose tool axes are its joints moves nothing.§fn motor_linear(&self, _motor: usize) -> bool
fn motor_linear(&self, _motor: usize) -> bool
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])
fn scale_state(&self, state: &[f64], pos: &mut [f64], vel: &mut [f64])
tool_state reports it.§fn rigid_motor_torque(
&self,
angle: &[f64],
speed: &[f64],
acc: &[f64],
out: &mut [f64],
)
fn rigid_motor_torque( &self, angle: &[f64], speed: &[f64], acc: &[f64], out: &mut [f64], )
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 twist(&self, _torque: &[f64], _acc: &[f64], out: &mut [f64])
fn twist(&self, _torque: &[f64], _acc: &[f64], out: &mut [f64])
torque holds, less what the rotor’s own acceleration acc takes (the motor’s angle less where
the rigid model puts the motor for the load’s pose). Zeros by default: the trains are rigid. For fitting a trace
(identify::fit_joints), with rigid_split_torque.§fn twist_at(&self, _angle: &[f64], torque: &[f64], acc: &[f64], out: &mut [f64])
fn twist_at(&self, _angle: &[f64], torque: &[f64], acc: &[f64], out: &mut [f64])
twist with the motors at angle (motor radians, the trace’s): behind a screw whose stiffness follows its nut,
the train’s spring where the nut is, on the shaft’s point the rotor has turned to it. By default twist, for a
machine whose trains have one stiffness along the stroke.§fn rigid_split_torque(
&self,
angle: &[f64],
speed: &[f64],
acc: &[f64],
_rotor_acc: &[f64],
out: &mut [f64],
)
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>,
)
fn rigid_tensions( &self, _tool_pos: &[f64], _tool_acc: &[f64], _out: &mut Vec<f64>, )
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>,
)
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]>
fn tension_band(&self) -> Option<[f64; 2]>
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]>,
)
fn rigid_guide_loads( &self, _tool_pos: &[f64], _tool_acc: &[f64], _out: &mut Vec<[f64; 2]>, )
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]>,
)
fn rigid_friction( &self, _tool_pos: &[f64], _tool_dir: &[f64], _out: &mut Vec<[f64; 2]>, )
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]>>,
)
fn rigid_friction_rise( &self, _tool_pos: &[f64], _tool_dir: &[f64], _out: &mut Vec<Vec<[f64; 2]>>, )
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).§fn rigid_checks(
&self,
_tool_pos: &[f64],
_tool_vel: &[f64],
_tool_acc: &[f64],
_out: &mut Vec<f64>,
)
fn rigid_checks( &self, _tool_pos: &[f64], _tool_vel: &[f64], _tool_acc: &[f64], _out: &mut Vec<f64>, )
rating_checks (in its order) the
value of its signal in the loss-free rigid model at a tool pose, speed and acceleration (a screw’s speed, its
force, a rack’s feed force), or NaN where the rigid model does not give it (a life, a sync error). The plan keeps
each value within its check’s limit. Appends nothing where the machine does not tell (no row is planned).§fn links(&self) -> Vec<String>
fn links(&self) -> Vec<String>
identify::fit_joints), by name: the links
of a URDF chain. None by default.§fn set_link_change(&mut self, _link: usize, _factor: f64, _moment: [f64; 3])
fn set_link_change(&mut self, _link: usize, _factor: f64, _moment: [f64; 3])
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 push_substeps(&self) -> u32
fn push_substeps(&self) -> u32
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)>
fn valves(&self) -> Vec<(String, f64)>
valves and wait. None
by default.§fn set_valve(&mut self, _valve: usize, _command: f64)
fn set_valve(&mut self, _valve: usize, _command: f64)
valve (of valves); the valve switches after its own delay.§fn end_sensors(&self, _valve: usize) -> [bool; 2]
fn end_sensors(&self, _valve: usize) -> [bool; 2]
valve’s end-position sensors, [retracted, extended], each after its delay.§fn trains(&self, _tool_pose: &[f64]) -> Vec<Option<Train>>
fn trains(&self, _tool_pose: &[f64]) -> Vec<Option<Train>>
Train), for the time-optimal plan to keep back the speed the
train’s twist adds to the motor’s: None, or no entry, where the train is rigid (no allowance).§fn mode_shape(&self, _tool_pose: &[f64]) -> Option<(f64, Vec<f64>)>
fn mode_shape(&self, _tool_pose: &[f64]) -> Option<(f64, Vec<f64>)>
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>
fn modes_small_amplitude(&self, tool_pose: &[f64]) -> Vec<Mode>
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 belt_wraps(&self, _tool_pose: &[f64]) -> Vec<f64>
fn belt_wraps(&self, _tool_pose: &[f64]) -> Vec<f64>
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 unreachable(&self, _tool_pose: &[f64], _slack: f64) -> Option<&'static str>
fn unreachable(&self, _tool_pose: &[f64], _slack: f64) -> Option<&'static str>
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.§fn condition(&self, _tool_pose: &[f64]) -> Option<f64>
fn condition(&self, _tool_pose: &[f64]) -> Option<f64>
f64::INFINITY out of reach
of the kinematics (whatever the envelope and the joints’ stops say, which unreachable tells). None for a
machine that has no map to show: one whose motor angles are a linear function of the tool pose.§fn cam(&self) -> Option<CamMaster>
fn cam(&self) -> Option<CamMaster>
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]])
fn cam_at(&self, _master: f64, _out: &mut [[f64; 4]])
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>>
fn cam_curve(&self) -> Option<Arc<dyn Fn(f64, &mut [[f64; 4]]) + Send + Sync>>
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]>
fn gantry_motors(&self) -> Option<[usize; 2]>
gantry.sync). None without one.§fn collision_capsules(&self, _state: &[f64]) -> Vec<Capsule>
fn collision_capsules(&self, _state: &[f64]) -> Vec<Capsule>
state, beside the boxes of collision_bodies. None by default.§fn self_collision_capsules(&self, state: &[f64]) -> Vec<Capsule>
fn self_collision_capsules(&self, state: &[f64]) -> Vec<Capsule>
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)>>
fn connected_bodies( &self, _state: &[f64], _boxes: usize, _capsules: usize, ) -> Option<Vec<(usize, usize)>>
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>
fn friction_contacts(&self) -> Vec<FrictionContact>
§fn friction_curve(&self, _i: usize, _speed: f64, _load_scale: f64) -> [f64; 3]
fn friction_curve(&self, _i: usize, _speed: f64, _load_scale: f64) -> [f64; 3]
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
fn friction_rotary(&self, _i: usize) -> bool
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>
fn friction_speed_limit(&self, _i: usize, _motor_speed: &[f64]) -> Option<f64>
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>
fn belt_sections(&self) -> Vec<BeltSection>
§fn thermal_values(&self, _id: &str) -> Option<(f64, f64)>
fn thermal_values(&self, _id: &str) -> Option<(f64, f64)>
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.