17 std::string log_filename);
20 unsigned char run(
bool e_stop_on,
bool control_on,
double commanded_vel,
double measured_vel,
22 void start(
bool use_control,
PidGains pid_gains,
int max,
int min);
68 double filter(
double left_motor_vel,
double dt);
72 double P(
double error,
double dt);
73 double I(
double error,
double dt);
74 double D(
double error,
double dt);
75 int PID(
double error,
double dt);
bool hasZeroHistory(const std::vector< double > &vel_history)
const double MIN_VELOCITY_
int deadbandOffset(int motor_speed, int deadband_offset)
unsigned char deadband_offset_
double D(double error, double dt)
std::vector< double > velocity_history_
int PID(double error, double dt)
void velocityController()
const double MAX_VELOCITY_
int boundMotorSpeed(int motor_speed, int max, int min)
double I(double error, double dt)
bool velocity_control_on_
double velocity_filtered_
void start(bool use_control, PidGains pid_gains, int max, int min)
double P(double error, double dt)
double filter(double left_motor_vel, double dt)
bool enable_file_logging_
unsigned char run(bool e_stop_on, bool control_on, double commanded_vel, double measured_vel, double dt)
const double MAX_ACCEL_CUTOFF_
double velocity_commanded_
std::string log_filename_
const int MOTOR_DEADBAND_
double velocity_measured_