Main Page
Namespaces
Classes
Files
File List
File Members
cartographer
mapping
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
22
#include "
cartographer/common/time.h
"
23
24
namespace
cartographer
{
25
namespace
mapping {
26
27
struct
Timespan
{
28
common::Time
start
;
29
common::Time
end
;
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_
cartographer::mapping::Timespan::end
common::Time end
Definition:
detect_floors.h:29
time.h
cartographer::mapping::Floor::z
double z
Definition:
detect_floors.h:39
cartographer::common::Time
UniversalTimeScaleClock::time_point Time
Definition:
time.h:44
cartographer::mapping::Timespan
Definition:
detect_floors.h:27
cartographer
Definition:
blocking_queue.h:29
cartographer::mapping::Timespan::start
common::Time start
Definition:
detect_floors.h:28
cartographer::mapping::Floor
Definition:
detect_floors.h:32
cartographer::mapping::Floor::timespans
std::vector< Timespan > timespans
Definition:
detect_floors.h:36
cartographer::mapping::DetectFloors
std::vector< Floor > DetectFloors(const proto::Trajectory &trajectory)
Definition:
detect_floors.cc:199
cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58