Dynamixel
(Created page with "The plug-in interfaces to a number of dynamixel servos - build for version MX-28, but may work with others, as most registers in the servo interface is compatible. ===Start s...") |
Revision as of 07:34, 26 October 2013
The plug-in interfaces to a number of dynamixel servos - build for version MX-28, but may work with others, as most registers in the servo interface is compatible.
Contents |
Start sequence
The servos must have power before the a usb client is connected to the teensy controller, i.e. before RHD is started. The controller reads at start-up all registers from the servo, and assumes that all servos with no battery voltage reported is not connected, and thus stops receiving status from these servos.
Interface
The interface is through a microprocessor Atmel mega32u4 (teensy 2), the code for the microprocessor is in a subdirectory to the plugin code.
The microcontroller can be operated from a serial terminal (putty), and has on-line help. It is fully text oriented.
Read variables
The plugin has the following (configured for (up to) 5 servos)
servoPos[5] Current angle of the servo in degrees x 10 servoMin[5] Minimum servo angle (in degrees x 10) - defined in rhdconfig.xml - never updated servoMax[5] Maximum servi angle (in degrees x 10) - defined in rhdconfig.xml - never updated servoVel[5] Current servo velocity - as reported by the servo (i.e. not converted to degrees/sec) servoLoad[5] Current servo load - as reported by the servo (motor current based) servoVolt[5] Current battery voltage, measured by the servo (in volt x 10) servoTemp[5] Current temperature in degrees C. servoComErr[5] Count of communication errors (crc-fail, rx timeout, etc) servoIntRef[5] Reference position in servo units (12bit unsigned) servoIntPos[5] Current position in servo units (12 bit unsigned) servoUpdCnt[5] Number of status updates received from each servo.
Write variables
The servos are controlled by an angle reference for each servo (in degrees x 10). The center position is defined in the rgdconfig.xml file.
servoref[5]
Sample rhdconfig entry
<dynamixel enable="true" lib="dynamixel.so.1" critical="true" safety="2" dev="/dev/ttyACM0" servo0 = "1200 2450 3700 1.1377778" servo3 = "1300 2560 3800 1.1377778" servo4 = "300 800 1400 1.1377778" deadzone="3" debug="1"> <dxlinit msg="i=0"/> <dxlinit msg="s=1"/> <dxlinit msg="j=0"/> <dxlinit msg="help"/> </dynamixel>