detect_floors.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_DETECT_FLOORS_H_
18 #define CARTOGRAPHER_MAPPING_DETECT_FLOORS_H_
19 
20 #include "cartographer/mapping/proto/trajectory.pb.h"
21 
23 
24 namespace cartographer {
25 namespace mapping {
26 
27 struct Timespan {
30 };
31 
32 struct Floor {
33  // The spans of time we spent on this floor. Since we might have walked up and
34  // down many times in this place, there can be many spans of time we spent on
35  // a particular floor.
36  std::vector<Timespan> timespans;
37 
38  // The median z-value of this floor.
39  double z;
40 };
41 
42 // Uses a heuristic which looks at z-values of the poses to detect individual
43 // floors of a building. This requires that floors are *mostly* on the same
44 // z-height and that level changes happen *relatively* abrubtly, e.g. by taking
45 // the stairs.
46 std::vector<Floor> DetectFloors(const proto::Trajectory& trajectory);
47 
48 } // namespace mapping
49 } // namespace cartographer
50 
51 #endif // CARTOGRAPHER_MAPPING_DETECT_FLOORS_H_
UniversalTimeScaleClock::time_point Time
Definition: time.h:44
std::vector< Timespan > timespans
Definition: detect_floors.h:36
std::vector< Floor > DetectFloors(const proto::Trajectory &trajectory)


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