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===

Revision as of 17:54, 27 December 2018

Contents

CAN Communication

Baud-Rate

The CAN communication baud-rate is 1Mbps.

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.

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.

CAN Frames

Standard CAN Packet

The standard CAN packet used for communication is 14 bytes including 8 bytes of data.

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;

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).

1 8 16 24 26 27 29 30 32
Command ID Dest. ID Source ID


Command Identifiers

Variable Name Value Description Destination Source
ID_CMD_SET_SYSTEM_ON 0x01 Start periodic communication ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_SYSTEM_OFF 0x02 Stop periodic communication ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_PERIOD 0x03 Set communication frequency ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_MODE_JOINT 0x04 Command Transmission Mode ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_MODE_TASK 0x05 Command Transmission Mode ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_TORQUE_1 0x06 Index finger (1) torque command ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_TORQUE_2 0x07 Middle finger (2) torque command ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_TORQUE_3 0x08 Pinky finger (3) torque command ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_TORQUE_4 0x09 Thumb torque command ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_POSITION_1 0x0a (unused) ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_POSITION_2 0x0b (unused) ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_POSITION_3 0x0c (unused) ID_COMMON ID_DEVICE_MAIN
ID_CMD_SET_POSITION_4 0x0d (unused) ID_COMMON ID_DEVICE_MAIN
ID_CMD_QUERY_STATE_DATA 0x0e Request joint state ID_COMMON ID_DEVICE_MAIN
ID_CMD_QUERY_STATE_DATA 0x0e Joint state response ID_DEVICE_MAIN ID_DEVICE_SUB_01
ID_DEVICE_SUB_02
ID_DEVICE_SUB_03
ID_DEVICE_SUB_04
ID_CMD_QUERY_CONTROL_DATA 0x0f Joint state response ID_DEVICE_MAIN ID_DEVICE_SUB_01
ID_DEVICE_SUB_02
ID_DEVICE_SUB_03
ID_DEVICE_SUB_04


Source and Destination Identifiers

Variable Name Value Description
ID_COMMON 0x01 Allegro Hand
ID_DEVICE_MAIN 0x02 Control PC
ID_DEVICE_SUB_01 0x03 Index Finger
ID_DEVICE_SUB_02 0x04 Middle Finger
ID_DEVICE_SUB_03 0x05 Little Finger
ID_DEVICE_SUB_04 0x06 Thumb


Download

File:V4 AllegroHandUsersManual.pdf





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