PX4 Firmware
PX4 Autopilot Software http://px4.io
TestCollisionPrevention Class Reference
Inheritance diagram for TestCollisionPrevention:
Collaboration diagram for TestCollisionPrevention:

Public Member Functions

 TestCollisionPrevention ()
 
void paramsChanged ()
 
obstacle_distance_sgetObstacleMap ()
 
void test_addDistanceSensorData (distance_sensor_s &distance_sensor, const matrix::Quatf &attitude)
 
void test_addObstacleSensorData (const obstacle_distance_s &obstacle, const matrix::Quatf &attitude)
 
void test_adaptSetpointDirection (matrix::Vector2f &setpoint_dir, int &setpoint_index, float vehicle_yaw_angle_rad)
 
bool test_enterData (int map_index, float sensor_range, float sensor_reading)
 
- Public Member Functions inherited from CollisionPrevention
 CollisionPrevention (ModuleParams *parent)
 
virtual ~CollisionPrevention ()
 
bool is_active ()
 Returs true if Collision Prevention is running. More...
 
void modifySetpoint (matrix::Vector2f &original_setpoint, const float max_speed, const matrix::Vector2f &curr_pos, const matrix::Vector2f &curr_vel)
 Computes collision free setpoints. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CollisionPrevention
void _addDistanceSensorData (distance_sensor_s &distance_sensor, const matrix::Quatf &vehicle_attitude)
 
void _addObstacleSensorData (const obstacle_distance_s &obstacle, const matrix::Quatf &vehicle_attitude)
 Updates obstacle distance message with measurement from offboard. More...
 
void _adaptSetpointDirection (matrix::Vector2f &setpoint_dir, int &setpoint_index, float vehicle_yaw_angle_rad)
 Computes an adaption to the setpoint direction to guide towards free space. More...
 
bool _enterData (int map_index, float sensor_range, float sensor_reading)
 Determines whether a new sensor measurement is used. More...
 
virtual hrt_abstime getTime ()
 
virtual hrt_abstime getElapsedTime (const hrt_abstime *ptr)
 
- Protected Attributes inherited from CollisionPrevention
obstacle_distance_s _obstacle_map_body_frame {}
 
uint64_t _data_timestamps [sizeof(_obstacle_map_body_frame.distances)/sizeof(_obstacle_map_body_frame.distances[0])]
 
uint16_t _data_maxranges [sizeof(_obstacle_map_body_frame.distances)/sizeof(_obstacle_map_body_frame.distances[0])]
 in cm More...
 

Detailed Description

Definition at line 49 of file CollisionPreventionTest.cpp.

Constructor & Destructor Documentation

◆ TestCollisionPrevention()

TestCollisionPrevention::TestCollisionPrevention ( )
inline

Definition at line 52 of file CollisionPreventionTest.cpp.

Member Function Documentation

◆ getObstacleMap()

obstacle_distance_s& TestCollisionPrevention::getObstacleMap ( )
inline

Definition at line 54 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ paramsChanged()

void TestCollisionPrevention::paramsChanged ( )
inline

Definition at line 53 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ test_adaptSetpointDirection()

void TestCollisionPrevention::test_adaptSetpointDirection ( matrix::Vector2f setpoint_dir,
int &  setpoint_index,
float  vehicle_yaw_angle_rad 
)
inline

Definition at line 63 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ test_addDistanceSensorData()

void TestCollisionPrevention::test_addDistanceSensorData ( distance_sensor_s distance_sensor,
const matrix::Quatf attitude 
)
inline

Definition at line 55 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ test_addObstacleSensorData()

void TestCollisionPrevention::test_addObstacleSensorData ( const obstacle_distance_s obstacle,
const matrix::Quatf attitude 
)
inline

Definition at line 59 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

◆ test_enterData()

bool TestCollisionPrevention::test_enterData ( int  map_index,
float  sensor_range,
float  sensor_reading 
)
inline

Definition at line 68 of file CollisionPreventionTest.cpp.

Referenced by TEST_F().

Here is the caller graph for this function:

The documentation for this class was generated from the following file: