Payload Use Cases
This topic lists a few common drone "payload use cases", and how they are supported by PX4.
Mapping Drones
Mapping drones use cameras to capture images at time or distance intervals during surveys.
MAVLink cameras that support the MAVLink Camera Protocol provide the best integration with PX4 and QGroundControl. The MAVSDK provides simple APIs to use this protocol for both standalone camera operations and in missions.
Cameras can also be connected directly to a flight controller using PWM or GPI outputs. PX4 supports the following set of MAVLink commands/mission items for cameras that are connected to the flight controller:
- MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL - set time interval between captures.
- MAV_CMD_DO_SET_CAM_TRIGG_DIST - set distance between captures
- MAV_CMD_DO_TRIGGER_CONTROL - start/stop capturing (using distance or time, as defined using above messages).
The following topics show how to connect and configure a camera:
- Camera Triggering from flight controller PWM or GPIO outputs, or via MAVLink.
- Camera Capture feedback via hotshoe input.
Cargo Drones (Package Delivery)
Cargo drones commonly use grippers, winches, and other mechanisms to release packages at their destinations.
PX4 supports package delivery in missions using a gripper. Grippers can also be triggering using the MAV_CMD_DO_GRIPPER MAVLink command, or manually via a Joystick button.
For setup and usage information see:
:::note Support for winches and other release mechanisms is also intended.
If you need to perform cargo delivery using hardware that is not yet integrated, you can use Generic Actuator Control. :::
Surveillance, Search & Rescue
Surveillance and Search & Rescue drones have similar requirements to mapping drones. The main differences are that, in addition to flying a planned survey area, they typically need good standalone control over the camera for image and video capture, and they may need to be able to work during both day and night
Use a camera that supports the MAVLink Camera Protocol as this supports image and video capture, zooming, storage management, multiple cameras on the same vehicle and switching between them, etc. These cameras can be controlled either manually from QGroundControl or via MAVSDK (for both standalone camera operations and in missions). See Camera triggering for information on how to configure your camera to work with MAVLink.
:::note Cameras connected directly to the flight controller only support camera triggering, and are unlikely to be suitable for most surveillance/search work. :::
A search and rescue drone may also need to carry cargo, for example, emergency supplies for a stranded hiker. See Cargo Drones above for information about payload delivery.
Agricultural Drones/Crop Spraying
Agricultural drones are commonly used for mapping crop health and pest detection and animal management (herding, tracking,and so on). These cases are similar to the mapping and surveillance, search & rescue cases above. While specific crops/animals may need specialist cameras, the integration with PX4 is the same.
Agricultural drone may also be used for crop spraying. In this case the sprayer must be controlled as a generic actuator:
- Generic Actuator Control explains how you can connect flight controller outputs to your sprayer so that they can be controlled using MAVLink. Most sprayers provide controls to activate/deactivate a pump; some also allow control over the rate of flow or the spray field (i.e. by controlling the nozzle shape, or using a spinner to distribute the payload).
- You can define the area to spray using a Survey pattern, or you can define the grid to fly using waypoints. In either case, it is important to ensure that the vehicle flight path and altitude provide adequate coverage for your particular spray being used.
- You should add a "Set actuator" mission item to your mission before and after the survey pattern in order to enable and disable the sprayer.