map_builder_stub.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 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_CLIENT_MAP_BUILDER_STUB_H_
18 #define CARTOGRAPHER_CLOUD_CLIENT_MAP_BUILDER_STUB_H_
19 
20 #include <memory>
21 
25 #include "grpc++/grpc++.h"
26 
27 namespace cartographer {
28 namespace cloud {
29 
31  public:
32  MapBuilderStub(const std::string& server_address);
33 
34  MapBuilderStub(const MapBuilderStub&) = delete;
35  MapBuilderStub& operator=(const MapBuilderStub&) = delete;
36 
38  const std::set<SensorId>& expected_sensor_ids,
39  const mapping::proto::TrajectoryBuilderOptions& trajectory_options,
40  LocalSlamResultCallback local_slam_result_callback) override;
42  const mapping::proto::TrajectoryBuilderOptionsWithSensorIds&
43  options_with_sensor_ids_proto) override;
45  int trajectory_id) const override;
46  void FinishTrajectory(int trajectory_id) override;
47  std::string SubmapToProto(
48  const mapping::SubmapId& submap_id,
49  mapping::proto::SubmapQuery::Response* response) override;
50  void SerializeState(io::ProtoStreamWriterInterface* writer) override;
52  bool load_frozen_state) override;
53  int num_trajectory_builders() const override;
55  const std::vector<mapping::proto::TrajectoryBuilderOptionsWithSensorIds>&
56  GetAllTrajectoryBuilderOptions() const override;
57 
58  private:
59  std::shared_ptr<::grpc::Channel> client_channel_;
60  std::unique_ptr<mapping::PoseGraphInterface> pose_graph_stub_;
61  std::map<int, std::unique_ptr<mapping::TrajectoryBuilderInterface>>
63 };
64 
65 } // namespace cloud
66 } // namespace cartographer
67 
68 #endif // CARTOGRAPHER_CLOUD_CLIENT_MAP_BUILDER_STUB_H_
std::map< int, std::unique_ptr< mapping::TrajectoryBuilderInterface > > trajectory_builder_stubs_
TrajectoryBuilderInterface::LocalSlamResultCallback LocalSlamResultCallback
std::shared_ptr<::grpc::Channel > client_channel_
const std::vector< mapping::proto::TrajectoryBuilderOptionsWithSensorIds > & GetAllTrajectoryBuilderOptions() const override
MapBuilderStub(const std::string &server_address)
mapping::TrajectoryBuilderInterface * GetTrajectoryBuilder(int trajectory_id) const override
MapBuilderStub & operator=(const MapBuilderStub &)=delete
int AddTrajectoryForDeserialization(const mapping::proto::TrajectoryBuilderOptionsWithSensorIds &options_with_sensor_ids_proto) override
void SerializeState(io::ProtoStreamWriterInterface *writer) override
std::unique_ptr< mapping::PoseGraphInterface > pose_graph_stub_
int AddTrajectoryBuilder(const std::set< SensorId > &expected_sensor_ids, const mapping::proto::TrajectoryBuilderOptions &trajectory_options, LocalSlamResultCallback local_slam_result_callback) override
void LoadState(io::ProtoStreamReaderInterface *reader, bool load_frozen_state) override
std::string SubmapToProto(const mapping::SubmapId &submap_id, mapping::proto::SubmapQuery::Response *response) override
void FinishTrajectory(int trajectory_id) override
int num_trajectory_builders() const override
mapping::PoseGraphInterface * pose_graph() override


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