(Created page with "==CAN Communication== ===Baud-Rate=== The CAN communication baud-rate is 1Mbps. ===Non-Periodic Communication=== Messages can be sent to initialize or stop CAN communication....")
 
(Message ID)
 
(15 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>
====Command Identifiers====
+
===Message ID===
 
+
<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: 3px 5px 2px 5px; background: #F0F0F0" | Variable Name
+
!colspan="1"|Message
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Value
+
!colspan="1"|Message ID
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Description
+
!colspan="1"|RTR
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Destination
+
!colspan="1"|Description
| style="padding: 3px 5px 2px 5px; background: #F0F0F0" | Source
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_SYSTEM_ON
+
!style="background-color:#ffffff;"| Servo ON
| style="padding: 2px 5px 2px 5px" | 0x01
+
!style="background-color:#ffffff;"| 0x040
| style="padding: 2px 5px 2px 5px" | Start periodic communication
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Engage joint motor driver
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_SYSTEM_OFF
+
!style="background-color:#ffffff;"| Servo OFF
| style="padding: 2px 5px 2px 5px" | 0x02
+
!style="background-color:#ffffff;"| 0x041
| style="padding: 2px 5px 2px 5px" | Stop periodic communication
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Disable joint motor driver
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_PERIOD
+
!style="background-color:#ffffff;"| Set Torque Finger 1
| style="padding: 2px 5px 2px 5px" | 0x03
+
!style="background-color:#ffffff;"| 0x060
| style="padding: 2px 5px 2px 5px" | Set communication frequency
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set torque of finger #1
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_MODE_JOINT
+
!style="background-color:#ffffff;"| Set Torque Finger 2
| style="padding: 2px 5px 2px 5px" | 0x04
+
!style="background-color:#ffffff;"| 0x061
| style="padding: 2px 5px 2px 5px" | Command Transmission Mode
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set torque of finger #2
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_MODE_TASK
+
!style="background-color:#ffffff;"| Set Torque Finger 3
| style="padding: 2px 5px 2px 5px" | 0x05
+
!style="background-color:#ffffff;"| 0x062
| style="padding: 2px 5px 2px 5px" | Command Transmission Mode
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set torque of finger #3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_1
+
!style="background-color:#ffffff;"| Set Torque Finger 4
| style="padding: 2px 5px 2px 5px" | 0x06
+
!style="background-color:#ffffff;"| 0x063
| style="padding: 2px 5px 2px 5px" | Index finger (1) torque command
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set torque of finger #4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_2
+
!style="background-color:#ffffff;"| Set Position Finger 1
| style="padding: 2px 5px 2px 5px" | 0x07
+
!style="background-color:#ffffff;"| 0x0E0
| style="padding: 2px 5px 2px 5px" | Middle finger (2) torque command
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set position of finger #1
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_3
+
!style="background-color:#ffffff;"| Set Position Finger 2
| style="padding: 2px 5px 2px 5px" | 0x08
+
!style="background-color:#ffffff;"| 0x0E1
| style="padding: 2px 5px 2px 5px" | Pinky finger (3) torque command
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set position of finger #2
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_TORQUE_4
+
!style="background-color:#ffffff;"| Set Position Finger 3
| style="padding: 2px 5px 2px 5px" | 0x09
+
!style="background-color:#ffffff;"| 0x0E2
| style="padding: 2px 5px 2px 5px" | Thumb torque command
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set position of finger #3
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_1
+
!style="background-color:#ffffff;"| Set Position Finger 4
| style="padding: 2px 5px 2px 5px" | 0x0a
+
!style="background-color:#ffffff;"| 0x0E3
| style="padding: 2px 5px 2px 5px" | (unused)
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set position of finger #4
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_2
+
!style="background-color:#ffffff;"| Set Periodic Read
| style="padding: 2px 5px 2px 5px" | 0x0b
+
!style="background-color:#ffffff;"| 0x081
| style="padding: 2px 5px 2px 5px" | (unused)
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set periodic read interval for position, IMU, temperature, status
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_3
+
!style="background-color:#ffffff;"| Config
| style="padding: 2px 5px 2px 5px" | 0x0c
+
!style="background-color:#ffffff;"| 0x068
| style="padding: 2px 5px 2px 5px" | (unused)
+
!style="background-color:#ffffff;"|
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Set Device ID, Baud-rate for RS-485
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_SET_POSITION_4
+
!style="background-color:#ffffff;"| Information
| style="padding: 2px 5px 2px 5px" | 0x0d
+
!style="background-color:#ffffff;"| 0x080
| style="padding: 2px 5px 2px 5px" | (unused)
+
!style="background-color:#ffffff;"| R
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Product information and status
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_QUERY_STATE_DATA
+
!style="background-color:#ffffff;"| Serial
| style="padding: 2px 5px 2px 5px" | 0x0e
+
!style="background-color:#ffffff;"| 0x088
| style="padding: 2px 5px 2px 5px" | Request joint state
+
!style="background-color:#ffffff;"| R
| style="padding: 2px 5px 2px 5px" | ID_COMMON
+
!style="background-color:#ffffff;"| Product serial number
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
 
|-
 
|-
| style="padding: 2px 5px 2px 5px" | ID_CMD_QUERY_STATE_DATA
+
!style="background-color:#ffffff;"| Position Finger 1
| style="padding: 2px 5px 2px 5px" | 0x0e
+
!style="background-color:#ffffff;"| 0x020
| style="padding: 2px 5px 2px 5px" | Joint state response
+
!style="background-color:#ffffff;"| R
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!style="background-color:#ffffff;"| Current angle position of finger #1
| 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
+
 
|-
 
|-
| style="padding: 5px 5px 2px 5px" | ID_CMD_QUERY_CONTROL_DATA
+
!style="background-color:#ffffff;"| Position Finger 2
| style="padding: 2px 5px 2px 5px" | 0x0f
+
!style="background-color:#ffffff;"| 0x021
| style="padding: 2px 5px 2px 5px" | Joint state response
+
!style="background-color:#ffffff;"| R
| style="padding: 2px 5px 2px 5px" | ID_DEVICE_MAIN
+
!style="background-color:#ffffff;"| Current angle position of finger #2
| 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
+
 
|-
 
|-
 +
!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
 
|}
 
|}
<br>
+
Messages marked with RTR can be sent by host in remote frame, and the Allegro Hand will respond it.
 +
<br><br>
  
====Source and Destination 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: 520px"
+
==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===
 +
Data Length = 0<br><br>This message does not have data field.
 +
<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_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
 +
|}
 +
<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_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;"| Joint 1
| style="padding: 2px 5px 2px 5px" | 0x04
+
!colspan="2" style="background-color:#ffffff;"| Joint 2
| style="padding: 2px 5px 2px 5px" | Middle Finger
+
!colspan="2" style="background-color:#ffffff;"| Joint 3
 +
!colspan="2" style="background-color:#ffffff;"| Joint 4
 +
|}
 +
<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_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
 +
!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
 +
|-
 +
!colspan="2" style="background-color:#ffffff;"| Position
 +
!colspan="2" style="background-color:#ffffff;"| IMU
 +
!colspan="2" style="background-color:#ffffff;"| Temperature
 +
!colspan="2" style="background-color:#ffffff;"| Status
 +
|}
 +
<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_DEVICE_SUB_04
+
!colspan="1" style="background-color:#ffffff;"| 0
| style="padding: 2px 5px 2px 5px" | 0x06
+
!colspan="1" style="background-color:#ffffff;"| 1
| style="padding: 2px 5px 2px 5px" | Thumb
+
!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;"| SET
 +
!colspan="1" style="background-color:#ffffff;"| Dev.ID
 +
!colspan="4" style="background-color:#ffffff;"| RS-485 baud-rate
 +
|}
 +
<br>
 +
'''SET''' field is structured as below.
 +
<br><br>
 +
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| SET 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;"| X
 +
!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
 +
|-
 +
!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;"| X
 +
!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]
 +
|-
 +
!colspan="1" style="background-color:#ffffff;"| MSB
 +
!colspan="1" style="background-color:#ffffff;"| 30
 +
!colspan="4" style="background-color:#ffffff;"| ...
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!colspan="1" style="background-color:#ffffff;"| LSB
 +
|-
 +
!colspan="8" style="background-color:#ffffff;"| Baud rate in bps
 
|}
 
|}
 
<br>
 
<br>
  
==Case-study: Softing CAN==
 
In this chapter, sample code demonstrating the implementation of the CAN communication interface is provide. This is the foundation for Softing PCI CAN.
 
===Opening the CAN Communication Channel===
 
<syntaxhighlight lang="cpp">
 
char ch_name[256];
 
sprintf_s(ch_name, 256, "CAN-ACx-PCI_%d", ch);
 
INIL2_initialize_channel(&hCAN[ch-1], ch_name);
 
  
L2CONFIG L2Config;
 
L2Config.fBaudrate = 1000.0;
 
L2Config.bEnableAck = 0;
 
L2Config.bEnableErrorframe = 0;
 
L2Config.s32AccCodeStd = 0;
 
L2Config.s32AccMaskStd = 0;
 
L2Config.s32AccCodeXtd = 0;
 
L2Config.s32AccMaskXtd = 0;
 
L2Config.s32OutputCtrl = GET_FROM_SCIM;
 
L2Config.s32Prescaler = 1;
 
L2Config.s32Sam = 0;
 
L2Config.s32Sjw = 1;
 
L2Config.s32Tseg1 = 4;
 
L2Config.s32Tseg2 = 3;
 
L2Config.hEvent = (void*)-1;
 
  
CANL2_initialize_fifo_mode(hCAN[ch-1], &L2Config);
+
===Information===
</syntaxhighlight>
+
Data Length = 7<br><br>
===CAN Initialization===
+
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.
<syntaxhighlight lang="cpp">
+
<br><br>
long Txid;  
+
{| class="wikitable" style="text-align: center; width: 50%;"
unsigned char data[8];  
+
!colspan="7"| Information Data [0:6]
 +
|-
 +
!colspan="1" style="background-color:#ffffff;"| 0
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!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="2" style="background-color:#ffffff;"| Hardware Ver.
 +
!colspan="2" style="background-color:#ffffff;"| Firmware Ver.
 +
!colspan="1" style="background-color:#ffffff;"| L/R
 +
!colspan="1" style="background-color:#ffffff;"| Temp
 +
!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>
 +
* 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>
  
Txid = ((unsigned long)ID_CMD_SET_PERIOD<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
 
data[0] = (unsigned char)period_msec;
 
canWrite(hCAN, Txid, data, 1, STD);
 
  
Sleep(10);
 
  
Txid = ((unsigned long)ID_CMD_SET_MODE_TASK<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
+
===Serial===
canWrite(hCAN, Txid, data, 0, STD);
+
Data Length = 8<br><br>
 +
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>
  
Sleep(10);
 
  
Txid = ((unsigned long)ID_CMD_QUERY_STATE_DATA<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);  
+
===Position Finger #===
canWrite(hCAN, Txid, data, 0, STD);
+
Data Length = 8<br><br>
</syntaxhighlight>
+
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.
===Starting Periodic CAN Communication===
+
<br><br>
When you start periodic CAN communication, joint angles are automatically updated according to the torque control input.
+
{| class="wikitable" style="text-align: center; width: 50%;"
 +
!colspan="8"| Position Data[0:7]
 +
|-
 +
!colspan="1" style="background-color:#ffffff;"| 0
 +
!colspan="1" style="background-color:#ffffff;"| 1
 +
!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
 +
|-
 +
!colspan="2" style="background-color:#ffffff;"| Joint 1
 +
!colspan="2" style="background-color:#ffffff;"| Joint 2
 +
!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>
  
<syntaxhighlight lang="cpp">
 
long Txid;
 
unsigned char data[8];
 
  
Txid = ((unsigned long)ID_CMD_QUERY_STATE_DATA<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
 
canWrite(hCAN[ch-1], Txid, data, 0, STD);
 
  
Sleep(10);
+
===IMU===
 
+
Data Length = 8<br><br>
Txid = ((unsigned long)ID_CMD_SET_SYSTEM_ON<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
+
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.
canWrite(hCAN[ch-1], Txid, data, 0, STD);
+
<br><br>
</syntaxhighlight>
+
{| class="wikitable" style="text-align: center; width: 50%;"
===Stopping Periodic CAN Communication===
+
!colspan="8"| Quaternion Data[0:7]
<syntaxhighlight lang="cpp">
+
|-
long Txid;
+
!colspan="1" style="background-color:#ffffff;"| 0
unsigned char data[8];
+
!colspan="1" style="background-color:#ffffff;"| 1
 
+
!colspan="1" style="background-color:#ffffff;"| 2
Txid = ((unsigned long)ID_CMD_SET_SYSTEM_OFF<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
+
!colspan="1" style="background-color:#ffffff;"| 3
canWrite(hCAN[ch-1], Txid, data, 0, STD);
+
!colspan="1" style="background-color:#ffffff;"| 4
</syntaxhighlight>
+
!colspan="1" style="background-color:#ffffff;"| 5
===Transmitting Control Torques===
+
!colspan="1" style="background-color:#ffffff;"| 6
Control inputs for the four joints in each finger should be packed in a single CAN frame. The sample code below demontrates how to encode four PWM inputs into an 8 byte data buffer and how to set the CAN frame ID properly.
+
!colspan="1" style="background-color:#ffffff;"| 7
 
+
|-
'''''Note:''' PWM = Desired_Torque (N-m) * '''800.0'''.<br>800.0 is an empirical constant that will convert torque to PWM.''<br>
+
!colspan="2" style="background-color:#ffffff;"| Quaternion W
As seen below, ''torque2pwm = 800.0''
+
!colspan="2" style="background-color:#ffffff;"| Quaternion X
 
+
!colspan="2" style="background-color:#ffffff;"| Quaternion Y
 
+
!colspan="2" style="background-color:#ffffff;"| Quaternion Z
'''''Note:''' The joint index order used in the following code is for '''Allegro Hand versions 2.0 and up'''. For Allegro hand 1.0 or earlier, see the code snippet after this one.''
+
|}
 
+
<br><br>
<syntaxhighlight lang="cpp">
+
long Txid;  
+
unsigned char data[8];  
+
float torque2pwm = 800.0f
+
short pwm[4] = {
+
0.1*torque2pwm,
+
0.1*torque2pwm,
+
0.1*torque2pwm,
+
0.1*torque2pwm
+
};  
+
 
+
// This joint index order is used Allegro Hand versions 2.0 and up.
+
if (findex >= 0 && findex < 4)
+
{
+
data[0] = (unsigned char)( (pwm[3] >> 8) & 0x00ff);  
+
data[1] = (unsigned char)(pwm[3] & 0x00ff);  
+
  
data[2] = (unsigned char)( (pwm[2] >> 8) & 0x00ff);
+
===Temperature Finger #===
data[3] = (unsigned char)(pwm[2] & 0x00ff);
+
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.
data[4] = (unsigned char)( (pwm[1] >> 8) & 0x00ff);
+
<br><br>
data[5] = (unsigned char)(pwm[1] & 0x00ff);
+
Temperature is represented as Celsius degree.
 
+
<br><br>
data[6] = (unsigned char)( (pwm[0] >> 8) & 0x00ff);
+
{| class="wikitable" style="text-align: center; width: 50%;"
data[7] = (unsigned char)(pwm[0] & 0x00ff);
+
!colspan="4"| Temperature Date[0:3]
 
+
|-
Txid = ((unsigned long)(ID_CMD_SET_TORQUE_1 + findex)<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
+
!colspan="1" style="background-color:#ffffff;"| 0
canWrite(hCAN, Txid, data, 8, STD);
+
!colspan="1" style="background-color:#ffffff;"| 1
}
+
!colspan="1" style="background-color:#ffffff;"| 2
 
+
!colspan="1" style="background-color:#ffffff;"| 3
</syntaxhighlight>
+
|-
 
+
!colspan="1" style="background-color:#ffffff;"| Joint 1
 
+
!colspan="1" style="background-color:#ffffff;"| Joint 2
 
+
!colspan="1" style="background-color:#ffffff;"| Joint 3
'''''Note:''' The joint index order used in the following code is for '''Allegro Hand versions 1.0 and down'''. For Allegro hand 2.0 or later, see the code snippet before this one.''
+
!colspan="1" style="background-color:#ffffff;"| Joint 4
 
+
|}
<syntaxhighlight lang="cpp">
+
// This joint index order is used Allegro Hand versions 1.0 and down.
+
if (findex >= 0 && findex < 4)
+
{  
+
data[0] = (unsigned char)( (pwm[0] >> 8) & 0x00ff);  
+
data[1] = (unsigned char)(pwm[0] & 0x00ff);
+
 
+
data[2] = (unsigned char)( (pwm[1] >> 8) & 0x00ff);  
+
data[3] = (unsigned char)(pwm[1] & 0x00ff);
+
 
+
data[4] = (unsigned char)( (pwm[2] >> 8) & 0x00ff);  
+
data[5] = (unsigned char)(pwm[2] & 0x00ff);
+
 
+
data[6] = (unsigned char)( (pwm[3] >> 8) & 0x00ff);  
+
data[7] = (unsigned char)(pwm[3] & 0x00ff);
+
 
+
Txid = ((unsigned long)(ID_CMD_SET_TORQUE_1 + findex)<<6) | ((unsigned long)ID_COMMON <<3) | ((unsigned long)ID_DEVICE_MAIN);
+
canWrite(hCAN, Txid, data, 8, STD);  
+
}
+
 
+
</syntaxhighlight>
+
 
+
 
+
===Receiving Joint Angles===
+
Each finger consists of four joints. The joint angles for those four joints can be received via one CAN packet. The sample code below demonstrates the method for decoding the data buffer and reading the joint angles.
+
 
+
The sample code assumes that when fingers are in their zero positions, the joint angles from the can packet are 32768. In practice, users should perform experiments and introduce offsets to obtain the zero position.
+
 
+
<syntaxhighlight lang="cpp">
+
char cmd;  
+
char src;
+
char des;
+
int len;
+
unsigned char data[8];
+
int ret;
+
can_msg msg;
+
PARAM_STRUCT param;
+
 
+
ret = CANL2_read_ac(hCAN, &param);
+
  
switch (ret)
+
<br><br>
{
+
case CANL2_RA_DATAFRAME:
+
msg.msg_id = param.Ident;
+
msg.STD_EXT = STD;
+
msg.data_length = param.DataLength;
+
+
msg.data[0] = param.RCV_data[0];
+
msg.data[1] = param.RCV_data[1];
+
msg.data[2] = param.RCV_data[2];
+
msg.data[3] = param.RCV_data[3];
+
msg.data[4] = param.RCV_data[4];
+
msg.data[5] = param.RCV_data[5];
+
msg.data[6] = param.RCV_data[6];
+
msg.data[7] = param.RCV_data[7];
+
  
break;
+
===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.
  
cmd = (char)( (msg.msg_id >> 6) & 0x1f );
 
des = (char)( (msg.msg_id >> 3) & 0x07 );
 
src = (char)( msg.msg_id & 0x07 );
 
len = (int)( msg.data_length );
 
for(int nd=0; nd<len; nd++)
 
data[nd] = msg.data[nd];
 
  
switch (cmd)
 
{
 
case ID_CMD_QUERY_CONTROL_DATA:
 
{
 
if (id_src >= ID_DEVICE_SUB_01 && id_src <= ID_DEVICE_SUB_04)
 
{
 
int temp_pos[4]; // raw angle data
 
float ang[4]; // degree
 
float q[4]; // radian
 
  
temp_pos[0] = (int)(data[0] | (data[1] << 8));
 
temp_pos[1] = (int)(data[2] | (data[3] << 8));
 
temp_pos[2] = (int)(data[4] | (data[5] << 8));
 
temp_pos[3] = (int)(data[6] | (data[7] << 8));
 
  
ang[0] = ((float)(temp_pos[0]-32768)*(333.3f/65536.0f))*(1);
 
ang[1] = ((float)(temp_pos[1]-32768)*(333.3f/65536.0f))*(1);
 
ang[2] = ((float)(temp_pos[2]-32768)*(333.3f/65536.0f))*(1);
 
ang[3] = ((float)(temp_pos[3]-32768)*(333.3f/65536.0f))*(1);
 
  
q[0] = (3.141592f/180.0f) * ang[0];
+
<br><br><br>
q[1] = (3.141592f/180.0f) * ang[1];
+
q[2] = (3.141592f/180.0f) * ang[2];
+
q[3] = (3.141592f/180.0f) * ang[3];
+
}
+
}
+
  
}
 
</syntaxhighlight>
 
  
 
==Download==
 
==Download==
[http://wiki.wonikrobotics.com/AllegroHandWiki/images/8/83/AllegroHandCanProtocol.pdf Allegro Hand CAN Protocol (English)] ----------- This page.<br>
+
[[File:v4_AllegroHandUsersManual_1.1.pdf]]
[http://wiki.wonikrobotics.com/AllegroHandWiki/images/a/a2/AllegroHandCanProtocol_KR.pdf Allegro Hand CAN Protocol (Korean)]<br>
+

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 0   Bots & Crawlers 1