mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 08:13:34 +08:00
Navigator: add terrain collision avoidance logic for Mission/RTL
Avoid flying into terrain using the distance sensor. Enable through the parameter NAV_MIN_GND_DIST. Only active during commanded descents with vz>0 (to prevent climb-aways), excluding landing and VTOL transitions. It changes the altitude setpoint in the triplet to maintain the current altitude and republish the triplet. We also change the mission item altitude used for acceptance calculations to prevent getting stuck in a loop. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -1522,6 +1522,13 @@ void Navigator::set_gimbal_neutral()
|
||||
publish_vehicle_cmd(&vcmd);
|
||||
}
|
||||
|
||||
void Navigator::sendWarningDescentStoppedDueToTerrain()
|
||||
{
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Terrain collision risk, descent is stopped\t");
|
||||
events::send(events::ID("navigator_terrain_collision_risk"), events::Log::Critical,
|
||||
"Terrain collision risk, descent is stopped");
|
||||
}
|
||||
|
||||
int Navigator::print_usage(const char *reason)
|
||||
{
|
||||
if (reason) {
|
||||
|
||||
Reference in New Issue
Block a user