ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.21k stars 1.38k forks source link

Translation error (near to 0) between IMU and camera. #599

Closed LarryDong closed 1 year ago

LarryDong commented 1 year ago

The translation between my IMU and camera is about 10cm. However, the kalibr gives the wrong translation (x,y,z are all near to 0) but the rotation seems correct.

T_ci:  (imu0 to cam0): 
[[ 0.98235183  0.18703993  0.0009721   0.00003113]
 [ 0.01204317 -0.05806375 -0.99824023  0.00008589]
 [-0.18665434  0.98063483 -0.05929158  0.00000564]
 [ 0.          0.          0.          1.        ]]

Here, the last column for translation is wrong. Here is the results pdf: test-report-imucam.pdf

What I've found instersting is that, the estimated bias of acc and gyro is always constant (the same as mentioned issues below):

图片


I've viewed some of the issues, and found some others have the similar issues, such as https://github.com/ethz-asl/kalibr/issues/572#issue-1397895936, https://github.com/ethz-asl/kalibr/issues/451#issuecomment-964985577. My platform: ubuntu 18.04, ros melodic. I've changed IMU frequency from 100Hz to 1000Hz, and I also tried camera's fps at 4, 10, and 20, but they didn't help. Also, I changed the translation between camera and IMU, 3cm to 10cm, in either imu's z axis or imu's y axis.

The camera's calibration is given by kalibr and the matlab gives the similar results. Thre reprojection error is lower than 1px. The IMU is KVH1750 (about $ 30,000) and calibrated by https://github.com/gaowenliang/imu_utils. When recording the rosbag, 3-axis rotation and translation are smooth and slow, and 3-axis are well excited I believe.

Hope to get your help.

goldbattle commented 1 year ago

Does the accelerometer have gravity in it? Looking at the IMU timestamps, there might be something wrong there. image

Why are some sequential IMU readings have 30ms, while others have near zero? This will need to be addressed (should be one flat light at 1/1000 or 1/100).

The accelemeter noises seem a bit large here, so maybe there is something there too? image

Have you tried processing your static IMU bag with: https://github.com/ori-drs/allan_variance_ros

How long is your static bag? Are you able to post any of the bag files you collected?

LarryDong commented 1 year ago

@goldbattle Thanks for your quick reply.

Does the accelerometer have gravity in it?

Yes.

Why are some sequential IMU readings have 30ms, while others have near zero?

Yes it is an issue indeed. Thanks for point it out!
I'm using boost::asio::serial_port to read IMU from ttyUSB0, and I found that there is a 30ms delay (I got 3 sequences every 30ms).
I have solved this timestamp issue by chaging the latency_timer to 1 (default: 16) of serial_port on linux system, by:

sudo sh -c 'echo 1 > /sys/bus/usb-serial/devices/ttyUSB0/latency_timer'

See this. Hope it can help others who have the same problem.

The accelemeter noises seem a bit large here, so maybe there is something there too? Have you tried processing your static IMU bag with: allan_variance_ros?

I will try it soon. Thanks.

How long is your static bag?

about 2 hours. I will use a longer one later.

Are you able to post any of the bag files you collected?

If there are still issues, I will upload one.

Thanks again for your reply. Please keep this issue open, and I will close it if there's no other issues.

LarryDong commented 1 year ago

The accelemeter noises seem a bit large here, so maybe there is something there too?

Yep another issue found in gyroscope. The unit should be rad/s but I'm using degree.
The calibration results seems correct (although not so accurate). I appreciate your suggestions. @goldbattle

In summary, two reasons lead to this issue:

Jawaheru commented 2 months ago

Where did u change the gyroscope unit?

LarryDong commented 2 months ago

Where did u change the gyroscope unit?

Just multiply the value by "180/PI" when publishing, or using a new node to subcribe and re-publish the value.

Jawaheru commented 2 months ago

Yes, but the gyro data we enter for the calibration is only the random walk and white noise. You mean the recorded imu data shud be captured in rad right?

On Fri, Apr 26, 2024 at 2:29 PM LarryDong @.***> wrote:

Where did u change the gyroscope unit?

Just multiply the value by "180/PI" when publishing, or using a new node to subcribe and re-publish the value.

— Reply to this email directly, view it on GitHub https://github.com/ethz-asl/kalibr/issues/599#issuecomment-2079205198, or unsubscribe https://github.com/notifications/unsubscribe-auth/AX6LI324TJVFYR2LSUY4DRDY7I3CJAVCNFSM6AAAAAAWAFFXL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZZGIYDKMJZHA . You are receiving this because you commented.Message ID: @.***>