Skip to content

eulerjs API / @eulerjs/core / JointDrive

JointDrive ​

Defined in: packages/core/src/joints/SixDofJoint.ts:22

A drive pushes an axis toward a target, as a spring-damper with a force limit: a motor holds a speed (targetVelocity, and by default infinite damping), a servo holds a position (targetPosition with a stiffness, and some damping to keep it from ringing). Force = stiffness × (targetPosition - position) + damping × (targetVelocity - velocity), at most maxForce, all solved implicitly so that any stiffness is stable.

Properties ​

PropertyTypeDescriptionDefined in
damping?numberIn N·s/m or N·m·s/rad. Defaults to infinite without a stiffness, making a motor, and to 0 with one.packages/core/src/joints/SixDofJoint.ts:29
dampingRatio?number-packages/core/src/joints/SixDofJoint.ts:36
frequency?numberInstead of stiffness and damping: how fast the axis springs to its target, in Hz, and how damped it is (1, the default, just doesn't overshoot), whatever mass it moves; the engine works out the stiffness and damping from the mass along the axis.packages/core/src/joints/SixDofJoint.ts:35
maxForce?numberThe most force (N) or torque (N·m) the drive gives. Defaults to Infinity.packages/core/src/joints/SixDofJoint.ts:38
stiffness?numberIn N/m or N·m/rad. Defaults to 0.packages/core/src/joints/SixDofJoint.ts:27
targetPosition?number-packages/core/src/joints/SixDofJoint.ts:23
targetVelocity?numberIn m/s along a linear axis, rad/s about an angular one. Defaults to 0.packages/core/src/joints/SixDofJoint.ts:25

Released under the MIT License.