简体   繁体   中英

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

I'm trying to run the script by python2-3 (alias). This is for drone's flight so I'm using dronekit. But I got this error as below. Please help me to solve this error.

  • Ubuntu20.04
  • Raspberrypi 4 Board
  • Dronekit 2.9.2
  • 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) . 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.
  • 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 .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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