BB.Actuator.MotorProfile (bb v0.20.1)

Copy Markdown View Source

Motor-space limits and starting position for an actuator.

Built by BB.Actuator.Server from a joint's limits and resolved transmission, then injected into the driver's resolved options as :motor_profile. Drivers read what they need from the profile instead of fetching the joint and applying the transmission themselves.

Position fields are signed motor-space values; rate and effort fields are positive magnitudes. Any field may be nil if the corresponding joint limit is unset.

motor_initial_position is the midpoint of motor_lower and motor_upper, falling back to 0.0 when either is nil.

Summary

Functions

Build a motor profile for an actuator attached to joint, applying transmission (which may be nil) to convert joint-space limits into motor-space.

Types

t()

@type t() :: %BB.Actuator.MotorProfile{
  motor_acceleration_limit: float() | nil,
  motor_effort_limit: float() | nil,
  motor_initial_position: float(),
  motor_lower: float() | nil,
  motor_upper: float() | nil,
  motor_velocity_limit: float() | nil
}

Functions

from_joint(arg1, transmission)

@spec from_joint(map() | nil, BB.Transmission.t() | nil) :: t()

Build a motor profile for an actuator attached to joint, applying transmission (which may be nil) to convert joint-space limits into motor-space.

When the joint is nil or has no limits, returns a profile with every field set to nil apart from motor_initial_position, which defaults to 0.0.