Kobuki 1.0.0
C++ API for the Kobuki research robot
Loading...
Searching...
No Matches
kobuki::DockDrive Class Reference

Public Member Functions

bool init ()
 
bool isEnabled () const
 
bool canRun () const
 
void enable ()
 
void disable ()
 
void modeShift (const std::string &mode)
 
void update (const std::vector< unsigned char > &signal, const unsigned char &bumper, const unsigned char &charger, const ecl::linear_algebra::Vector3d &pose)
 Updates the odometry from firmware stamps and encoders.
 
void velocityCommands (const double &vx, const double &wz)
 
double getVX () const
 
double getWZ () const
 
RobotDockingState::State getState () const
 
std::string getStateStr () const
 
std::string getDebugStr () const
 
void setMinAbsV (double mav)
 
void setMinAbsW (double maw)
 
std::string getDebugStream ()
 

Protected Member Functions

void processBumpChargeEvent (const unsigned char &bumper, const unsigned char &charger)
 
void computePoseUpdate (ecl::linear_algebra::Vector3d &pose_update, const ecl::linear_algebra::Vector3d &pose)
 compute pose update from previouse pose and current pose
 
void filterIRSensor (std::vector< unsigned char > &signal_filt, const std::vector< unsigned char > &signal)
 pushing into signal into signal window. and go through the signal window to find what has detected
 
void generateDebugMessage (const std::vector< unsigned char > &signal_filt, const unsigned char &bumper, const unsigned char &charger, const std::string &debug_str)
 
void updateVelocity (const std::vector< unsigned char > &signal_filt, const ecl::linear_algebra::Vector3d &pose_update, std::string &debug_str)
 
RobotDockingState::State determineRobotLocation (const std::vector< unsigned char > &signal_filt, const unsigned char &charger)
 
bool validateSignal (const std::vector< unsigned char > &signal_filt, const unsigned int state)
 
void idle (RobotDockingState::State &state, double &vx, double &wz)
 
void scan (RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt, const ecl::linear_algebra::Vector3d &pose_update, std::string &debug_str)
 
void find_stream (RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt)
 
void get_stream (RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt)
 
void aligned (RobotDockingState::State &state, double &vx, double &wz, const std::vector< unsigned char > &signal_filt, std::string &debug_str)
 
void bumped (RobotDockingState::State &nstate, double &nvx, double &nwz, int &bump_count)
 

Member Function Documentation

◆ computePoseUpdate()

void kobuki::DockDrive::computePoseUpdate ( ecl::linear_algebra::Vector3d &  pose_update,
const ecl::linear_algebra::Vector3d &  pose 
)
protected

compute pose update from previouse pose and current pose

Parameters
poseupdate. this variable get filled after this function
pose- current pose

◆ filterIRSensor()

void kobuki::DockDrive::filterIRSensor ( std::vector< unsigned char > &  signal_filt,
const std::vector< unsigned char > &  signal 
)
protected

pushing into signal into signal window. and go through the signal window to find what has detected

Parameters
signal_filt- this get filled out after the function.
signal- the raw data from robot

◆ update()

void kobuki::DockDrive::update ( const std::vector< unsigned char > &  signal,
const unsigned char &  bumper,
const unsigned char &  charger,
const ecl::linear_algebra::Vector3d &  pose 
)

Updates the odometry from firmware stamps and encoders.

Really horrible - could do with an overhaul.

Parameters
dock_irsignal
bumpersensor
chargersensor
currentpose

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