|
Formula Student Autonomous Systems
The code for the main driverless system
|
#include <inspection_functions.hpp>

Public Member Functions | |
| double | calculate_steering (double time) const |
| calculate the steering angle according to time | |
| double | calculate_throttle (double current_velocity) const |
| calculate torque output according to velocity | |
| double | rpm_to_velocity (double rpm) const |
| convert rpm [rotations/minute] to velocity [m/s] | |
| void | redefine_goal_velocity (double current_velocity) |
| used when in oscilation mode to redefine the ideal velocity | |
| double | throttle_to_adequate_range (double throttle) const |
| convert the throttle to a range between -1 and 1 | |
| InspectionFunctions () | |
| Construct a new Inspection Functions object. | |
| InspectionFunctions (double max_angle, double turning_period, double wheel_radius, double finish_time, bool start_and_stop, double gain=0.0, double ideal_velocity=0.0) | |
| Construct a new Inspection Mission with constants to be defined by input. | |
Public Attributes | |
| double | max_angle_ = MAX_ANGLE |
| double | ideal_velocity_ = 2.0 |
| double | turning_period_ = 4.0 |
| double | wheel_radius_ = 0.254 |
| double | gain_ = 0.05 |
| double | finish_time_ = 26.0 |
| double | current_goal_velocity_ = 1.0 |
| bool | start_and_stop_ = false |
| bool | stop_oscilating_ = false |
| Used to stop the oscilation near zero and avoid violent wheel movements. | |
Definition at line 15 of file inspection_functions.hpp.
|
default |
Construct a new Inspection Functions object.
| InspectionFunctions::InspectionFunctions | ( | double | max_angle, |
| double | turning_period, | ||
| double | wheel_radius, | ||
| double | finish_time, | ||
| bool | start_and_stop, | ||
| double | gain = 0.0, |
||
| double | ideal_velocity = 0.0 |
||
| ) |
Construct a new Inspection Mission with constants to be defined by input.
| max_angle | maximum turning angle for the wheels in the inspection script [rad] |
| ebs_test_ideal_velocity | ideal velocity of the wheels for the ebs test [m/s] |
| inspection_ideal_velocity | ideal velocity of the wheels for the inspection [m/s] |
| turning_period | time it takes for the wheels to turn in inspecion script [s] |
| wheel_radius | radius of the wheels of the car to estimate velocity [m] |
| inspection_gain | constant for the controller in the inspection |
| ebs_test_gain | constant for the controller in the ebs test |
| finish_time | time until the end of the program [s] |
| start_and_stop | whether to make the car accelerate and brake multiple times (true) or just once (false) |
Definition at line 4 of file inspection_functions.cpp.
| double InspectionFunctions::calculate_steering | ( | double | time | ) | const |
calculate the steering angle according to time
| time | in seconds |
Definition at line 30 of file inspection_functions.cpp.

| double InspectionFunctions::calculate_throttle | ( | double | current_velocity | ) | const |
calculate torque output according to velocity
| velocity |
Definition at line 24 of file inspection_functions.cpp.

| void InspectionFunctions::redefine_goal_velocity | ( | double | current_velocity | ) |
used when in oscilation mode to redefine the ideal velocity
| current_velocity | [m/s] |
Definition at line 41 of file inspection_functions.cpp.

| double InspectionFunctions::rpm_to_velocity | ( | double | rpm | ) | const |
convert rpm [rotations/minute] to velocity [m/s]
| rpm | rotations per minute |
Definition at line 19 of file inspection_functions.cpp.

| double InspectionFunctions::throttle_to_adequate_range | ( | double | throttle | ) | const |
convert the throttle to a range between -1 and 1
| throttle | original throttle value |
Definition at line 34 of file inspection_functions.cpp.

| double InspectionFunctions::current_goal_velocity_ = 1.0 |
Definition at line 24 of file inspection_functions.hpp.
| double InspectionFunctions::finish_time_ = 26.0 |
Definition at line 23 of file inspection_functions.hpp.
| double InspectionFunctions::gain_ = 0.05 |
Definition at line 22 of file inspection_functions.hpp.
| double InspectionFunctions::ideal_velocity_ = 2.0 |
Definition at line 19 of file inspection_functions.hpp.
| double InspectionFunctions::max_angle_ = MAX_ANGLE |
Definition at line 18 of file inspection_functions.hpp.
| bool InspectionFunctions::start_and_stop_ = false |
Definition at line 25 of file inspection_functions.hpp.
| bool InspectionFunctions::stop_oscilating_ = false |
Used to stop the oscilation near zero and avoid violent wheel movements.
Definition at line 28 of file inspection_functions.hpp.
| double InspectionFunctions::turning_period_ = 4.0 |
Definition at line 20 of file inspection_functions.hpp.
| double InspectionFunctions::wheel_radius_ = 0.254 |
Definition at line 21 of file inspection_functions.hpp.