无人机不会使用Onboard SDK示例代码来驱动其电机

时间:2018-01-29 04:00:29

标签: dji-sdk

我使用DJI A3和带有Onboard SDK 3.5的Raspberry Pi 3构建了自己的无人机。我测试了示例代码和遥测一个似乎没问题,但飞行控制一个没有用。在智能助理2的模拟​​器中,它运行正常,但在现实生活中,即使它的电机也没有旋转。这是控制台日志:

rp1:pi % ./djiosdk-flightcontrol-sample UserConfig.txt
Read App ID
User Configuration read successfully.


STATUS/1 @ init, L55: Attempting to open device /dev/ttyAMA0 with baudrate 230400...

STATUS/1 @ init, L65: ...Serial started successfully.

STATUS/1 @ parseDroneVersionInfo, L630: Device Serial No. = 0670134595

STATUS/1 @ parseDroneVersionInfo, L632: Hardware = A3

STATUS/1 @ parseDroneVersionInfo, L633: Firmware = 3.2.36.8

ERRORLOG/1 @ functionalSetUp, L211: Virtual RC not supported!

STATUS/1 @ activate, L1083: version 0x3022408

STATUS/1 @ activate, L1096: Activation successful

STATUS/1 @ startPackage, L332: Start package 0 result: 0.
STATUS/1 @ startPackage, L334: Package 0 info: freq=50, nTopics=1.
STATUS/1 @ removePackage, L441: Remove package 0 successful.
STATUS/1 @ initGimbal, L804: Gimbal not mounted!
| Available commands:                                            |
| [a] Monitored Takeoff + Landing                                |
| [b] Monitored Takeoff + Position Control + Landing             |
a

STATUS/1 @ startPackage, L332: Start package 0 result: 0.
STATUS/1 @ startPackage, L334: Package 0 info: freq=10, nTopics=2.
STATUS/1 @ getErrorCodeMessage, L644: %&1nZ%&̖nZ
STATUS/1 @ getCMDIDTaskMSG, L823: CONTROLLER_MOTOR_ON

ERRORLOG/1 @ initPackageFromTopicList, L162: package [0] is being occupied.

似乎vehicle->control->takeoff()返回了一些错误(示例代码flight_control_sample.cpp中的L87),但我绝对不知道如何解决这个问题。

非常感谢帮助。谢谢!

1 个答案:

答案 0 :(得分:0)

我解决了这个问题:只需校准罗盘!

官方用户手册中有一个页面,其中包含有关如何校准指南针的信息。