ClodBuster Class Reference

Public Member Functions | |
ClodBuster (ConfigFile *cf, int section) | |
virtual void | Main () |
Main method for driver thread. | |
int | ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data) |
Message handler. | |
virtual int | MainSetup () |
Sets up the resources needed by the driver thread. | |
virtual void | MainQuit () |
Cleanup method for driver thread (called when main exits). | |
unsigned char | SetServo (unsigned char chan, int value) |
void | SetServo (unsigned char chan, unsigned char cmd) |
Protected Attributes | |
int | motor_max_speed |
int | motor_max_turnspeed |
bool | use_vel_band |
short | speedDemand |
short | turnRateDemand |
bool | newmotorspeed |
bool | newmotorturn |
Private Member Functions | |
void | ResetRawPositions () |
clodbuster_encoder_data_t | ReadEncoders () |
void | GetGraspBoardParams () |
void | IntegrateEncoders () |
void | DifferenceEncoders () |
Private Attributes | |
player_position2d_data_t | position_data |
int | clodbuster_fd |
char | clodbuster_serial_port [MAX_FILENAME_SIZE] |
int | kp |
int | ki |
int | kd |
bool | initdone |
clodbuster_encoder_data_t | encoder_offset |
clodbuster_encoder_data_t | encoder_measurement |
clodbuster_encoder_data_t | old_encoder_measurement |
float | EncV |
float | EncOmega |
float | EncVleft |
float | EncVright |
bool | direct_command_control |
unsigned char | max_limits [SERVO_CHANNELS] |
unsigned char | center_limits [SERVO_CHANNELS] |
unsigned char | min_limits [SERVO_CHANNELS] |
float | WheelRadius |
float | WheelBase |
float | WheelSeparation |
unsigned int | CountsPerRev |
float | Kenc |
float | LoopFreq |
PIDGains * | Kv |
PIDGains * | Kw |
Member Function Documentation
void ClodBuster::Main | ( | ) | [virtual] |
Main method for driver thread.
drivers have their own thread of execution, created using StartThread(); this is the entry point for the driver thread, and must be overloaded by all threaded drivers.
Implements ThreadedDriver.
References Driver::device_addr, Driver::ProcessMessages(), and Driver::Publish().
void ClodBuster::MainQuit | ( | void | ) | [virtual] |
Cleanup method for driver thread (called when main exits).
Overload this method and to do additional cleanup when the driver thread exits.
Reimplemented from ThreadedDriver.
int ClodBuster::ProcessMessage | ( | QueuePointer & | resp_queue, | |
player_msghdr * | hdr, | |||
void * | data | |||
) | [virtual] |
Message handler.
This function is called once for each message in the incoming queue. Reimplement it to provide message handling. Return 0 if you handled the message and -1 otherwise
- Parameters:
-
resp_queue The queue to which any response should go. hdr The message header data The message body
Reimplemented from Driver.
References Driver::device_addr, Message::MatchMessage(), and Driver::Publish().
The documentation for this class was generated from the following files:
- clodbuster.h
- clodbuster.cc