edge_switchPrior.cpp
Go to the documentation of this file.
1 #include "edge_switchPrior.h"
2 using namespace std;
3 
5  {
6  setMeasurement(1.0);
7  }
8 
9  bool EdgeSwitchPrior::read(std::istream &is)
10  {
11  double new_measurement;
12  is >> new_measurement;
13 
14  setMeasurement(new_measurement);
15 
16  is >> information()(0,0);
17  return true;
18  }
19 
20  bool EdgeSwitchPrior::write(std::ostream &os) const
21  {
22  os << measurement() << " " << information()(0,0);
23  return true;
24  }
25 
26  void EdgeSwitchPrior::setMeasurement(const double & m)
27  {
28  g2o::BaseEdge<1, double>::setMeasurement(m);
29  information()(0,0) = 1.0;
30  }
31 
33  {
34  _jacobianOplusXi[0]=-1.0;
35  }
36 
38  {
39  const VertexSwitchLinear* s = static_cast<const VertexSwitchLinear*>(_vertices[0]);
40 
41  _error[0] = measurement() - s->x();
42 
43  }
44 
edge_switchPrior.h
s
RealScalar s
EdgeSwitchPrior::linearizeOplus
virtual void linearizeOplus()
Definition: edge_switchPrior.cpp:32
os
ofstream os("timeSchurFactors.csv")
EdgeSwitchPrior::read
virtual bool read(std::istream &is)
Definition: edge_switchPrior.cpp:9
EdgeSwitchPrior::EdgeSwitchPrior
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EdgeSwitchPrior()
Definition: edge_switchPrior.cpp:4
m
Matrix3f m
EdgeSwitchPrior::setMeasurement
virtual void setMeasurement(const double &m)
Definition: edge_switchPrior.cpp:26
VertexSwitchLinear
Definition: vertex_switchLinear.h:19
EdgeSwitchPrior::computeError
void computeError()
Definition: edge_switchPrior.cpp:37
EdgeSwitchPrior::write
virtual bool write(std::ostream &os) const
Definition: edge_switchPrior.cpp:20
std


rtabmap
Author(s): Mathieu Labbe
autogenerated on Thu Jul 25 2024 02:50:09