xivo icon indicating copy to clipboard operation
xivo copied to clipboard

Running on EurocMav Datasets

Open goldbattle opened this issue 4 years ago • 10 comments

Hi, thanks again for open sourcing. Was trying to get your system running on the EurocMav datasets. I was able to compile and run on the TUM-VI room1 dataset it is just the euroc mavs that are having issues for me. I have attached the configuration file that I have created. I am starting the rosbag files from the very beginning of each dataset.

config.zip

Do you have a config file that I could use to evaluate your method on the EurocMav with? If not, do you see any problems with the one I have attached?

goldbattle avatar Feb 21 '20 06:02 goldbattle

We have not been testing on the EurocMav datasets. Can you please elaborate more on the problems that you're seeing?

Looking at your config file, this are the best guesses I can give you, short of trying to run and tune it myself.

  1. I notice that X.td is zero, and it is probably not zero. Since EuRoC and Kalibr are both published by ETH, you should be able to run the calibration dataset through Kalibr and get a better number.
  2. Double-check numbers for min_depth and max_depth and any other standard deviation numbers. They are very specific to the environment. TUM-VI room sequences are entirely contained in a small room, so 5m might be too small.
  3. If the datasets do not start from rest, set gravity_init_counter to 0 and make sure that X.Wg is correct.
  4. Make the noise parameters in Qimu bigger.; For TUM-VI dataset, we inflated the numbers by three times.
  5. If all that fails, edit src/CMakeLists.txt and turn on online calibration. (XIVO is under active development. I recently committed something that affects the radial-tangential distortion model, so please pull the latest copy of the devel branch.)

stephanietsuei avatar Feb 21 '20 21:02 stephanietsuei

Have you been able to find a working solution? When I looked into the IMU data of euroc and data9_workbench, I found that the directions of gravity are not equal (+9.7 for euroc / -9.7 for data9_workbench). I guess the orientation of the mounted IMU differs however I am not sure which parameter to adapt in order to correct for this.

malteprinzler avatar Feb 26 '20 15:02 malteprinzler

I haven't had time to really look at this, but I can comment on how Xivo deals with gravity.

If you start from constant velocity (e.g. rest), and if the parameter gravity_init_counter is greater than 0, then Xivo will use the average of the first gravity_init_counter IMU measurements to solve for the transformation that aligns the parameter gravity to the spatial frame. This transformation is stored as the state variable Wg (gravity vector -> spatial frame, so really Wsg). During this period, Xivo will not attempt to estimate the state. Wg will be adjusted/updated during state estimation.

The code that initializes gravity is the function xivo::Estimator::InitializeGravity which is called from xivo::Estimator::InertialMeasInternal

If you already know the proper value of Wg, then you can put that value in X.Wg and then set gravity_init_counter to 0. If your dataset does not start from constant velocity, you absolutely must do this.

stephanietsuei avatar Feb 26 '20 17:02 stephanietsuei

I have a question about your definition of W_{sg}. According to the xivo paper, the spatial frame is defined such that the gravity goes along the z-axis of the spatial frame: "The spatial frame s is attached to Earth and oriented so gravity T = [0 0 1]T x k is known." Shouldn't in this case W_{sg} always be Identity? What xivo::Estimator::InitializeGravity() seams to calculate is W_{bs}. Are my thoughts correct?

malteprinzler avatar Feb 28 '20 03:02 malteprinzler

Another possible explanation: the spatial frame coincides with the body frame during gravity initialization. Then everything is clear. Could someone please verify? Thanks

malteprinzler avatar Feb 28 '20 03:02 malteprinzler

The body frame is always aligned with the spatial frame during initialization; the spatial frame is defined to be wherever the body frame is at the very beginning.

The body frame, however, is not necessarily aligned with gravity at initialization. Then, W_{sg] is nonzero. Does that make sense?

stephanietsuei avatar Feb 28 '20 16:02 stephanietsuei

Yes that makes perfectly sense. Thank you very much for this clear explanation. I have one more question and even though it might not be directly connected to the EurocMav dataset it might help me to find a working configuration:

What exactly are the values in P used for?

I tried to do some digging in the source code but Im still not sure what P is used for.

malteprinzler avatar Feb 28 '20 17:02 malteprinzler

P contains the initial value of the state covariance. See

stephanietsuei avatar Feb 28 '20 18:02 stephanietsuei

Hi, was a config every uploaded that worked? I don't see one here. https://github.com/ucla-vision/xivo/tree/devel/cfg

goldbattle avatar Jan 03 '22 15:01 goldbattle

Oh whoops. It's been a while and I thought the problem had been solved.

stephanietsuei avatar Jan 03 '22 15:01 stephanietsuei