PX4 Firmware
PX4 Autopilot Software http://px4.io
CollisionPreventionTest.cpp File Reference
#include <gtest/gtest.h>
#include "CollisionPrevention.hpp"
Include dependency graph for CollisionPreventionTest.cpp:

Go to the source code of this file.

Classes

class  CollisionPreventionTest
 
class  TestCollisionPrevention
 
class  TestTimingCollisionPrevention
 

Functions

 TEST_F (CollisionPreventionTest, instantiation)
 
 TEST_F (CollisionPreventionTest, behaviorOff)
 
 TEST_F (CollisionPreventionTest, noSensorData)
 
 TEST_F (CollisionPreventionTest, testBehaviorOnWithObstacleMessage)
 
 TEST_F (CollisionPreventionTest, testBehaviorOnWithDistanceMessage)
 
 TEST_F (CollisionPreventionTest, testPurgeOldData)
 
 TEST_F (CollisionPreventionTest, testNoRangeData)
 
 TEST_F (CollisionPreventionTest, noBias)
 
 TEST_F (CollisionPreventionTest, outsideFOV)
 
 TEST_F (CollisionPreventionTest, goNoData)
 
 TEST_F (CollisionPreventionTest, jerkLimit)
 
 TEST_F (CollisionPreventionTest, addDistanceSensorData)
 
 TEST_F (CollisionPreventionTest, addObstacleSensorData_attitude)
 
 TEST_F (CollisionPreventionTest, addObstacleSensorData_bodyframe)
 
 TEST_F (CollisionPreventionTest, addObstacleSensorData_resolution_offset)
 
 TEST_F (CollisionPreventionTest, adaptSetpointDirection_distinct_minimum)
 
 TEST_F (CollisionPreventionTest, adaptSetpointDirection_flat_minimum)
 
 TEST_F (CollisionPreventionTest, overlappingSensors)
 
 TEST_F (CollisionPreventionTest, enterData)
 

Variables

hrt_abstime mocked_time = 0
 

Function Documentation

◆ TEST_F() [1/19]

TEST_F ( CollisionPreventionTest  ,
instantiation   
)

Definition at line 90 of file CollisionPreventionTest.cpp.

◆ TEST_F() [2/19]

TEST_F ( CollisionPreventionTest  ,
behaviorOff   
)

Definition at line 92 of file CollisionPreventionTest.cpp.

References CollisionPrevention::is_active().

Here is the call graph for this function:

◆ TEST_F() [3/19]

TEST_F ( CollisionPreventionTest  ,
noSensorData   
)

Definition at line 101 of file CollisionPreventionTest.cpp.

References f(), CollisionPrevention::is_active(), CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), param_set(), and TestCollisionPrevention::paramsChanged().

Here is the call graph for this function:

◆ TEST_F() [4/19]

◆ TEST_F() [5/19]

◆ TEST_F() [6/19]

◆ TEST_F() [7/19]

◆ TEST_F() [8/19]

◆ TEST_F() [9/19]

◆ TEST_F() [10/19]

TEST_F ( CollisionPreventionTest  ,
goNoData   
)

Definition at line 500 of file CollisionPreventionTest.cpp.

References CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), param_set(), and TestCollisionPrevention::paramsChanged().

Here is the call graph for this function:

◆ TEST_F() [11/19]

◆ TEST_F() [12/19]

TEST_F ( CollisionPreventionTest  ,
addDistanceSensorData   
)

Definition at line 583 of file CollisionPreventionTest.cpp.

References obstacle_distance_s::distances, f(), TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, distance_sensor_s::min_distance, math::radians(), and TestCollisionPrevention::test_addDistanceSensorData().

Here is the call graph for this function:

◆ TEST_F() [13/19]

TEST_F ( CollisionPreventionTest  ,
addObstacleSensorData_attitude   
)

Definition at line 660 of file CollisionPreventionTest.cpp.

References obstacle_distance_s::distances, obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, M_PI, and TestCollisionPrevention::test_addObstacleSensorData().

Here is the call graph for this function:

◆ TEST_F() [14/19]

TEST_F ( CollisionPreventionTest  ,
addObstacleSensorData_bodyframe   
)

Definition at line 761 of file CollisionPreventionTest.cpp.

References obstacle_distance_s::distances, obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, M_PI, and TestCollisionPrevention::test_addObstacleSensorData().

Here is the call graph for this function:

◆ TEST_F() [15/19]

TEST_F ( CollisionPreventionTest  ,
addObstacleSensorData_resolution_offset   
)

Definition at line 862 of file CollisionPreventionTest.cpp.

References obstacle_distance_s::distances, obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, and TestCollisionPrevention::test_addObstacleSensorData().

Here is the call graph for this function:

◆ TEST_F() [16/19]

TEST_F ( CollisionPreventionTest  ,
adaptSetpointDirection_distinct_minimum   
)

◆ TEST_F() [17/19]

TEST_F ( CollisionPreventionTest  ,
adaptSetpointDirection_flat_minimum   
)

◆ TEST_F() [18/19]

◆ TEST_F() [19/19]

TEST_F ( CollisionPreventionTest  ,
enterData   
)

Definition at line 1106 of file CollisionPreventionTest.cpp.

References obstacle_distance_s::distances, f(), TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, distance_sensor_s::min_distance, math::radians(), TestCollisionPrevention::test_addDistanceSensorData(), and TestCollisionPrevention::test_enterData().

Here is the call graph for this function:

Variable Documentation

◆ mocked_time