DJI Matrice 100 无人机激活失败

Failed activation of DJI Matrice 100 Drone

我正在尝试 运行 Matrice 100 的示例应用程序,方法是在 raspberry Pi 2.I 上使用 ROS,通过 USB-TTL 电缆将 Pi 连接到无人机无人机上的 UART 端口。我的笔记本电脑连接到无人机 运行ning DJI Assistant 2,控制器和我的 iPhone 也通过 DJI Go App(v3.1.54) 无线连接到无人机。所有这些都连接到互联网并登录到我各自的 DJI 开发者帐户。但是,当我 运行 "roslaunch dji_sdk sdk.launch" 时,我收到一条错误消息,提示无人机未激活。

我已从 DJI Assistant 2 启用 API 访问权限,我已确保 TX 和 RX 引脚连接正确,并且我已更改我的 sdk.launch 文件以获得正确的应用程序ID 和密钥。我在其他帖子中注意到,他们说要为 App ID、Key 和 BaudRate 编辑 UserConfig.txt 文件;但是,我无法在我的 Pi 上找到这个文件(它不存在)。只是我正确更改这些设置以适合我的应用程序和无人机的 sdk.launch 文件。

STATUS/1 @ init, L55: attempting to open device /dev/ttyUSB0 with     baudrate 230400...
STATUS/1 @ init, L65: ...serial started successfully.
STATUS/1 @ parseDroneVersionInfo, L727: device Serial No. = 041DF31901
STATUS/1 @ parseDroneVersionInfo, L729: Hardware = M100
STATUS/1 @ parseDroneVersionInfo, L730: Firmware = 3.1.10.0
STATUS/1 @ parseDroneVersionInfo, L733: Version CRC = 0xA6453AAC
STATUS/1 @ initSubscriber, L778: Telemetry subscription mechanism is not   supported on this platform!
STATUS/1 @ initMFIO, L981: MFIO is not supported on this platform!
STATUS/1 @ initHardSync, L1077: Hardware sync is not supported on this platform!
STATUS/1 @ activate, L1313: version 0x3010A00
STATUS/1 @ getErrorCodeMessage, L656: activate
STATUS/1 @ getCMDSetActivationMSG, L705: NEW_DEVICE_ERROR

ERRORLOG/1 @ activate, L1339: Failed to activate please retry SET 0x0 ID 0x1 code 0x3

ERRORLOG/1 @ activate, L1346: Solutions for NEW_DEVICE_ERROR
   *Double check your app_id and app_key in UserConfig.txt. Does is match with your DJI developer account?
   *If this is a new device, you need to activate it through the App or DJI assistant 2 with internet
   For different aircraft, the App and the version of DJI Assistant 2 might be different, 
   For A3, N3, M600/Pro and M100, please use DJI Go App
   For DJI Assistant 2, it's available on the download tab of the product page
   *If this device is previously activated with another app_id and app_key, you will need to reactivate it again
   *A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.

[ERROR] [1560967071.851508645]: drone activation error
[ERROR] [1560967071.851845364]: Vehicle initialization failed

我检查了sdk.launch文件中的app_id和app_key,它们与我在DJI网站上的应用程序相同。仍然无法找到文件 "UserConfig.txt"。在设备已通过控制器连接到车辆后,我看不到在 DJI Go App 上激活设备的位置。对于 DJI Assistant 2,我也找不到下载选项卡或 where/how 来通过我的笔记本电脑为 OSDK 激活无人机。我不相信它是用另一个 app_id 激活的,并且考虑到它是非常新的密钥。所以这就是我卡住的地方,我想 运行 无人机上的示例应用程序。关于如何解决此问题的任何想法?

欢迎来到DJI SDK的地狱世界。低劣的 API 文档和错误之地的世界。

根据您的错误,link 没问题 -> 如您所见固件版本。

错误是新设备错误,这意味着您没有打开远程。或遥控器未连接到 Go App 或 Go App 未授权 API .

连接所有设备并相应地启动所有设备。

  1. 打开无人机和遥控器。连接 phone 和 Go App。

确保您可以在地图上看到无人机位置。

  1. 一旦您在 Go App 的地图中看到无人机,运行sdk.launch。

一旦你这样做,Go App 会弹出一个 MESSAGE 说 api sth sth xxxxxxxxx,你必须按 OK 或确认。这是为了解决新设备错误

然后 ctrl-C 终端和 运行 sdk.laucnch 再次。

还要确保 sdk.lunch 应用程序 ID 与登录 Go 应用程序的帐户相同

如果第一次不工作,重新启动并重复这 2 个步骤。

sdk.launch需要至少两次运行。我知道它很愚蠢,但它是 DJI,而且很常见。

另外请记住为您的 /dev/serial/by-id/usbXXXX 设置 udev 规则,然后为串口设置低延迟模式。这些都是您会预料到的常见错误。

几天前我遇到了同样的问题,并在 Stack Overflow、DJI 论坛等上浏览了大约 10-20 个帖子。我联系了 dev@dji.com,他们建议的方法对我有用。下面是邮件。

Bruce Cheung (DJI) 6 Sep, 11:22 CST

Dear Chris,

Thank you for contacting DJI.

If have the same error log as before, it doesn't matter the new device is activated. Suggest that you can delete the catkin_ws folder, then git clone DJI OSDK-ROS source code, modify dji_sdk_node.cpp, and do catkin_make. You can provide a new log document if there is any problem again. Good luck with your project.

Thank you for your understanding and support, hope you have a nice day.

Best Regards, DJI SDK Support Team

成功后我的回复:

Thank you, I took your advice and it worked.

I deleted the folders, did catkin_make. This time I made a 2nd Onboard SDK project at developer.dji.com and used that one instead. My first one had been activated on the same computer but through the Linux (not ROS sdk). Not sure if that makes a difference. It works now.

Chris

我真的不确定为什么删除然后卸载有效,因为我确实在前一两天添加了一个新安装。但我猜它奏效了。我还制作了第二个 API 键,但根据 DJI 的说法,这不是它起作用的原因。