pub struct RotaryJoint {
pub gearbox: Gearbox,
pub rotor_inertia: f64,
pub shaft: ShaftFriction,
pub ripple: Ripple,
pub brake: HoldingBrake,
pub friction: ShaftFriction,
pub stops: HardStop,
pub range: (f64, f64),
pub extra_efficiency: f64,
pub coupled: bool,
}Fields§
§gearbox: Gearbox§rotor_inertia: f64Rotor and gearbox input, kg m^2: what the brake holds and the motor turns.
shaft: ShaftFrictionMotor bearing friction, at the rotor.
ripple: Ripple§brake: HoldingBrake§friction: ShaftFrictionFriction in the joint (bearings of the arm), at the output, N m.
stops: HardStopThe stops at both ends of the angle range, N m/rad and N m s/rad; zero with effects.hard_stops off.
range: (f64, f64)The angles of the stops, rad.
extra_efficiency: f64What a screw, rack or worm puts on the configured gearbox’s efficiency (1 for none): kept apart so that the
gearbox’s temperature can set its own share (JointMachine::set_part_temperatures), and so that the torque at
the gearbox output can be told from the force at the joint.
coupled: boolThe configured gearbox has ratio 1: it is the coupling of a direct drive, also with a screw or rack behind it (which changes the ratio). Nothing then warms as a gearbox, and its loss is the coupling’s.
Implementations§
Source§impl RotaryJoint
impl RotaryJoint
pub fn from_config(cfg: &Config) -> Result<Self, ConfigError>
Sourcepub fn linear_from_config(cfg: &Config) -> Result<Self, ConfigError>
pub fn linear_from_config(cfg: &Config) -> Result<Self, ConfigError>
A joint that slides (a carriage on its guides), its coordinate the travel in m: [slide] stroke_m (the stops
at 0 and the stroke), friction_coulomb_n, friction_viscous_n_s_m, friction_smoothing_m_s (the guides,
effects.joint_friction), stop_stiffness_n_m, stop_damping_n_s_m (effects.hard_stops). Motor and gearbox as for
from_config; a transmission (transmission::Converter) turns the gearbox into one in N and m.
With effects.slide_presliding (a config without the switch has it off) the guides’ friction is a presliding
state (ShaftFriction::presliding_force) of stiffness presliding_stiffness_n_m, its level the breakaway force
friction_breakaway_n at rest falling to the Coulomb level over friction_stribeck_m_s.
Sourcepub fn with(
cfg: &Config,
friction: ShaftFriction,
stops: HardStop,
range: (f64, f64),
) -> Result<Self, ConfigError>
pub fn with( cfg: &Config, friction: ShaftFriction, stops: HardStop, range: (f64, f64), ) -> Result<Self, ConfigError>
Motor and gearbox from [motor] and [gearbox], with the joint’s own friction, stops and range.
pub fn ratio(&self) -> f64
Sourcepub fn train(&self, whole: f64) -> Option<Train>
pub fn train(&self, whole: f64) -> Option<Train>
Its train for the time-optimal plan (Machine::trains): the gearbox’s spring (K1, which holds a converter’s own
compliance behind it in series) between the rotor and the rest of whole, the motor’s rigid inertia at a pose, all
referred to the motor over the ratio squared.
Behind a screw whose stiffness follows its nut, the far end’s (train_at takes the pose’s).
Sourcepub fn train_at(&self, travel: f64, whole: f64) -> Option<Train>
pub fn train_at(&self, travel: f64, whole: f64) -> Option<Train>
train with the joint at travel, where a screw’s stiffness follows its nut (Gearbox::at).
Sourcepub fn reflected_inertia(&self) -> f64
pub fn reflected_inertia(&self) -> f64
The rotor’s inertia as the joint feels it in the rigid model.
Sourcepub fn stop_substeps(&self, angle: f64, speed: f64, dt: f64) -> u32
pub fn stop_substeps(&self, angle: f64, speed: f64, dt: f64) -> u32
The parts a sub-step is cut into where the joint at angle and speed meets its stops within a base step dt
(HardStop::substeps).
Sourcepub fn output_torque(&self, angle: f64, speed: f64) -> f64
pub fn output_torque(&self, angle: f64, speed: f64) -> f64
What acts on the arm at the joint besides the gearbox, at its angle and speed: the joint’s friction and the stops (positive turns the angle up).
Sourcepub fn rotor(
&self,
command: f64,
rotor: f64,
rotor_speed: f64,
angle: f64,
speed: f64,
brake: f64,
engaged: bool,
) -> (GearTorque, f64, f64)
pub fn rotor( &self, command: f64, rotor: f64, rotor_speed: f64, angle: f64, speed: f64, brake: f64, engaged: bool, ) -> (GearTorque, f64, f64)
Elastic model: the gearbox torques between rotor and arm, the rotor’s acceleration under the motor’s torque
command (before ripple), and the rate of the brake’s deflection brake.
Sourcepub fn rotor_under(
&self,
command: f64,
rotor: f64,
rotor_speed: f64,
gear: GearTorque,
brake: f64,
engaged: bool,
) -> (f64, f64)
pub fn rotor_under( &self, command: f64, rotor: f64, rotor_speed: f64, gear: GearTorque, brake: f64, engaged: bool, ) -> (f64, f64)
rotor with the gearbox’s torques gear given (a gear with its Maxwell arm, Gearbox::torque_with): the
rotor’s acceleration and the brake’s deflection rate.
Sourcepub fn rigid_drive(
&self,
command: f64,
rotor: f64,
rotor_speed: f64,
brake: f64,
engaged: bool,
) -> (f64, f64)
pub fn rigid_drive( &self, command: f64, rotor: f64, rotor_speed: f64, brake: f64, engaged: bool, ) -> (f64, f64)
Rigid model: the torque the motor puts on the arm through a loss-free gearbox with a massless rotor at the rotor’s angle and speed (ripple, motor friction and the brake taken off), and the brake’s deflection rate.
Sourcepub fn friction_split(&self, speed: f64) -> [f64; 3]
pub fn friction_split(&self, speed: f64) -> [f64; 3]
The joint’s own friction torque at a steady speed at the output, split into [Coulomb, viscous, stiction] (N m;
they add up to friction.torque(speed) of a joint without gearbox drag): the level level is Coulomb plus the
Stribeck rise to the breakaway, both under the same tanh, the viscous part is linear. For the friction view.
Sourcepub fn friction_signals(&self, speed: f64) -> [f64; 5]
pub fn friction_signals(&self, speed: f64) -> [f64; 5]
The values of the friction view’s signals <id>.friction_<part> (sim_core::FRICTION_SIGNALS) of this joint at
an output speed: the speed, the three parts, and a load factor of 1 (a bearing’s levels do not follow a load).
Sourcepub fn friction_infos(id: &str, owner_key: &str) -> Vec<SignalInfo>
pub fn friction_infos(id: &str, owner_key: &str) -> Vec<SignalInfo>
The infos of friction_signals for a joint id of the owner owner_key: rad/s and N m.
Sourcepub fn stop_energy(&self, angle: f64) -> f64
pub fn stop_energy(&self, angle: f64) -> f64
Energy in the stops’ springs at an angle.
Sourcepub fn losses(
&self,
angle: f64,
speed: f64,
rotor_speed: f64,
brake: f64,
engaged: bool,
) -> [f64; 4]
pub fn losses( &self, angle: f64, speed: f64, rotor_speed: f64, brake: f64, engaged: bool, ) -> [f64; 4]
Powers lost at an angle and speed, rotor speed and brake: in the joint’s friction, the stops, the motor’s friction with the brake, and the gearbox’s drag (W; the gearbox’s loss, though it acts on the rotor).
Trait Implementations§
Source§impl Clone for RotaryJoint
impl Clone for RotaryJoint
Source§fn clone(&self) -> RotaryJoint
fn clone(&self) -> RotaryJoint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more