Skip to main content

DiscCam

Struct DiscCam 

Source
pub struct DiscCam {
Show 14 fields pub lift: Cam, pub base_radius: f64, pub roller_radius: f64, pub offset: f64, pub j_disc: f64, pub m_follower: f64, pub payload: f64, pub attached: bool, pub spring: f64, pub preload: f64, pub g: f64, pub cam: Cam, pub master: Option<CamMaster>, pub lift_off: Option<LiftOff>, /* private fields */
}

Fields§

§lift: Cam

The lift law over one turn of the disc.

§base_radius: f64§roller_radius: f64§offset: f64§j_disc: f64§m_follower: f64

The follower’s own mass, the tool on it (payload) apart.

§payload: f64§attached: bool§spring: f64§preload: f64§g: f64§cam: Cam

The electronic cam that turns the disc at its speed with cam.run: one turn over one turn of the master.

§master: Option<CamMaster>§lift_off: Option<LiftOff>

With effects.follower_lift_off: the roller’s width, the contact’s damping ratio, the guide’s friction.

Implementations§

Source§

impl DiscCam

Source

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

Source

pub fn s0(&self) -> f64

The roller centre’s height above the disc’s centre on the base circle, s0 = sqrt((r_b + r_r)^2 - e^2).

Source

pub fn pressure_angle(&self, theta: f64) -> f64

The pressure angle at the disc’s angle, rad (the module’s formula).

Source

pub fn loads(&self, theta: f64, speed: f64, acc: f64) -> [f64; 2]

The contact force along the normal and the guide’s load across, N, at the disc’s angle, speed and acceleration.

Source

pub fn contact_force(&self, g: f64, gd: f64) -> [f64; 2]

The contact force along the follower’s axis F_c and its elastic part Q, N, at the gap g and its rate g’ (both 0 off the disc and without effects.follower_lift_off).

Trait Implementations§

Source§

impl Mechanism for DiscCam

Source§

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

In the scene’s frame: the follower (with the tool on it) lifting on its axis, the disc and the rotor turning about -y. Its spring pushes on the frame on the base: nothing from outside.

Source§

fn passive_loss_row(&self) -> Option<(&'static str, &'static str)>

The gap joint has no damper of its own: the contact’s is loss_row’s.

Source§

fn passive_rest(&self, q: &[f64]) -> Vec<f64>

Pressed in by the spring’s and the weight’s force: Q(d) = F0 + k (s - d) + m g, by fixed point (k d is some 1e-5 of Q, so the second step is exact to 1e-10 of d).

Source§

fn loss_row(&self) -> Option<(&'static str, &'static str)>

The contact damper’s and the guide’s friction power, as a row of the loss budget.

Source§

fn loss_power(&self, q: &[f64], qd: &[f64]) -> f64

(F_c - c_s d) d’ with d’ = -g’, and F_f v: the damper’s (the clamp’s included) and the guide’s, W.

Source§

fn tool_is_joints(&self) -> bool

The speed term of J(theta) needs the feedforward’s speed terms.

Source§

fn scene( &self, q: &[f64], rotors: &[f64], rotor_speeds: &[f64], out: &mut Scene, )

Seen from the front: the disc at the origin with a mark that turns with it, the roller on it at the follower’s offset and lift, the follower above; the motor behind the disc.

Source§

fn dynamics(&self, q: &[f64], qd: &[f64], mass: &mut [f64], bias: &mut [f64])

The load’s mass matrix M (n x n, row by row, without the rotors) and h with M q’’ + h = the torques (forces) at the joints: velocity terms plus gravity. With the payload as it is attached. Where the mechanism has passive joints (passive_joints), q and q’ hold them after the driven ones, and M and h are of them all.
Source§

fn potential(&self, q: &[f64]) -> f64

The load’s potential energy (passive joints included, their springs not); its gravity torques are those of h at rest.
Source§

fn passive_joints(&self) -> Vec<(f64, f64)>

Joints that no motor drives, after the driven ones (a payload swinging on the flange): each with its spring (N m/rad) and damper (N m s/rad) towards zero. None by default.
Source§

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

The passive joints’ position signals, one per joint in their order (their values are the joints’ positions): by default those of a payload swinging on the flange, swing.<k>.angle.
Source§

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

Joints to tool pose. The joints themselves by default.
Source§

fn set_payload_attached(&mut self, attached: bool)

Source§

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

As Machine::cam and Machine::cam_at: an electronic cam the mechanism runs as its cycle, its slaves the tool axes. None by default.
Source§

fn cam_at(&self, master: f64, out: &mut [[f64; 4]])

Source§

fn cam_curve(&self) -> Option<CamCurve>

Source§

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

The mechanism’s own signals, after the machine’s: their infos, and their values from joint positions, speeds, accelerations and the force (torque) each transmission passes to its joint.
Source§

fn signals( &self, q: &[f64], qd: &[f64], qdd: &[f64], _force: &[f64], out: &mut Vec<f64>, )

Source§

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

Source§

fn collision_parts(&self) -> &'static [&'static str]

The ids of the boxes scene draws that move with the load and can hit an obstacle (Machine::collision_bodies).
Source§

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

§

fn passive_shift(&self, _q: &[f64], _passive: &[f64], out: &mut [f64])

How far the tool pose moves at joints q (the driven ones) when the passive joints stand at passive rather than at zero, into out (zeroed first): a forearm rocking on its rod. Zero by default (a swinging payload’s joints do not move the flange’s frame).
§

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

The damping (N m s/rad) of each passive joint’s own damper that dynamics applies (not in passive_joints’ pair), in their order, for the modes’ damping figures; missing entries 0.
§

fn passive_in_modes(&self) -> usize

How many of the first passive joints the arm’s trains and held modes take free (a rocking forearm: stiff, but a mode of its own), rather than hold. 0 by default.
§

fn linear_motor(&self) -> bool

Whether the motors are linear motors (their signals in m, m/s, N): Machine::motor_linear. False by default.
As Machine::links and Machine::set_link_change: the bodies whose inertial parameters a trace can be fitted for.
§

fn inverse(&self, tool: &[f64], q: &mut [f64]) -> bool

Tool pose to joints; false where it cannot be reached.
§

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

What inverse carries from one call to the next (a numerical inverse’s last solution, which the next starts from), as a fixed count of numbers, for Machine::memory. None by default.
§

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

Sets back what memory gave (empty: none, as before the first inverse), as inverse keeps it: behind a lock.
§

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

§

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

Machine::condition at a tool pose; None where the tool is the joints.
§

fn has_process(&self) -> bool

Whether the mechanism works on a process (a press force, a cut), which process_torque gives: then the machine reports the power given to it as power.process. None by default.
§

fn process_torque(&self, _q: &[f64], _qd: &[f64], _out: &mut [f64])

Adds the torques (forces) the process puts on the joints at positions q and speeds qd to out, positive turning a joint up. Not conservative and not in dynamics: the torque breakdown counts it among the rest, and the feedforward leaves it out, as a drive does not know it.
§

fn reads_jerk(&self) -> bool

Whether a signal needs the joints’ jerk q’‘’ (signals_with_jerk): the chain works it out only then, as it costs three more evaluations of the machine’s derivatives.
§

fn signals_with_jerk( &self, q: &[f64], qd: &[f64], qdd: &[f64], _qddd: &[f64], force: &[f64], out: &mut Vec<f64>, )

signals with the joints’ jerk as well, for a mechanism that reads_jerk; zeros where it does not.
§

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

As Machine::rigid_guide_loads: the loads of the guides among signals, at a tool pose and acceleration.
The ids of the segments scene draws, in order from the base to the tool, as the links that the check of the machine’s own parts looks at (Machine::self_collision_capsules): each a capsule of half its width, not an obstacle’s part. Empty by default: the machine’s own parts are then those of collision_parts.
§

fn flex_modes(&self) -> Vec<FlexMode>

Bending modes of the load’s links (effects.link_bending): its motion drives them and they move the tool; the joints feel them only where flex_coupling gives them two-way, else not (one-way, as base::Based). Their count must not change. Empty by default.
§

fn flex_loads(&self, _q: &[f64], _qd: &[f64], _qdd: &[f64], _out: &mut [f64])

The force on each of flex_modes at the driven joints’ positions q, speeds qd and accelerations qdd, in its coordinate (N).
§

fn flex_shift(&self, _q: &[f64], _deflection: &[f64], _out: &mut [f64])

How far the tool pose moves at joints q when the modes deflect by deflection, into out (zeroed first).
§

fn static_shift(&self, _q: &[f64], out: &mut [f64])

How far the tool pose moves at joints q by the bending’s static part that has no coordinate of its own (the weights’ load on a shape without inertia, state-free), into out (zeroed first): zero by default.
§

fn flex_coupling( &self, _q: &[f64], _qd: &[f64], _d: &[f64], _dd: &[f64], ) -> Option<FlexCoupling>

effects.link_bending_reaction: the modes two-way, coordinates of their own beside the joints, at all joints’ q and qd (passive ones included) and the modes’ deflections d and rates dd (FlexCoupling). None where they are one-way (flex_loads), the default.

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.