21 unsigned int index = 2*i;
23 _error[index+1] = m[1] - _measurement[index+1];
33 unsigned int index = 2*i;
38 for(
unsigned int i=0; i<_observedPoints*2; i++){
40 for(
unsigned int j=i; j<_observedPoints*2; j++){
45 for(
unsigned int j=0; j<i; j++){
60 unsigned int index = 2*i;
65 for(
unsigned int i=0; i<_observedPoints*2; i++){
66 for(
unsigned int j=i; j<_observedPoints*2; j++){
81 double ct = cos(th1) ;
82 double st = sin(th1) ;
85 unsigned int rows = 2*(
_vertices.size()-1);
96 for(
unsigned int i=1; i<
_vertices.size(); i++){
99 const double& x2 = point->
estimate()[0];
100 const double& y2 = point->
estimate()[1];
102 unsigned int index = 2*(i-1);
104 Ji.block<2,2>(index,0) = minusPoseRot;
106 Ji(index,2) = ct * (y2-y1) + st * (x1 - x2);
107 Ji(index+1,2) = st * (y1-y2) + ct * (x1 - x2);
113 Jj.block<2,2>(index, 0) = poseRot;
133 estimate_this[i] =
true;
137 for(std::set<HyperGraph::Vertex*>::iterator it=fixed.begin(); it!=fixed.end(); it++){
138 for(
unsigned int i=1; i<
_vertices.size(); i++){
140 if(vert->
id() == (*it)->id()) estimate_this[i-1] =
false;
144 for(
unsigned int i=1; i<
_vertices.size(); i++){
145 if(estimate_this[i-1]){
146 unsigned int index = 2*(i-1);
158 for(std::set<HyperGraph::Vertex *>::iterator it=fixed.begin(); it!=fixed.end(); it++){
175 unsigned int index = 2*i;
Eigen::Matrix< double, 2, 1, Eigen::ColMajor > Vector2D
int id() const
returns the id
virtual void initialEstimate(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
std::set< Vertex * > VertexSet
Eigen::Matrix< double, 2, 2, Eigen::ColMajor > Matrix2D
2D pose Vertex, (x,y,theta)
virtual bool read(std::istream &is)
read the vertex from a stream, i.e., the internal state of the vertex
virtual bool setMeasurementFromState()
virtual void linearizeOplus()
void setSize(int vertices)
const Eigen::Rotation2Dd & rotation() const
rotational component
virtual void computeError()
virtual bool write(std::ostream &os) const
write the vertex to a stream
base class to represent an edge connecting an arbitrary number of nodes
void setEstimate(const EstimateType &et)
set the estimate for the vertex also calls updateCache()
A general case Vertex for optimization.
Eigen::Matrix< double, Eigen::Dynamic, 1, Eigen::ColMajor > VectorXD
virtual double initialEstimatePossible(const OptimizableGraph::VertexSet &, OptimizableGraph::Vertex *)
virtual void resize(size_t size)
EIGEN_STRONG_INLINE const InformationType & information() const
information matrix of the constraint
const EstimateType & estimate() const
return the current estimate of the vertex
SE2 inverse() const
invert :-)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor > MatrixXD
const Vector2D & translation() const
translational component
unsigned int _observedPoints
std::vector< JacobianType, Eigen::aligned_allocator< JacobianType > > _jacobianOplus
jacobians of the edge (w.r.t. oplus)
VertexContainer _vertices