Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
tests.cpp File Reference
#include <chrono>
#include <fstream>
#include "gtest/gtest.h"
#include "inspection_node/inspection_ros.hpp"
#include "rclcpp/rclcpp.hpp"
Include dependency graph for tests.cpp:

Go to the source code of this file.

Functions

double round (double number, int n)
 round to n decimal places
 
 TEST (STEERING, steering1)
 test steering output is sinusoidal
 
 TEST (TORQUE, torque1)
 test torque output control.
 
 TEST (TORQUE, torque2)
 test torque output control.
 
 TEST (TORQUE, torque3)
 test torque output control.
 
 TEST (TORQUE, torque4)
 test control while oscilating the goal velocity.
 
 TEST (CONVERSION, conversion1)
 test conversion from rpm to velocity with constants defined directly
 

Function Documentation

◆ round()

double round ( double  number,
int  n 
)

round to n decimal places

Parameters
numbernumber to round
nnumber of decimal places
Returns
double with n decimal places

Definition at line 17 of file tests.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TEST() [1/6]

TEST ( CONVERSION  ,
conversion1   
)

test conversion from rpm to velocity with constants defined directly

Definition at line 130 of file tests.cpp.

◆ TEST() [2/6]

TEST ( STEERING  ,
steering1   
)

test steering output is sinusoidal

Definition at line 27 of file tests.cpp.

◆ TEST() [3/6]

TEST ( TORQUE  ,
torque1   
)

test torque output control.

Initial velocity greater than target.

Definition at line 41 of file tests.cpp.

◆ TEST() [4/6]

TEST ( TORQUE  ,
torque2   
)

test torque output control.

Initial velocity smaller than target.

Definition at line 56 of file tests.cpp.

◆ TEST() [5/6]

TEST ( TORQUE  ,
torque3   
)

test torque output control.

Initial velocity similar to ideal velocity.

Definition at line 71 of file tests.cpp.

◆ TEST() [6/6]

TEST ( TORQUE  ,
torque4   
)

test control while oscilating the goal velocity.

Definition at line 86 of file tests.cpp.