mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
cosmetics changes to ObstacleAvoidance library
This commit is contained in:
parent
e5441a6565
commit
c5dfcbc50e
@ -45,7 +45,7 @@
|
||||
#include <uORB/topics/home_position.h>
|
||||
#include <uORB/topics/vehicle_status.h>
|
||||
#include <lib/ecl/geo/geo.h>
|
||||
#include "ObstacleAvoidance.hpp"
|
||||
#include <ObstacleAvoidance.hpp>
|
||||
|
||||
/**
|
||||
* This enum has to agree with position_setpoint_s type definition
|
||||
@ -103,7 +103,7 @@ protected:
|
||||
float _target_acceptance_radius = 0.0f; /**< Acceptances radius of the target */
|
||||
int _mission_gear = landing_gear_s::GEAR_KEEP;
|
||||
|
||||
ObstacleAvoidance _obstacle_avoidance;
|
||||
ObstacleAvoidance _obstacle_avoidance; /**< class adjusting setpoints according to external avoidance module's input */
|
||||
|
||||
DEFINE_PARAMETERS_CUSTOM_PARENT(FlightTask,
|
||||
(ParamFloat<px4::params::MPC_XY_CRUISE>) _param_mpc_xy_cruise,
|
||||
|
||||
@ -86,7 +86,7 @@ bool FlightTaskAutoMapper::update()
|
||||
_generateVelocitySetpoints();
|
||||
}
|
||||
|
||||
_obstacle_avoidance.prepareAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
|
||||
_obstacle_avoidance.injectAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
|
||||
_yawspeed_setpoint);
|
||||
|
||||
// during mission and reposition, raise the landing gears but only
|
||||
|
||||
@ -91,7 +91,7 @@ bool FlightTaskAutoMapper2::update()
|
||||
break;
|
||||
}
|
||||
|
||||
_obstacle_avoidance.prepareAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
|
||||
_obstacle_avoidance.injectAvoidanceSetpoints(_position_setpoint, _velocity_setpoint, _yaw_setpoint,
|
||||
_yawspeed_setpoint);
|
||||
|
||||
_generateSetpoints();
|
||||
|
||||
@ -84,7 +84,7 @@ bool ObstacleAvoidance::initializeSubscriptions(SubscriptionArray &subscription_
|
||||
return true;
|
||||
}
|
||||
|
||||
void ObstacleAvoidance::prepareAvoidanceSetpoints(Vector3f &pos_sp, Vector3f &vel_sp, float &yaw_sp,
|
||||
void ObstacleAvoidance::injectAvoidanceSetpoints(Vector3f &pos_sp, Vector3f &vel_sp, float &yaw_sp,
|
||||
float &yaw_speed_sp)
|
||||
{
|
||||
|
||||
|
||||
@ -64,16 +64,16 @@ public:
|
||||
bool initializeSubscriptions(SubscriptionArray &subscription_array);
|
||||
|
||||
/**
|
||||
* Inject setpoints from obstacle avoidance system into FLightTasks.
|
||||
* Inject setpoints from obstacle avoidance system into FlightTasks.
|
||||
* @param pos_sp, position setpoint
|
||||
* @param vel_sp, velocity setpoint
|
||||
* @param yaw_sp, yaw setpoint
|
||||
* @param yaw_speed_sp, yaw speed setpoint
|
||||
*/
|
||||
void prepareAvoidanceSetpoints(matrix::Vector3f &pos_sp, matrix::Vector3f &vel_sp, float &yaw_sp, float &yaw_speed_sp);
|
||||
void injectAvoidanceSetpoints(matrix::Vector3f &pos_sp, matrix::Vector3f &vel_sp, float &yaw_sp, float &yaw_speed_sp);
|
||||
|
||||
/**
|
||||
* Updates the desired waypoints to send to the obstacle avoidance system.
|
||||
* Updates the desired waypoints to send to the obstacle avoidance system. These messages don't have any direct impact on the flight.
|
||||
* @param curr_wp, current position triplet
|
||||
* @param curr_yaw, current yaw triplet
|
||||
* @param curr_yawspeed, current yaw speed triplet
|
||||
@ -91,7 +91,7 @@ public:
|
||||
void updateAvoidanceDesiredSetpoints(const matrix::Vector3f &pos_sp, const matrix::Vector3f &vel_sp);
|
||||
|
||||
/**
|
||||
* Checks the vehicle progress between previous and current position triplet.
|
||||
* Checks the vehicle progress between previous and current position waypoint of the triplet.
|
||||
* @param pos, vehicle position
|
||||
* @param prev_wp, previous position triplet
|
||||
* @param target_acceptance_radius, current position triplet xy acceptance radius
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user