g2o内部定义的常用顶点类型

  • Post author:
  • Post category:其他


g2o内部定义的常用顶点类型:

VertexSE2 : public BaseVertex<3, SE2> //2D pose Vertex, (x,y,theta)
VertexSE3 : public BaseVertex<6, Isometry3> //6d vector (x,y,z,qx,qy,qz) (note that weleave out the w part of the quaternion)
VertexPointXY : public BaseVertex<2, Vector2>VertexPointXYZ : public BaseVertex<3, Vector3>
VertexSBAPointXYZ : public BaseVertex<3, Vector3>

// SE3 Vertex parameterized internally with a transformation matrix and externally withits exponential map
VertexSE3Expmap : public BaseVertex<6, SE3Quat>

// SBACam Vertex, (x,y,z,qw,qx,qy,qz),(x,y,z,qx,qy,qz) (note that we leave out the w partof the quaternion.
// qw is assumed to be positive, otherwise there is an ambiguity in qx,qy,qz as arotation
VertexCam : public BaseVertex<6, SBACam>

// Sim3 Vertex, (x,y,z,qw,qx,qy,qz),7d vector,(x,y,z,qx,qy,qz) (note that we leave outthe w part of the quaternion.VertexSim3Expmap : public BaseVertex<7, Sim3>

顶点类型这里面如果没有,就得自己定义了

重新定义顶点一般需要考虑重写如下函数:

virtual bool read(std::istream& is);
virtual bool write(std::ostream& os) const;
virtual void oplusImpl(const number_t* update);
virtual void setToOriginImpl();



版权声明:本文为ypange原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。