gtsam/cpp/Simulated3D.cpp

59 lines
899 B
C++
Raw Normal View History

2009-08-22 06:23:24 +08:00
/**
* @file Simulated3D.cpp
* @brief measurement functions and derivatives for simulated 3D robot
* @author Alex Cunningham
**/
#include "Simulated3D.h"
namespace gtsam {
2010-01-14 06:25:03 +08:00
namespace simulated3D {
2009-08-22 06:23:24 +08:00
2010-01-14 06:25:03 +08:00
Vector prior (const Vector& x)
2009-08-22 06:23:24 +08:00
{
return x;
}
2010-01-14 06:25:03 +08:00
Matrix Dprior(const Vector& x)
2009-08-22 06:23:24 +08:00
{
Matrix H = eye((int) x.size());
return H;
}
2010-01-14 06:25:03 +08:00
Vector odo(const Vector& x1, const Vector& x2)
2009-08-22 06:23:24 +08:00
{
return x2 - x1;
}
2010-01-14 06:25:03 +08:00
Matrix Dodo1(const Vector& x1, const Vector& x2)
2009-08-22 06:23:24 +08:00
{
Matrix H = -1 * eye((int) x1.size());
return H;
}
2010-01-14 06:25:03 +08:00
Matrix Dodo2(const Vector& x1, const Vector& x2)
2009-08-22 06:23:24 +08:00
{
Matrix H = eye((int) x1.size());
return H;
}
2010-01-14 06:25:03 +08:00
Vector mea(const Vector& x, const Vector& l)
2009-08-22 06:23:24 +08:00
{
return l - x;
}
2010-01-14 06:25:03 +08:00
Matrix Dmea1(const Vector& x, const Vector& l)
2009-08-22 06:23:24 +08:00
{
Matrix H = -1 * eye((int) x.size());
return H;
}
2010-01-14 06:25:03 +08:00
Matrix Dmea2(const Vector& x, const Vector& l)
2009-08-22 06:23:24 +08:00
{
Matrix H = eye((int) x.size());
return H;
}
}} // namespace gtsam::simulated3D