Docs / API Reference

Firmware API Reference v2.x

Complete command reference for position, velocity, torque, and impedance control modes. Register map for all Tendonkindle-custom SDO objects. Error code table for diagnostics.

4 modes
Position / velocity / torque / impedance
CiA 402
Base profile (EtherCAT + CANopen)
400 Hz
Control loop rate
Technical Docs / API Reference

Firmware API Reference

ROS 2 Topic Layout

Each TK actuator exposes the following topics under the namespace /tk_joint_N/ where N is the node ID (default: 0).

Topic Type Direction Rate
joint_statetknd_msgs/JointStatePublish100 Hz
cmd_posstd_msgs/Float64Subscribeasync
cmd_velstd_msgs/Float64Subscribeasync
cmd_torquestd_msgs/Float64Subscribeasync
impedance_paramstknd_msgs/ImpedanceParamsSubscribeasync
diagnosticsdiagnostic_msgs/DiagnosticArrayPublish1 Hz

The JointState message fields:

float64 position     # rad, output flange angle
float64 velocity     # rad/s, output flange angular velocity
float64 torque       # Nm, measured output torque
float64 temperature  # degC, motor winding temperature
uint8   mode         # current control mode (see modes below)
uint16  fault_code   # 0 = no fault

Control Modes

Set the control mode via the cmd_pos, cmd_vel, or cmd_torque topic. The firmware switches modes on the first command received on each topic. Over CiA 402, set 0x6060 (modes of operation):

Mode ROS 2 Topic CiA 402 Object 0x6060 Value Notes
Positioncmd_pos8 (cyclic sync position)Profile trapezoidal by default
Velocitycmd_vel9 (cyclic sync velocity)Velocity in rad/s
Torquecmd_torque10 (cyclic sync torque)Torque in Nm, FOC loop at 400 Hz
Impedanceimpedance_paramsCustom: 0x20 via 0x2020Spring-damper at output

Impedance Control

Impedance mode runs a spring-damper equation at the output: τ = Kp * (θ_ref - θ) - Kd * dθ/dt. Parameters are set via:

ros2 topic pub /tk_joint_0/impedance_params \
  tknd_msgs/ImpedanceParams \
  '{kp: 20.0, kd: 1.5, theta_ref: 0.0}'

Or via SDO:

Parameter Object Type Default Range
Stiffness Kp0x2010FLOAT3220.00 – 500 Nm/rad
Damping Kd0x2011FLOAT321.50 – 50 Nm·s/rad
Reference angle0x2012FLOAT320.0–π to +π rad
Torque saturation0x2013FLOAT32model max0 – rated torque

Register Map (Tendonkindle Custom Objects)

These are extensions beyond the CiA 402 standard. All are accessible via SDO in CANopen and CoE in EtherCAT.

Index Name Type Notes
0x2000Firmware versionUINT32Read-only
0x2001Node IDUINT8Write + EEPROM save; range 1–63
0x2002Baud rate indexUINT80=250k, 1=500k, 2=1Mbit
0x2010Impedance KpFLOAT32Stiffness in Nm/rad
0x2011Impedance KdFLOAT32Damping in Nm·s/rad
0x2012Impedance θ_refFLOAT32Reference angle in rad
0x2013Impedance τ_satFLOAT32Torque saturation in Nm
0x2020Control modeUINT88=pos, 9=vel, 10=torque, 32=impedance
0x2030Winding temperatureFLOAT32Read-only, degC
0x2031Housing temperatureFLOAT32Read-only, degC
0x2040Error history (0)UINT16Most recent fault code

Error Codes

Error codes are returned in joint_state.fault_code and in 0x2040. A value of 0x0000 means no fault.

Code Name Likely Cause Recovery
0x1000Over-temperatureWinding temp > 85°CAllow 5 min cool-down; reduce duty cycle
0x2000Over-voltageSupply > 56 VDCCheck power supply regulation
0x2001Under-voltageSupply < 36 VDCCheck supply voltage at connector
0x3000Over-currentPhase current > rated peakReduce peak torque command; check wiring
0x4000Encoder faultEncoder communication lostCheck encoder connector; power-cycle
0x5000Fieldbus timeoutNo command received for > 500 msCheck network link; increase heartbeat rate
0x6000Position limitOutput angle hit software hard stopCommand to within ±π rad from zero

To clear a latched fault: write 0x6040 (control word) with bits 7+4+3+1+0 set (fault reset sequence), or send:

ros2 topic pub --once /tk_joint_0/cmd_pos \
  std_msgs/Float64 '{data: 0.0}'

Publishing any valid command after a timeout fault will automatically attempt a fault reset and return to operational state.

Related documentation

Quickstart Guide ROS 2 Integration EtherCAT Setup
Request Engineering Sample