#include <SimpleLaunchController.h>
|
| | TorqueControllerSimpleLaunch (float launch_rate, int16_t initial_speed_target) |
| | this launch controller is based off of a specified launch rate and an initial speed target It will ramp up the speed target linearly over time to accelerate More...
|
| |
| | TorqueControllerSimpleLaunch () |
| | base constructor with default values: Default_Launch_Rate = 11.76, DEFAULT_LAUNCH_SPEED_TARGET = 1500(rpm) More...
|
| |
| void | calc_launch_algo (const VectornavData_s &vn_data) override |
| | Increases speed target during launch linearly based off launch rate provided in the constructor. More...
|
| |
| | BaseLaunchController (int16_t initial_speed_target) |
| | Constructor for parent launch controller. More...
|
| |
| void | tick (const SysTick_s &tick, const PedalsSystemData_s &pedalsData, const float wheel_rpms[], const VectornavData_s &vn_data) |
| | ticks launch controller to progress through launch states when conditions are met. The conditions are explained above the launch states enum. all launch controllers use this class' implementation of tick. tick conatains the current system tick controlled by main.cpp pedalsData conatins the brake and accelerator values wheel_rpms[] contains how fast each wheel is spinning, order of wheels in this array is defined in SharedDataTypes.h and Utility.h vn_data contains vector states of the car that will be provided to the calc_launch_algo method called in the LAUNCHING state of this set of modes More...
|
| |
| LaunchStates_e | get_launch_state () |
| |
| virtual void | calc_launch_algo (const VectornavData_s &vn_data)=0 |
| | calculates how speed target (the speed the car is trying to achieve during launch) is set and/or increased during launch This updates internal speed target variable launch_speed_target_ More...
|
| |
| TorqueControllerOutput_s | evaluate (const SharedCarState_s &state) override |
| | all launch controllers share the same evaluate method implemented in this class implementation. More...
|
| |
| virtual TorqueControllerOutput_s | evaluate (const SharedCarState_s &state)=0 |
| | This mehod must be implemented by every controller in the Tc Muxer. This is called in the Muxer whenever the drivetrain command is obtained. TorqueControllerMux.cpp to see that in every tick of the system, the active controller must be ticked through this method. More...
|
| |
Definition at line 14 of file SimpleLaunchController.h.
◆ TorqueControllerSimpleLaunch() [1/2]
| TorqueControllerSimpleLaunch::TorqueControllerSimpleLaunch |
( |
float |
launch_rate, |
|
|
int16_t |
initial_speed_target |
|
) |
| |
|
inline |
this launch controller is based off of a specified launch rate and an initial speed target It will ramp up the speed target linearly over time to accelerate
SIMPLE LAUNCH CONTROLLER
- Parameters
-
| launch_rate | specified launch rate in m/s^2 |
| initial_speed_target | the initial speed commanded to the wheels |
Definition at line 27 of file SimpleLaunchController.h.
float launch_rate_target_
◆ TorqueControllerSimpleLaunch() [2/2]
| TorqueControllerSimpleLaunch::TorqueControllerSimpleLaunch |
( |
| ) |
|
|
inline |
base constructor with default values: Default_Launch_Rate = 11.76, DEFAULT_LAUNCH_SPEED_TARGET = 1500(rpm)
Definition at line 32 of file SimpleLaunchController.h.
TorqueControllerSimpleLaunch()
base constructor with default values: Default_Launch_Rate = 11.76, DEFAULT_LAUNCH_SPEED_TARGET = 1500...
const float DEFAULT_LAUNCH_RATE
const int16_t DEFAULT_LAUNCH_SPEED_TARGET
◆ calc_launch_algo()
| void TorqueControllerSimpleLaunch::calc_launch_algo |
( |
const VectornavData_s & |
vn_data | ) |
|
|
overridevirtual |
Increases speed target during launch linearly based off launch rate provided in the constructor.
- Parameters
-
| vn_data | this data is not necessary for this controller but is supplied according to the interface |
Implements BaseLaunchController.
Definition at line 6 of file LaunchControllerAlgos.cpp.
7{
8
9
10
11
12
13
14
19}
constexpr const float METERS_PER_SECOND_TO_RPM
float launch_speed_target_
int16_t init_speed_target_
◆ launch_rate_target_
| float TorqueControllerSimpleLaunch::launch_rate_target_ |
|
private |
The documentation for this class was generated from the following files: