Hi José Luis,
In our lab we have recently come up with a function that allows us to accurately recover the covariance of the displacement between two poses. I'm opening this issue because I thought it might be of interest to the library. Let me know what you think about it.
Context: I'm currently working with pose graph SLAM in underwater scenarios. It is not uncommon that underwater robots have very reliable inertial navigation systems (INSs). These sensors usually have very low drift because of their high-end gyroscopes and because they can directly measure velocity using Doppler Velocity Logs (DVLs). Therefore, we can safely assume that the displacement between two poses calculated by the INS has very low errors.
Taking this into account, a very convenient way of building the graph is adding these displacements as between_factors (without the need of integrating inertial measurements ourselves). However, now the question arises: how do we characterize the covariance matrices of these displacements?
We assume we have two poses (with their covariance matrices) that we have read from the INS: $x_{k-1}$ and $x_k$. We can compute the displacement as:
$\Delta x_k = \ominus x_{k-1} \oplus x_k$
Using MRPT, we could do:
mrpt::poses::CPose3DPDFGaussian pose_k_1, pose_k = ... // Read from INS
mrpt::poses::CPose3DPDFGaussian displacement = - pose_k_1 + pose_k;
However, this is no good, because the resulting covariance of the variable displacement would be larger than any of the matrices of the poses. Instead, the displacement covariance should exactly reflect the increment in uncertainty from $x_{k-1}$ to $x_k$. Said differently, this test should hold true:
mrpt::poses::CPose3DPDFGaussian pose_k_1 = random_initialization;
mrpt::poses::CPose3DPDFGaussian displacement_ground_truth = random_initialization;
mrpt::poses::CPose3DPDFGaussian pose_k = pose_k_1 + displacement_ground_truth;
mrpt::poses::CPose3DPDFGaussian displacement = pose_k_1.relativeDisplacement(pose_k);
Doing this, displacement and displacement_ground_truth should be the same. The reason displacement = - pose_k_1 + pose_k is not correct is that $x_{k-1}$ and $x_k$ are strongly correlated: $x_k= x_{k-1} \oplus \Delta x_k$.
We have found out that we can know exactly the cross-correlation term between pairs of poses, which makes the relativeDisplacement function return the exact value for the displacement covariance. The explanation is a bit too long to write here, but I just wanted to check if you see this as a nice feature to have in the library (maybe it's something that you already do and I'm not aware of). If so, I could do a PR with it.
Best regards,
Miguel
Hi José Luis,
In our lab we have recently come up with a function that allows us to accurately recover the covariance of the displacement between two poses. I'm opening this issue because I thought it might be of interest to the library. Let me know what you think about it.
Context: I'm currently working with pose graph SLAM in underwater scenarios. It is not uncommon that underwater robots have very reliable inertial navigation systems (INSs). These sensors usually have very low drift because of their high-end gyroscopes and because they can directly measure velocity using Doppler Velocity Logs (DVLs). Therefore, we can safely assume that the displacement between two poses calculated by the INS has very low errors.
Taking this into account, a very convenient way of building the graph is adding these displacements as
between_factors(without the need of integrating inertial measurements ourselves). However, now the question arises: how do we characterize the covariance matrices of these displacements?We assume we have two poses (with their covariance matrices) that we have read from the INS:$x_{k-1}$ and $x_k$ . We can compute the displacement as:
$\Delta x_k = \ominus x_{k-1} \oplus x_k$
Using MRPT, we could do:
However, this is no good, because the resulting covariance of the variable$x_{k-1}$ to $x_k$ . Said differently, this test should hold true:
displacementwould be larger than any of the matrices of the poses. Instead, the displacement covariance should exactly reflect the increment in uncertainty fromDoing this,$x_{k-1}$ and $x_k$ are strongly correlated: $x_k= x_{k-1} \oplus \Delta x_k$ .
displacementanddisplacement_ground_truthshould be the same. The reasondisplacement = - pose_k_1 + pose_kis not correct is thatWe have found out that we can know exactly the cross-correlation term between pairs of poses, which makes the
relativeDisplacementfunction return the exact value for the displacement covariance. The explanation is a bit too long to write here, but I just wanted to check if you see this as a nice feature to have in the library (maybe it's something that you already do and I'm not aware of). If so, I could do a PR with it.Best regards,
Miguel