Defines | Enumerations | Variables
common_edc_ethercat_protocol.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define INSERT_CRC_CALCULATION_HERE
#define JOINTS_NUM_0X20   ((int)28)
 This needs to be a #define because it's used to dimension an array.
#define MESSAGE_ID_ACK_BIT   0b00000010000
 Bit mask specifying which bits of the CAN message ID are used for the ACK bit (only for bootloading)
#define MESSAGE_ID_DIRECTION_BITS   0b11000000000
 Bit mask specifying which bits of the CAN message ID are used for the MESSAGE_DIRECTION.
#define MESSAGE_ID_DIRECTION_SHIFT_POS   9
 Bit number of lowest bit of MESSAGE_ID_DIRECTION_BITS.
#define MESSAGE_ID_MOTOR_ID_BITS   0b00111100000
 Bit mask specifying which bits of the CAN message ID are used for the motor ID [0..9].
#define MESSAGE_ID_TYPE_BITS   0b00000001111
 Bit mask specifying which bits of the CAN message ID are used for the TO_MOTOR_DATA_TYPE or FROM_MOTOR_DATA_TYPE.
#define SENSORS_NUM_0X20   ((int)36)

Enumerations

enum  EDC_COMMAND {
  EDC_COMMAND_INVALID = 0, EDC_COMMAND_SENSOR_DATA, EDC_COMMAND_SENSOR_CHANNEL_NUMBERS, EDC_COMMAND_SENSOR_ADC_CHANNEL_CS,
  EDC_COMMAND_CAN_DIRECT_MODE
}
 The host can request different types of data from the palm. More...
enum  HARD_CONFIGURATION_INFORMATION { PALM_SVN_VERSION = 0, SERVER_SVN_VERSION = 1 }
enum  MESSAGE_DIRECTION { DIRECTION_DATA_REQUEST = 0x0, DIRECTION_TO_MOTOR = 0x1, DIRECTION_FROM_MOTOR = 0x2, DIRECTION_BOOTLOADER = 0x3 }
enum  SENSOR_NAME_ENUM {
  FFJ1 = 0, FFJ2, FFJ3, FFJ4,
  MFJ1, MFJ2, MFJ3, MFJ4,
  RFJ1, RFJ2, RFJ3, RFJ4,
  LFJ1, LFJ2, LFJ3, LFJ4,
  LFJ5, THJ1, THJ2, THJ3,
  THJ4, THJ5A, THJ5B, WRJ1A,
  WRJ1B, WRJ2, ACCX, ACCY,
  ACCZ, GYRX, GYRY, GYRZ,
  ANA0, ANA1, ANA2, ANA3,
  IGNORE
}
 This enum defines which ADC reading goes into which sensors[]. More...

Variables

static const char * joint_names [JOINTS_NUM_0X20]
 This needs to be a #define for symmetry with SENSORS_NUM.
static const char * sensor_names [SENSORS_NUM_0X20]
 This array defines the names of the joints. The names and order should match the enum SENSOR_NAMES_ENUM.
static const char * slow_data_types [17]

Detailed Description

The term "Command" means data going from the ROS PC to the Node on the robot Previously known as "Incoming"

The term "Status" means data going from Node on the robot the to the ROS PC Previously known as "Outgoing"

Definition in file common_edc_ethercat_protocol.h.


Define Documentation

Value:
crc_i = (int8u) (crc_result&0xff);          \
                                        crc_i ^= crc_byte;                          \
                                        crc_result >>= 8;                           \
                                        if(crc_i & 0x01)        crc_result ^= 0x3096;   \
                                        if(crc_i & 0x02)        crc_result ^= 0x612c;   \
                                        if(crc_i & 0x04)        crc_result ^= 0xc419;   \
                                        if(crc_i & 0x08)        crc_result ^= 0x8832;   \
                                        if(crc_i & 0x10)        crc_result ^= 0x1064;   \
                                        if(crc_i & 0x20)        crc_result ^= 0x20c8;   \
                                        if(crc_i & 0x40)        crc_result ^= 0x4190;   \
                                        if(crc_i & 0x80)        crc_result ^= 0x8320;

Definition at line 171 of file common_edc_ethercat_protocol.h.

#define JOINTS_NUM_0X20   ((int)28)

This needs to be a #define because it's used to dimension an array.

The number of joints in the hand

Definition at line 112 of file common_edc_ethercat_protocol.h.

#define MESSAGE_ID_ACK_BIT   0b00000010000

Bit mask specifying which bits of the CAN message ID are used for the ACK bit (only for bootloading)

Definition at line 100 of file common_edc_ethercat_protocol.h.

#define MESSAGE_ID_DIRECTION_BITS   0b11000000000

Bit mask specifying which bits of the CAN message ID are used for the MESSAGE_DIRECTION.

Definition at line 98 of file common_edc_ethercat_protocol.h.

Bit number of lowest bit of MESSAGE_ID_DIRECTION_BITS.

Definition at line 104 of file common_edc_ethercat_protocol.h.

#define MESSAGE_ID_MOTOR_ID_BITS   0b00111100000

Bit mask specifying which bits of the CAN message ID are used for the motor ID [0..9].

Definition at line 99 of file common_edc_ethercat_protocol.h.

#define MESSAGE_ID_TYPE_BITS   0b00000001111

Bit mask specifying which bits of the CAN message ID are used for the TO_MOTOR_DATA_TYPE or FROM_MOTOR_DATA_TYPE.

Definition at line 101 of file common_edc_ethercat_protocol.h.

#define SENSORS_NUM_0X20   ((int)36)

The number of sensors in the robot.

Definition at line 108 of file common_edc_ethercat_protocol.h.


Enumeration Type Documentation

The host can request different types of data from the palm.

Enumerator:
EDC_COMMAND_INVALID 

Reading an empty mailbox on the ET1200 results in a zero.

EDC_COMMAND_SENSOR_DATA 

Normal operating value. Palm transmits ADC readings.

EDC_COMMAND_SENSOR_CHANNEL_NUMBERS 

Instead of sending ADC readings, send the channel number, so the host can confirm the firmware is correct.

EDC_COMMAND_SENSOR_ADC_CHANNEL_CS 

Instead of sending ADC readings, send the chip select channel, so the host can confirm the firmware is correct.

EDC_COMMAND_CAN_DIRECT_MODE 

Might be used in the future for running automated tests inside the firmware.

Definition at line 48 of file common_edc_ethercat_protocol.h.

Enumerator:
PALM_SVN_VERSION 
SERVER_SVN_VERSION 

Definition at line 163 of file common_edc_ethercat_protocol.h.

This represents the top two bits [10..9] of the CAN message ID. These bits tell us the type of the message.

Enumerator:
DIRECTION_DATA_REQUEST 

Requesting that motors send back status data (AKA Start of Frame)

DIRECTION_TO_MOTOR 

Message contains command data being sent to the motors.

DIRECTION_FROM_MOTOR 

Message contains status data from a motor.

DIRECTION_BOOTLOADER 

Message has something to do with boot-loading.

Definition at line 89 of file common_edc_ethercat_protocol.h.

This enum defines which ADC reading goes into which sensors[].

Enumerator:
FFJ1 
FFJ2 
FFJ3 
FFJ4 
MFJ1 
MFJ2 
MFJ3 
MFJ4 
RFJ1 
RFJ2 
RFJ3 
RFJ4 
LFJ1 
LFJ2 
LFJ3 
LFJ4 
LFJ5 
THJ1 
THJ2 
THJ3 
THJ4 
THJ5A 
THJ5B 
WRJ1A 
WRJ1B 
WRJ2 
ACCX 
ACCY 
ACCZ 
GYRX 
GYRY 
GYRZ 
ANA0 
ANA1 
ANA2 
ANA3 
IGNORE 

Definition at line 144 of file common_edc_ethercat_protocol.h.


Variable Documentation

const char* joint_names[JOINTS_NUM_0X20] [static]
Initial value:
 {  "FFJ0", "FFJ1", "FFJ2", "FFJ3", "FFJ4",
                                                         "MFJ0", "MFJ1", "MFJ2", "MFJ3", "MFJ4",
                                                         "RFJ0", "RFJ1", "RFJ2", "RFJ3", "RFJ4",
                                                         "LFJ0", "LFJ1", "LFJ2", "LFJ3", "LFJ4","LFJ5",
                                                         "THJ1", "THJ2", "THJ3", "THJ4", "THJ5",
                                                         "WRJ1", "WRJ2"
                                                      }

This needs to be a #define for symmetry with SENSORS_NUM.

Definition at line 119 of file common_edc_ethercat_protocol.h.

const char* sensor_names[SENSORS_NUM_0X20] [static]
Initial value:
 {"FFJ1",  "FFJ2",  "FFJ3", "FFJ4",                          
                                                         "MFJ1",  "MFJ2",  "MFJ3", "MFJ4",                       
                                                         "RFJ1",  "RFJ2",  "RFJ3", "RFJ4",                       
                                                         "LFJ1",  "LFJ2",  "LFJ3", "LFJ4", "LFJ5",               
                                                         "THJ1",  "THJ2",  "THJ3", "THJ4", "THJ5A", "THJ5B",     
                                                         "WRJ1A", "WRJ1B", "WRJ2",                               
                                                         "ACCX",  "ACCY",  "ACCZ",                               
                                                         "GYRX",  "GYRY",  "GYRZ",                               
                                                         "AN0",   "AN1",   "AN2",  "AN3"                         
                                                       }

This array defines the names of the joints. The names and order should match the enum SENSOR_NAMES_ENUM.

Definition at line 130 of file common_edc_ethercat_protocol.h.

const char* slow_data_types[17] [static]
Initial value:
 {  "Invalid",                                  
                                                "SVN revision",                             
                                                "SVN revision on server at build time",     

                                                "Modified from SVN revision",               
                                                "Serial number low",                        
                                                "Serial number high",                       
                                                "Motor gear ratio",                         
                                                "Assembly date year",                       
                                                "Assembly date month, day",                 

                                                "Controller F",                             
                                                "Controller P",                             
                                                "Controller I",                             
                                                "Controller Imax",                          
                                                "Controller D",                             
                                                "Controller deadband and sign",             

                                                "Controller loop frequency Hz"              
                                               }

Definition at line 63 of file common_edc_ethercat_protocol.h.



sr_external_dependencies
Author(s): Ugo Cupcic
autogenerated on Mon Jul 1 2019 20:06:25