2017-12-13 22:53:47 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2017 The Cartographer Authors
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2018-03-02 01:30:30 +08:00
|
|
|
#ifndef CARTOGRAPHER_GRPC_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_
|
|
|
|
#define CARTOGRAPHER_GRPC_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_
|
2017-12-13 22:53:47 +08:00
|
|
|
|
|
|
|
#include "cartographer/mapping/pose_graph_interface.h"
|
|
|
|
#include "grpc++/grpc++.h"
|
|
|
|
|
2018-03-03 06:21:28 +08:00
|
|
|
namespace cartographer {
|
|
|
|
namespace cloud {
|
2017-12-13 22:53:47 +08:00
|
|
|
|
2018-03-03 06:21:28 +08:00
|
|
|
class PoseGraphStub : public ::cartographer::mapping::PoseGraphInterface {
|
2017-12-13 22:53:47 +08:00
|
|
|
public:
|
2018-03-03 06:21:28 +08:00
|
|
|
PoseGraphStub(std::shared_ptr<::grpc::Channel> client_channel);
|
2017-12-13 22:53:47 +08:00
|
|
|
|
|
|
|
PoseGraphStub(const PoseGraphStub&) = delete;
|
|
|
|
PoseGraphStub& operator=(const PoseGraphStub&) = delete;
|
|
|
|
|
|
|
|
void RunFinalOptimization() override;
|
2018-03-03 06:21:28 +08:00
|
|
|
mapping::MapById<mapping::SubmapId, SubmapData> GetAllSubmapData() override;
|
|
|
|
mapping::MapById<mapping::SubmapId, SubmapPose> GetAllSubmapPoses() override;
|
|
|
|
transform::Rigid3d GetLocalToGlobalTransform(int trajectory_id) override;
|
|
|
|
mapping::MapById<mapping::NodeId, mapping::TrajectoryNode>
|
2017-12-13 22:53:47 +08:00
|
|
|
GetTrajectoryNodes() override;
|
2018-03-03 06:21:28 +08:00
|
|
|
mapping::MapById<mapping::NodeId, mapping::TrajectoryNodePose>
|
2018-01-08 16:13:51 +08:00
|
|
|
GetTrajectoryNodePoses() override;
|
2018-03-03 06:21:28 +08:00
|
|
|
std::map<std::string, transform::Rigid3d> GetLandmarkPoses() override;
|
2017-12-13 22:53:47 +08:00
|
|
|
bool IsTrajectoryFinished(int trajectory_id) override;
|
2018-03-03 06:21:28 +08:00
|
|
|
std::map<int, mapping::PoseGraphInterface::TrajectoryData> GetTrajectoryData()
|
|
|
|
override;
|
2017-12-13 22:53:47 +08:00
|
|
|
std::vector<Constraint> constraints() override;
|
2018-03-03 06:21:28 +08:00
|
|
|
mapping::proto::PoseGraph ToProto() override;
|
2017-12-13 22:53:47 +08:00
|
|
|
|
|
|
|
private:
|
2018-03-03 06:21:28 +08:00
|
|
|
std::shared_ptr<::grpc::Channel> client_channel_;
|
2017-12-13 22:53:47 +08:00
|
|
|
};
|
|
|
|
|
2018-03-03 06:21:28 +08:00
|
|
|
} // namespace cloud
|
|
|
|
} // namespace cartographer
|
2017-12-13 22:53:47 +08:00
|
|
|
|
2018-03-02 01:30:30 +08:00
|
|
|
#endif // CARTOGRAPHER_GRPC_INTERNAL_CLIENT_POSE_GRAPH_STUB_H_
|