wh200720041 / floam

Fast LOAM: Fast and Optimized Lidar Odometry And Mapping for indoor/outdoor localization IROS 2021
Other
1.05k stars 274 forks source link

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

Closed FishInWave closed 2 years ago

FishInWave commented 2 years ago

https://github.com/wh200720041/floam/blob/9fdb2ca60a2988c0db515c9c1567100fba8b58d8/src/lidarOptimization.cpp#L33

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

XiaotaoGuo commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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.