Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In computeEdgeSE3Gradient, why the jacobians of dte/dtj is related to Rj #783

Open
issacfrog opened this issue Apr 10, 2024 · 0 comments
Open

Comments

@issacfrog
Copy link

Hello, g2o team.I’m learning about g2o optimizer.I had some questions about computeEdgeSE3Gradient function.
The code is as follow:

const Isometry3 A=Z.inverse();
const Isometry3 B=Xi.inverse()Xj;
E=A
B; // [Rz^-1 * Ri^-1 * Rj | Rz^-1 * Ri^-1 * tj - Rz^-1 ti - tz]*
Isometry3::ConstLinearPart Re = extractRotation(E);
Isometry3::ConstLinearPart Ra = extractRotation(A);
Isometry3::ConstLinearPart Rb = extractRotation(B);
Isometry3::ConstTranslationPart tb = B.translation();

Eigen::Matrix<double, 3, 9, Eigen::ColMajor> dq_dR;
compute_dq_dR(dq_dR, Re(0, 0), Re(1, 0), Re(2, 0), Re(0, 1), Re(1, 1),
Re(2, 1), Re(0, 2), Re(1, 2), Re(2, 2));
Ji.setZero();
Jj.setZero();
// dte/dti
Ji.template block<3, 3>(0, 0) = -Ra; // -Ra = - Rz^-1
// dte/dtj
Jj.template block<3, 3>(0, 0) = Re; // Re = Rz^-1 * Ri^-1 * Rj or Rz^-1 * Ri^-1
Is there something wrong with my formula ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant