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

Meaning of LidarEdgeFactor #7

Closed
getupgetup opened this issue Jun 13, 2019 · 4 comments
Closed

Meaning of LidarEdgeFactor #7

getupgetup opened this issue Jun 13, 2019 · 4 comments

Comments

@getupgetup
Copy link

Hi, I'm confused about the residual computed by LidarEdgeFactor in lidarFactor.hpp:
Eigen::Matrix<T, 3, 1> nu = (lp - lpa).cross(lp - lpb);
Eigen::Matrix<T, 3, 1> de = lpa - lpb;
residual[0] = nu.x() / de.norm();
residual[1] = nu.y() / de.norm();
residual[2] = nu.z() / de.norm();
What's the meaning of this residual?
Since the residual of LidarPlaneFactor means the distance from the point to the plane, shouldn't the residual of LidarEdgeFactor mean the distance from the point to the line? How to explain that
the residual is 3-dimensional? Thank you~

@andre-nguyen
Copy link

Isn't it this equation? https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_vector_formulation

@getupgetup
Copy link
Author

Isn't it this equation? https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_vector_formulation

Yeah, I can find the same equation in Ji.Zhang's paper. However, the distance is a scalar instead of a 3-d vector. Although both are same to Ceres, I still can't understand the meaning of vector instead of distance.

@lizimo061
Copy link

I think the residual here is most relevant to the Jacobian computation. Distance is not directly used in the cost function if you write the Jacobian equations explicitly for the point to LiDAR edge distance.

@getupgetup
Copy link
Author

I think the residual here is most relevant to the Jacobian computation. Distance is not directly used in the cost function if you write the Jacobian equations explicitly for the point to LiDAR edge distance.

However, the residual is just the distance in LidarPlaneFactor.

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