(Message ID)
 
(13 intermediate revisions by one user not shown)
Line 4: Line 4:
  
 
===Non-Periodic Communication===
 
===Non-Periodic Communication===
Messages can be sent to initialize or stop CAN communication.
+
Messages can be sent to initialize or stop CAN communication.<br>
 +
Remote frame can be used to request data. If host sends remote frame, the Allegro Hand responds with it regardless periodic communication status.
  
 
===Periodic Communication===
 
===Periodic Communication===
Line 10: Line 11:
  
 
==CAN Frames==
 
==CAN Frames==
===Standard CAN Packet===
+
===Arbitration Identifier===
The standard CAN packet used for communication is 14 bytes including 8 bytes of data.
+
The Allegro Hand uses 11 bit standard arbitration identifier. It is composed with two part.
<syntaxhighlight lang="cpp">
+
typedef struct{
+
unsigned char STD_EXT;            //type of message (Standard or Extended)
+
unsigned long msg_id; //message identifier
+
unsigned char data_length; //
+
char          data[8]; // data array
+
} can_msg; 
+
</syntaxhighlight>
+
 
+
===ID (Message Identifier)===
+
The 4 byte integer CAN message identifier (msg_id) is split into the command ID (26 bits), destination ID (3 bits) and source ID (3 bits).
+
 
<br>
 
<br>
{|style=" border-collapse: separate; border-spacing: 15; border-width: 2px; border-style: solid; border-color: #CCCCCC; padding: 0px; text-align: left; width: 800px"
+
{| class="wikitable" style="text-align: center; width: 85%;"
| style="padding: 0px 0px 0px 3px; width: 21.88%; font-size: 80%" | 1
+
!colspan="1"|MSB
| style="width: 21.88%; font-size: 80%" | 8
+
!colspan="1"|9
| style="width: 21.88%; font-size: 80%" | 16
+
!colspan="1"|8
| style="width: 6.26%; font-size: 80%" | 24
+
!colspan="1"|7
| style="width: 3.13%; font-size: 80%" | 26
+
!colspan="1"|6
| style="width: 6.26%; font-size: 80%" | 27
+
!colspan="1"|5
| style="width: 3.13%; font-size: 80%" | 29
+
!colspan="1"|4
| style="width: 6.26%; font-size: 80%" | 30
+
!colspan="1"|3
| style="width: 3.13%; font-size: 80%" | 32
+
!colspan="1"|2
|-
+
!colspan="1"|1
| style="padding: 2px 5px 2px 5px; background: #F0F0F0" ! scope="row" colspan="5" | Command ID
+
!colspan="1"|LSB
| style="padding: 2px 5px 2px 5px; background: #F0F0F0" ! scope="row" colspan="2" | Dest. ID
+
| style="padding: 2px 5px 2px 5px; background: #F0F0F0" ! scope="row" colspan="2" | Source ID
+
 
|-
 
|-
 +
!colspan="9" style="background-color:#ffffff;"| Message ID
 +
!colspan="2" style="background-color:#ffffff;"| Device ID
 
|}
 
|}
 
<br>
 
<br>
 +
<br>
 +
===Message ID===
 +
<br>
 +
{| class="wikitable" style="text-align: center; width: 85%;"
 +
!colspan="1"|Message
 +
!colspan="1"|Message ID
 +
!colspan="1"|RTR
 +
!colspan="1"|Description
 +
|-
 +
!style="background-color:#ffffff;"| Servo ON
 +
!style="background-color:#ffffff;"| 0x040
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Engage joint motor driver
 +
|-
 +
!style="background-color:#ffffff;"| Servo OFF
 +
!style="background-color:#ffffff;"| 0x041
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Disable joint motor driver
 +
|-
 +
!style="background-color:#ffffff;"| Set Torque Finger 1
 +
!style="background-color:#ffffff;"| 0x060
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set torque of finger #1
 +
|-
 +
!style="background-color:#ffffff;"| Set Torque Finger 2
 +
!style="background-color:#ffffff;"| 0x061
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set torque of finger #2
 +
|-
 +
!style="background-color:#ffffff;"| Set Torque Finger 3
 +
!style="background-color:#ffffff;"| 0x062
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set torque of finger #3
 +
|-
 +
!style="background-color:#ffffff;"| Set Torque Finger 4
 +
!style="background-color:#ffffff;"| 0x063
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set torque of finger #4
 +
|-
 +
!style="background-color:#ffffff;"| Set Position Finger 1
 +
!style="background-color:#ffffff;"| 0x0E0
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set position of finger #1
 +
|-
 +
!style="background-color:#ffffff;"| Set Position Finger 2
 +
!style="background-color:#ffffff;"| 0x0E1
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set position of finger #2
 +
|-
 +
!style="background-color:#ffffff;"| Set Position Finger 3
 +
!style="background-color:#ffffff;"| 0x0E2
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set position of finger #3
 +
|-
 +
!style="background-color:#ffffff;"| Set Position Finger 4
 +
!style="background-color:#ffffff;"| 0x0E3
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set position of finger #4
 +
|-
 +
!style="background-color:#ffffff;"| Set Periodic Read
 +
!style="background-color:#ffffff;"| 0x081
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set periodic read interval for position, IMU, temperature, status
 +
|-
 +
!style="background-color:#ffffff;"| Config
 +
!style="background-color:#ffffff;"| 0x068
 +
!style="background-color:#ffffff;"|
 +
!style="background-color:#ffffff;"| Set Device ID, Baud-rate for RS-485
 +
|-
 +
!style="background-color:#ffffff;"| Information
 +
!style="background-color:#ffffff;"| 0x080
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Product information and status
 +
|-
 +
!style="background-color:#ffffff;"| Serial
 +
!style="background-color:#ffffff;"| 0x088
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Product serial number
 +
|-
 +
!style="background-color:#ffffff;"| Position Finger 1
 +
!style="background-color:#ffffff;"| 0x020
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current angle position of finger #1
 +
|-
 +
!style="background-color:#ffffff;"| Position Finger 2
 +
!style="background-color:#ffffff;"| 0x021
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current angle position of finger #2
 +
|-
 +
!style="background-color:#ffffff;"| Position Finger 3
 +
!style="background-color:#ffffff;"| 0x022
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current angle position of finger #3
 +
|-
 +
!style="background-color:#ffffff;"| Position Finger 4
 +
!style="background-color:#ffffff;"| 0x023
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current angle position of finger #4
 +
|-
 +
!style="background-color:#ffffff;"| IMU
 +
!style="background-color:#ffffff;"| 0x030
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current IMU quaternion
 +
|-
 +
!style="background-color:#ffffff;"| Temperature Finger 1
 +
!style="background-color:#ffffff;"| 0x038
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current temperature of finger #1
 +
|-
 +
!style="background-color:#ffffff;"| Temperature Finger 2
 +
!style="background-color:#ffffff;"| 0x039
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current temperature of finger #2
 +
|-
 +
!style="background-color:#ffffff;"| Temperature Finger 3
 +
!style="background-color:#ffffff;"| 0x03A
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current temperature of finger #3
 +
|-
 +
!style="background-color:#ffffff;"| Temperature Finger 4
 +
!style="background-color:#ffffff;"| 0x03B
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current temperature of finger #4
 +
|-
 +
!style="background-color:#ffffff;"| Status
 +
!style="background-color:#ffffff;"| 0x010
 +
!style="background-color:#ffffff;"| R
 +
!style="background-color:#ffffff;"| Current Status
 +
|}
 +
Messages marked with RTR can be sent by host in remote frame, and the Allegro Hand will respond it.
 +
<br><br>
  
====Command Identifiers====
+
===DeviceID===
 +
Multiple Allegro Hand can be used in the same CAN bus. In such case, Device ID field is used to distinguish each device.
 +
<br><br>
 +
Default device ID is 0, and it can be configured using '''Config''' message. Changed Device ID is stored in internal non-volatile memory and will be retained for power cycle.
 +
<br><br><br>
  
{|style=" border-collapse: separate; border-spacing: 15; border-width: 2px; border-style: solid; border-color: #CCCCCC; padding: 0px; text-align: left; width: 800px"
+
==Data Structure==
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Variable Name
+
Each message has different data filed format. All multi-byte data structures in data filed uses little endian.
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Value
+
<br><br><br>
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Description
+
===Servo ON===
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Destination
+
Data Length = 0<br><br>This message does not have data field.
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Source
+
<br><br><br>
 +
===Servo OFF===
 +
Data Length = 0<br><br>This message does not have data field.
 +
<br><br><br>
 +
===Set Torque Finger #===
 +
Data Length = 8<br><br>Each finger has 4 joints. This message sets joint torque set-point. Torque set-point is 2 byte signed digit. Data field is composed as below.
 +
<br>
 +
<br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"|Torque Data[0:7]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_SYSTEM_ON
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x01
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Start periodic communication
+
!colspan="1" style="background-color:#ffffff;"| 2
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 7
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_SYSTEM_OFF
+
!colspan="2" style="background-color:#ffffff;"| Joint 1
| style="padding: 2px 5px 2px 5px" | 0x02
+
!colspan="2" style="background-color:#ffffff;"| Joint 2
| style="padding: 2px 5px 2px 5px" | Stop periodic communication
+
!colspan="2" style="background-color:#ffffff;"| Joint 3
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="2" style="background-color:#ffffff;"| Joint 4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
|}
 +
<br>
 +
<br><br>
 +
===Set Position Finger #===
 +
Data Length = 8<br><br>Each finger has 4 joints. This message sets position set-point. Position set-point is 2 byte signed digit. Data field is composed as below.
 +
<br>
 +
<br>
 +
This message is not implemented yet.
 +
<br>
 +
<br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Position Data[0:7]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_PERIOD
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x03
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Set communication frequency
+
!colspan="1" style="background-color:#ffffff;"| 2
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 7
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_MODE_JOINT
+
!colspan="2" style="background-color:#ffffff;"| Joint 1
| style="padding: 2px 5px 2px 5px" | 0x04
+
!colspan="2" style="background-color:#ffffff;"| Joint 2
| style="padding: 2px 5px 2px 5px" | Command Transmission Mode
+
!colspan="2" style="background-color:#ffffff;"| Joint 3
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="2" style="background-color:#ffffff;"| Joint 4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
|}
 +
<br>
 +
<br><br>
 +
===Set Periodic Read===
 +
Data Length = 8<br><br>This message sets periodic report interval. Period is configured in milli-second. If period is set to 0, that message will not be reported periodically.
 +
<br>
 +
<br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Period Data[0:7]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_MODE_TASK
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x05
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Command Transmission Mode
+
!colspan="1" style="background-color:#ffffff;"| 2
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 7
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_1
+
!colspan="2" style="background-color:#ffffff;"| Position
| style="padding: 2px 5px 2px 5px" | 0x06
+
!colspan="2" style="background-color:#ffffff;"| IMU
| style="padding: 2px 5px 2px 5px" | Index finger (1) torque command
+
!colspan="2" style="background-color:#ffffff;"| Temperature
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="2" style="background-color:#ffffff;"| Status
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
|}
 +
<br>
 +
<br><br>
 +
===Config===
 +
Data Length = 6<br><br>
 +
This message sets Device ID and RS-485 baud-rate. If '''SET''' field bit is marked, corresponding data will be stored in internal non-volatile memory.
 +
<br>
 +
<br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="6"| Config Data[0:5]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_2
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x07
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Middle finger (2) torque command
+
!colspan="1" style="background-color:#ffffff;"| 2
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_3
+
!colspan="1" style="background-color:#ffffff;"| SET
| style="padding: 2px 5px 2px 5px" | 0x08
+
!colspan="1" style="background-color:#ffffff;"| Dev.ID
| style="padding: 2px 5px 2px 5px" | Pinky finger (3) torque command
+
!colspan="4" style="background-color:#ffffff;"| RS-485 baud-rate
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
|}
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
<br>
 +
'''SET''' field is structured as below.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| SET field bit flag
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_4
+
!colspan="1" style="background-color:#ffffff;"| MSB
| style="padding: 2px 5px 2px 5px" | 0x09
+
!colspan="1" style="background-color:#ffffff;"| 6
| style="padding: 2px 5px 2px 5px" | Thumb torque command
+
!colspan="1" style="background-color:#ffffff;"| 5
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 3
 +
!colspan="1" style="background-color:#ffffff;"| 2
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!colspan="1" style="background-color:#ffffff;"| LSB
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_1
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | 0x0a
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | (unused)
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| Baud-rate
 +
!colspan="1" style="background-color:#ffffff;"| Dev.ID
 +
|}
 +
<br>
 +
'''Dev.ID''' field is structured as below.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Dev.ID field bit
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_2
+
!colspan="1" style="background-color:#ffffff;"| MSB
| style="padding: 2px 5px 2px 5px" | 0x0b
+
!colspan="1" style="background-color:#ffffff;"| 6
| style="padding: 2px 5px 2px 5px" | (unused)
+
!colspan="1" style="background-color:#ffffff;"| 5
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 3
 +
!colspan="1" style="background-color:#ffffff;"| 2
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!colspan="1" style="background-color:#ffffff;"| LSB
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_3
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | 0x0c
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | (unused)
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| X
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="2" style="background-color:#ffffff;"| Device ID
 +
|}
 +
<br>
 +
'''Baud-rate''' field is structured as below.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Baud-rate filed [31:0]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_4
+
!colspan="1" style="background-color:#ffffff;"| MSB
| style="padding: 2px 5px 2px 5px" | 0x0d
+
!colspan="1" style="background-color:#ffffff;"| 30
| style="padding: 2px 5px 2px 5px" | (unused)
+
!colspan="4" style="background-color:#ffffff;"| ...
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| LSB
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_QUERY_STATE_DATA
+
!colspan="8" style="background-color:#ffffff;"| Baud rate in bps
| style="padding: 2px 5px 2px 5px" | 0x0e
+
|}
| style="padding: 2px 5px 2px 5px" | Request joint state
+
<br>
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
 
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
 +
 
 +
===Information===
 +
Data Length = 7<br><br>
 +
Information message is composed with hardware version, firmware version, palm temperature, status flag. The Allegro Hand sends this message when the host request by remote frame.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="7"| Information Data [0:6]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_QUERY_STATE_DATA
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x0e
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Joint state response
+
!colspan="1" style="background-color:#ffffff;"| 2
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_SUB_01<br>ID_DEVICE_SUB_02<br>ID_DEVICE_SUB_03<br>ID_DEVICE_SUB_04
+
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 
|-
 
|-
| style="padding: 5px 5px 2px 5px" | ID_CMD_QUERY_CONTROL_DATA
+
!colspan="2" style="background-color:#ffffff;"| Hardware Ver.
| style="padding: 2px 5px 2px 5px" | 0x0f
+
!colspan="2" style="background-color:#ffffff;"| Firmware Ver.
| style="padding: 2px 5px 2px 5px" | Joint state response
+
!colspan="1" style="background-color:#ffffff;"| L/R
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="1" style="background-color:#ffffff;"| Temp
| style="padding: 2px 5px 5px 5px" | ID_DEVICE_SUB_01<br>ID_DEVICE_SUB_02<br>ID_DEVICE_SUB_03<br>ID_DEVICE_SUB_04
+
!colspan="1" style="background-color:#ffffff;"| Stat
 +
|}
 +
<br>
 +
'''Hardware Ver.''' And '''Firmware Ver.''' Is 2 byte number.
 +
<br><br>
 +
'''L/R''' field shows which side hand is. If this field is 0, it means the Hand is right hand.
 +
<br><br>
 +
'''Temp.''' field shows palm temperature. Represented in signed Celsius degree.
 +
<br><br>
 +
'''Stat''' field represents current status. The same data can be retrieved using Status message.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Stat. field bit flag
 +
|-
 +
!colspan="1" style="background-color:#ffffff;"| MSB
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 3
 +
!colspan="1" style="background-color:#ffffff;"| 2
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!colspan="1" style="background-color:#ffffff;"| LSB
 
|-
 
|-
 +
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| X
 +
!colspan="1" style="background-color:#ffffff;"| F4
 +
!colspan="1" style="background-color:#ffffff;"| F3
 +
!colspan="1" style="background-color:#ffffff;"| F2
 +
!colspan="1" style="background-color:#ffffff;"| F1
 +
!colspan="1" style="background-color:#ffffff;"| S
 
|}
 
|}
 
<br>
 
<br>
 +
* S : Servo status. 0 means servo OFF.
 +
* F1 : One or more of joints is in high temperature fault state.
 +
* F2 : One or more of joints is in high temperature throttling state.
 +
* F3 : One or more of joints is in communication timeout state.
 +
* F4 : Palm is in high temperature fault state.
 +
<br><br>
  
====Source and Destination Identifiers====
 
  
{|style=" border-collapse: separate; border-spacing: 15; border-width: 2px; border-style: solid; border-color: #CCCCCC; padding: 0px; text-align: left; width: 520px"
+
 
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Variable Name
+
===Serial===
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Value
+
Data Length = 8<br><br>
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Description
+
Serial number can be retrieved using CAN interface. It is stored in ASCII characters. The Allegro Hand sends this message when the host request by remote frame.
 +
<br><br>
 +
 
 +
 
 +
===Position Finger #===
 +
Data Length = 8<br><br>
 +
Joint position is reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 2 byte integer.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Position Data[0:7]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x01
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Allegro Hand
+
!colspan="1" style="background-color:#ffffff;"| 2
 +
!colspan="1" style="background-color:#ffffff;"| 3
 +
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 7
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!colspan="2" style="background-color:#ffffff;"| Joint 1
| style="padding: 2px 5px 2px 5px" | 0x02
+
!colspan="2" style="background-color:#ffffff;"| Joint 2
| style="padding: 2px 5px 2px 5px" | Control PC
+
!colspan="2" style="background-color:#ffffff;"| Joint 3
 +
!colspan="2" style="background-color:#ffffff;"| Joint 4
 +
|}
 +
Joint angle can be calculated by this equation
 +
<br>
 +
[[Image:equation_v4.png|300px]]
 +
<br><br>
 +
 
 +
 
 +
 
 +
===IMU===
 +
Data Length = 8<br><br>
 +
The pose of device is measured by IMU and reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 2 byte integer.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Quaternion Data[0:7]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_SUB_01
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x03
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Index Finger
+
!colspan="1" style="background-color:#ffffff;"| 2
 +
!colspan="1" style="background-color:#ffffff;"| 3
 +
!colspan="1" style="background-color:#ffffff;"| 4
 +
!colspan="1" style="background-color:#ffffff;"| 5
 +
!colspan="1" style="background-color:#ffffff;"| 6
 +
!colspan="1" style="background-color:#ffffff;"| 7
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_SUB_02
+
!colspan="2" style="background-color:#ffffff;"| Quaternion W
| style="padding: 2px 5px 2px 5px" | 0x04
+
!colspan="2" style="background-color:#ffffff;"| Quaternion X
| style="padding: 2px 5px 2px 5px" | Middle Finger
+
!colspan="2" style="background-color:#ffffff;"| Quaternion Y
 +
!colspan="2" style="background-color:#ffffff;"| Quaternion Z
 +
|}
 +
<br><br>
 +
 
 +
===Temperature Finger #===
 +
Data Length = 4<br><br>
 +
The temperature of joint is reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 1 byte integer.
 +
<br><br>
 +
Temperature is represented as Celsius degree.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="4"| Temperature Date[0:3]
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_SUB_03
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x05
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Little Finger
+
!colspan="1" style="background-color:#ffffff;"| 2
|-
+
!colspan="1" style="background-color:#ffffff;"| 3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_SUB_04
+
| style="padding: 2px 5px 2px 5px" | 0x06
+
| style="padding: 2px 5px 2px 5px" | Thumb
+
 
|-
 
|-
 +
!colspan="1" style="background-color:#ffffff;"| Joint 1
 +
!colspan="1" style="background-color:#ffffff;"| Joint 2
 +
!colspan="1" style="background-color:#ffffff;"| Joint 3
 +
!colspan="1" style="background-color:#ffffff;"| Joint 4
 
|}
 
|}
<br>
+
 
 +
<br><br>
 +
 
 +
===Status===
 +
Data Length = 1<br><br>
 +
Hand Status can be retrieved by this message. The Allegro Hand sends this message when the host request by remote frame or report period comes.
 +
<br><br>
 +
'''Status''' bit field is same with '''Stat''' field in '''Information''' message.
 +
 
 +
 
 +
 
 +
 
 +
 
 +
<br><br><br>
 +
 
  
 
==Download==
 
==Download==
[[File:v4_AllegroHandUsersManual.pdf]]
+
[[File:v4_AllegroHandUsersManual_1.1.pdf]]

Latest revision as of 09:37, 6 April 2020

Contents

[edit] CAN Communication

[edit] Baud-Rate

The CAN communication baud-rate is 1Mbps.

[edit] Non-Periodic Communication

Messages can be sent to initialize or stop CAN communication.
Remote frame can be used to request data. If host sends remote frame, the Allegro Hand responds with it regardless periodic communication status.

[edit] Periodic Communication

The Allegro Hand control software attempts to communicate with the real or simulated hand at a regular control interval. Every 3 milliseconds, the joint torques are calculated and the joint angles are updated.

[edit] CAN Frames

[edit] Arbitration Identifier

The Allegro Hand uses 11 bit standard arbitration identifier. It is composed with two part.

MSB 9 8 7 6 5 4 3 2 1 LSB
Message ID Device ID



[edit] Message ID


Message Message ID RTR Description
Servo ON 0x040 Engage joint motor driver
Servo OFF 0x041 Disable joint motor driver
Set Torque Finger 1 0x060 Set torque of finger #1
Set Torque Finger 2 0x061 Set torque of finger #2
Set Torque Finger 3 0x062 Set torque of finger #3
Set Torque Finger 4 0x063 Set torque of finger #4
Set Position Finger 1 0x0E0 Set position of finger #1
Set Position Finger 2 0x0E1 Set position of finger #2
Set Position Finger 3 0x0E2 Set position of finger #3
Set Position Finger 4 0x0E3 Set position of finger #4
Set Periodic Read 0x081 Set periodic read interval for position, IMU, temperature, status
Config 0x068 Set Device ID, Baud-rate for RS-485
Information 0x080 R Product information and status
Serial 0x088 R Product serial number
Position Finger 1 0x020 R Current angle position of finger #1
Position Finger 2 0x021 R Current angle position of finger #2
Position Finger 3 0x022 R Current angle position of finger #3
Position Finger 4 0x023 R Current angle position of finger #4
IMU 0x030 R Current IMU quaternion
Temperature Finger 1 0x038 R Current temperature of finger #1
Temperature Finger 2 0x039 R Current temperature of finger #2
Temperature Finger 3 0x03A R Current temperature of finger #3
Temperature Finger 4 0x03B R Current temperature of finger #4
Status 0x010 R Current Status

Messages marked with RTR can be sent by host in remote frame, and the Allegro Hand will respond it.

[edit] DeviceID

Multiple Allegro Hand can be used in the same CAN bus. In such case, Device ID field is used to distinguish each device.

Default device ID is 0, and it can be configured using Config message. Changed Device ID is stored in internal non-volatile memory and will be retained for power cycle.


[edit] Data Structure

Each message has different data filed format. All multi-byte data structures in data filed uses little endian.


[edit] Servo ON

Data Length = 0

This message does not have data field.


[edit] Servo OFF

Data Length = 0

This message does not have data field.


[edit] Set Torque Finger #

Data Length = 8

Each finger has 4 joints. This message sets joint torque set-point. Torque set-point is 2 byte signed digit. Data field is composed as below.

Torque Data[0:7]
0 1 2 3 4 5 6 7
Joint 1 Joint 2 Joint 3 Joint 4




[edit] Set Position Finger #

Data Length = 8

Each finger has 4 joints. This message sets position set-point. Position set-point is 2 byte signed digit. Data field is composed as below.

This message is not implemented yet.

Position Data[0:7]
0 1 2 3 4 5 6 7
Joint 1 Joint 2 Joint 3 Joint 4




[edit] Set Periodic Read

Data Length = 8

This message sets periodic report interval. Period is configured in milli-second. If period is set to 0, that message will not be reported periodically.

Period Data[0:7]
0 1 2 3 4 5 6 7
Position IMU Temperature Status




[edit] Config

Data Length = 6

This message sets Device ID and RS-485 baud-rate. If SET field bit is marked, corresponding data will be stored in internal non-volatile memory.

Config Data[0:5]
0 1 2 3 4 5
SET Dev.ID RS-485 baud-rate


SET field is structured as below.

SET field bit flag
MSB 6 5 4 3 2 1 LSB
X X X X X X Baud-rate Dev.ID


Dev.ID field is structured as below.

Dev.ID field bit
MSB 6 5 4 3 2 1 LSB
X X X X X X Device ID


Baud-rate field is structured as below.

Baud-rate filed [31:0]
MSB 30 ... 1 LSB
Baud rate in bps



[edit] Information

Data Length = 7

Information message is composed with hardware version, firmware version, palm temperature, status flag. The Allegro Hand sends this message when the host request by remote frame.

Information Data [0:6]
0 1 2 3 4 5 6
Hardware Ver. Firmware Ver. L/R Temp Stat


Hardware Ver. And Firmware Ver. Is 2 byte number.

L/R field shows which side hand is. If this field is 0, it means the Hand is right hand.

Temp. field shows palm temperature. Represented in signed Celsius degree.

Stat field represents current status. The same data can be retrieved using Status message.

Stat. field bit flag
MSB 6 5 4 3 2 1 LSB
X X X F4 F3 F2 F1 S


  • S : Servo status. 0 means servo OFF.
  • F1 : One or more of joints is in high temperature fault state.
  • F2 : One or more of joints is in high temperature throttling state.
  • F3 : One or more of joints is in communication timeout state.
  • F4 : Palm is in high temperature fault state.




[edit] Serial

Data Length = 8

Serial number can be retrieved using CAN interface. It is stored in ASCII characters. The Allegro Hand sends this message when the host request by remote frame.


[edit] Position Finger #

Data Length = 8

Joint position is reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 2 byte integer.

Position Data[0:7]
0 1 2 3 4 5 6 7
Joint 1 Joint 2 Joint 3 Joint 4

Joint angle can be calculated by this equation
Equation v4.png


[edit] IMU

Data Length = 8

The pose of device is measured by IMU and reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 2 byte integer.

Quaternion Data[0:7]
0 1 2 3 4 5 6 7
Quaternion W Quaternion X Quaternion Y Quaternion Z



[edit] Temperature Finger #

Data Length = 4

The temperature of joint is reported through this message format. The Allegro Hand sends this message when the host request by remote frame or report period comes. All values are represented as signed 1 byte integer.

Temperature is represented as Celsius degree.

Temperature Date[0:3]
0 1 2 3
Joint 1 Joint 2 Joint 3 Joint 4



[edit] Status

Data Length = 1

Hand Status can be retrieved by this message. The Allegro Hand sends this message when the host request by remote frame or report period comes.

Status bit field is same with Stat field in Information message.







[edit] Download

File:V4 AllegroHandUsersManual 1.1.pdf





Whos here now:   Members 0   Guests 1   Bots & Crawlers 1