Firmware
Public Member Functions | List of all members
ObstacleAvoidance Class Reference
Inheritance diagram for ObstacleAvoidance:
ModuleParams ListNode< ModuleParams *>

Public Member Functions

 ObstacleAvoidance (ModuleParams *parent)
 
bool initializeSubscriptions (SubscriptionArray &subscription_array)
 
void injectAvoidanceSetpoints (matrix::Vector3f &pos_sp, matrix::Vector3f &vel_sp, float &yaw_sp, float &yaw_speed_sp)
 Inject setpoints from obstacle avoidance system into FlightTasks. More...
 
void updateAvoidanceDesiredWaypoints (const matrix::Vector3f &curr_wp, const float curr_yaw, const float curr_yawspeed, const matrix::Vector3f &next_wp, const float next_yaw, const float next_yawspeed)
 Updates the desired waypoints to send to the obstacle avoidance system. More...
 
void updateAvoidanceDesiredSetpoints (const matrix::Vector3f &pos_sp, const matrix::Vector3f &vel_sp)
 Updates the desired setpoints to send to the obstacle avoidance system. More...
 
void checkAvoidanceProgress (const matrix::Vector3f &pos, const matrix::Vector3f &prev_wp, float target_acceptance_radius, const matrix::Vector2f &closest_pt)
 Checks the vehicle progress between previous and current position waypoint of the triplet. More...
 
- Public Member Functions inherited from ModuleParams
 ModuleParams (ModuleParams *parent)
 
void setParent (ModuleParams *parent)
 Sets the parent module. More...
 
 ModuleParams (const ModuleParams &)=delete
 
ModuleParamsoperator= (const ModuleParams &)=delete
 
 ModuleParams (ModuleParams &&)=delete
 
ModuleParamsoperator= (ModuleParams &&)=delete
 
- Public Member Functions inherited from ListNode< ModuleParams *>
void setSibling (ModuleParams * sibling)
 
const ModuleParamsgetSibling () const
 

Additional Inherited Members

- Protected Member Functions inherited from ModuleParams
virtual void updateParams ()
 Call this method whenever the module gets a parameter change notification. More...
 
virtual void updateParamsImpl ()
 The implementation for this is generated with the macro DEFINE_PARAMETERS()
 
- Protected Attributes inherited from ListNode< ModuleParams *>
ModuleParams_sibling
 

Member Function Documentation

§ checkAvoidanceProgress()

void ObstacleAvoidance::checkAvoidanceProgress ( const matrix::Vector3f &  pos,
const matrix::Vector3f &  prev_wp,
float  target_acceptance_radius,
const matrix::Vector2f &  closest_pt 
)

Checks the vehicle progress between previous and current position waypoint of the triplet.

Parameters
pos,vehicleposition
prev_wp,previousposition triplet
target_acceptance_radius,currentposition triplet xy acceptance radius
closest_pt,closestpoint to the vehicle on the line previous-current position triplet

§ injectAvoidanceSetpoints()

void ObstacleAvoidance::injectAvoidanceSetpoints ( matrix::Vector3f &  pos_sp,
matrix::Vector3f &  vel_sp,
float &  yaw_sp,
float &  yaw_speed_sp 
)

Inject setpoints from obstacle avoidance system into FlightTasks.

Parameters
pos_sp,positionsetpoint
vel_sp,velocitysetpoint
yaw_sp,yawsetpoint
yaw_speed_sp,yawspeed setpoint

§ updateAvoidanceDesiredSetpoints()

void ObstacleAvoidance::updateAvoidanceDesiredSetpoints ( const matrix::Vector3f &  pos_sp,
const matrix::Vector3f &  vel_sp 
)

Updates the desired setpoints to send to the obstacle avoidance system.

Parameters
pos_sp,desiredposition setpoint computed by the active FlightTask
vel_sp,desiredvelocity setpoint computed by the active FlightTask

§ updateAvoidanceDesiredWaypoints()

void ObstacleAvoidance::updateAvoidanceDesiredWaypoints ( const matrix::Vector3f &  curr_wp,
const float  curr_yaw,
const float  curr_yawspeed,
const matrix::Vector3f &  next_wp,
const float  next_yaw,
const float  next_yawspeed 
)

Updates the desired waypoints to send to the obstacle avoidance system.

These messages don't have any direct impact on the flight.

Parameters
curr_wp,currentposition triplet
curr_yaw,currentyaw triplet
curr_yawspeed,currentyaw speed triplet
next_wp,nextposition triplet
next_yaw,nextyaw triplet
next_yawspeed,nextyaw speed triplet

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