Ask Your Question

FOVIS odometry produces NaNs

asked 2013-02-21 08:04:55 -0500

Spym gravatar image

updated 2014-01-28 17:15:21 -0500

ngrennan gravatar image

Good day everyone.

I've tested FOVIS library with Juergen Sturm's datasets and discovered that sometimes (approximately every 500 frames) fovis::VisualOdometry may produce some NaNs in the estimated transformation. The input datasets have no NaN; unknown depth is encoded by zeroes.

Here are the samples: In particular I've used Pioneer and Desk 360.

Now I simply create a new instance of fovis::VisualOdometry every time I see NaN in output, but I don't like this kind of voodoo programming much.

Is it a flaw of the library itself, or maybe there is something I need to fix?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-02-27 02:50:38 -0500

Hi Spym!

It could happen when fovis changes the reference frame. If you launch our wrapper you will see a new ROS topic called /stereo_odometer/info (or the name you set instead). In this topic there is a boolean variable called 'change_reference_frame' which is True when fovis changes the reference frame.

Can you, check if you got the NaN when this variable is True? This could help us to isolate the problem...

If not, check the other variables in the info message, like 'num_total_keypoints' for example. A small value here could produce NaN

edit flag offensive delete link more


Here the results: Sadly, I see no corellation neither with frame switching nor number of keypoints. Maybe there are some other interesting parameters I may look closely?

Spym gravatar image Spym  ( 2013-02-27 10:26:27 -0500 )edit

It seems you have sufficient keypoints, and the reference frame is not changing at the moment of NaN. I would suggest you 2 things: Check the way you pass the images to Fovis and try to change some algorithm parameters and see what happens. You can find the parameters in the file stereo-odometry.cpp

Pep Lluis Negre gravatar image Pep Lluis Negre  ( 2013-02-27 21:24:15 -0500 )edit

answered 2013-02-27 01:27:21 -0500

Miquel Massot gravatar image

Hi Spym!

we have made a fovis_ros wrapper that may solve your problems. Please, take a look at it at and let us know what do you think!

edit flag offensive delete link more


Thanks Miquel, but your wrapper fails in the same way, I've tested it. I made my own FOVIS wrapper because I needed the motion covariance, and had to do something with these NaNs as well.

Spym gravatar image Spym  ( 2013-02-27 01:36:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2013-02-21 08:04:55 -0500

Seen: 662 times

Last updated: Feb 27 '13