简体   繁体   English

Dronekit-Python 错误与 Raspberrypi4-Ubuntu20.04 “dronekit.APIException”

[英]Dronekit-Python Error with Raspberrypi4-Ubuntu20.04 "dronekit.APIException"

I'm trying to run the script by python2-3 (alias).我正在尝试通过 python2-3(别名)运行脚本。 This is for drone's flight so I'm using dronekit.这是为了无人机的飞行,所以我正在使用 dronekit。 But I got this error as below.但是我收到如下错误。 Please help me to solve this error.请帮我解决这个错误。

  • Ubuntu20.04 Ubuntu20.04
  • Raspberrypi 4 Board树莓派 4 板
  • Dronekit 2.9.2无人机套件 2.9.2
  • Python2.7 & Python3.8 Python2.7 & Python3.8

enter image description here在此处输入图像描述

In the terminal output that you posted, there is a Timeout exception at the line which reads vehicle = connect('/dev/ttyAMA0', baud=921600, wait_ready=True) .在您发布的终端 output 中,读取vehicle = connect('/dev/ttyAMA0', baud=921600, wait_ready=True)的行有超时异常。 More details about your setup would be useful, but I'm going to assume you are using a serial radio to communicate with your drone.有关您的设置的更多详细信息会很有用,但我假设您正在使用串行无线电与您的无人机通信。 If that's true, some troubleshooting steps may be:如果是这样,一些故障排除步骤可能是:

  • Make sure the radio is being mounted to /dev/ttyAMA0.确保无线电被安装到 /dev/ttyAMA0。
  • Make sure the baud rate for the radio is 921600. If it's something different, pass this value in as the baud parameter in connect .确保无线电的波特率为 921600。如果有所不同,请将此值作为connect中的波特参数传递。

When asking questions, it's best to give as much detail as possible, and, as the above commenter said, please include code as text instead of linking to screenshots.提问时,最好提供尽可能详细的信息,并且如上述评论者所说,请将代码作为文本包含在内,而不是链接到屏幕截图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM