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

Why the size of Jacobian is 1*7? #50

Closed
FishInWave opened this issue Dec 19, 2021 · 4 comments
Closed

Why the size of Jacobian is 1*7? #50

FishInWave opened this issue Dec 19, 2021 · 4 comments

Comments

@FishInWave
Copy link

FishInWave commented Dec 19, 2021

Eigen::Map<Eigen::Matrix<double, 1, 7, Eigen::RowMajor> > J_se3(jacobians[0]);

Hi,
Why the size of jacobian is 1x7 rather than 1x6 ?

@XiaotaoGuo
Copy link

Since in ceres, the jacobian is composed of two parts. e.g J = J1*J2. J1 is the jacobian of the cost function to the global parameter (in this case, translation and quaternion), which is calculated by users or using auto diff. J2 is the jacobian of the global parameter to local parameter, defined in LocalParameterization class. See here: link

See similar discussion here: link

@sy8008
Copy link

sy8008 commented Apr 18, 2022

Since in ceres, the jacobian is composed of two parts. e.g J = J1*J2. J1 is the jacobian of the cost function to the global parameter (in this case, translation and quaternion), which is calculated by users or using auto diff. J2 is the jacobian of the global parameter to local parameter, defined in LocalParameterization class. See here: link

See similar discussion here: link

And Why is the last row of the jacobian matrix of the quarternion and translation w.r.t. Lie algebra se(3) is all zero?

@XiaotaoGuo
Copy link

XiaotaoGuo commented Apr 18, 2022

Since in ceres, the jacobian is composed of two parts. e.g J = J1*J2. J1 is the jacobian of the cost function to the global parameter (in this case, translation and quaternion), which is calculated by users or using auto diff. J2 is the jacobian of the global parameter to local parameter, defined in LocalParameterization class. See here: link
See similar discussion here: link

And Why is the last row of the jacobian matrix of the quarternion and translation w.r.t. Lie algebra se(3) is all zero?

I assume you are referring to the J2 (size of 7 * 6) in my previous comment. Here the author is manually calculating the jacobian matrix of cost function to local parameter, which is a 1x6 matrix. Thus he just use J1 and J2 as two placeholders, putting the computation result in J1, and setting J2 as a (almost) identity matrix. So the last column in J1 and last row in J2 are simply not used.

@sy8008
Copy link

sy8008 commented Apr 18, 2022

Since in ceres, the jacobian is composed of two parts. e.g J = J1*J2. J1 is the jacobian of the cost function to the global parameter (in this case, translation and quaternion), which is calculated by users or using auto diff. J2 is the jacobian of the global parameter to local parameter, defined in LocalParameterization class. See here: link
See similar discussion here: link

And Why is the last row of the jacobian matrix of the quarternion and translation w.r.t. Lie algebra se(3) is all zero?

I assume you are referring to the J2 (size of 7 * 6) in my previous comment. Here the author is manually calculating the jacobian matrix of cost function to local parameter, which is a 1x6 matrix. Thus he just use J1 and J2 as two placeholders, putting the computation result in J1, and setting J2 as a (almost) identity matrix. So the last column in J1 and last row in J2 are simply not used.

Thank you! It is clearer to me now.

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

3 participants