50 J.block<3, 3>(0, 0) = -Matrix3::Identity();
61 "CACHE_SE3_OFFSET", pv);
71 return is.good() || is.eof();
101 J(0, 4) = -2 * Zcam(2);
102 J(0, 5) = 2 * Zcam(1);
104 J(1, 3) = 2 * Zcam(2);
106 J(1, 5) = -2 * Zcam(0);
108 J(2, 3) = -2 * Zcam(1);
109 J(2, 4) = 2 * Zcam(0);
112 J.block<3, 3>(0, 6) =
cache->
w2l().rotation();
114 Eigen::Matrix<double, 3, 9, Eigen::ColMajor> Jhom =
137 assert(from.size() == 1 && from.count(
_vertices[0]) == 1 &&
138 "Can not initialize VertexDepthCam position by VertexTrackXYZ");
146#ifdef G2O_HAVE_OPENGL
147EdgeSE3PointXYZDrawAction::EdgeSE3PointXYZDrawAction()
150HyperGraphElementAction* EdgeSE3PointXYZDrawAction::operator()(
151 HyperGraph::HyperGraphElement* element,
152 HyperGraphElementAction::Parameters* params_) {
153 if (
typeid(*element).name() != _typeName)
return nullptr;
154 refreshPropertyPtrs(params_);
155 if (!_previousParams)
return this;
157 if (_show && !_show->value())
return this;
159 EdgeSE3PointXYZ* e =
static_cast<EdgeSE3PointXYZ*
>(element);
160 VertexSE3* fromEdge =
static_cast<VertexSE3*
>(e->vertex(0));
161 VertexPointXYZ* toEdge =
static_cast<VertexPointXYZ*
>(e->vertex(1));
162 if (!fromEdge || !toEdge)
return this;
164 fromEdge->estimate() * e->offsetParameter()->offset();
166 glPushAttrib(GL_ENABLE_BIT);
167 glDisable(GL_LIGHTING);
169 glVertex3f((
float)fromTransform.translation().x(),
170 (
float)fromTransform.translation().y(),
171 (
float)fromTransform.translation().z());
172 glVertex3f((
float)toEdge->estimate().x(), (
float)toEdge->estimate().y(),
173 (
float)toEdge->estimate().z());
BaseFixedSizedEdge< D, Vector3, VertexSE3, VertexPointXYZ >::template JacobianType< D, VertexXj::Dimension > & _jacobianOplusXj
BaseFixedSizedEdge< D, Vector3, VertexSE3, VertexPointXYZ >::template JacobianType< D, VertexXi::Dimension > & _jacobianOplusXi
bool writeInformationMatrix(std::ostream &os) const
write the upper trinagular part of the information matrix into the stream
bool readInformationMatrix(std::istream &is)
bool readParamIds(std::istream &is)
reads the param IDs from the stream
EIGEN_STRONG_INLINE const Measurement & measurement() const
accessor functions for the measurement represented by the edge
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
bool writeParamIds(std::ostream &os) const
write the param IDs that are potentially used by the edge
Measurement _measurement
the measurement of the edge
const EstimateType & estimate() const
return the current estimate of the vertex
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
const Isometry3 & w2n() const
const Isometry3 & w2l() const
g2o edge from a track to a point node
ParameterSE3Offset * offsetParam
virtual void initialEstimate(const OptimizableGraph::VertexSet &from, OptimizableGraph::Vertex *to)
virtual bool write(std::ostream &os) const
write the vertex to a stream
virtual bool setMeasurementFromState()
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
Eigen::Matrix< double, 3, 9, Eigen::ColMajor > J
virtual void linearizeOplus()
virtual void setMeasurement(const Vector3 &m)
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EdgeSE3PointXYZ()
virtual bool resolveCaches()
VertexContainer _vertices
std::set< Vertex * > VertexSet
bool installParameter(ParameterType *&p, size_t argNo, int paramId=-1)
void resizeParameters(size_t newSize)
void resolveCache(CacheType *&cache, OptimizableGraph::Vertex *, const std::string &_type, const ParameterVector ¶meters)
A general case Vertex for optimization.
const Isometry3 & inverseOffset() const
rotation of the inverse offset as 3x3 rotation matrix
const Isometry3 & offset() const
rotation of the offset as 3x3 rotation matrix
Vertex for a tracked point in space.
3D pose Vertex, represented as an Isometry3
bool writeVector(std::ostream &os, const Eigen::DenseBase< Derived > &b)
bool readVector(std::istream &is, Eigen::DenseBase< Derived > &b)
Eigen::Transform< double, 3, Eigen::Isometry, Eigen::ColMajor > Isometry3
std::vector< Parameter * > ParameterVector
#define LANDMARK_EDGE_COLOR