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_MAPPING_DATA_H_
18 #define CARTOGRAPHER_MAPPING_DATA_H_
19 
23 
24 namespace cartographer {
25 
26 namespace mapping {
27 class TrajectoryBuilderInterface;
28 }
29 
30 namespace sensor {
31 
32 class Data {
33  public:
34  explicit Data(const std::string &sensor_id) : sensor_id_(sensor_id) {}
35  virtual ~Data() {}
36 
37  virtual common::Time GetTime() const = 0;
38  const std::string &GetSensorId() const { return sensor_id_; }
39  virtual void AddToTrajectoryBuilder(
40  mapping::TrajectoryBuilderInterface *trajectory_builder) = 0;
41 
42  protected:
43  const std::string sensor_id_;
44 };
45 
46 } // namespace sensor
47 } // namespace cartographer
48 
49 #endif // CARTOGRAPHER_MAPPING_DATA_H_
const std::string & GetSensorId() const
Definition: data.h:38
common::Time GetTime(const T &t)
Definition: id.h:49
UniversalTimeScaleClock::time_point Time
Definition: time.h:44
const std::string sensor_id_
Definition: data.h:43
Data(const std::string &sensor_id)
Definition: data.h:34


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