Skip to main content

Crate cu_feetech

Crate cu_feetech 

Source
Expand description

Feetech STS/SCS serial bus servo bridge for Copper.

This crate provides a CuBridge that communicates with Feetech STS/SCS serial bus servos (such as the STS3215 used in SO-100 / SO-101 robot arms) over a half-duplex serial (UART) bus.

§Protocol overview

Feetech servos use a Dynamixel-style packet protocol:

TX:  [0xFF 0xFF] [ID] [LENGTH] [INSTRUCTION] [PARAM …] [CHECKSUM]
RX:  [0xFF 0xFF] [ID] [LENGTH] [ERROR]       [DATA …]  [CHECKSUM]

The bus is half-duplex: after each instruction packet the master reads back a status packet (except for broadcast sync-write, which has no response).

§Channels

DirectionChannel idPayloadDescription
RxpositionsJointPositionsPresent positions read from servos
Txgoal_positionsJointPositionsGoal positions written to servos

§Position values

The unit of published / consumed positions depends on the "units" config key:

ValueMeaningCalibration required?
"raw"Raw 16-bit register values (0..65535). Default.No
"deg"Degrees relative to calibration center.Yes
"rad"Radians relative to calibration center.Yes
"normalize"[-1, 1] over calibrated min..max (same scale for leader/follower).Yes

When using "deg", "rad", or "normalize", set "calibration_file" to the path of a JSON file generated by the feetech-calibrate tool. The center (zero) of each servo is the midpoint of its calibrated min/max range. Optionally set "ticks_per_rev" (raw units per 360°); the value is model-dependent (default 4096, e.g. for STS3215).

§Torque behaviour

  • When Tx writers are connected (commander mode) the bridge enables torque on start so the servos track goal positions.
  • When no Tx writers are connected (follower / teach mode) torque is left disabled so the arm can be moved freely by hand while positions are read back.
  • On stop torque is always disabled for safety.

Modules§

calibration
Calibration data and unit conversions for Feetech servos.
messages
Message types for the Feetech bridge.

Structs§

FeetechBridge
Bidirectional bridge for Feetech STS/SCS serial bus servos.
Resources
RxChannels
TxChannels

Enums§

Binding
RxId
TxId