points_batch.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_IO_POINTS_BATCH_H_
18 #define CARTOGRAPHER_IO_POINTS_BATCH_H_
19 
20 #include <array>
21 #include <cstdint>
22 #include <vector>
23 
24 #include "Eigen/Core"
26 
27 namespace cartographer {
28 namespace io {
29 
30 // A point's color.
31 using Color = std::array<uint8_t, 3>;
32 
33 // A number of points, captured around the same 'time' and by a
34 // sensor at the same 'origin'.
35 struct PointsBatch {
37  origin = Eigen::Vector3f::Zero();
38  trajectory_index = 0;
39  }
40 
41  // Time at which this batch has been acquired.
43 
44  // Origin of the data, i.e. the location of the sensor in the world at
45  // 'time'.
46  Eigen::Vector3f origin;
47 
48  // Sensor that generated this data's 'frame_id' or empty if this information
49  // is unknown.
50  string frame_id;
51 
52  // Trajectory index that produced this point.
54 
55  // Geometry of the points in a metric frame.
56  std::vector<Eigen::Vector3f> points;
57 
58  // Intensities are optional and may be unspecified. The meaning of these
59  // intensity values varies by device. For example, the VLP16 provides values
60  // in the range [0, 100] for non-specular return values and values up to 255
61  // for specular returns. On the other hand, Hokuyo lasers provide a 16-bit
62  // value that rarely peaks above 4096.
63  std::vector<float> intensities;
64 
65  // Colors are optional. If set, they are RGB values.
66  std::vector<Color> colors;
67 };
68 
69 // Removes the indices in 'to_remove' from 'batch'.
70 void RemovePoints(std::vector<int> to_remove, PointsBatch* batch);
71 
72 } // namespace io
73 } // namespace cartographer
74 
75 #endif // CARTOGRAPHER_IO_POINTS_BATCH_H_
void RemovePoints(std::vector< int > to_remove, PointsBatch *batch)
Definition: points_batch.cc:22
UniversalTimeScaleClock::time_point Time
Definition: time.h:44
std::array< uint8_t, 3 > Color
Definition: points_batch.h:31
std::vector< Color > colors
Definition: points_batch.h:66
std::vector< float > intensities
Definition: points_batch.h:63
std::vector< Eigen::Vector3f > points
Definition: points_batch.h:56


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