local_trajectory_uploader.h
Go to the documentation of this file.
1 /*
2  * Copyright 2018 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_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H
18 #define CARTOGRAPHER_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H
19 
20 #include <memory>
21 #include <set>
22 #include <string>
23 
24 #include "cartographer/cloud/proto/map_builder_service.pb.h"
25 #include "cartographer/mapping/proto/trajectory_builder_options.pb.h"
27 
28 namespace cartographer {
29 namespace cloud {
30 
32  public:
34 
35  virtual ~LocalTrajectoryUploaderInterface() = default;
36 
37  // Starts the upload thread.
38  virtual void Start() = 0;
39 
40  // Shuts down the upload thread. This method blocks until the shutdown is
41  // complete.
42  virtual void Shutdown() = 0;
43 
44  // Enqueue an Add*DataRequest message to be uploaded.
45  virtual void EnqueueSensorData(
46  std::unique_ptr<proto::SensorData> sensor_data) = 0;
47  virtual void AddTrajectory(
48  int local_trajectory_id, const std::set<SensorId>& expected_sensor_ids,
49  const mapping::proto::TrajectoryBuilderOptions& trajectory_options) = 0;
50  virtual void FinishTrajectory(int local_trajectory_id) = 0;
51 
53  int local_trajectory_id) const = 0;
54 };
55 
56 // Returns LocalTrajectoryUploader with the actual implementation.
57 std::unique_ptr<LocalTrajectoryUploaderInterface> CreateLocalTrajectoryUploader(
58  const std::string& uplink_server_address, int batch_size,
59  bool enable_ssl_encryption);
60 
61 } // namespace cloud
62 } // namespace cartographer
63 
64 #endif // CARTOGRAPHER_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H
virtual void AddTrajectory(int local_trajectory_id, const std::set< SensorId > &expected_sensor_ids, const mapping::proto::TrajectoryBuilderOptions &trajectory_options)=0
std::unique_ptr< LocalTrajectoryUploaderInterface > CreateLocalTrajectoryUploader(const std::string &uplink_server_address, int batch_size, bool enable_ssl_encryption)
virtual void FinishTrajectory(int local_trajectory_id)=0
virtual SensorId GetLocalSlamResultSensorId(int local_trajectory_id) const =0
::cartographer::mapping::TrajectoryBuilderInterface::SensorId SensorId
virtual void EnqueueSensorData(std::unique_ptr< proto::SensorData > sensor_data)=0


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