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_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_
00018 #define CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_
00019
00020 #include "cartographer/mapping/pose_graph_interface.h"
00021 #include "glog/logging.h"
00022 #include "gmock/gmock.h"
00023 #include "gtest/gtest.h"
00024
00025 namespace cartographer {
00026 namespace mapping {
00027 namespace testing {
00028
00029 class MockPoseGraph : public mapping::PoseGraphInterface {
00030 public:
00031 MockPoseGraph() = default;
00032 ~MockPoseGraph() override = default;
00033
00034 MOCK_METHOD0(RunFinalOptimization, void());
00035 MOCK_CONST_METHOD0(GetAllSubmapData,
00036 mapping::MapById<mapping::SubmapId, SubmapData>());
00037 MOCK_CONST_METHOD0(GetAllSubmapPoses,
00038 mapping::MapById<mapping::SubmapId, SubmapPose>());
00039 MOCK_CONST_METHOD1(GetLocalToGlobalTransform, transform::Rigid3d(int));
00040 MOCK_CONST_METHOD0(
00041 GetTrajectoryNodes,
00042 mapping::MapById<mapping::NodeId, mapping::TrajectoryNode>());
00043 MOCK_CONST_METHOD0(
00044 GetTrajectoryNodePoses,
00045 mapping::MapById<mapping::NodeId, mapping::TrajectoryNodePose>());
00046 MOCK_CONST_METHOD0(
00047 GetTrajectoryStates,
00048 std::map<int, mapping::PoseGraphInterface::TrajectoryState>());
00049 MOCK_CONST_METHOD0(GetLandmarkPoses,
00050 std::map<std::string, transform::Rigid3d>());
00051 MOCK_METHOD3(SetLandmarkPose,
00052 void(const std::string&, const transform::Rigid3d&, const bool));
00053 MOCK_METHOD1(DeleteTrajectory, void(int));
00054 MOCK_CONST_METHOD1(IsTrajectoryFinished, bool(int));
00055 MOCK_CONST_METHOD1(IsTrajectoryFrozen, bool(int));
00056 MOCK_CONST_METHOD0(
00057 GetTrajectoryData,
00058 std::map<int, mapping::PoseGraphInterface::TrajectoryData>());
00059 MOCK_CONST_METHOD0(constraints, std::vector<Constraint>());
00060 MOCK_CONST_METHOD1(ToProto, mapping::proto::PoseGraph(bool));
00061 MOCK_METHOD1(SetGlobalSlamOptimizationCallback,
00062 void(GlobalSlamOptimizationCallback callback));
00063 };
00064
00065 }
00066 }
00067 }
00068
00069 #endif // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_