30 #define GICP_ANALYTIC_JACOBIANS 40 #include <Eigen/Geometry> 49 typedef Eigen::Matrix<double, 6, 1, Eigen::ColMajor>
Vector6d;
92 y = y - normal0(1)*normal0;
95 R0.row(0) = normal0.cross(R0.row(1));
107 y = y - normal1(1)*normal1;
110 R1.row(0) = normal1.cross(R1.row(1));
121 return R0.transpose()*prec*R0;
132 return R1.transpose()*prec*R1;
143 return R0.transpose()*cov*R0;
154 return R1.transpose()*cov*R1;
176 virtual bool read(std::istream& is);
177 virtual bool write(std::ostream& os)
const;
197 cout << _transforms[_cnum] << endl;
199 p1 = _transforms[_cnum].map(measurement().pos1);
204 p1 = vp1->
estimate() * measurement().pos1;
205 p1 = vp0->
estimate().inverse() * p1;
214 _error = p1 - measurement().pos0;
217 cout <<
"vp0" << endl << vp0->
estimate() << endl;
218 cout <<
"vp1" << endl << vp1->
estimate() << endl;
219 cout <<
"e Jac Xj" << endl << _jacobianOplusXj << endl << endl;
220 cout <<
"e Jac Xi" << endl << _jacobianOplusXi << endl << endl;
228 information() = ( cov0 + transform * cov1 * transform.transpose() ).inverse();
233 #ifdef GICP_ANALYTIC_JACOBIANS 234 virtual void linearizeOplus();
253 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
258 virtual bool read(std::istream& is);
259 virtual bool write(std::ostream& os)
const;
273 Eigen::Matrix<double,3,4,Eigen::ColMajor>
w2n;
274 Eigen::Matrix<double,3,4,Eigen::ColMajor>
w2i;
283 const Eigen::Quaterniond &qrot)
285 m.block<3,3>(0,0) = qrot.toRotationMatrix().transpose();
295 const Eigen::Quaterniond &qrot)
297 m.block<3,3>(0,0) = qrot.toRotationMatrix();
302 static void setKcam(
double fx,
double fy,
double cx,
double cy,
double tx)
315 w2n = estimate().inverse().matrix().block<3,4>(0, 0);
329 dRdx = dRidx * w2n.block<3,3>(0,0);
330 dRdy = dRidy * w2n.block<3,3>(0,0);
331 dRdz = dRidz * w2n.block<3,3>(0,0);
352 double invp1 = 1.0/p1(2);
353 res.head<2>() = p1.head<2>()*invp1;
357 res(2) = p2(0)/p2(2);
376 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
380 virtual bool read(std::istream& is);
381 virtual bool write(std::ostream& os)
const;
404 _error = kp - _measurement;
406 #ifdef SCAM_ANALYTIC_JACOBIANS 408 virtual void linearizeOplus();
static void transformW2F(Eigen::Matrix< double, 3, 4, Eigen::ColMajor > &m, const Vector3D &trans, const Eigen::Quaterniond &qrot)
Eigen::Matrix< double, 3, 1, Eigen::ColMajor > Vector3D
virtual void oplusImpl(const double *update)
Eigen::Matrix< double, 4, 1, Eigen::ColMajor > Vector4D
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
void transform(PlaneList &l, const SE3Quat &t)
Eigen::Matrix< double, 3, 4, Eigen::ColMajor > w2i
void mapPoint(Vector3D &res, const Vector3D &pt3)
Eigen::Matrix< double, 3, 3, Eigen::ColMajor > Matrix3D
static void transformF2W(Eigen::Matrix< double, 3, 4, Eigen::ColMajor > &m, const Vector3D &trans, const Eigen::Quaterniond &qrot)
#define G2O_TYPES_ICP_API
Eigen::Matrix< double, 3, 4, Eigen::ColMajor > w2n
const EstimateType & estimate() const
return the current estimate of the vertex
virtual void oplusImpl(const double *update)
3D pose Vertex, represented as an Isometry3D
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
static void setKcam(double fx, double fy, double cx, double cy, double tx)
Point vertex, XYZ, is in types_sba.
Stereo camera vertex, derived from SE3 class. Note that we use the actual pose of the vertex as its p...
Matrix< double, 6, 1, Eigen::ColMajor > Vector6d