MCU
Loading...
Searching...
No Matches
Classes | Functions
test_CASE.h File Reference
#include "TorqueControllers.h"
#include "CASESystem.h"
#include <gtest/gtest.h>
Include dependency graph for test_CASE.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  FakeMessageQueue
 

Functions

void enqueue_matlab_msg (FakeMessageQueue *, const CAN_MESSAGE_BUS &msg)
 
 TEST (CASESystemTesting, test_vn_start_time)
 

Function Documentation

◆ enqueue_matlab_msg()

void enqueue_matlab_msg ( FakeMessageQueue ,
const CAN_MESSAGE_BUS &  msg 
)

Definition at line 13 of file test_CASE.h.

14{
15}

◆ TEST()

TEST ( CASESystemTesting  ,
test_vn_start_time   
)

Definition at line 17 of file test_CASE.h.

18{
19 FakeMessageQueue faked_msg_q;
21
22 // Following used for generated code
23 .AbsoluteTorqueLimit = PhysicalParameters::AMK_MAX_TORQUE, // N-m, Torque limit used for yaw pid torque split overflow
24 .yaw_pid_p = 1.369,
25 .yaw_pid_i = 0.25,
26 .yaw_pid_d = 0.0,
27 .tcs_pid_p_lowerBound_front = 35.0, // if tcs_pid_p_lowerBound_front > tcs_pid_p_upperBound_front, inverse relationship, no error
28 .tcs_pid_p_upperBound_front = 55.0,
29 .tcs_pid_p_lowerBound_rear = 28.0,
30 .tcs_pid_p_upperBound_rear = 35.0,
31 .tcs_pid_i = 0.0,
32 .tcs_pid_d = 0.0,
33 .useLaunch = false,
34 .usePIDTV = true,
35 .useTCSLimitedYawPID = true,
36 .useNormalForce = false,
37 .useTractionControl = true,
38 .usePowerLimit = true,
39 .usePIDPowerLimit = false,
40 .useDecoupledYawBrakes = true,
41 .useDiscontinuousYawPIDBrakes = false,
42 .tcsSLThreshold = 0.2,
43 .launchSL = 0.2,
44 .launchDeadZone = 20.0, // N-m
45 .launchVelThreshold = 0.75, // m/s
46 .tcsVelThreshold = 2.5, // m/s
47 .yawPIDMaxDifferential = 10.0, // N-m
48 .yawPIDErrorThreshold = 0.1, // rad/s
49 .yawPIDVelThreshold = 1.0, // m/s
50 .yawPIDCoastThreshold = 2.5, // m/s
51 .yaw_pid_brakes_p = 0.25,
52 .yaw_pid_brakes_i = 0.0,
53 .yaw_pid_brakes_d = 0.0,
54 .decoupledYawPIDBrakesMaxDIfference = 2, // N-m
55 .discontinuousBrakesPercentThreshold = 0.4,
56 .TorqueMode = PhysicalParameters::AMK_MAX_TORQUE, // N-m
57 .RegenLimit = -10.0, // N-m
58 .useNoRegen5kph = true,
59 .useTorqueBias = true,
60 .DriveTorquePercentFront = 0.5,
61 .BrakeTorquePercentFront = 0.6,
62 .MechPowerMaxkW = 63.0, // kW
63 .launchLeftRightMaxDiff = 2.0, // N-m
64 .tcs_pid_lower_rpm_front = 0.0, // RPM
65 .tcs_pid_upper_rpm_front = 5000.0, // RPM
66 .tcs_pid_lower_rpm_rear = 0.0, // RPM
67 .tcs_pid_upper_rpm_rear = 5000.0, // RPM
68
69 // Following used for calculate_torque_request in CASESystem.tpp
71 .max_regen_torque = PhysicalParameters::AMK_MAX_TORQUE,
73 };
74 CASESystem case_system(&faked_msg_q, 100, 70, 550, case_config);
75}
this class with both take in sensor inputs as well as handle calculations for various derived states ...
Definition: CASESystem.h:97
const float AMK_MAX_TORQUE
TorqueControllerCASEWrapper< CircularBufferType > case_wrapper & case_system
Definition: main.cpp:310
CASEConfiguration case_config
Definition: main.cpp:225
float AbsoluteTorqueLimit
Definition: CASESystem.h:15