This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
product:usb2ax:advanced_instructions [2013/04/02 05:48] xevel [SYNC_READ] |
product:usb2ax:advanced_instructions [2018/04/02 22:16] (current) xevel [SYNC_READ] |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== USB2AX: Advanced instructions ===== | ===== USB2AX: Advanced instructions ===== | ||
- | The USB2AX can react to some specific commands as if it were a Dynamixel device. | + | The USB2AX can react to some specific commands as if it were a Dynamixel device, and much more. |
---- | ---- | ||
Line 54: | Line 54: | ||
SYNC_READ is used for reading data from multiple Dynamixel actuators with one command. | SYNC_READ is used for reading data from multiple Dynamixel actuators with one command. | ||
This allows for a significant performance boost when reading the same values in a lot of devices. | This allows for a significant performance boost when reading the same values in a lot of devices. | ||
+ | |||
+ | An (obsolete) implementation in the DynamxelSDK v1 library is availalbe in the [[https://github.com/Xevel/usb2ax/tree/master/pc_software/usb2ax_DynamixelSDK|GitHub repository]]. The newer revisions of the Dynamixel SDK are not compatible with this definition of the SYNC_READ, which pre-dates the official one. | ||
**Warning: Various implementations of custom Dynamixel multiple-read commands named SYNC_READ can be found over the Internet, this one is based on the one found in the arbotix_python ROS package by Michael Ferguson. | **Warning: Various implementations of custom Dynamixel multiple-read commands named SYNC_READ can be found over the Internet, this one is based on the one found in the arbotix_python ROS package by Michael Ferguson. | ||
Line 71: | Line 73: | ||
<0xFF><0xFF><ID><Length><Instruction><Param 1><Param 2><Param 3> ... <Param N+2><Checksum> | <0xFF><0xFF><ID><Length><Instruction><Param 1><Param 2><Param 3> ... <Param N+2><Checksum> | ||
- | ID : 0XFD or 0xFE | + | ID : 0xFD or 0xFE |
Length : N + 4 (N: number of Dynamixel actuators to read from, value between 1 and 32 inclusive) | Length : N + 4 (N: number of Dynamixel actuators to read from, value between 1 and 32 inclusive) | ||
- | Instruction: 0X84 | + | Instruction: 0x84 |
Param 1 : Starting address of the location where the data is to be read from | Param 1 : Starting address of the location where the data is to be read from | ||
Param 2 : L (L: length of the data to be read, value between 1 and 6 inclusive) | Param 2 : L (L: length of the data to be read, value between 1 and 6 inclusive) | ||
Line 80: | Line 82: | ||
Param N+2 : The ID of the Nth Dynamixel actuator | Param N+2 : The ID of the Nth Dynamixel actuator | ||
Checksum : The usual checksum of Dynamixel packets | Checksum : The usual checksum of Dynamixel packets | ||
+ | |||
+ | |||
+ | **WARNING** Some choices of implementation of the Dynamixel SDK make it impossible to simply send this packet and expect a valid response. | ||
+ | |||
Line 106: | Line 112: | ||
0XFF 0XFF 0XFD 0X12 0X00 **0X50 0X01 0XFF 0X01** //0X20 0X00 0X00 0X02// __0X10 0X00 0X10 0X02__ ''0X00 0X00 0XFE 0X01'' 0X5C | 0XFF 0XFF 0XFD 0X12 0X00 **0X50 0X01 0XFF 0X01** //0X20 0X00 0X00 0X02// __0X10 0X00 0X10 0X02__ ''0X00 0X00 0XFE 0X01'' 0X5C | ||
+ | ** Performances ** | ||
+ | |||
+ | On tests performed with the reference implementation (see above), reading the present positions (2 bytes) of 8 servos took around 2.7ms, on a Win7 64 bits desktop plateform. Each additional servos will add betwee 0.21 and 0.34ms. | ||
---- | ---- | ||
//Based on documentation by Richard "iBot" Ibbotson// | //Based on documentation by Richard "iBot" Ibbotson// |