The Safe Landing feature ensures that vehicles only land on flat terrain.
The feature can be enabled in both Land mode and Mission mode on multicopter vehicles that have a companion computer running the appropriate vision software. It can also be used for VTOL vehicles in MC mode.
If commanded to land, the vehicle first descends to a height where it can measure the surface (companion computer
loiter_height parameter). If the landing area is not sufficiently flat, the vehicle moves outwards in a square-spiral pattern, periodically stopping to re-check the terrain for a landing spot that isn't too rough.
Safe landing is designed for finding flat areas in rough terrain.
- Landing on a road is not prevented; if a car is detected it will be "forgotten" once it moves past.
- Landing on water may occur if using radar or ultrasound sensors, but should not occur if using stereo cameras or LIDAR.
- The system will only land if it is able to detect ground. For stereo cameras, water that is rough enough to have sufficient distinguishing features for analysis will not be flat enough to land on.
COM_OBS_AVOIDalso enables Obstacle Avoidance in Missions and any other features that use the Path Planning Offboard Interface (Trajectory Interface) to integrate external path planning services with PX4.
Companion-side setup and configuration is provided in the PX4/avoidance Github repo.
This covers the common setup for obstacle avoidance and collision prevention, and includes specific sections for using the safe landing planner (which provides companion-side support for this feature):
The configuration information includes, among other things, how to set up safe landing for different cameras, sizes of vehicles, and the height at which the decision to land or not is taken.
The interface (messages sent) between PX4 and the companion are exactly the same as for any other path planning services. Note however that the safe landing planner only uses information in Point 0 of the
TRAJECTORY_REPRESENTATION_WAYPOINTS message for the desired path.
Tested companion computers and cameras are listed in PX4/avoidance.