boteye icon indicating copy to clipboard operation
boteye copied to clipboard

IMU频率可调吗?

Open hgpvision opened this issue 8 years ago • 9 comments

IMU的频率显示为97-98Hz,并没有100Hz,正常吗?还有一个问题,IMU的频率可调吗?驱动程序里面似乎也没有看到用来调整到的IMU频率的函数?

hgpvision avatar Apr 21 '18 03:04 hgpvision

@hgpvision The IMU is polled at ~100 Hz at this moment. See https://github.com/baidu/boteye_driver/blob/1ac52f56ff54d3b83e3606b395f62757b1b40d5c/src/XP_sensor_driver.cc#L288.

On the firmware side, the Cypress polls IMU through I2C at 500 Hz (fixed) and timestamps it. The host then polls the latest cached IMU measurement.

mingyux avatar Apr 23 '18 05:04 mingyux

Thanks!It seems that I can obtain ~200Hz if I set the sleep time to ~4900 mircosecond. Is it right?

hgpvision avatar Apr 24 '18 07:04 hgpvision

@hgpvision yes,you are right. When I changed this value to 4950, the imu frequency was set to 200hz.

TAO270 avatar Aug 12 '18 15:08 TAO270

@mingyux Can camera output frequency be adjusted?I want to set it to 20hz.

QLJX avatar Sep 04 '18 01:09 QLJX

Change the sleep time here. https://github.com/baidu/boteye_driver/blob/master/src/XP_sensor_driver.cc#L320

mingyux avatar Sep 04 '18 17:09 mingyux

@mingyux From above, this place changes the frequency of imu. I want to change the frequency of camera to 20Hz. Which data should I change?

QLJX avatar Sep 05 '18 07:09 QLJX

Unfortunately, there's no easy way to adjust the frame rate at this moment. You need to go into the firmware, modify it, and then flash the firmware into the device again. https://github.com/baidu/boteye_sensor/blob/bf037c74297f2867a58f9712d9924e883944f4e3/firmware/sensor_v034_raw.c#L177

We're working on exposing an interface to adjust image rates & IMU rates.
However, the frame rate usually needs to be in sync with the AC if used indoor to avoid the flickering effect. For instance, the frame rate can be 20 Hz / 30 Hz / 60 Hz at 60 Hz AC, and the frame rate can be 25 Hz / 50 Hz at 50 Hz, but not 20 Hz.

mingyux avatar Sep 05 '18 17:09 mingyux

@mingyux Can this imaging_FPS_(25) change the frequency of image. https://github.com/baidu/boteye_driver/blob/a46d223c39d61f88ece393965735faa7659eada6/src/XP_sensor_driver.cc#L70

QLJX avatar Sep 07 '18 00:09 QLJX

No. We're still working on providing driver API to adjust image framerate & IMU rate. For now, the only way is to change the firmware and re-flash.

mingyux avatar Sep 07 '18 16:09 mingyux