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 PLAYER_MSGTYPE_DATA, and PLAYER_POSITION2D_DATA_STATE.
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 player_position2d_speed_pid_req::kd, player_position2d_speed_pid_req::ki, player_position2d_speed_pid_req::kp, Message::MatchMessage(), player_pose2d::pa, PLAYER_MSGTYPE_CMD, PLAYER_MSGTYPE_REQ, PLAYER_MSGTYPE_RESP_ACK, PLAYER_POSITION2D_CMD_VEL, PLAYER_POSITION2D_REQ_GET_GEOM, PLAYER_POSITION2D_REQ_MOTOR_POWER, PLAYER_POSITION2D_REQ_RESET_ODOM, PLAYER_POSITION2D_REQ_SET_ODOM, PLAYER_POSITION2D_REQ_SPEED_PID, PLAYER_POSITION2D_REQ_VELOCITY_MODE, player_position2d_geom::pose, player_position2d_set_odom_req::pose, player_pose2d::px, player_pose3d::px, player_pose3d::py, player_pose3d::pyaw, player_position2d_geom::size, player_msghdr::size, player_bbox3d::sl, player_position2d_power_config::state, player_bbox3d::sw, player_position2d_velocity_mode_config::value, and player_position2d_cmd_vel::vel.
The documentation for this class was generated from the following files:
- clodbuster.h
- clodbuster.cc