#include <LookupLaunchController.h>
|
| | TorqueControllerLookupLaunch (int16_t initial_speed_target) |
| |
| | TorqueControllerLookupLaunch () |
| | default constructor for slip launch controller: DEFAULT_LAUNCH_SPEED_TARGET = 1500(rpm) More...
|
| |
| void | calc_launch_algo (const VectornavData_s &vn_data) override |
| | increases speed target based on distance from start to ensure the speed target is progressing as the car begins to move 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 10 of file LookupLaunchController.h.
◆ TorqueControllerLookupLaunch() [1/2]
| TorqueControllerLookupLaunch::TorqueControllerLookupLaunch |
( |
int16_t |
initial_speed_target | ) |
|
|
inline |
Lookup Launch Controller This launch controller is based off of a matlab and symlink generated lookup table. This has been converted to a C array with some basic python code using the array index as the input for the controller
- Parameters
-
| initial_speed_target | the initial speed commanded to the wheels |
Definition at line 23 of file LookupLaunchController.h.
◆ TorqueControllerLookupLaunch() [2/2]
| TorqueControllerLookupLaunch::TorqueControllerLookupLaunch |
( |
| ) |
|
|
inline |
default constructor for slip launch controller: DEFAULT_LAUNCH_SPEED_TARGET = 1500(rpm)
Definition at line 26 of file LookupLaunchController.h.
TorqueControllerLookupLaunch()
default constructor for slip launch controller: DEFAULT_LAUNCH_SPEED_TARGET = 1500(rpm)
const int16_t DEFAULT_LAUNCH_SPEED_TARGET
◆ calc_launch_algo()
| void TorqueControllerLookupLaunch::calc_launch_algo |
( |
const VectornavData_s & |
vn_data | ) |
|
|
overridevirtual |
increases speed target based on distance from start to ensure the speed target is progressing as the car begins to move
Implements BaseLaunchController.
Definition at line 21 of file LaunchControllerAlgos.cpp.
22{
23
25
29
30 double distance = sqrt((dx * dx) + (dy * dy) + (dz * dz));
31
32
33
34
35
36
37
38
39
40 uint32_t idx = (uint32_t)(distance * 10);
41 idx = std::min(idx, (uint32_t)(
sizeof(
vel_dist_lookup) /
sizeof(
float)));
43
46}
constexpr const float METERS_PER_SECOND_TO_RPM
const float vel_dist_lookup[750]
float launch_speed_target_
◆ init_position
| bool TorqueControllerLookupLaunch::init_position = false |
|
private |
The documentation for this class was generated from the following files: