39 #ifndef INCLUDE_OKVIS_CERES_POSEERROR_HPP_
40 #define INCLUDE_OKVIS_CERES_POSEERROR_HPP_
43 #include "ceres/ceres.h"
54 class PoseError :
public ::ceres::SizedCostFunction<6 ,
58 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62 typedef ::ceres::SizedCostFunction<6, 7>
base_t;
87 double translationVariance,
double rotationVariance);
138 virtual bool Evaluate(
double const*
const * parameters,
double* residuals,
139 double** jacobians)
const;
153 double** jacobiansMinimal)
const;
163 return base_t::parameter_block_sizes().size();
168 return base_t::parameter_block_sizes().at(parameterBlockId);
virtual bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const
This evaluates the error term and additionally computes the Jacobians.
Definition: PoseError.cpp:79
void setInformation(const information_t &information)
Set the information.
Definition: PoseError.cpp:70
virtual std::string typeInfo() const
Return parameter block type as string.
Definition: PoseError.hpp:172
Header file for the ErrorInterface class. A simple interface class that other error classes should in...
virtual ~PoseError()
Trivial destructor.
Definition: PoseError.hpp:90
Eigen::Matrix< double, 6, 6 > information_t
The information matrix type (6x6).
Definition: PoseError.hpp:68
information_t information_
The 6x6 information matrix.
Definition: PoseError.hpp:182
void setMeasurement(const okvis::kinematics::Transformation &measurement)
Set the measurement.
Definition: PoseError.hpp:98
size_t parameterBlocks() const
Number of parameter blocks.
Definition: PoseError.hpp:162
const information_t & covariance() const
Get the covariance matrix.
Definition: PoseError.hpp:124
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef::ceres::SizedCostFunction< 6, 7 > base_t
The base class type.
Definition: PoseError.hpp:62
Simple interface class the errors implemented here should inherit from.
Definition: ErrorInterface.hpp:53
#define OKVIS_DEFINE_EXCEPTION(exceptionName, exceptionParent)
Macro for defining an exception with a given parent.
Definition: assert_macros.hpp:52
This file contains some useful assert macros.
PoseError()
Default constructor.
Definition: PoseError.hpp:74
Absolute error of a pose.
Definition: PoseError.hpp:54
static const int kNumResiduals
The number of residuals (6).
Definition: PoseError.hpp:65
const information_t & information() const
Get the information matrix.
Definition: PoseError.hpp:118
information_t squareRootInformation_
The 6x6 square root information matrix.
Definition: PoseError.hpp:183
okvis::kinematics::Transformation measurement_
The pose measurement.
Definition: PoseError.hpp:179
size_t residualDim() const
Residual dimension.
Definition: PoseError.hpp:157
const okvis::kinematics::Transformation & measurement() const
Get the measurement.
Definition: PoseError.hpp:112
covariance_t covariance_
The 6x6 covariance matrix.
Definition: PoseError.hpp:184
Eigen::Matrix< double, 6, 6 > covariance_t
The covariance matrix type (same as information).
Definition: PoseError.hpp:71
virtual bool EvaluateWithMinimalJacobians(double const *const *parameters, double *residuals, double **jacobians, double **jacobiansMinimal) const
This evaluates the error term and additionally computes the Jacobians in the minimal internal represe...
Definition: PoseError.cpp:86
size_t parameterBlockDim(size_t parameterBlockId) const
Dimension of an individual parameter block.
Definition: PoseError.hpp:167