dji-sdk / RoboMaster-SDK

DJI RoboMaster Python SDK and Sample Code for RoboMaster EP.
Apache License 2.0
312 stars 141 forks source link

AI_module靠例程运行不了 #70

Closed kenton2000 closed 1 year ago

kenton2000 commented 2 years ago

原来的例程如下 import time from robomaster import robot

def sub_ia_info_handler(ai_info): id, x, y, w, h, C = ai_info print("ai target id:{0}, x:{1:.3f}, y:{2:.3f}, w:{3:.3f}, h:{4:.3f}, C:{5}".format(id, x, y, w, h, C))

if name == 'main': tl_drone = robot.Drone() tl_drone.initialize()

# 订阅AI模块信息
tl_drone.ai_module.sub_ai_info(freq=5, callback=sub_ia_info_handler)
time.sleep(60)

# 取消订阅
tl_drone.ai_module.unsub_ai_info()

tl_drone.close()

下面的报错结果为: AttributeError: 'Drone' object has no attribute 'ai_module'

似乎这个例程的接口变了

kenton2000 commented 1 year ago

更新固件就完事了