range_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_SENSOR_RANGE_DATA_H_
18 #define CARTOGRAPHER_SENSOR_RANGE_DATA_H_
19 
23 #include "cartographer/sensor/proto/sensor.pb.h"
24 
25 namespace cartographer {
26 namespace sensor {
27 
28 // Rays begin at 'origin'. 'returns' are the points where obstructions were
29 // detected. 'misses' are points in the direction of rays for which no return
30 // was detected, and were inserted at a configured distance. It is assumed that
31 // between the 'origin' and 'misses' is free space.
32 struct RangeData {
33  Eigen::Vector3f origin;
36 };
37 
38 // Like 'RangeData', but with 'TimedPointClouds'.
40  Eigen::Vector3f origin;
43 };
44 
45 RangeData TransformRangeData(const RangeData& range_data,
46  const transform::Rigid3f& transform);
47 
49  const transform::Rigid3f& transform);
50 
51 // Crops 'range_data' according to the region defined by 'min_z' and 'max_z'.
52 RangeData CropRangeData(const RangeData& range_data, float min_z, float max_z);
53 
54 // Crops 'range_data' according to the region defined by 'min_z' and 'max_z'.
55 TimedRangeData CropTimedRangeData(const TimedRangeData& range_data, float min_z,
56  float max_z);
57 
58 // Converts 'range_data' to a proto::RangeData.
59 proto::RangeData ToProto(const RangeData& range_data);
60 
61 // Converts 'proto' to RangeData.
62 RangeData FromProto(const proto::RangeData& proto);
63 
64 } // namespace sensor
65 } // namespace cartographer
66 
67 #endif // CARTOGRAPHER_SENSOR_RANGE_DATA_H_
proto::FixedFramePoseData ToProto(const FixedFramePoseData &pose_data)
FixedFramePoseData FromProto(const proto::FixedFramePoseData &proto)
RangeData TransformRangeData(const RangeData &range_data, const transform::Rigid3f &transform)
Definition: range_data.cc:25
TimedRangeData TransformTimedRangeData(const TimedRangeData &range_data, const transform::Rigid3f &transform)
Definition: range_data.cc:34
std::vector< Eigen::Vector3f > PointCloud
Definition: point_cloud.h:32
TimedRangeData CropTimedRangeData(const TimedRangeData &range_data, const float min_z, const float max_z)
Definition: range_data.cc:50
std::vector< Eigen::Vector4f > TimedPointCloud
Definition: point_cloud.h:39
RangeData CropRangeData(const RangeData &range_data, const float min_z, const float max_z)
Definition: range_data.cc:43
int min_z
Definition: submap_3d.cc:31
int max_z
Definition: submap_3d.cc:32


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