JointMotor class Physics

A spring-damper drive on a single GenericJoint axis.

The motor pulls the axis toward targetPosition with spring constant stiffness and toward targetVelocity with damping, applying at most maxForce (a force on a linear axis, a torque on an angular one). Leave stiffness at 0 for a pure velocity drive; set it for a positional spring (a soft constraint).

Constructors

JointMotor({double targetPosition = 0, double targetVelocity = 0, double stiffness = 0, double damping = 0, double maxForce = double.infinity, JointMotorModel model = JointMotorModel.acceleration})
const

Properties

damping double
Damping constant pulling the axis toward targetVelocity.
final
hashCode int
The hash code for this object.
no setterinherited
maxForce double
Maximum force (linear axis) or torque (angular axis) the motor may apply. double.infinity leaves it unlimited.
final
model JointMotorModel
How the drive parameters are interpreted.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stiffness double
Spring constant pulling the axis toward targetPosition.
final
targetPosition double
Rest position the spring pulls toward: meters on a linear axis, radians on an angular one.
final
targetVelocity double
Velocity the damper drives toward: meters per second or radians per second.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited