合并施向提交代码: 修复追踪器超出范围是位置信息为None导致的异常

合并施向提交代码: 修复追踪器超出范围是位置信息为None导致的异常
main
詹力 2024-10-18 21:14:28 +08:00
commit 4106ae665f
1 changed files with 11 additions and 7 deletions

View File

@ -17,10 +17,14 @@ if interval:
while(True): while(True):
start = time.time() start = time.time()
txt = "" txt = ""
for each in v.devices["hmd_1"].get_pose_euler(): pose_euler = v.devices["hmd_1"].get_pose_euler()
txt += "%.4f" % each if pose_euler is not None:
txt += " " for each in pose_euler:
print("\r" + txt, end="") txt += "%.4f" % each
sleep_time = interval-(time.time()-start) txt += " "
if sleep_time>0: print("\r" + txt, end="")
time.sleep(sleep_time) sleep_time = interval - (time.time() - start)
if sleep_time > 0:
time.sleep(sleep_time)
else:
print("定位器超出基站扫描视野范围!")