Live commands / events
The drone implement 2 components in the Mavlink ecosystem:
Autopilot component will use MAV_COMP_ID_AUTOPILOT1 as
target_component
Camera component will use MAV_COMP_ID_CAMERA
All commands and events are sent / received according to mavlink coding
and acknowledge system
Index:
- Commands to MAV_COMP_ID_AUTOPILOT1
- Events from MAV_COMP_ID_AUTOPILOT1
- Commands to MAV_COMP_ID_CAMERA
- Events from MAV_COMP_ID_CAMERA
Commands to MAV_COMP_ID_AUTOPILOT1
-
HEARTBEAT :
The heartbeat should be sent to keep the udp link alive -
SYSTEM_TIME
: time_unix_usec is used to set the system time on the drone
-
SET MODE :
- base_mode: unused
- custom_mode: 32 bits value composed of:
- main_mode: b0-b7
- sub_mode: b8-b15
> supported modes are:
main mode | sub mode | description |
---|---|---|
PX4_CUSTOM_MAIN_MODE_AUTO | PX4_CUSTOM_SUB_MODE_AUTO_MISSION | starts a flightplan mission |
PX4_CUSTOM_MAIN_MODE_AUTO | PX4_CUSTOM_SUB_MODE_AUTO_RTL | starts a return home position |
PX4_CUSTOM_MAIN_MODE_AUTO | PX4_CUSTOM_SUB_MODE_AUTO_TAKEOFF | arm the drone and take off |
PX4_CUSTOM_MAIN_MODE_AUTO | PX4_CUSTOM_SUB_MODE_AUTO_LAND | lands the drone |
PX4_CUSTOM_MAIN_MODE_POSCTL | PX4_CUSTOM_SUB_MODE_POSCTL_POSCTL | force manual control |
PX4_CUSTOM_MAIN_MODE_MANUAL | Any | force manual control |
-
MANUAL_CONTROL : Manual control of the drone. Buttons are not taken into account
- MISSION_ITEM_INT
- MISSION_REQUEST_INT
- MISSION_REQUEST_LIST
- MISSION_COUNT
- MISSION_CLEAR_ALL
-
MISSION_SET_CURRENT
available mission types are: MAV_MISSION_TYPE_MISSION and
MAV_MISSION_TYPE_RALLY- MAV_MISSION_TYPE_MISSION: flightplan mission
- MAV_MISSION_TYPE_RALLY: first rally point is set as home
position otherwise, home position is based on drone heuristics
-
COMMAND_INT
-
MAV_CMD_DO_REPOSITION
: starts a move to -
MAV_CMD_DO_SET_ROI_LOCATION
: sets a Region of Interest -
MAV_CMD_DO_SET_ROI_NONE
: cancels a ROI
-
MAV_CMD_DO_REPOSITION
-
COMMAND_LONG
-
MAV_CMD_COMPONENT_ARM_DISARM
: drone must be armed to react -
MAV_CMD_NAV_TAKEOFF
: takes off if armed -
MAV_CMD_NAV_LAND
: lands the drone -
MAV_CMD_PREFLIGHT_CALIBRATION
: launch / cancels magnetometer and gimbal calibrations -
MAV_CMD_DO_MOUNT_CONTROL
: mount mode is ignored and reference frame is always absolute - MAV_CMD_REQUEST_PROTOCOL_VERSION
- MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES
-
MAV_CMD_COMPONENT_ARM_DISARM
Events from MAV_COMP_ID_AUTOPILOT1
-
HEARTBEAT :
Sent at 1Hz -
BATTERY_STATUS
: Sent at 1Hz -
EXTENDED_SYS_STATE
: Sent at 1Hz -
SYS_STATUS
: It reports at 1Hz- sensor health : those are internal Parrot bits used for
diagnostic - battery voltage in mV
- battery level
- sensor health : those are internal Parrot bits used for
-
AUTOPILOT_VERSION:
Sent at 1Hz - PROTOCOL_VERSION
-
STATUSTEXT
: sends some warnings and errors to the GCS
-
GPS_RAW_INT
: It reports at 10Hz- timestamp en usec
- GPS fix type
- GPS Latitude
- GPS Longitude
- GPS Altitude
- satellites visible
-
LOCAL_POSITION_NED
: Sent at 30Hz -
GLOBAL_POSITION_INT
: Sent at 10Hz -
UTM_GLOBAL_POSITION
: Sent at 1Hz
-
ATTITUDE :
Sent at 5Hz -
ATTITUDE_QUATERNION
: Sent at 30Hz
-
VFR_HUD :
Sent at 4Hz, airspeed and throttle are not supported -
ODODMETRY :
Sent at 3Hz -
ALTITUDE :
Sent at 1Hz -
HOME_POSITION
: Sent at 1Hz
- MISSION_ITEM_INT
- MISSION_REQUEST_INT
- MISSION_COUNT
-
MISSION_CURRENT
: Sent at 1Hz - MISSION_ITEM
REACHED - MISSION_ACK
-
MOUNT_ORIENTATION
: Sent at 3Hz
Commands to MAV_COMP_ID_CAMERA
In case of thermal capability, 2 streams are provided “frontal” and
“thermal”
-
COMMAND_LONG
- MAV_CMD_REQUEST_CAMERA_INFORMATION
- MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION
- MAV_CMD_REQUEST_CAMERA_SETTINGS
- MAV_CMD_REQUEST_VIDEO_STREAM_STATUS
- MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS
- MAV_CMD_REQUEST_STORAGE_INFORMATION
- MAV_CMD_VIDEO_START_STREAMING
- MAV_CMD_VIDEO_STOP_STREAMING
- MAV_CMD_VIDEO_START_CAPTURE
- MAV_CMD_VIDEO_STOP_CAPTURE
- MAV_CMD_IMAGE_START_CAPTURE
- MAV_CMD_IMAGE_STOP_CAPTURE
- MAV_CMD_SET_CAMERA_ZOOM
- MAV_CMD_STORAGE_FORMAT
- MAV_CMD_RESET_CAMERA_SETTINGS
- PARAM_EXT_REQUEST_READ
- PARAM_EXT_REQUEST_LIST
-
PARAM_EXT_SET
All camera parameters are described by the file found at
cam_definition_uri in
CAMERA_INFORMATION
camera except CAM_MODE which toggles between photo and video