pose_graph_stub.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef CARTOGRAPHER_CLOUD_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_
00018 #define CARTOGRAPHER_CLOUD_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_
00019 
00020 #include "cartographer/mapping/pose_graph_interface.h"
00021 #include "grpc++/grpc++.h"
00022 
00023 namespace cartographer {
00024 namespace cloud {
00025 
00026 class PoseGraphStub : public ::cartographer::mapping::PoseGraphInterface {
00027  public:
00028   PoseGraphStub(std::shared_ptr<::grpc::Channel> client_channel,
00029                 const std::string& client_id);
00030 
00031   PoseGraphStub(const PoseGraphStub&) = delete;
00032   PoseGraphStub& operator=(const PoseGraphStub&) = delete;
00033 
00034   void RunFinalOptimization() override;
00035   mapping::MapById<mapping::SubmapId, SubmapData> GetAllSubmapData()
00036       const override;
00037   mapping::MapById<mapping::SubmapId, SubmapPose> GetAllSubmapPoses()
00038       const override;
00039   transform::Rigid3d GetLocalToGlobalTransform(
00040       int trajectory_id) const override;
00041   mapping::MapById<mapping::NodeId, mapping::TrajectoryNode>
00042   GetTrajectoryNodes() const override;
00043   mapping::MapById<mapping::NodeId, mapping::TrajectoryNodePose>
00044   GetTrajectoryNodePoses() const override;
00045   std::map<int, TrajectoryState> GetTrajectoryStates() const override;
00046   std::map<std::string, transform::Rigid3d> GetLandmarkPoses() const override;
00047   void SetLandmarkPose(const std::string& landmark_id,
00048                        const transform::Rigid3d& global_pose,
00049                        const bool frozen = false) override;
00050   void DeleteTrajectory(int trajectory_id) override;
00051   bool IsTrajectoryFinished(int trajectory_id) const override;
00052   bool IsTrajectoryFrozen(int trajectory_id) const override;
00053   std::map<int, mapping::PoseGraphInterface::TrajectoryData> GetTrajectoryData()
00054       const override;
00055   std::vector<Constraint> constraints() const override;
00056   mapping::proto::PoseGraph ToProto(
00057       bool include_unfinished_submaps) const override;
00058   void SetGlobalSlamOptimizationCallback(
00059       GlobalSlamOptimizationCallback callback) override;
00060 
00061  private:
00062   std::shared_ptr<::grpc::Channel> client_channel_;
00063   const std::string client_id_;
00064 };
00065 
00066 }  // namespace cloud
00067 }  // namespace cartographer
00068 
00069 #endif  // CARTOGRAPHER_CLOUD_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:35