DroneKit is a popular tool in drone programming. What is its main purpose?
Think about software tools that help programmers control drones.
DroneKit is a software library that allows developers to write programs to control drones, making drone programming simpler and more accessible.
What will this DroneKit Python script print?
from dronekit import connect vehicle = connect('udp:127.0.0.1:14550', wait_ready=True) print(vehicle.mode.name)
Consider the default mode in a standard DroneKit SITL simulation.
In a standard SITL setup using udp:127.0.0.1:14550, after connect with wait_ready=True, the vehicle mode is 'STABILIZE'.
What error will this code raise?
from dronekit import connect vehicle = connect('tcp:127.0.0.1:5760') print(vehicle.location.global_frame.lat)
Think about what happens if the drone is not reachable at the given address.
If the drone is not running or reachable at the TCP address, connect() will raise a TimeoutError.
Which code snippet correctly arms a drone using DroneKit?
Check the correct attribute name and method to arm the drone.
To arm a drone in DroneKit, you set the 'armed' attribute to True. There is no 'arm' attribute or method.
You want to change the drone's mode to GUIDED. Which code snippet will do this correctly?
Remember that mode is an object, not a string.
In DroneKit, you must assign a VehicleMode object to vehicle.mode to change the mode.
