Public Member Functions | Private Member Functions | Private Attributes | List of all members
kobuki::DiffDrive Class Reference

#include <diff_drive.hpp>

Public Member Functions

 DiffDrive ()
 
void getWheelJointStates (double &wheel_left_angle, double &wheel_left_angle_rate, double &wheel_right_angle, double &wheel_right_angle_rate)
 
const ecl::DifferentialDrive::Kinematicskinematics ()
 
std::vector< double > pointVelocity () const
 
void reset ()
 
void setVelocityCommands (const double &vx, const double &wz)
 
void update (const uint16_t &time_stamp, const uint16_t &left_encoder, const uint16_t &right_encoder, ecl::LegacyPose2D< double > &pose_update, ecl::linear_algebra::Vector3d &pose_update_rates)
 Updates the odometry from firmware stamps and encoders. More...
 
std::vector< short > velocityCommands ()
 
void velocityCommands (const double &vx, const double &wz)
 
void velocityCommands (const short &cmd_speed, const short &cmd_radius)
 
void velocityCommands (const std::vector< double > &cmd)
 
void velocityCommands (const std::vector< short > &cmd)
 
double wheel_bias () const
 

Private Member Functions

short bound (const double &value)
 

Private Attributes

double bias
 
ecl::DifferentialDrive::Kinematics diff_drive_kinematics
 
int imu_heading_offset
 
double last_diff_time
 
double last_rad_left
 
double last_rad_right
 
unsigned short last_tick_left
 
unsigned short last_tick_right
 
unsigned short last_timestamp
 
double last_velocity_left
 
double last_velocity_right
 
std::vector< double > point_velocity
 
double radius
 
double speed
 
ecl::Mutex state_mutex
 
const double tick_to_rad
 
ecl::Mutex velocity_mutex
 
double wheel_radius
 

Detailed Description

Definition at line 44 of file diff_drive.hpp.

Constructor & Destructor Documentation

◆ DiffDrive()

kobuki::DiffDrive::DiffDrive ( )

Definition at line 29 of file diff_drive.cpp.

Member Function Documentation

◆ bound()

short kobuki::DiffDrive::bound ( const double &  value)
private

Definition at line 194 of file diff_drive.cpp.

◆ getWheelJointStates()

void kobuki::DiffDrive::getWheelJointStates ( double &  wheel_left_angle,
double &  wheel_left_angle_rate,
double &  wheel_right_angle,
double &  wheel_right_angle_rate 
)

Definition at line 121 of file diff_drive.cpp.

◆ kinematics()

const ecl::DifferentialDrive::Kinematics& kobuki::DiffDrive::kinematics ( )
inline

Definition at line 55 of file diff_drive.hpp.

◆ pointVelocity()

std::vector< double > kobuki::DiffDrive::pointVelocity ( ) const

Definition at line 190 of file diff_drive.cpp.

◆ reset()

void kobuki::DiffDrive::reset ( )

Definition at line 112 of file diff_drive.cpp.

◆ setVelocityCommands()

void kobuki::DiffDrive::setVelocityCommands ( const double &  vx,
const double &  wz 
)

Definition at line 131 of file diff_drive.cpp.

◆ update()

void kobuki::DiffDrive::update ( const uint16_t &  time_stamp,
const uint16_t &  left_encoder,
const uint16_t &  right_encoder,
ecl::LegacyPose2D< double > &  pose_update,
ecl::linear_algebra::Vector3d pose_update_rates 
)

Updates the odometry from firmware stamps and encoders.

Really horrible - could do with an overhaul.

Parameters
time_stamp
left_encoder
right_encoder
pose_update
pose_update_rates

Definition at line 59 of file diff_drive.cpp.

◆ velocityCommands() [1/5]

std::vector< short > kobuki::DiffDrive::velocityCommands ( )

Definition at line 181 of file diff_drive.cpp.

◆ velocityCommands() [2/5]

void kobuki::DiffDrive::velocityCommands ( const double &  vx,
const double &  wz 
)

Definition at line 140 of file diff_drive.cpp.

◆ velocityCommands() [3/5]

void kobuki::DiffDrive::velocityCommands ( const short &  cmd_speed,
const short &  cmd_radius 
)

Definition at line 173 of file diff_drive.cpp.

◆ velocityCommands() [4/5]

void kobuki::DiffDrive::velocityCommands ( const std::vector< double > &  cmd)
inline

Definition at line 67 of file diff_drive.hpp.

◆ velocityCommands() [5/5]

void kobuki::DiffDrive::velocityCommands ( const std::vector< short > &  cmd)
inline

Definition at line 68 of file diff_drive.hpp.

◆ wheel_bias()

double kobuki::DiffDrive::wheel_bias ( ) const
inline

Definition at line 79 of file diff_drive.hpp.

Member Data Documentation

◆ bias

double kobuki::DiffDrive::bias
private

Definition at line 93 of file diff_drive.hpp.

◆ diff_drive_kinematics

ecl::DifferentialDrive::Kinematics kobuki::DiffDrive::diff_drive_kinematics
private

Definition at line 98 of file diff_drive.hpp.

◆ imu_heading_offset

int kobuki::DiffDrive::imu_heading_offset
private

Definition at line 95 of file diff_drive.hpp.

◆ last_diff_time

double kobuki::DiffDrive::last_diff_time
private

Definition at line 84 of file diff_drive.hpp.

◆ last_rad_left

double kobuki::DiffDrive::last_rad_left
private

Definition at line 87 of file diff_drive.hpp.

◆ last_rad_right

double kobuki::DiffDrive::last_rad_right
private

Definition at line 87 of file diff_drive.hpp.

◆ last_tick_left

unsigned short kobuki::DiffDrive::last_tick_left
private

Definition at line 86 of file diff_drive.hpp.

◆ last_tick_right

unsigned short kobuki::DiffDrive::last_tick_right
private

Definition at line 86 of file diff_drive.hpp.

◆ last_timestamp

unsigned short kobuki::DiffDrive::last_timestamp
private

Definition at line 82 of file diff_drive.hpp.

◆ last_velocity_left

double kobuki::DiffDrive::last_velocity_left
private

Definition at line 83 of file diff_drive.hpp.

◆ last_velocity_right

double kobuki::DiffDrive::last_velocity_right
private

Definition at line 83 of file diff_drive.hpp.

◆ point_velocity

std::vector<double> kobuki::DiffDrive::point_velocity
private

Definition at line 90 of file diff_drive.hpp.

◆ radius

double kobuki::DiffDrive::radius
private

Definition at line 91 of file diff_drive.hpp.

◆ speed

double kobuki::DiffDrive::speed
private

Definition at line 92 of file diff_drive.hpp.

◆ state_mutex

ecl::Mutex kobuki::DiffDrive::state_mutex
private

Definition at line 99 of file diff_drive.hpp.

◆ tick_to_rad

const double kobuki::DiffDrive::tick_to_rad
private

Definition at line 96 of file diff_drive.hpp.

◆ velocity_mutex

ecl::Mutex kobuki::DiffDrive::velocity_mutex
private

Definition at line 99 of file diff_drive.hpp.

◆ wheel_radius

double kobuki::DiffDrive::wheel_radius
private

Definition at line 94 of file diff_drive.hpp.


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


kobuki_driver
Author(s): Daniel Stonier , Younghun Ju , Jorge Santos Simon
autogenerated on Wed Mar 2 2022 00:26:14