Expand description
A machine of joints, each driven by a motor through a transmission (joint::RotaryJoint): the machine for every
mechanism that can say its dynamics in joint coordinates, M(q) q’’ + h(q, q’) = tau. A joint’s coordinate is an angle
(rad) or a travel (m); its gearbox’s ratio is motor radians per unit of it, so a ball screw is a gearbox of ratio
2 pi / lead (times any reduction before it), a rack 1 / pinion radius, a linear motor 1 (its “rotor” the forcer, its
torques forces). Stiffness, backlash, friction and stops are those at the joint, in its unit.
Rigid: the rotors turn with their joints times the ratio, their inertia counts at the joint times the ratio squared,
and each gearbox loses its efficiency on what passes through it (two passes, as on the delta). Elastic
(effects.joint_elasticity): the rotors are states of their own behind the gearboxes’ springs.
A mechanism (Mechanism) gives the load’s dynamics, its kinematics from joints to the tool, its own signals and
rating checks and its scene. Everything else (states, losses, energy, torque breakdown, friction view, heating
gearboxes) is here, the same for all.
Structs§
- Flex
Coupling - The two-way bending modes (
Mechanism::flex_coupling) at one moment, with T = 1/2 q’^T M q’ + d’^T p + 1/2 d’^T M_d d’ their share of the kinetic energy and V = -d^T Q_g of the potential: - Flex
Mode - A bending mode of a mechanism’s load (
Mechanism::flex_modes): its modal mass (kg), stiffness (N/m) and damping (N s/m), in the coordinate of its deflection (a link’s tip, m; a twist’s angle, rad, and kg m^2, N m/rad), the link (0 the first) it bends and how. - Joint
Machine - Joint
Spec - One joint as the machine sees it: its drive, the joint’s id and translation key (for friction contacts and signals),
and where it has a gearbox ahead of a converter (screw, rack): the joint’s travel per radian of the gearbox output,
so that the torque at the gearbox output is the joint force times it (signal
gearbox.<motor>.output_torque). - Lu
solve’s elimination of a fixed-size matrix, kept for several right-hand sides: each solve does the very operationssolvedoes, so the results are the same to the bit, without a heap allocation and with the matrix eliminated once.
Enums§
- Flex
Kind - How a link deflects in a
FlexMode: in the plane its joint turns it in, across that plane, or twisted about its length; a bend’s second shape where a link bends in two (BendSecond,BendAcrossSecond).
Constants§
- JOINT_
KEYS - MOTOR_
IDS - Motor ids “1” to “7” and the ids of their gearboxes’ loss powers, so that
ThermalPartgets&'static strs. - MOTOR_
KEYS - Translation keys of motors 1 to 7 and of joints 1 to 7.
Traits§
- Mechanism
- What a mechanism tells the joint machine.
Functions§
- condition_
number - The 2-norm condition number of a rows x cols matrix (row by row): sqrt of the largest over the smallest eigenvalue of J^T J; infinite where it is singular.
- eigenvalues
- The eigenvalues of the symmetric n x n matrix
a(row by row), by Jacobi rotations. - invert
- The inverse of an n x n matrix (row by row), column by column with
solve;Nonewhere it is singular. - matrix_
modes matrix_modes_atwith a constant C (symmetric, row by row).- solve
- Solves the n x n system
m(row by row) x = b by Gaussian elimination with partial pivoting;Nonewheremis singular. - solve_
in_ place solvewithout its copies: eliminatesain place and leaves the solution inx;falsewhereais singular or the solution not finite (aandxare then of no use).