ClodBuster Class Reference
Inheritance diagram for ClodBuster:

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 | 
| 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.
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] | 
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.
Definition at line 256 of file clodbuster.cc.
References GRASPPacket::Build(), clodbuster_fd, Driver::device_addr, direct_command_control, player_position2d_speed_pid_req::kd, kd, player_position2d_speed_pid_req::ki, ki, player_position2d_speed_pid_req::kp, kp, Message::MatchMessage(), newmotorspeed, newmotorturn, 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_data::pos, player_position2d_geom::pose, player_position2d_set_odom_req::pose, position_data, Driver::Publish(), player_pose2d::px, player_pose3d::px, player_pose3d::py, player_pose3d::pyaw, ResetRawPositions(), GRASPPacket::Send(), player_position2d_geom::size, player_bbox3d::sl, speedDemand, player_position2d_power_config::state, player_bbox3d::sw, turnRateDemand, player_position2d_velocity_mode_config::value, and player_position2d_cmd_vel::vel.
Here is the call graph for this function:

| 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:
