Introduce PoseGraphInterface::ToProto() (#813)

master
Christoph Schütte 2018-01-12 13:55:14 +01:00 committed by Wally B. Feed
parent fee77c8a99
commit 1de696d45f
4 changed files with 9 additions and 2 deletions

View File

@ -109,8 +109,7 @@ class PoseGraph : public PoseGraphInterface {
// not exist (anymore).
virtual SubmapData GetSubmapData(const SubmapId& submap_id) = 0;
// Serializes the constraints and trajectories.
proto::PoseGraph ToProto();
proto::PoseGraph ToProto() override;
// Returns the IMU data.
virtual sensor::MapByTime<sensor::ImuData> GetImuData() = 0;

View File

@ -90,6 +90,9 @@ class PoseGraphInterface {
// Returns the collection of constraints.
virtual std::vector<Constraint> constraints() = 0;
// Serializes the constraints and trajectories.
virtual proto::PoseGraph ToProto() = 0;
};
} // namespace mapping

View File

@ -109,5 +109,9 @@ PoseGraphStub::constraints() {
return cartographer::mapping::FromProto(response.constraints());
}
cartographer::mapping::proto::PoseGraph PoseGraphStub::ToProto() {
LOG(FATAL) << "Not implemented";
}
} // namespace mapping
} // namespace cartographer_grpc

View File

@ -47,6 +47,7 @@ class PoseGraphStub : public cartographer::mapping::PoseGraphInterface {
GetTrajectoryNodePoses() override;
bool IsTrajectoryFinished(int trajectory_id) override;
std::vector<Constraint> constraints() override;
cartographer::mapping::proto::PoseGraph ToProto() override;
private:
std::shared_ptr<grpc::Channel> client_channel_;