Public Member Functions | Public Attributes | Private Member Functions | List of all members
openrover::OdomControl Class Reference

#include <odom_control.hpp>

Public Member Functions

 OdomControl ()
 
 OdomControl (bool use_control, PidGains pid_gains, int max, int min, std::ofstream *fs)
 
 OdomControl (bool use_control, PidGains pid_gains, int max, int min)
 
void reset ()
 
unsigned char run (bool e_stop_on, bool control_on, double commanded_vel, double measured_vel, double dt)
 
void start (bool use_control, PidGains pid_gains, int max, int min)
 

Public Attributes

bool at_max_motor_speed_
 
bool at_min_motor_speed_
 
unsigned char deadband_offset_
 
double differential_error_
 
std::ofstream * fs_
 
double integral_error_
 
double K_D_
 
double K_I_
 
double K_P_
 
double MAX_ACCEL_CUTOFF_
 
double MAX_VELOCITY_
 
double MIN_VELOCITY_
 
int MOTOR_DEADBAND_
 
int MOTOR_MAX_
 
int MOTOR_MIN_
 
int motor_speed_
 
bool skip_measurement_
 
bool stop_integrating_
 
bool use_control_
 
double velocity_commanded_
 
bool velocity_control_on_
 
double velocity_error_
 
double velocity_filtered_
 
std::vector< double > velocity_filtered_history_
 
std::vector< double > velocity_history_
 
double velocity_measured_
 

Private Member Functions

int boundMotorSpeed (int motor_speed, int max, int min)
 
double D (double error, double dt)
 
int deadbandOffset (int motor_speed, int deadband_offset)
 
int feedThroughControl ()
 
double filter (double left_motor_vel, double dt)
 
bool hasZeroHistory (const std::vector< double > &vel_history)
 
double I (double error, double dt)
 
double P (double error, double dt)
 
int PID (double error, double dt)
 
void velocityController ()
 

Detailed Description

Definition at line 11 of file odom_control.hpp.

Constructor & Destructor Documentation

openrover::OdomControl::OdomControl ( )

Definition at line 21 of file odom_control.cpp.

openrover::OdomControl::OdomControl ( bool  use_control,
PidGains  pid_gains,
int  max,
int  min,
std::ofstream *  fs 
)

Definition at line 51 of file odom_control.cpp.

openrover::OdomControl::OdomControl ( bool  use_control,
PidGains  pid_gains,
int  max,
int  min 
)

Definition at line 86 of file odom_control.cpp.

Member Function Documentation

int openrover::OdomControl::boundMotorSpeed ( int  motor_speed,
int  max,
int  min 
)
private

Definition at line 239 of file odom_control.cpp.

double openrover::OdomControl::D ( double  error,
double  dt 
)
private

Definition at line 209 of file odom_control.cpp.

int openrover::OdomControl::deadbandOffset ( int  motor_speed,
int  deadband_offset 
)
private

Definition at line 262 of file odom_control.cpp.

int openrover::OdomControl::feedThroughControl ( )
private

Definition at line 170 of file odom_control.cpp.

double openrover::OdomControl::filter ( double  left_motor_vel,
double  dt 
)
private

Definition at line 275 of file odom_control.cpp.

bool openrover::OdomControl::hasZeroHistory ( const std::vector< double > &  vel_history)
private

Definition at line 230 of file odom_control.cpp.

double openrover::OdomControl::I ( double  error,
double  dt 
)
private

Definition at line 215 of file odom_control.cpp.

double openrover::OdomControl::P ( double  error,
double  dt 
)
private

Definition at line 224 of file odom_control.cpp.

int openrover::OdomControl::PID ( double  error,
double  dt 
)
private

Definition at line 187 of file odom_control.cpp.

void openrover::OdomControl::reset ( )

Definition at line 175 of file odom_control.cpp.

unsigned char openrover::OdomControl::run ( bool  e_stop_on,
bool  control_on,
double  commanded_vel,
double  measured_vel,
double  dt 
)

Definition at line 116 of file odom_control.cpp.

void openrover::OdomControl::start ( bool  use_control,
PidGains  pid_gains,
int  max,
int  min 
)

Definition at line 14 of file odom_control.cpp.

void openrover::OdomControl::velocityController ( )
private

Member Data Documentation

bool openrover::OdomControl::at_max_motor_speed_

Definition at line 36 of file odom_control.hpp.

bool openrover::OdomControl::at_min_motor_speed_

Definition at line 37 of file odom_control.hpp.

unsigned char openrover::OdomControl::deadband_offset_

Definition at line 53 of file odom_control.hpp.

double openrover::OdomControl::differential_error_

Definition at line 48 of file odom_control.hpp.

std::ofstream* openrover::OdomControl::fs_

Definition at line 41 of file odom_control.hpp.

double openrover::OdomControl::integral_error_

Definition at line 47 of file odom_control.hpp.

double openrover::OdomControl::K_D_

Definition at line 46 of file odom_control.hpp.

double openrover::OdomControl::K_I_

Definition at line 45 of file odom_control.hpp.

double openrover::OdomControl::K_P_

Definition at line 44 of file odom_control.hpp.

double openrover::OdomControl::MAX_ACCEL_CUTOFF_

Definition at line 29 of file odom_control.hpp.

double openrover::OdomControl::MAX_VELOCITY_

Definition at line 31 of file odom_control.hpp.

double openrover::OdomControl::MIN_VELOCITY_

Definition at line 30 of file odom_control.hpp.

int openrover::OdomControl::MOTOR_DEADBAND_

Definition at line 27 of file odom_control.hpp.

int openrover::OdomControl::MOTOR_MAX_

Definition at line 25 of file odom_control.hpp.

int openrover::OdomControl::MOTOR_MIN_

Definition at line 26 of file odom_control.hpp.

int openrover::OdomControl::motor_speed_

Definition at line 52 of file odom_control.hpp.

bool openrover::OdomControl::skip_measurement_

Definition at line 62 of file odom_control.hpp.

bool openrover::OdomControl::stop_integrating_

Definition at line 38 of file odom_control.hpp.

bool openrover::OdomControl::use_control_

Definition at line 33 of file odom_control.hpp.

double openrover::OdomControl::velocity_commanded_

Definition at line 56 of file odom_control.hpp.

bool openrover::OdomControl::velocity_control_on_

Definition at line 61 of file odom_control.hpp.

double openrover::OdomControl::velocity_error_

Definition at line 49 of file odom_control.hpp.

double openrover::OdomControl::velocity_filtered_

Definition at line 58 of file odom_control.hpp.

std::vector<double> openrover::OdomControl::velocity_filtered_history_

Definition at line 59 of file odom_control.hpp.

std::vector<double> openrover::OdomControl::velocity_history_

Definition at line 60 of file odom_control.hpp.

double openrover::OdomControl::velocity_measured_

Definition at line 57 of file odom_control.hpp.


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


rr_openrover_driver
Author(s): Jack Kilian
autogenerated on Thu Sep 10 2020 03:38:39