我可以用 python 连接到 pixhawk 吗?

Can i connect to pixhawk with python?

我想在没有 Mission Planner 的情况下连接 pixhawk,因为 Mission Planner 支持 Python 2.7 脚本,但我在 Python 3.7 上工作,所以我可以连接到 pixhawk Just Python 和遥测模块吗? OS: 赢 10

您可以使用 dronekit-python 运行 来自 python 的无人机。 https://dronekit-python.readthedocs.io/en/latest/automodule.html

您还可以构建一个 运行Arducopter 3.7 的 SITL 版本,这样您就可以在尝试使用无人机之前在这里测试您的命令。以下 link 有助于安装此 SITL: http://ardupilot.org/dev/docs/sitl-native-on-windows.html

要连接无人机,您必须在 Windows 上安装 Telemetry 驱动程序。要安装遥测驱动程序,此视频可能会有所帮助:https://www.youtube.com/watch?v=s_MO4xUySoU

在python代码中我使用遥测端口号和波特率连接无人机: 车辆=连接('COM5',wait_ready=假,波特=57600)