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


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:58