pub struct PlanLimits {
pub reserve: f64,
pub tension: [f64; 3],
pub gearbox: Vec<Option<[f64; 4]>>,
pub guide: f64,
pub friction: Vec<[f64; 5]>,
pub ratings: Vec<[f64; 3]>,
pub margin: f64,
pub hermite: bool,
pub speed_kept: f64,
pub loops: Vec<LoopKeep>,
}Expand description
What a time-optimal plan keeps within beside each motor’s torque-speed curve, its rated speed and the axes’ jerk
limits (see plan_time_optimal).
Fields§
§reserve: f64The share of each torque limit the plan may use (profile.torque_reserve): of the motor’s torque-speed curve, of
the torque of the drive’s maximum current, and of the gearbox’s and the pulley’s torque rating.
tension: [f64; 3]The lowest and the highest tension a belt section may have and the share of the room to them the plan may use.
gearbox: Vec<Option<[f64; 4]>>Per motor (in the order of Machine::motors) its gearbox: the ratio, the inertia that turns at its input (rotor
and gearbox, kg m^2), the most torque at its output (N m), ratings.gearbox_max_torque_nm (M2max) or
pulley_max_torque_nm where that is lower (infinite where the config rates neither), and its efficiency
(gearbox.efficiency with effects.gearbox_efficiency, else 1). None (or no entry) where the machine reports no
gearbox output torque, or the gearbox is neither rated nor lossy.
guide: f64The most load a guide may carry, ratings.guide_max_load_n (N); infinite without. The plan keeps reserve of it.
friction: Vec<[f64; 5]>Per motor (in the order of Machine::motors) the friction on its shaft as the motor and its gearbox have it:
[Coulomb level, viscous, smoothing speed, gearbox drag at its reference speed, that speed] in N m and rad/s
(mech::ShaftFriction, mech::GearDrag), all 0 with effects.motor_friction and gearbox_drag off. No entry: none.
ratings: Vec<[f64; 3]>Per motor (in the order of Machine::motors) the drive’s and the gearbox’s ratings that bound the plan beside the
motor: [the drive’s maximum current ratings.drive_max_current_a (A, whether or not effects.drive_current_limit
holds the drive to it), the gearbox’s maximum input speed ratings.gearbox_max_input_speed_rpm (rad/s), the
most power the braking resistor takes ratings.braking_resistor_peak_w (W, shared out evenly over the motors of
a line-up that brakes through one module)], each infinite without. No entry: none.
margin: f64profile.time_optimal_margin: the share of every limit the plan may use, on top of the reserves (1: all).
hermite: boolThe controller interpolates the plan’s points with the Hermite cubic (profile.trajectory_spline = "hermite");
false: with the C2 spline, as shipped. It sets what piece_limits keeps back for the cubics’ overshoot.
speed_kept: f64The share of every speed rating the plan keeps back for the velocity loops’ following (speed_kept_of, the
largest over the motors); at least SPEED_KEPT.
loops: Vec<LoopKeep>Per motor (in the order of Machine::motors) what the keep-back at a place takes from the motor’s loop and drive
(LoopKeep, PlanLimits::kept_at): with it the share kept back is that of the place’s own pose (its drive
trains, rigid inertias and jerks) and speed_kept is the least of them. No entry: speed_kept everywhere.
Implementations§
Source§impl PlanLimits
impl PlanLimits
Sourcepub fn new(reserve: f64, tension: [f64; 3]) -> Self
pub fn new(reserve: f64, tension: [f64; 3]) -> Self
The torque share and the belt only, with no gearbox or guide rating and no friction.
Sourcepub fn kept_at(&self, machine: &dyn Machine, pose: &[f64]) -> f64
pub fn kept_at(&self, machine: &dyn Machine, pose: &[f64]) -> f64
The share of every speed rating kept back at the tool pose pose, speed_kept_of of each motor with the train,
the rigid inertia and the jerk it has there (the most over the motors, at least SPEED_KEPT); speed_kept
where no loops are given.
Sourcepub fn shaft_friction(&self, m: usize, speed: f64) -> f64
pub fn shaft_friction(&self, m: usize, speed: f64) -> f64
The steady friction on motor m’s shaft at the speed speed (rad/s, at least 0): c tanh(w / smoothing) + b w +
T0 (w / n0)^(2/3), as mech::ShaftFriction::torque has it at the reference temperature, without the breakaway’s
Stribeck rise near a standstill.
Trait Implementations§
Source§impl Clone for PlanLimits
impl Clone for PlanLimits
Source§fn clone(&self) -> PlanLimits
fn clone(&self) -> PlanLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PlanLimits
impl Debug for PlanLimits
Source§impl<'de> Deserialize<'de> for PlanLimits
impl<'de> Deserialize<'de> for PlanLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PlanLimits
impl PartialEq for PlanLimits
Source§fn eq(&self, other: &PlanLimits) -> bool
fn eq(&self, other: &PlanLimits) -> bool
self and other values to be equal, and is used by ==.