30#define GICP_ANALYTIC_JACOBIANS
33#include <Eigen/Geometry>
110 prec << e, 0, 0, 0, e, 0, 0, 0, 1;
111 return R0.transpose() * prec *
R0;
118 prec << e, 0, 0, 0, e, 0, 0, 0, 1;
119 return R1.transpose() * prec *
R1;
126 cov << 1, 0, 0, 0, 1, 0, 0, 0, e;
127 return R0.transpose() * cov *
R0;
134 cov << 1, 0, 0, 0, 1, 0, 0, 0, e;
135 return R1.transpose() * cov *
R1;
155 virtual bool read(std::istream& is);
156 virtual bool write(std::ostream& os)
const;
175 cout << _transforms[_cnum] << endl;
183 p1 = vp0->
estimate().inverse() * p1;
195 cout <<
"vp0" << endl << vp0->
estimate() << endl;
196 cout <<
"vp1" << endl << vp1->
estimate() << endl;
207 .topLeftCorner<3, 3>();
212#ifdef GICP_ANALYTIC_JACOBIANS
213 virtual void linearizeOplus();
235 virtual bool read(std::istream& is);
236 virtual bool write(std::ostream& os)
const;
249 Eigen::Matrix<double, 3, 4, Eigen::ColMajor>
251 Eigen::Matrix<double, 3, 4, Eigen::ColMajor>
259 static void transformW2F(Eigen::Matrix<double, 3, 4, Eigen::ColMajor>& m,
261 m.block<3, 3>(0, 0) = qrot.toRotationMatrix().transpose();
269 static void transformF2W(Eigen::Matrix<double, 3, 4, Eigen::ColMajor>& m,
271 m.block<3, 3>(0, 0) = qrot.toRotationMatrix();
276 static void setKcam(
double fx,
double fy,
double cx,
double cy,
double tx) {
288 w2n =
estimate().inverse().matrix().block<3, 4>(0, 0);
322 double invp1 =
cst(1.0) / p1(2);
323 res.head<2>() = p1.head<2>() * invp1;
326 p2 =
Kcam * (p2 - pb);
327 res(2) = p2(0) / p2(2);
344 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
348 virtual bool read(std::istream& is);
349 virtual bool write(std::ostream& os)
const;
374#ifdef SCAM_ANALYTIC_JACOBIANS
376 virtual void linearizeOplus();
BaseFixedSizedEdge< D, EdgeGICP, VertexSE3, VertexSE3 >::template JacobianType< D, VertexSE3::Dimension > & _jacobianOplusXj
BaseFixedSizedEdge< D, EdgeGICP, VertexSE3, VertexSE3 >::template JacobianType< D, VertexSE3::Dimension > & _jacobianOplusXi
EIGEN_STRONG_INLINE const Measurement & measurement() const
EIGEN_STRONG_INLINE const InformationType & information() const
const EstimateType & estimate() const
return the current estimate of the vertex
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual bool write(std::ostream &os) const
write the vertex to a stream
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Edge_XYZ_VSC()
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
virtual bool write(std::ostream &os) const
write the vertex to a stream
VertexContainer _vertices
Vertex for a tracked point in space.
Stereo camera vertex, derived from SE3 class. Note that we use the actual pose of the vertex as its p...
static void transformW2F(Eigen::Matrix< double, 3, 4, Eigen::ColMajor > &m, const Vector3 &trans, const Quaternion &qrot)
static void transformF2W(Eigen::Matrix< double, 3, 4, Eigen::ColMajor > &m, const Vector3 &trans, const Quaternion &qrot)
virtual bool write(std::ostream &os) const
write the vertex to a stream
virtual void oplusImpl(const double *update)
static void setKcam(double fx, double fy, double cx, double cy, double tx)
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Eigen::Matrix< double, 3, 4, Eigen::ColMajor > w2n
void mapPoint(Vector3 &res, const Vector3 &pt3)
Eigen::Matrix< double, 3, 4, Eigen::ColMajor > w2i
EIGEN_MAKE_ALIGNED_OPERATOR_NEW VertexSCam()
3D pose Vertex, represented as an Isometry3
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
virtual void oplusImpl(const double *update)
#define G2O_TYPES_ICP_API
constexpr double cst(long double v)
Eigen::Quaternion< double > Quaternion
void transform(PlaneList &l, const SE3Quat &t)