map_builder_server_interface.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_MAP_BUILDER_SERVER_INTERFACE_H
18 #define CARTOGRAPHER_CLOUD_MAP_BUILDER_SERVER_INTERFACE_H
19 
20 #include <memory>
21 
22 #include "cartographer/cloud/proto/map_builder_server_options.pb.h"
25 
26 namespace cartographer {
27 namespace cloud {
28 
30  public:
32 
33  // Starts the gRPC server, the 'LocalTrajectoryUploader' and the SLAM thread.
34  virtual void Start() = 0;
35 
36  // Waits for the 'MapBuilderServer' to shut down. Note: The server must be
37  // either shutting down or some other thread must call 'Shutdown()' for
38  // this function to ever return.
39  virtual void WaitForShutdown() = 0;
40 
41  // Waits until all computation is finished (for testing).
42  virtual void WaitUntilIdle() = 0;
43 
44  // Shuts down the gRPC server, the 'LocalTrajectoryUploader' and the SLAM
45  // thread.
46  virtual void Shutdown() = 0;
47 };
48 
49 // Registers all metrics for the MapBuilderServer.
51 
52 // Returns MapBuilderServer with the actual implementation.
53 std::unique_ptr<MapBuilderServerInterface> CreateMapBuilderServer(
54  const proto::MapBuilderServerOptions& map_builder_server_options,
55  std::unique_ptr<mapping::MapBuilderInterface> map_builder);
56 
57 } // namespace cloud
58 } // namespace cartographer
59 
60 #endif // CARTOGRAPHER_CLOUD_MAP_BUILDER_SERVER_INTERFACE_H
void RegisterMapBuilderServerMetrics(metrics::FamilyFactory *factory)
std::unique_ptr< MapBuilderServerInterface > CreateMapBuilderServer(const proto::MapBuilderServerOptions &map_builder_server_options, std::unique_ptr< mapping::MapBuilderInterface > map_builder)


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