An actuator that uses a Feetech controller to drive a serial bus servo.
Configuration is derived from the joint's motor_profile injected by
BB.Actuator.Server:
- Position limits from
motor_profile.motor_lower/motor_upper - Velocity limit from
motor_profile.motor_velocity_limit - Position range maps to the servo's goal_position register
When initialised, the actuator:
- Disables torque on the servo
- Registers with the controller, receiving the shared ETS table reference
- Subscribes to position commands
When a position command is received, the actuator:
- Clamps the position to motor limits
- Converts to servo position units (0-4095 for 360 degrees)
- Writes goal_position and goal_speed to the controller's ETS table
- Publishes a
BB.Message.Actuator.BeginMotionviaBB.Actuator.publish_begin_motion/3(which handles the motor → joint-space conversion)
The controller picks up pending commands on its next loop tick and batches them
into efficient sync_write operations on the serial bus.
Example DSL Usage
controller :feetech, {BB.Servo.Feetech.Controller,
port: "/dev/ttyUSB0",
baud_rate: 1_000_000
}
joint :shoulder, type: :revolute do
limit lower: ~u(-90 degree), upper: ~u(90 degree), velocity: ~u(60 degree_per_second)
actuator :servo, {BB.Servo.Feetech.Actuator, servo_id: 1, controller: :feetech}
end
Summary
Functions
Safety disarm callback.