data.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_DATA_H_
18 #define CARTOGRAPHER_MAPPING_DATA_H_
19 
24 
25 namespace cartographer {
26 namespace sensor {
27 
28 // This type is a logical union, i.e. only one type of sensor data is actually
29 // filled in. It is only used for time ordering sensor data before passing it
30 // on.
31 struct Data {
32  enum class Type { kImu, kRangefinder, kOdometer };
33 
34  struct Imu {
35  Eigen::Vector3d linear_acceleration;
36  Eigen::Vector3d angular_velocity;
37  };
38 
39  struct Rangefinder {
40  Eigen::Vector3f origin;
42  };
43 
44  Data(const common::Time time, const Imu& imu)
45  : type(Type::kImu), time(time), imu(imu) {}
46 
48  : type(Type::kRangefinder), time(time), rangefinder(rangefinder) {}
49 
51  : type(Type::kOdometer), time(time), odometer_pose(odometer_pose) {}
52 
58 };
59 
60 } // namespace sensor
61 } // namespace cartographer
62 
63 #endif // CARTOGRAPHER_MAPPING_DATA_H_
Data(const common::Time time, const Rangefinder &rangefinder)
Definition: data.h:47
Data(const common::Time time, const Imu &imu)
Definition: data.h:44
Rangefinder rangefinder
Definition: data.h:56
Data(const common::Time time, const transform::Rigid3d &odometer_pose)
Definition: data.h:50
UniversalTimeScaleClock::time_point Time
Definition: time.h:44
Eigen::Vector3d angular_velocity
Definition: data.h:36
Eigen::Vector3d linear_acceleration
Definition: data.h:35
transform::Rigid3d odometer_pose
Definition: data.h:57
std::vector< Eigen::Vector3f > PointCloud
Definition: point_cloud.h:30
common::Time time
Definition: data.h:54


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58