droneapi 是用于绑定 Python 语言的 DroneApi 开发包。它包含了无人机上绑定 Python 语言的API 接口和相关 MAVProxy 模块。
当你使用 Python 编程开发新的 DroneAPI 接口时,最好方法是在 MAVProxy 内部运行它。
代码示例:
MANUAL> api start small_demo.py Mode: VehicleMode:MANUAL Location: Location:lat=21.2938874,lon=-157.8501416,alt=0.189999997616,is_relative=None Attitude: Attitude:-0.286077767611,-3.01412272453,0.261489063501 GPS: GPSInfo:fix=1,num_sat=0 Param: 75.0 waiting for download Requesting 10 waypoints t=Mon Mar 31 09:41:39 2014 now=Mon Mar 31 09:41:39 2014 Home WP: MISSION_ITEM {target_system : 255, target_component : 0, seq : 0, frame : 0, command : 16, current : 1, autocontinue : 1, param1 : 0.0, param2 : 0.0, param3 : 0.0, param4 : 0.0, x : 21.2921352386, y : -157.848922729, z : 89.1800003052} APIThread-0 exiting... APM: Non-Nav command ID updated to #255 idx=1 waypoint 1 AUTO>