mock_pose_graph.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2018 The Cartographer Authors
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *      http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
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 }  // namespace testing
00066 }  // namespace mapping
00067 }  // namespace cartographer
00068 
00069 #endif  // CARTOGRAPHER_MAPPING_INTERNAL_TESTING_MOCK_POSE_GRAPH_H_


cartographer
Author(s): The Cartographer Authors
autogenerated on Thu May 9 2019 02:27:35