edge_switchPrior.cpp
Go to the documentation of this file.
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 
virtual void setMeasurement(const double &m)
virtual bool write(std::ostream &os) const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW EdgeSwitchPrior()
virtual void linearizeOplus()
virtual bool read(std::istream &is)


rtabmap
Author(s): Mathieu Labbe
autogenerated on Wed Jun 5 2019 22:41:31