rpng / open_vins

An open source platform for visual-inertial navigation research.
https://docs.openvins.com
GNU General Public License v3.0
2.06k stars 616 forks source link

Zero-velocity NaN in chi2 check #310

Closed EhrazImam closed 1 year ago

EhrazImam commented 1 year ago

Hi @goldbattle i am able to run it on my custom hardware and it runs perfect but after running it for several time on my hardware i can noticed 2/3 time it's stopped working. 1

As you asked for the dataset over here https://github.com/rpng/open_vins/issues/297#issuecomment-1423181810 please find the link https://drive.google.com/file/d/1X3i3MtK4kXGncgBYEP02Q5zxWhZU7UwX/view?usp=share_link

EhrazImam commented 1 year ago

@goldbattle Any update??

goldbattle commented 1 year ago

No I have not had time, but thanks for posting the bag so I can take a look when I get time.

On Sat, Feb 25, 2023 at 1:22 AM EhrazImam @.***> wrote:

@goldbattle https://github.com/goldbattle Any update??

— Reply to this email directly, view it on GitHub https://github.com/rpng/open_vins/issues/310#issuecomment-1445009115, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6TYVOM35SNEKQ7RCXP23WZGQLHANCNFSM6AAAAAAVD7BCAQ . You are receiving this because you were mentioned.Message ID: @.***>

EhrazImam commented 1 year ago

Ok thankyou

EhrazImam commented 1 year ago

Hi @goldbattle have you looked into this as today i crashed my drone while trying to do take off landing with the help of openvins which was running perfectly and after it stop working and drone got crashed. Thankyou It will be great if you can have a look into this

goldbattle commented 1 year ago

I assume this only happens during zero velocity update? Is it if you do a zero velocity update for a very long time? or any amount of time? What type of platform are you running on (OS version, arm / x86 etc..).

It looks like the chi2 is getting a NaN, which should only happen if the covariance becomes NaN which is a very large problem (an EKF cannot work if the covariance is invalid).

On Sat, Mar 4, 2023 at 5:43 AM EhrazImam @.***> wrote:

Hi @goldbattle https://github.com/goldbattle have you looked into this as today i crashed my drone while trying to do take off landing with the help of openvins which was running perfectly and after it stop working and drone got crashed. Thankyou It will be great if you can have a look into this

— Reply to this email directly, view it on GitHub https://github.com/rpng/open_vins/issues/310#issuecomment-1454695796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6TYQZMHQ4FKWXM3JU5EDW2MMF5ANCNFSM6AAAAAAVD7BCAQ . You are receiving this because you were mentioned.Message ID: @.***>

EhrazImam commented 1 year ago

@goldbattle For zero velocity yes it do but not only it happens with zero velocity it happens with while velocity update. I am Using Jetson How can i resolve chi2 error, Secondly i can give one more try to see the chi2 value. And one thing i noticed i am using my custom stereo pair i am using it without rectification as there is slightly height difference, could this be a problem??

goldbattle commented 1 year ago

The bag file you have posted has zero timestamps for the image topics. Could you upload the bag that has the problem and has valid timestamps? Additionally the config files you are running which cause the problem.

image

EhrazImam commented 1 year ago

Please find the calibration file that i am using econ.zip Please find the bag file link https://drive.google.com/file/d/1pqbX6whjo3egSdsm9bkyQ52Fd7V24rFE/view?usp=share_link

EhrazImam commented 1 year ago

@goldbattle any update??

goldbattle commented 1 year ago

I tested both stereo and mono with the bag / config you sent and was unabel to get it to NaN. image

Could you try with the latest master?

EhrazImam commented 1 year ago

@goldbattle Thankyou its been solved it was due to the stereo camera now its working fine.

Secondly you have added some changes over here https://github.com/rpng/open_vins/blob/master/config/rpng_sim/kalibr_imucam_chain.yaml where you are taking 4 camera intrinsic and extrinsic value but here you are using https://github.com/rpng/open_vins/blob/db026f3e68eea56b7e3d89daa0b5b4ddb12cd9e0/config/rpng_sim/estimator_config.yaml#L10 2 camera

goldbattle commented 1 year ago

Yep. If you simulate with more cameras then it will use those 3 and 4 configurations.

roslaunch ov_msckf simulation.launch max_cameras:=3

Only a simulation thing since the ROS subscribers currently only support 1-2 cameras as input. Glad you got things figured out.