WIP: add homogenization term to D = 1 lifting to QCQP factor#2549
WIP: add homogenization term to D = 1 lifting to QCQP factor#2549avinashresearch1 wants to merge 5 commits into
Conversation
|
Discussion on conversion to QCQP: would it be reasonable to use: |
|
To keep the math consistent, we keep the two steps: 1. lifting, 2. homogenization & truncation separate. This is because the lifting step is identical for SE(2), SE(3) and so on, but homogenization & truncatio is lie group specific Step 1: Lifting Derivation:
where M is the measured relative transform/rotation. Using column-major The standard vectorization identity is
For the right-product term R1 M, take X = I, Y = R1, Z = M: Then the residual can be written
we build The noise model whitens this residual by left-multiplying B:
For Rot2, there is no truncation. the lifted coordinate layout is |
|
On Kronecker: Yes, but one caveat: GTSAM_WITH_EIGEN_UNSUPPORTED defaults OFF for installing bundled unsupported headers. So avoid adding unsupported Eigen includes to public GTSAM headers. Inside .cpp files is fine. |
| if constexpr (D == 1) { | ||
| const Matrix2 R = value.matrix(); | ||
| return Eigen::Map<const Matrix>(R.data(), 4, 1); | ||
| Matrix X(5, 1); |
| const Matrix Q = whitenedB.transpose() * whitenedB; | ||
|
|
||
| // From here on we do homogenization and truncation (which may be Lie-group specific): | ||
| constexpr int LiftedDim = AmbientDim + 1; // First entry is homogenization |
There was a problem hiding this comment.
we should get rid of AmbientDim! It's already defined as Dim in this class.
| const Matrix Q = whitenedB.transpose() * whitenedB; | ||
|
|
||
| // From here on we do homogenization and truncation (which may be Lie-group specific): | ||
| constexpr int LiftedDim = AmbientDim + 1; // First entry is homogenization |
There was a problem hiding this comment.
This works for SO(2), SO(3), but dow we truly use 17 rows for SE(3)?
There was a problem hiding this comment.
No, that is what I'm trying to explain in the comment: #2549 (comment)
we should separate lifting and homogenization/truncation. So we should lift to 16 rows, then truncate the 4 rows and then add the homogenization row. Because the lifting math is the same. It is only that we truncate for SE(3) but not for SO(2), SO(3).
There was a problem hiding this comment.
Yes - I think I am saying the same thing. We commit to 17 for SE(3) in the D=1 case, and make sure factors adhere to it. So, we should go down to 17 here, in FrobeniusFactor
There was a problem hiding this comment.
The 17 is a temporary thing that exists in memory before it is truncated to 13
There was a problem hiding this comment.
Excellent. BTW my comment about AmbientDim still holds. Please remove and change to Dim everywhere.
No description provided.