37typedef Eigen::Matrix<double, 6, 1>
Vector6;
38typedef Eigen::Matrix<double, 6, 6>
Matrix6;
47 W = Matrix2::Identity();
48 U = Matrix3::Identity();
61 *
this << 0.0, 0.0, 0.0, 1.0, 0.0, 0.0;
84 Vector3 _d = cart.tail<3>() * 1.0 / cart.tail<3>().norm();
85 _p -= _d * (_d.dot(_p));
86 l.
setW(_p.cross(_p + _d));
94 w.x() = ortho.
U(0, 0) * ortho.
W(0, 0);
95 w.y() = ortho.
U(1, 0) * ortho.
W(0, 0);
96 w.z() = ortho.
U(2, 0) * ortho.
W(0, 0);
99 d.x() = ortho.
U(0, 1) * ortho.
W(1, 0);
100 d.y() = ortho.
U(1, 1) * ortho.
W(1, 0);
101 d.z() = ortho.
U(2, 1) * ortho.
W(1, 0);
116 mags << line.
d().norm(), line.
w().norm();
118 double wn = 1.0 / mags.norm();
119 ortho.
W << mags.y() * wn, -mags.x() * wn, mags.x() * wn, mags.y() * wn;
121 double mn = 1.0 / mags.y();
122 double dn = 1.0 / mags.x();
124 mdcross = line.
w().cross(line.
d());
125 double mdcrossn = 1.0 / mdcross.norm();
126 ortho.
U << line.
w().x() * mn, line.
d().x() * dn, mdcross.x() * mdcrossn,
127 line.
w().y() * mn, line.
d().y() * dn, mdcross.y() * mdcrossn,
128 line.
w().z() * mn, line.
d().z() * dn, mdcross.z() * mdcrossn;
134 double n = 1.0 /
d().norm();
145 ortho_update.
W << std::cos(v[3]), -std::sin(v[3]), std::sin(v[3]),
147 Quaternion quat(std::sqrt(1 - v.head<3>().squaredNorm()), v[0], v[1], v[2]);
149 ortho_update.
U = quat.toRotationMatrix();
151 ortho_estimate.
U = ortho_estimate.
U * ortho_update.
U;
152 ortho_estimate.
W = ortho_estimate.
W * ortho_update.
W;
162 Matrix2 W_delta = ortho_estimate.
W.transpose() * ortho_line.
W;
163 Matrix3 U_delta = ortho_estimate.
U.transpose() * ortho_line.
U;
171 delta[3] = std::atan2(W_delta(1, 0), W_delta(0, 0));
188 return std::atan2(v[2], sqrt(v[0] * v[0] + v[1] * v[1]));
192 return std::atan2(direction.y(), direction.x());
197 return std::atan2(direction.z(), direction.head<2>().norm());
G2O_TYPES_SLAM3D_ADDONS_API void setW(const Vector3 &w_)
G2O_TYPES_SLAM3D_ADDONS_API Line3D(const Vector6 &v)
G2O_TYPES_SLAM3D_ADDONS_API friend Line3D operator*(const Isometry3 &t, const Line3D &line)
static G2O_TYPES_SLAM3D_ADDONS_API Line3D fromCartesian(const Vector6 &cart)
static G2O_TYPES_SLAM3D_ADDONS_API OrthonormalLine3D toOrthonormal(const Line3D &line)
G2O_TYPES_SLAM3D_ADDONS_API void oplus(const Vector4 &v)
G2O_TYPES_SLAM3D_ADDONS_API void normalize()
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
G2O_TYPES_SLAM3D_ADDONS_API Line3D normalized() const
G2O_TYPES_SLAM3D_ADDONS_API Vector3 w() const
G2O_TYPES_SLAM3D_ADDONS_API Line3D()
G2O_TYPES_SLAM3D_ADDONS_API Vector4 ominus(const Line3D &line)
static G2O_TYPES_SLAM3D_ADDONS_API Line3D fromOrthonormal(const OrthonormalLine3D &ortho)
G2O_TYPES_SLAM3D_ADDONS_API Vector3 d() const
G2O_TYPES_SLAM3D_ADDONS_API Vector6 toCartesian() const
G2O_TYPES_SLAM3D_ADDONS_API void setD(const Vector3 &d_)
#define G2O_TYPES_SLAM3D_ADDONS_API
G2O_TYPES_SLAM3D_ADDONS_API double getElevation(const Vector3 &direction)
Vector6 transformCartesianLine(const Isometry3 &t, const Vector6 &line)
Vector6 normalizeCartesianLine(const Vector6 &line)
G2O_TYPES_SLAM3D_ADDONS_API double getAzimuth(const Vector3 &direction)
static double mline_elevation(const double v[3])
Eigen::Matrix< double, 6, 6 > Matrix6
Line2D operator*(const SE2 &t, const Line2D &l)
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3
Eigen::Matrix< double, 6, 4 > Matrix6x4
Eigen::Quaternion< double > Quaternion
EIGEN_MAKE_ALIGNED_OPERATOR_NEW