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_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 }
00067 }
00068
00069 #endif // CARTOGRAPHER_CLOUD_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_