17 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_ 18 #define CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_ 21 #include "Eigen/Geometry" 27 namespace optimization {
38 std::array<T, 3>
ScaleError(
const std::array<T, 3>& error,
39 double translation_weight,
double rotation_weight);
49 const T*
const start_translation,
const T*
const end_rotation,
50 const T*
const end_translation);
53 std::array<T, 6>
ScaleError(
const std::array<T, 6>& error,
54 double translation_weight,
double rotation_weight);
66 std::tuple<std::array<T, 4> , std::array<T, 3> >
68 const T*
const prev_node_translation,
69 const T*
const next_node_rotation,
70 const T*
const next_node_translation,
71 const double interpolation_parameter);
76 std::tuple<std::array<T, 4> , std::array<T, 3> >
78 const Eigen::Quaterniond& prev_node_gravity_alignment,
79 const T*
const next_node_pose,
80 const Eigen::Quaterniond& next_node_gravity_alignment,
81 const double interpolation_parameter);
89 #endif // CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_
std::tuple< std::array< T, 4 >, std::array< T, 3 > > InterpolateNodes3D(const T *const prev_node_rotation, const T *const prev_node_translation, const T *const next_node_rotation, const T *const next_node_translation, const double interpolation_parameter)
std::array< T, 3 > ScaleError(const std::array< T, 3 > &error, double translation_weight, double rotation_weight)
std::tuple< std::array< T, 4 >, std::array< T, 3 > > InterpolateNodes2D(const T *const prev_node_pose, const Eigen::Quaterniond &prev_node_gravity_alignment, const T *const next_node_pose, const Eigen::Quaterniond &next_node_gravity_alignment, const double interpolation_parameter)
static std::array< T, 3 > ComputeUnscaledError(const transform::Rigid2d &relative_pose, const T *const start, const T *const end)
std::array< T, 4 > SlerpQuaternions(const T *const start, const T *const end, double factor)