Skip to content

The linearize function in plane_icp_factor.hpp, the Jacobian matrix should be a 1 by 6 matrix. #105

@zhao-zhibo

Description

@zhao-zhibo

Thank you very much for your open source work.
Describe the bug
The correct way to write it should be as follows:

    Eigen::Matrix<double, 1, 6> J = Eigen::Matrix<double, 1, 6>::Zero();
    const Eigen::Vector3d p_source = traits::point(source, source_index).template head<3>();
    J.block<1, 3>(0, 0) = -target_normal.template head<3>().transpose() * T.linear() * skew(p_source);
    J.block<1, 3>(0, 3) = -target_normal.template head<3>().transpose() * T.linear();

The current writing method is a 4 by 6 matrix construction form:

    Eigen::Matrix<double, 4, 6> J = Eigen::Matrix<double, 4, 6>::Zero();
    J.block<3, 3>(0, 0) = target_normal.template head<3>().asDiagonal() * T.linear() * skew(traits::point(source, source_index).template head<3>());
    J.block<3, 3>(0, 3) = target_normal.template head<3>().asDiagonal() * (-T.linear());

To Reproduce
Steps to reproduce the behavior:

  1. Build the package
  2. Run '...'

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: [e.g. Ubuntu]
  • Version [e.g. 22.04]
  • Language [C++ / Python]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions