Add Fixedwing path following as a separate controller state (#21376)

* Separate offboard path setpoints as fixedwing pos control state

This commit separates offboard path following as a separate state inside the FW Poscontrol module.

This is a cleanup on clearly defining fw pos control behaviors

* Update src/modules/fw_pos_control/FixedwingPositionControl.cpp

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>

* Fix format

---------

Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Jaeyoung Lim
2024-01-09 16:35:50 +01:00
committed by GitHub
co-authored by Silvan Fuhrer
parent 88b3316409
commit c8e041a371
2 changed files with 88 additions and 12 deletions
@@ -240,6 +240,7 @@ private:
FW_POSCTRL_MODE_AUTO_TAKEOFF,
FW_POSCTRL_MODE_AUTO_LANDING_STRAIGHT,
FW_POSCTRL_MODE_AUTO_LANDING_CIRCULAR,
FW_POSCTRL_MODE_AUTO_PATH,
FW_POSCTRL_MODE_MANUAL_POSITION,
FW_POSCTRL_MODE_MANUAL_ALTITUDE,
FW_POSCTRL_MODE_OTHER
@@ -600,6 +601,18 @@ private:
const position_setpoint_s &pos_sp_prev, const position_setpoint_s &pos_sp_curr, const position_setpoint_s &pos_sp_next);
/**
* @brief Vehicle control for following a path.
*
* @param control_interval Time since last position control call [s]
* @param curr_pos Current 2D local position vector of vehicle [m]
* @param ground_speed Local 2D ground speed of vehicle [m/s]
* @param pos_sp_prev previous position setpoint
* @param pos_sp_curr current position setpoint
*/
void control_auto_path(const float control_interval, const Vector2d &curr_pos, const Vector2f &ground_speed,
const position_setpoint_s &pos_sp_curr);
/**
* @brief Controls a desired airspeed, bearing, and height rate.
*