Skip to main content

RotaryJoint

Struct RotaryJoint 

Source
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: f64

Rotor and gearbox input, kg m^2: what the brake holds and the motor turns.

§shaft: ShaftFriction

Motor bearing friction, at the rotor.

§ripple: Ripple§brake: HoldingBrake§friction: ShaftFriction

Friction in the joint (bearings of the arm), at the output, N m.

§stops: HardStop

The 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: f64

What 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: bool

The 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

Source

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

Source

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.

Source

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.

Source

pub fn ratio(&self) -> f64

Source

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

Source

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

Source

pub fn reflected_inertia(&self) -> f64

The rotor’s inertia as the joint feels it in the rigid model.

Source

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

Source

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

Source

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.

Source

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.

Source

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.

Source

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.

Source

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

Source

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.

Source

pub fn stop_energy(&self, angle: f64) -> f64

Energy in the stops’ springs at an angle.

Source

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

Source§

fn clone(&self) -> RotaryJoint

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RotaryJoint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.