baidu / boteye

210 stars 72 forks source link

XPDRIVER::IMU_DataAccess failed #31

Closed QLJX closed 5 years ago

QLJX commented 6 years ago

我在启动相机一段时间后,会出现XPDRIVER::IMU_DataAccess failed的提示,并且相机停止工作。请问这是什么原因,如何修复? 我在驱动中找到了这段代码,但是没有理解错误产生的原因。 // [NOTE] We have to flip the axes properly to align IMU coordinates with Camera L // The stored time_stamp is in 100us XPDRIVER::ImuData xp_imu; convert_imu_axes(imu_data, sensortype, &xp_imu); xp_imu.time_stamp = (clock_count_wo_overflow - first_imu_clockcount) clock_unit_ms 10; if (imu_datacallback != nullptr) { imu_datacallback(xp_imu); }

  ++pull_imu_count_;
  if (pull_imu_count_ > 10) {
    const int ms = std::chrono::duration_cast<std::chrono::milliseconds>(
        steady_clock::now() - thread_pull_imu_pre_timestamp_).count();
    thread_pull_imu_pre_timestamp_ = steady_clock::now();
    pull_imu_rate_ = pull_imu_count_ * 1000 / ms;
    pull_imu_count_ = 0;
  }
} else {
  XP_LOG_ERROR("XPDRIVER::IMU_DataAccess failed");
}
yanghongtian commented 6 years ago

Hi, QLJX, 这个一般是sensor的USB接口接触不良导致的,尤其是sensor那边的micro USB

QLJX commented 6 years ago

好的,重新拔插之后可以运行,感谢