ClodBuster Class Reference

Inheritance diagram for ClodBuster:

Inheritance graph
[legend]
Collaboration diagram for ClodBuster:

Collaboration graph
[legend]
List of all members.

Detailed Description

Definition at line 128 of file clodbuster.h.


Public Member Functions

 ClodBuster (ConfigFile *cf, int section)
virtual ~ClodBuster ()
virtual void Main ()
 Main method for driver thread.
int ProcessMessage (QueuePointer &resp_queue, player_msghdr *hdr, void *data)
 Message handler.
virtual int Setup ()
 Initialize the driver.
virtual int Shutdown ()
 Finalize the driver.
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
PIDGainsKv
PIDGainsKw

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.

Reimplemented from Driver.

Definition at line 366 of file clodbuster.cc.

References center_limits, Driver::device_addr, DifferenceEncoders(), direct_command_control, encoder_measurement, EncOmega, EncV, GetGraspBoardParams(), IntegrateEncoders(), PIDGains::K1(), PIDGains::K2(), PIDGains::K3(), Kv, Kw, max_limits, min_limits, old_encoder_measurement, PLAYER_MSGTYPE_DATA, PLAYER_POSITION2D_DATA_STATE, Driver::ProcessMessages(), Driver::Publish(), ReadEncoders(), SetServo(), speedDemand, turnRateDemand, and WheelBase.

Here is the call graph for this function:

int ClodBuster::ProcessMessage ( QueuePointer resp_queue,
player_msghdr hdr,
void *  data 
) [virtual]

int ClodBuster::Setup (  )  [virtual]

Initialize the driver.

This function is called with the first client subscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

Definition at line 146 of file clodbuster.cc.

References GRASPPacket::Build(), clodbuster_fd, clodbuster_serial_port, direct_command_control, ResetRawPositions(), and GRASPPacket::Send().

Here is the call graph for this function:

int ClodBuster::Shutdown (  )  [virtual]

Finalize the driver.

This function is called with the last client unsubscribes; it MUST be implemented by the driver.

Returns:
Returns 0 on success.

Implements Driver.

Definition at line 232 of file clodbuster.cc.

References GRASPPacket::Build(), clodbuster_fd, GRASPPacket::Send(), and Driver::StopThread().

Here is the call graph for this function:


The documentation for this class was generated from the following files:

Last updated 12 September 2005 21:38:45