mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 21:03:34 +08:00
Navigator/FlightTaskAuto yaw handling improvements/simplifications (#22532)
* PositionSetpoint: remove yaw_valid field * Navigator: set yaw setpoint to NAN for Takeoff Don't set a yaw setpoint for takeoff, as Navigator doesn't handle the yaw reset. The yaw setpoint generation is handled by FlightTaskAuto. * PositionSetpoint.msg: remove disable_weather_vane and instead only use the yaw field Strictly follow the concept that if the position_setpoint.yaw is set, then follow it the controller, and otherwise let the controller set it as it thinks it's best. * Navigator: remove logic that sets yaw to be accepted in TAKEOFF No longer needed as during Takeoff we anyway don't set a yaw setpoint. * PositionSetpoint.msg: remove yawspeed_valid * PositionSetpoint.msg: remove yawspeed * Navigator: set yaw setpoint to NAN instead of current In set_takeoff and set_land_item, as well as for VTOL transition. The flight tasks then set the yaw corresponding to the current yaw. * Navigator: change get_yaw_acceptance into a bool * PositionSetpoint.msg: improve comment for yaw * MissionBlock: remove unnecessary code from set_vtol_transition_item * Navigator: clean up calculate_breaking_stop(), set yaw to NAN * Navigator: set yaw to NAN in variouls places where not specifc setpoint is desired * Navigator: set yaw to NAN in reset_position_setpoint() --------- Signed-off-by: Silvan Fuhrer <silvan@auterion.com> Co-authored-by: Matthias Grob <maetugr@gmail.com>
This commit is contained in:
co-authored by
Matthias Grob
parent
d872ef87da
commit
7e22b47b85
@@ -75,7 +75,6 @@ VtolTakeoff::on_active()
|
||||
_mission_item.lon, _loiter_location(0), _loiter_location(1)));
|
||||
_mission_item.force_heading = true;
|
||||
mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
|
||||
pos_sp_triplet->current.disable_weather_vane = true;
|
||||
pos_sp_triplet->current.cruising_speed = -1.f;
|
||||
_navigator->set_position_setpoint_triplet_updated();
|
||||
|
||||
@@ -182,7 +181,6 @@ VtolTakeoff::set_takeoff_position()
|
||||
mission_item_to_position_setpoint(_mission_item, &pos_sp_triplet->current);
|
||||
|
||||
pos_sp_triplet->previous.valid = false;
|
||||
pos_sp_triplet->current.yaw_valid = true;
|
||||
pos_sp_triplet->next.valid = false;
|
||||
|
||||
_navigator->set_position_setpoint_triplet_updated();
|
||||
|
||||
Reference in New Issue
Block a user