PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Go to the source code of this file.
Classes | |
class | CollisionPreventionTest |
class | TestCollisionPrevention |
class | TestTimingCollisionPrevention |
Variables | |
hrt_abstime | mocked_time = 0 |
TEST_F | ( | CollisionPreventionTest | , |
instantiation | |||
) |
Definition at line 90 of file CollisionPreventionTest.cpp.
TEST_F | ( | CollisionPreventionTest | , |
behaviorOff | |||
) |
Definition at line 92 of file CollisionPreventionTest.cpp.
References CollisionPrevention::is_active().
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().
TEST_F | ( | CollisionPreventionTest | , |
testBehaviorOnWithObstacleMessage | |||
) |
Definition at line 126 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, attitude, obstacle_distance_s::distances, f(), obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), hrt_absolute_time(), obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), vehicle_attitude_s::q, vehicle_attitude_s::timestamp, and obstacle_distance_s::timestamp.
TEST_F | ( | CollisionPreventionTest | , |
testBehaviorOnWithDistanceMessage | |||
) |
Definition at line 191 of file CollisionPreventionTest.cpp.
References attitude, distance_sensor_s::current_distance, f(), TestCollisionPrevention::getObstacleMap(), distance_sensor_s::h_fov, hrt_absolute_time(), obstacle_distance_s::max_distance, distance_sensor_s::max_distance, obstacle_distance_s::min_distance, distance_sensor_s::min_distance, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), distance_sensor_s::orientation, param_set(), TestCollisionPrevention::paramsChanged(), vehicle_attitude_s::q, math::radians(), distance_sensor_s::signal_quality, vehicle_attitude_s::timestamp, distance_sensor_s::timestamp, distance_sensor_s::type, distance_sensor_s::v_fov, and distance_sensor_s::variance.
TEST_F | ( | CollisionPreventionTest | , |
testPurgeOldData | |||
) |
Definition at line 251 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, attitude, obstacle_distance_s::distances, f(), obstacle_distance_s::frame, hrt_absolute_time(), hrt_abstime, obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, mocked_time, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), vehicle_attitude_s::q, vehicle_attitude_s::timestamp, and obstacle_distance_s::timestamp.
TEST_F | ( | CollisionPreventionTest | , |
testNoRangeData | |||
) |
Definition at line 328 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, attitude, obstacle_distance_s::distances, f(), obstacle_distance_s::frame, hrt_absolute_time(), hrt_abstime, obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, mocked_time, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), vehicle_attitude_s::q, vehicle_attitude_s::timestamp, and obstacle_distance_s::timestamp.
TEST_F | ( | CollisionPreventionTest | , |
noBias | |||
) |
Definition at line 396 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::distances, obstacle_distance_s::frame, hrt_absolute_time(), obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::normalized(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), and obstacle_distance_s::timestamp.
TEST_F | ( | CollisionPreventionTest | , |
outsideFOV | |||
) |
Definition at line 437 of file CollisionPreventionTest.cpp.
References matrix::atan2(), math::degrees(), obstacle_distance_s::distances, f(), obstacle_distance_s::frame, hrt_absolute_time(), obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), math::radians(), obstacle_distance_s::timestamp, and matrix::wrap_2pi().
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().
TEST_F | ( | CollisionPreventionTest | , |
jerkLimit | |||
) |
Definition at line 533 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::distances, obstacle_distance_s::frame, hrt_absolute_time(), obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, CollisionPrevention::modifySetpoint(), matrix::Vector< Type, M >::norm(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), and obstacle_distance_s::timestamp.
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().
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().
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().
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().
TEST_F | ( | CollisionPreventionTest | , |
adaptSetpointDirection_distinct_minimum | |||
) |
Definition at line 919 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, math::degrees(), matrix::floor(), obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, param_set(), TestCollisionPrevention::paramsChanged(), TestCollisionPrevention::test_adaptSetpointDirection(), TestCollisionPrevention::test_addObstacleSensorData(), and matrix::wrap().
TEST_F | ( | CollisionPreventionTest | , |
adaptSetpointDirection_flat_minimum | |||
) |
Definition at line 966 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, math::degrees(), matrix::floor(), obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), obstacle_distance_s::increment, param_set(), TestCollisionPrevention::paramsChanged(), TestCollisionPrevention::test_adaptSetpointDirection(), TestCollisionPrevention::test_addObstacleSensorData(), and matrix::wrap().
TEST_F | ( | CollisionPreventionTest | , |
overlappingSensors | |||
) |
Definition at line 1015 of file CollisionPreventionTest.cpp.
References obstacle_distance_s::angle_offset, attitude, obstacle_distance_s::distances, obstacle_distance_s::frame, TestCollisionPrevention::getObstacleMap(), hrt_absolute_time(), obstacle_distance_s::increment, obstacle_distance_s::max_distance, obstacle_distance_s::min_distance, CollisionPrevention::modifySetpoint(), orb_advert_t, orb_advertise(), ORB_ID, orb_publish(), orb_unadvertise(), param_set(), TestCollisionPrevention::paramsChanged(), vehicle_attitude_s::q, vehicle_attitude_s::timestamp, and obstacle_distance_s::timestamp.
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().
hrt_abstime mocked_time = 0 |
Definition at line 38 of file CollisionPreventionTest.cpp.
Referenced by TestTimingCollisionPrevention::getElapsedTime(), TestTimingCollisionPrevention::getTime(), and TEST_F().