#include <dock_drive.hpp>
Public Types | |
enum | State { IDLE, LOST, UNKNOWN, INSIDE_FIELD, AWAY, SCAN, SPIN, SPIRAL, FIND_STREAM, GET_STREAM, ALIGNED, ALIGNED_FAR, ALIGNED_NEAR, BUMPED, BUMPED_DOCK, RUN, STOP, DOCKED_IN, DONE } |
enum | Station { NEAR_LEFT = 1, NEAR_CENTER = 2, NEAR_RIGHT = 4, FAR_CENTER = 8, FAR_LEFT = 16, FAR_RIGHT = 32, NEAR = 7, FAR = 56 } |
Public Member Functions | |
bool | canRun () const |
void | disable () |
DockDrive () | |
void | enable () |
std::string | getDebugStr () const |
std::string | getDebugStream () |
State | getState () const |
std::string | getStateStr () const |
double | getVX () const |
double | getWZ () const |
bool | init () |
bool | isEnabled () const |
void | modeShift (const std::string &mode) |
void | setMinAbsV (double mav) |
void | setMinAbsW (double maw) |
void | update (const std::vector< unsigned char > &signal, const unsigned char &bumper, const unsigned char &charger, const ecl::Pose2D< double > &pose) |
void | update (const std::vector< unsigned char > &signal, const unsigned char &bumper, const unsigned char &charger, const ecl::Pose2D< double > &pose_update, const ecl::linear_algebra::Vector3d &pose_update_rates) |
Updates the odometry from firmware stamps and encoders. | |
void | velocityCommands (const double &vx, const double &wz) |
~DockDrive () | |
Private Member Functions | |
std::string | binary (unsigned char number) const |
void | setVel (double v, double w) |
Private Attributes | |
int | bump_remainder |
bool | can_run |
std::string | debug_output |
std::string | debug_str |
int | dock_detector |
int | dock_stabilizer |
bool | is_enabled |
double | min_abs_v |
double | min_abs_w |
std::vector< std::vector < unsigned char > > | past_signals |
double | rotated |
State | state |
std::string | state_str |
double | vx |
double | wz |
Definition at line 64 of file dock_drive.hpp.
IDLE | |
LOST | |
UNKNOWN | |
INSIDE_FIELD | |
AWAY | |
SCAN | |
SPIN | |
SPIRAL | |
FIND_STREAM | |
GET_STREAM | |
ALIGNED | |
ALIGNED_FAR | |
ALIGNED_NEAR | |
BUMPED | |
BUMPED_DOCK | |
RUN | |
STOP | |
DOCKED_IN | |
DONE |
Definition at line 76 of file dock_drive.hpp.
Definition at line 66 of file dock_drive.hpp.
Definition at line 58 of file dock_drive.cpp.
Definition at line 71 of file dock_drive.cpp.
std::string kobuki::DockDrive::binary | ( | unsigned char | number | ) | const [private] |
Definition at line 341 of file dock_drive.cpp.
bool kobuki::DockDrive::canRun | ( | ) | const [inline] |
Definition at line 103 of file dock_drive.hpp.
void kobuki::DockDrive::disable | ( | ) | [inline] |
Definition at line 106 of file dock_drive.hpp.
void kobuki::DockDrive::enable | ( | ) | [inline] |
Definition at line 105 of file dock_drive.hpp.
std::string kobuki::DockDrive::getDebugStr | ( | ) | const [inline] |
Definition at line 133 of file dock_drive.hpp.
std::string kobuki::DockDrive::getDebugStream | ( | ) | [inline] |
Definition at line 142 of file dock_drive.hpp.
State kobuki::DockDrive::getState | ( | ) | const [inline] |
Definition at line 131 of file dock_drive.hpp.
std::string kobuki::DockDrive::getStateStr | ( | ) | const [inline] |
Definition at line 132 of file dock_drive.hpp.
double kobuki::DockDrive::getVX | ( | ) | const [inline] |
Definition at line 125 of file dock_drive.hpp.
double kobuki::DockDrive::getWZ | ( | ) | const [inline] |
Definition at line 126 of file dock_drive.hpp.
bool kobuki::DockDrive::init | ( | ) | [inline] |
Definition at line 101 of file dock_drive.hpp.
bool kobuki::DockDrive::isEnabled | ( | ) | const [inline] |
Definition at line 102 of file dock_drive.hpp.
void kobuki::DockDrive::modeShift | ( | const std::string & | mode | ) |
Definition at line 79 of file dock_drive.cpp.
void kobuki::DockDrive::setMinAbsV | ( | double | mav | ) | [inline] |
Definition at line 138 of file dock_drive.hpp.
void kobuki::DockDrive::setMinAbsW | ( | double | maw | ) | [inline] |
Definition at line 139 of file dock_drive.hpp.
void kobuki::DockDrive::setVel | ( | double | v, |
double | w | ||
) | [private] |
Definition at line 73 of file dock_drive.cpp.
void kobuki::DockDrive::update | ( | const std::vector< unsigned char > & | signal, |
const unsigned char & | bumper, | ||
const unsigned char & | charger, | ||
const ecl::Pose2D< double > & | pose | ||
) |
Definition at line 87 of file dock_drive.cpp.
void kobuki::DockDrive::update | ( | const std::vector< unsigned char > & | signal, |
const unsigned char & | bumper, | ||
const unsigned char & | charger, | ||
const ecl::Pose2D< double > & | pose_update, | ||
const ecl::linear_algebra::Vector3d & | pose_update_rates | ||
) |
Updates the odometry from firmware stamps and encoders.
Really horrible - could do with an overhaul.
time_stamp | |
left_encoder | |
right_encoder | |
pose_update | |
pose_update_rates |
Definition at line 117 of file dock_drive.cpp.
void kobuki::DockDrive::velocityCommands | ( | const double & | vx, |
const double & | wz | ||
) |
Definition at line 334 of file dock_drive.cpp.
int kobuki::DockDrive::bump_remainder [private] |
Definition at line 155 of file dock_drive.hpp.
bool kobuki::DockDrive::can_run [private] |
Definition at line 149 of file dock_drive.hpp.
std::string kobuki::DockDrive::debug_output [private] |
Definition at line 166 of file dock_drive.hpp.
std::string kobuki::DockDrive::debug_str [private] |
Definition at line 152 of file dock_drive.hpp.
int kobuki::DockDrive::dock_detector [private] |
Definition at line 157 of file dock_drive.hpp.
int kobuki::DockDrive::dock_stabilizer [private] |
Definition at line 156 of file dock_drive.hpp.
bool kobuki::DockDrive::is_enabled [private] |
Definition at line 149 of file dock_drive.hpp.
double kobuki::DockDrive::min_abs_v [private] |
Definition at line 159 of file dock_drive.hpp.
double kobuki::DockDrive::min_abs_w [private] |
Definition at line 160 of file dock_drive.hpp.
std::vector<std::vector<unsigned char> > kobuki::DockDrive::past_signals [private] |
Definition at line 154 of file dock_drive.hpp.
double kobuki::DockDrive::rotated [private] |
Definition at line 158 of file dock_drive.hpp.
State kobuki::DockDrive::state [private] |
Definition at line 151 of file dock_drive.hpp.
std::string kobuki::DockDrive::state_str [private] |
Definition at line 152 of file dock_drive.hpp.
double kobuki::DockDrive::vx [private] |
Definition at line 153 of file dock_drive.hpp.
double kobuki::DockDrive::wz [private] |
Definition at line 153 of file dock_drive.hpp.