Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef CARTOGRAPHER_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H
00018 #define CARTOGRAPHER_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H
00019
00020 #include <memory>
00021 #include <set>
00022 #include <string>
00023
00024 #include "cartographer/cloud/proto/map_builder_service.pb.h"
00025 #include "cartographer/mapping/proto/trajectory_builder_options.pb.h"
00026 #include "cartographer/mapping/trajectory_builder_interface.h"
00027 #include "grpc++/support/status.h"
00028
00029 namespace cartographer {
00030 namespace cloud {
00031
00032
00033
00034 class LocalTrajectoryUploaderInterface {
00035 public:
00036 using SensorId = mapping::TrajectoryBuilderInterface::SensorId;
00037
00038 virtual ~LocalTrajectoryUploaderInterface() = default;
00039
00040
00041 virtual void Start() = 0;
00042
00043
00044
00045 virtual void Shutdown() = 0;
00046
00047
00048 virtual void EnqueueSensorData(
00049 std::unique_ptr<proto::SensorData> sensor_data) = 0;
00050
00051
00052
00053 virtual grpc::Status AddTrajectory(
00054 const std::string& client_id, int local_trajectory_id,
00055 const std::set<SensorId>& expected_sensor_ids,
00056 const mapping::proto::TrajectoryBuilderOptions& trajectory_options) = 0;
00057
00058 virtual grpc::Status FinishTrajectory(const std::string& client_id,
00059 int local_trajectory_id) = 0;
00060 virtual SensorId GetLocalSlamResultSensorId(
00061 int local_trajectory_id) const = 0;
00062 };
00063
00064
00065 std::unique_ptr<LocalTrajectoryUploaderInterface> CreateLocalTrajectoryUploader(
00066 const std::string& uplink_server_address, int batch_size,
00067 bool enable_ssl_encryption, bool enable_google_auth);
00068
00069 }
00070 }
00071
00072 #endif // CARTOGRAPHER_CLOUD_INTERNAL_LOCAL_TRAJECTORY_UPLOADER_H