roboteqdriver.cpp File Reference

#include <time.h>
#include <assert.h>
#include <stdio.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <signal.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <pthread.h>
#include <math.h>
#include "libplayercore/playercore.h"

Classes

class  roboteq2

Defines

#define SERIAL_BUFF_SIZE   128
#define MAX_MOTOR_SPEED   127
#define ROBOTEQ_CON_TIMEOUT   10
#define ROBOTEQ_DEFAULT_BAUD   9600
#define INPUT_SWITCHES_FUNCTIONS   0x01
#define DEFAULT_CONTROLLER_CURRENT_LIMIT   105
#define DEFAULT_ACCELERATION   0x20
#define DEFAULT_ENCODER_TIME_BASE   0x16
#define DEFAULT_ENCODER_DISTANCE_DIVIDER   0x08
#define DEFAULT_GEAR_RATIO   1
#define DEFAULT_WHEEL_CIRCUMFERENCE   1
#define DEFAULT_AXLE_LENGTH   1
#define DEFAULT_ENCODER_PPR   500
#define DEFAULT_INVERT_DIRECTIONS   false
#define DEFAULT_RC_MODE_ON_SHUTDOWN   true
#define CHANNEL1_OPERATING_MODE_ADDRESS   0x80
#define CHANNEL2_OPERATING_MODE_ADDRESS   0x81
#define CONTROLLER_IDENTIFICATION_ADDRESS   0x8A
#define CONTROLLER_STATUS_ADDRESS   0x89
#define INPUT_CONTROL_MODE_ADDRESS   0x00
#define MOTOR_CONTROL_MODE_ADDRESS   0x01
#define CURRENT_LIMIT_ADDRESS   0x02
#define ACCELERATION_ADDRESS   0x03
#define INPUT_SWITCHES_FUNCTION_ADDRESS   0x04
#define ENCODER1_TIME_BASE_ADDRESS   0xA2
#define ENCODER2_TIME_BASE_ADDRESS   0xA3
#define ENCODER_DISTANCE_DIVIDER_ADDRESS   0xA5
#define EXPONENTIATION_CHANNEL1_ADDRESS   0x07
#define EXPONENTIATION_CHANNEL2_ADDRESS   0x08
#define PID_PROPORTIONAL_GAIN1_ADDRESS   0x82
#define PID_PROPORTIONAL_GAIN2_ADDRESS   0x83
#define PID_INTEGRAL_GAIN1_ADDRESS   0x84
#define PID_INTEGRAL_GAIN2_ADDRESS   0x85
#define PID_DIFFERENTIAL_GAIN1_ADDRESS   0x86
#define PID_DIFFERENTIAL_GAIN2_ADDRESS   0x87
#define MOTOR_CONTROL_MODE_CLOSED_LOOP   0xC5
#define MOTOR_CONTROL_MODE_OPEN_LOOP   0x01
#define MAX_PID_GAIN   63.0/8.0
#define EXPONENTIATION_LINEAR   0x00
#define EXPONENTIATION_STRONG_EXP   0x02
#define INPUT_CONTROL_MODE   0x01
#define MESSAGE_ERROR   0
#define MESSAGE_INFO   1
#define MESSAGE_DEBUG   2

Functions

Driver * roboteq2_Init (ConfigFile *cf, int section)
void roboteq2_Register (DriverTable *table)
int player_driver_init (DriverTable *table)


Define Documentation

#define ACCELERATION_ADDRESS   0x03

#define CHANNEL1_OPERATING_MODE_ADDRESS   0x80

#define CHANNEL2_OPERATING_MODE_ADDRESS   0x81

#define CONTROLLER_IDENTIFICATION_ADDRESS   0x8A

#define CONTROLLER_STATUS_ADDRESS   0x89

#define CURRENT_LIMIT_ADDRESS   0x02

#define DEFAULT_ACCELERATION   0x20

#define DEFAULT_AXLE_LENGTH   1

#define DEFAULT_CONTROLLER_CURRENT_LIMIT   105

#define DEFAULT_ENCODER_DISTANCE_DIVIDER   0x08

#define DEFAULT_ENCODER_PPR   500

#define DEFAULT_ENCODER_TIME_BASE   0x16

#define DEFAULT_GEAR_RATIO   1

#define DEFAULT_INVERT_DIRECTIONS   false

#define DEFAULT_RC_MODE_ON_SHUTDOWN   true

#define DEFAULT_WHEEL_CIRCUMFERENCE   1

#define ENCODER1_TIME_BASE_ADDRESS   0xA2

#define ENCODER2_TIME_BASE_ADDRESS   0xA3

#define ENCODER_DISTANCE_DIVIDER_ADDRESS   0xA5

#define EXPONENTIATION_CHANNEL1_ADDRESS   0x07

#define EXPONENTIATION_CHANNEL2_ADDRESS   0x08

#define EXPONENTIATION_LINEAR   0x00

#define EXPONENTIATION_STRONG_EXP   0x02

#define INPUT_CONTROL_MODE   0x01

#define INPUT_CONTROL_MODE_ADDRESS   0x00

#define INPUT_SWITCHES_FUNCTION_ADDRESS   0x04

#define INPUT_SWITCHES_FUNCTIONS   0x01

#define MAX_MOTOR_SPEED   127

#define MAX_PID_GAIN   63.0/8.0

#define MESSAGE_DEBUG   2

#define MESSAGE_ERROR   0

#define MESSAGE_INFO   1

#define MOTOR_CONTROL_MODE_ADDRESS   0x01

#define MOTOR_CONTROL_MODE_CLOSED_LOOP   0xC5

#define MOTOR_CONTROL_MODE_OPEN_LOOP   0x01

#define PID_DIFFERENTIAL_GAIN1_ADDRESS   0x86

#define PID_DIFFERENTIAL_GAIN2_ADDRESS   0x87

#define PID_INTEGRAL_GAIN1_ADDRESS   0x84

#define PID_INTEGRAL_GAIN2_ADDRESS   0x85

#define PID_PROPORTIONAL_GAIN1_ADDRESS   0x82

#define PID_PROPORTIONAL_GAIN2_ADDRESS   0x83

#define ROBOTEQ_CON_TIMEOUT   10

#define ROBOTEQ_DEFAULT_BAUD   9600

#define SERIAL_BUFF_SIZE   128


Function Documentation

int player_driver_init ( DriverTable *  table  ) 

Driver* roboteq2_Init ( ConfigFile *  cf,
int  section 
)

void roboteq2_Register ( DriverTable *  table  ) 


Generated on Sun Feb 21 00:00:05 2010 for Penn State Robotics Club: AUVSI IGVC 2010 by  doxygen 1.5.5