ceres_pose.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_MAPPING_3D_CERES_POSE_H_
18 #define CARTOGRAPHER_MAPPING_3D_CERES_POSE_H_
19 
20 #include <array>
21 #include <memory>
22 
23 #include "Eigen/Core"
25 #include "ceres/ceres.h"
26 
27 namespace cartographer {
28 namespace mapping_3d {
29 
30 class CeresPose {
31  public:
32  CeresPose(
33  const transform::Rigid3d& rigid,
34  std::unique_ptr<ceres::LocalParameterization> translation_parametrization,
35  std::unique_ptr<ceres::LocalParameterization> rotation_parametrization,
36  ceres::Problem* problem);
37 
38  CeresPose(const CeresPose&) = delete;
39  CeresPose& operator=(const CeresPose&) = delete;
40 
41  const transform::Rigid3d ToRigid() const;
42 
43  double* translation() { return translation_.data(); }
44  double* rotation() { return rotation_.data(); }
45 
46  private:
47  std::array<double, 3> translation_;
48  // Rotation quaternion as (w, x, y, z).
49  std::array<double, 4> rotation_;
50 };
51 
52 } // namespace mapping_3d
53 } // namespace cartographer
54 
55 #endif // CARTOGRAPHER_MAPPING_3D_CERES_POSE_H_
std::array< double, 4 > rotation_
Definition: ceres_pose.h:49
std::array< double, 3 > translation_
Definition: ceres_pose.h:47
const transform::Rigid3d ToRigid() const
Definition: ceres_pose.cc:37
CeresPose(const transform::Rigid3d &rigid, std::unique_ptr< ceres::LocalParameterization > translation_parametrization, std::unique_ptr< ceres::LocalParameterization > rotation_parametrization, ceres::Problem *problem)
Definition: ceres_pose.cc:22
CeresPose & operator=(const CeresPose &)=delete


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:38