MavlinkClient
__init__
Instantiates a Mavlink client to handle message passing and command sending to/from a mavlink drone. Additionally sets up video stream manager for handling RTSP streams from the drone.
IP address of the ground control station (default: ‘192.168.8.10’)
port number for mavlink connection (default: ‘14550’)
IP address of the vehicle (default: ‘192.168.8.1’)
communication protocol to use, one of (‘udp’|‘tcp’) (default: ‘udp’)
Dictionary of dictionaries containing the
whether to enable arming the drone (default: False)
whether to run in dry run mode which bypasses arming exceptions (default: False)
logging level to be displayed to the user, one of (‘DEBUG’|‘INFO’|‘WARNING’|‘ERROR’),
list of expected message types to handle without warning (default: None)
get_msg
update_setpoint
attempt_command
Attempt to perform a given command with name and id. Includes retry logic with delays.
arbitrary command name for logging/display
Mavlink ID of the command to be attempted
whether this is first transmission of command (0, default), or a confirmation (1-255)
maximum number of attempts to send the command (default=3)
delay in seconds between attempts (default=1.0)
set_custom_msg_rates
request_msg
reset_ned_origin
check_props_spinning
arm
disarm
set_offboard_control
Sets drone control mode to OFFBOARD
. This enables us to send position, velocity, or acceleration setpoints to the drone.
NOTE: Drone may reject offboard mode if certain conditions are not met (recent setpoint message received, armed, etc.)
start
Start the drone by resetting NED origin, arming the drone, and setting offboard control mode.
terminate
Terminate the drone client and shut down all threads.