32 using namespace Eigen;
53 cartesian.tail<3>() = d()/d().norm();
55 double damping = 1e-9;
56 Matrix3D A = W.transpose()*W+(Matrix3D::Identity()*damping);
57 cartesian.head<3>() = A.ldlt().solve(W.transpose()*w());
65 A.block<3,3>(0,0)=x.linear();
66 A.block<3,3>(0,3)=
_skew(x.translation())*x.linear();
67 A.block<3,3>(3,3)=x.linear();
72 D.block<3,3>(0,0) = -
_skew(l.
d());
73 D.block<3,3>(0,3) = -2*
_skew(l.
w());
74 D.block<3,3>(3,3) = -2*
_skew(l.
d());
75 Jp.block<6,6>(0,0) = A*D;
81 double iln3 = std::pow(iln,3);
84 iln,0,0,-(w.x()*d.x())*iln3,-(w.x()*d.y())*iln3,-(w.x()*d.z())*iln3,
85 0,iln,0,-(w.y()*d.x())*iln3,-(w.y()*d.y())*iln3,-(w.y()*d.z())*iln3,
86 0,0,iln,-(w.z()*d.x())*iln3,-(w.z()*d.y())*iln3,-(w.z()*d.z())*iln3,
87 0,0,0,-(d.x()*d.x()-ln*ln)*iln3,-(d.x()*d.y())*iln3,-(d.x()*d.z())*iln3,
88 0,0,0,-(d.x()*d.y())*iln3,-(d.y()*d.y()-ln*ln)*iln3,-(d.y()*d.z())*iln3,
89 0,0,0,-(d.x()*d.z())*iln3,-(d.y()*d.z())*iln3,-(d.z()*d.z()-ln*ln)*iln3;
90 Jl.block<6,6>(0,0) = A*Jll;
91 Jl.block<1,6>(6,0) << 2*d.x(),2*d.y(),2*d.z();
96 A.block<3,3>(0,0)=t.linear();
97 A.block<3,3>(0,3)=
_skew(t.translation())*t.linear();
98 A.block<3,3>(3,3)=t.linear();
110 l.head<3>() = t*line.head<3>();
111 l.tail<3>() = t.linear()*line.tail<3>();
G2O_TYPES_SLAM3D_ADDONS_API Vector3D w() const
Eigen::Matrix< double, 6, 6, Eigen::ColMajor > Matrix6d
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
G2O_TYPES_SLAM3D_ADDONS_API Vector3D d() const
Line2D operator*(const SE2 &t, const Line2D &l)
static G2O_TYPES_SLAM3D_ADDONS_API void jacobian(Matrix7x6d &Jp, Matrix7x6d &Jl, const Isometry3D &x, const Line3D &l)
Vector6d transformCartesianLine(const Isometry3D &t, const Vector6d &line)
Eigen::Matrix< double, 7, 6, Eigen::ColMajor > Matrix7x6d
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3D
G2O_TYPES_SLAM3D_ADDONS_API Vector6d toCartesian() const
Eigen::Matrix< double, 3, 3, Eigen::ColMajor > Matrix3D
static void _skew(Matrix3D &S, const Vector3D &t)
Vector6d normalizeCartesianLine(const Vector6d &line)
Matrix< double, 6, 1, Eigen::ColMajor > Vector6d