Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_
00019
00020 #include "Eigen/Core"
00021 #include "Eigen/Geometry"
00022 #include "cartographer/transform/rigid_transform.h"
00023 #include "cartographer/transform/transform.h"
00024
00025 namespace cartographer {
00026 namespace mapping {
00027 namespace optimization {
00028
00029
00030
00031
00032
00033 template <typename T>
00034 static std::array<T, 3> ComputeUnscaledError(
00035 const transform::Rigid2d& relative_pose, const T* const start,
00036 const T* const end);
00037 template <typename T>
00038 std::array<T, 3> ScaleError(const std::array<T, 3>& error,
00039 double translation_weight, double rotation_weight);
00040
00041
00042
00043
00044
00045
00046 template <typename T>
00047 static std::array<T, 6> ComputeUnscaledError(
00048 const transform::Rigid3d& relative_pose, const T* const start_rotation,
00049 const T* const start_translation, const T* const end_rotation,
00050 const T* const end_translation);
00051
00052 template <typename T>
00053 std::array<T, 6> ScaleError(const std::array<T, 6>& error,
00054 double translation_weight, double rotation_weight);
00055
00056
00057
00058
00059 template <typename T>
00060 std::array<T, 4> SlerpQuaternions(const T* const start, const T* const end,
00061 double factor);
00062
00063
00064
00065 template <typename T>
00066 std::tuple<std::array<T, 4> , std::array<T, 3> >
00067 InterpolateNodes3D(const T* const prev_node_rotation,
00068 const T* const prev_node_translation,
00069 const T* const next_node_rotation,
00070 const T* const next_node_translation,
00071 const double interpolation_parameter);
00072
00073
00074
00075 template <typename T>
00076 std::tuple<std::array<T, 4> , std::array<T, 3> >
00077 InterpolateNodes2D(const T* const prev_node_pose,
00078 const Eigen::Quaterniond& prev_node_gravity_alignment,
00079 const T* const next_node_pose,
00080 const Eigen::Quaterniond& next_node_gravity_alignment,
00081 const double interpolation_parameter);
00082
00083 }
00084 }
00085 }
00086
00087 #include "cartographer/mapping/internal/optimization/cost_functions/cost_helpers_impl.h"
00088
00089 #endif // CARTOGRAPHER_MAPPING_INTERNAL_OPTIMIZATION_COST_FUNCTIONS_COST_HELPERS_H_