Skip to content

R_mean中手动推导的雅克比有问题 #1

Description

@lddnb

class MyCostFunction : public ceres::SizedCostFunction<3, 4>

上面这个函数中的
Eigen::Vector3d residual = residual_eigen;
jacobian_R.leftCols(3) = Jacob_right_inv(residual);

使用的旋转矩阵的方式推导得到的,但是直接用 ceres::EigenQuaternionManifold() 也能用,用自己写的右扰动四元数 RightQuaternionManifold 也能用,但是在一开始优化的时候残差不降反升
image
最终结果是差不多的
如果是用
// j.topRows<3>().setIdentity();
// j.bottomRows<1>().setZero();

替换 PlusJacobian 的增量雅克比计算过程,
image
可以看到残差都是下降的,但是收敛特别慢,这里的计算使用 ceres::EigenQuaternionManifold() + 自动求导三步就收敛了,这里可能要三四十步,具体原因未知,这个残差对四元数形式的求导没推出来也没找到对应的资料

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions