diff --git a/cartographer/mapping/pose_graph.h b/cartographer/mapping/pose_graph.h index 24e18a8..53a5e41 100644 --- a/cartographer/mapping/pose_graph.h +++ b/cartographer/mapping/pose_graph.h @@ -125,9 +125,6 @@ class PoseGraph : public PoseGraphInterface { // Returns the odometry data. virtual sensor::MapByTime GetOdometryData() = 0; - // Returns the trajectory data. - virtual std::map GetTrajectoryData() = 0; - // Returns the fixed frame pose data. virtual sensor::MapByTime GetFixedFramePoseData() = 0; diff --git a/cartographer/mapping/pose_graph_interface.h b/cartographer/mapping/pose_graph_interface.h index db36e3a..f3d4587 100644 --- a/cartographer/mapping/pose_graph_interface.h +++ b/cartographer/mapping/pose_graph_interface.h @@ -111,6 +111,9 @@ class PoseGraphInterface { // Checks if the given trajectory is finished. virtual bool IsTrajectoryFinished(int trajectory_id) = 0; + // Returns the trajectory data. + virtual std::map GetTrajectoryData() = 0; + // Returns the collection of constraints. virtual std::vector constraints() = 0; diff --git a/cartographer_grpc/mapping/pose_graph_stub.cc b/cartographer_grpc/mapping/pose_graph_stub.cc index 54d24da..17c261a 100644 --- a/cartographer_grpc/mapping/pose_graph_stub.cc +++ b/cartographer_grpc/mapping/pose_graph_stub.cc @@ -121,6 +121,11 @@ bool PoseGraphStub::IsTrajectoryFinished(int trajectory_id) { LOG(FATAL) << "Not implemented"; } +std::map +PoseGraphStub::GetTrajectoryData() { + LOG(FATAL) << "Not implemented"; +} + std::vector PoseGraphStub::constraints() { google::protobuf::Empty request; diff --git a/cartographer_grpc/mapping/pose_graph_stub.h b/cartographer_grpc/mapping/pose_graph_stub.h index f4e9f42..5c28929 100644 --- a/cartographer_grpc/mapping/pose_graph_stub.h +++ b/cartographer_grpc/mapping/pose_graph_stub.h @@ -46,6 +46,8 @@ class PoseGraphStub : public cartographer::mapping::PoseGraphInterface { std::map GetLandmarkPoses() override; bool IsTrajectoryFinished(int trajectory_id) override; + std::map + GetTrajectoryData() override; std::vector constraints() override; cartographer::mapping::proto::PoseGraph ToProto() override; diff --git a/cartographer_grpc/testing/mock_pose_graph.h b/cartographer_grpc/testing/mock_pose_graph.h index 30291d7..ce19d55 100644 --- a/cartographer_grpc/testing/mock_pose_graph.h +++ b/cartographer_grpc/testing/mock_pose_graph.h @@ -50,6 +50,10 @@ class MockPoseGraph : public cartographer::mapping::PoseGraphInterface { MOCK_METHOD0(GetLandmarkPoses, std::map()); MOCK_METHOD1(IsTrajectoryFinished, bool(int)); + MOCK_METHOD0( + GetTrajectoryData, + std::map()); MOCK_METHOD0(constraints, std::vector()); MOCK_METHOD0(ToProto, cartographer::mapping::proto::PoseGraph()); };