rflex_info.h
Go to the documentation of this file.
00001 /*  RFLEX ROS Node constants
00002  *  David Lu!! - 2/2010
00003  *  Modified from Player Driver
00004  *
00005  *  Player - One Hell of a Robot Server
00006  *  Copyright (C) 2000
00007  *     Brian Gerkey, Kasper Stoy, Richard Vaughan, & Andrew Howard
00008  *
00009  *
00010  *  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version.
00014  *
00015  *  This program is distributed in the hope that it will be useful,
00016  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  *  GNU General Public License for more details.
00019  *
00020  *  You should have received a copy of the GNU General Public License
00021  *  along with this program; if not, write to the Free Software
00022  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  *
00024  */
00025 
00026 #ifndef RFLEX_INFO_H
00027 #define RFLEX_INFO_H
00028 
00029 // Protocol information
00030 static const int PROTOCOL_SIZE = 9;
00031 static const int PACKET_CRC_START = 2;
00032 static const int PACKET_CRC_OFFSET = 4;
00033 // Packet data slots
00034 static const int PACKET_PORT_BYTE = 2;
00035 static const int PACKET_ID_BYTE = 3;
00036 static const int PACKET_OPCODE_BYTE = 4;
00037 static const int PACKET_SIZE_BYTE = 5;
00038 static const int PACKET_DATA_START_BYTE = 6;
00039 
00040 #define MAX_COMMAND_LENGTH             256
00041 #define BUFFER_SIZE 1024
00042 
00043 #define STD_TRANS_TORQUE    30000
00044 #define STD_ROT_ACC         100000
00045 #define STD_ROT_TORQUE      35000
00046 
00047 #define SYS_PORT                 1
00048 #define MOT_PORT                 2
00049 #define JSTK_PORT                3
00050 #define SONAR_PORT               4
00051 #define DIO_PORT                 5
00052 #define IR_PORT                  6
00053 
00054 #define SYS_LCD_DUMP             0
00055 #define SYS_STATUS               1
00056 
00057 #define MOT_AXIS_GET_SYSTEM      0
00058 #define MOT_AXIS_GET_MODEL       1
00059 #define MOT_AXIS_GET_TARGET      2
00060 #define MOT_AXIS_SET_LIMITS      3
00061 #define MOT_AXIS_GET_LIMITS      4
00062 #define MOT_AXIS_SET_POS_LIMITS  5
00063 #define MOT_AXIS_GET_POS_LIMITS  6
00064 #define MOT_AXIS_SET_DIR         7
00065 #define MOT_AXIS_SET_POS         8
00066 #define MOT_AXIS_GET_MODE        9
00067 #define MOT_SET_DEFAULTS        10
00068 #define MOT_BRAKE_SET           11
00069 #define MOT_BRAKE_RELEASE       12
00070 #define MOT_SYSTEM_REPORT       33
00071 #define MOT_SYSTEM_REPORT_REQ   34
00072 #define MOT_GET_NAXES           65
00073 #define MOT_SET_GEARING         66
00074 #define MOT_GET_GEARING         67
00075 #define MOT_MOTOR_SET_MODE      68
00076 #define MOT_MOTOR_GET_MODE      69
00077 #define MOT_MOTOR_SET_PARMS     70
00078 #define MOT_MOTOR_GET_PARMS     71
00079 #define MOT_MOTOR_SET_LIMITS    72
00080 #define MOT_MOTOR_GET_LIMITS    73
00081 #define MOT_MOTOR_GET_DATA      74
00082 #define MOT_AXIS_SET_PARMS      75
00083 #define MOT_AXIS_GET_PARMS      76
00084 #define MOT_AXIS_SET_PWM_LIMIT  77
00085 #define MOT_AXIS_GET_PWM_LIMIT  78
00086 #define MOT_AXIS_SET_PWM        79
00087 #define MOT_AXIS_GET_PWM        80
00088 
00089 #define SONAR_RUN                0
00090 #define SONAR_GET_UPDATE         1
00091 #define SONAR_REPORT             2
00092 
00093 #define DIO_REPORTS_REQ          0
00094 #define DIO_REPORT               1
00095 #define DIO_GET_UPDATE           2
00096 #define DIO_UPDATE               3
00097 #define DIO_SET                  4
00098 
00099 #define IR_RUN                   0
00100 #define IR_REPORT                1
00101 
00102 #define JSTK_GET_STATE               0
00103 
00104 #define HEADING_HOME_ADDRESS 0x31
00105 #define BUMPER_ADDRESS 0x40
00106 
00107 #define SONAR_MAX_COUNT 224
00108 
00109 // Escape codes used in the data packets
00110 static const unsigned char NUL = 0;
00111 static const unsigned char SOH = 1;
00112 static const unsigned char STX = 2;
00113 static const unsigned char ETX = 3;
00114 static const unsigned char ESC = 27;
00115 
00116 #endif


rflex
Author(s): David V. Lu!!, Mikhail Medvedev
autogenerated on Fri Aug 28 2015 12:58:58