pose_cost_function.h 763 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _POSE_COST_FUNCTION_H_
  2. #define _POSE_COST_FUNCTION_H_
  3. #include <ceres/ceres.h>
  4. #include <Eigen/Dense>
  5. #include <Eigen/Cholesky>
  6. namespace hlzn_slam {
  7. namespace pose_graph {
  8. class PoseLocalParameterization : public ceres::LocalParameterization
  9. {
  10. virtual bool Plus(const double *x, const double *delta, double *x_plus_delta) const;
  11. virtual bool ComputeJacobian(const double *x, double *jacobian) const;
  12. virtual int GlobalSize() const { return 7; };
  13. virtual int LocalSize() const { return 6; };
  14. };
  15. class PoseCostFunction : public ceres::SizedCostFunction<3, 7, 7, 7>
  16. {
  17. public:
  18. PoseCostFunction();
  19. virtual bool Evaluate(double const *const *parameters, double *residuals, double **jacobians) const;
  20. };
  21. }
  22. }
  23. #endif