1#ifndef INSPECTION_FUNCTIONS_HPP
2#define INSPECTION_FUNCTIONS_HPP
4#define MAX_THROTTLE (1.0)
91 double finish_time,
bool start_and_stop,
double gain = 0.0,
92 double ideal_velocity = 0.0);
void redefine_goal_velocity(double current_velocity)
used when in oscilation mode to redefine the ideal velocity
double calculate_throttle(double current_velocity) const
calculate torque output according to velocity
bool stop_oscilating_
Used to stop the oscilation near zero and avoid violent wheel movements.
double throttle_to_adequate_range(double throttle) const
convert the throttle to a range between -1 and 1
double current_goal_velocity_
double rpm_to_velocity(double rpm) const
convert rpm [rotations/minute] to velocity [m/s]
double calculate_steering(double time) const
calculate the steering angle according to time
InspectionFunctions()
Construct a new Inspection Functions object.
constexpr double WHEELS_STOPPED_THRESHOLD