Move GetTrajectoryData() down to PoseGraphInterface (#932)
parent
ed3502909c
commit
258aa715ba
|
@ -125,9 +125,6 @@ class PoseGraph : public PoseGraphInterface {
|
|||
// Returns the odometry data.
|
||||
virtual sensor::MapByTime<sensor::OdometryData> GetOdometryData() = 0;
|
||||
|
||||
// Returns the trajectory data.
|
||||
virtual std::map<int, TrajectoryData> GetTrajectoryData() = 0;
|
||||
|
||||
// Returns the fixed frame pose data.
|
||||
virtual sensor::MapByTime<sensor::FixedFramePoseData>
|
||||
GetFixedFramePoseData() = 0;
|
||||
|
|
|
@ -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<int, TrajectoryData> GetTrajectoryData() = 0;
|
||||
|
||||
// Returns the collection of constraints.
|
||||
virtual std::vector<Constraint> constraints() = 0;
|
||||
|
||||
|
|
|
@ -121,6 +121,11 @@ bool PoseGraphStub::IsTrajectoryFinished(int trajectory_id) {
|
|||
LOG(FATAL) << "Not implemented";
|
||||
}
|
||||
|
||||
std::map<int, cartographer::mapping::PoseGraphInterface::TrajectoryData>
|
||||
PoseGraphStub::GetTrajectoryData() {
|
||||
LOG(FATAL) << "Not implemented";
|
||||
}
|
||||
|
||||
std::vector<cartographer::mapping::PoseGraphInterface::Constraint>
|
||||
PoseGraphStub::constraints() {
|
||||
google::protobuf::Empty request;
|
||||
|
|
|
@ -46,6 +46,8 @@ class PoseGraphStub : public cartographer::mapping::PoseGraphInterface {
|
|||
std::map<std::string, cartographer::transform::Rigid3d> GetLandmarkPoses()
|
||||
override;
|
||||
bool IsTrajectoryFinished(int trajectory_id) override;
|
||||
std::map<int, cartographer::mapping::PoseGraphInterface::TrajectoryData>
|
||||
GetTrajectoryData() override;
|
||||
std::vector<Constraint> constraints() override;
|
||||
cartographer::mapping::proto::PoseGraph ToProto() override;
|
||||
|
||||
|
|
|
@ -50,6 +50,10 @@ class MockPoseGraph : public cartographer::mapping::PoseGraphInterface {
|
|||
MOCK_METHOD0(GetLandmarkPoses,
|
||||
std::map<std::string, cartographer::transform::Rigid3d>());
|
||||
MOCK_METHOD1(IsTrajectoryFinished, bool(int));
|
||||
MOCK_METHOD0(
|
||||
GetTrajectoryData,
|
||||
std::map<int,
|
||||
cartographer::mapping::PoseGraphInterface::TrajectoryData>());
|
||||
MOCK_METHOD0(constraints, std::vector<Constraint>());
|
||||
MOCK_METHOD0(ToProto, cartographer::mapping::proto::PoseGraph());
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue