2018-02-07 01:13:31 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2018 The Cartographer Authors
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2018-03-02 21:16:49 +08:00
|
|
|
#ifndef CARTOGRAPHER_GRPC_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
|
|
|
|
#define CARTOGRAPHER_GRPC_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
|
2018-02-07 01:13:31 +08:00
|
|
|
|
|
|
|
#include "cartographer/mapping/pose_graph_interface.h"
|
|
|
|
#include "glog/logging.h"
|
|
|
|
#include "gmock/gmock.h"
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
2018-03-03 06:21:28 +08:00
|
|
|
namespace cartographer {
|
|
|
|
namespace cloud {
|
2018-02-07 01:13:31 +08:00
|
|
|
namespace testing {
|
|
|
|
|
2018-03-03 06:21:28 +08:00
|
|
|
class MockPoseGraph : public mapping::PoseGraphInterface {
|
2018-02-07 01:13:31 +08:00
|
|
|
public:
|
|
|
|
MockPoseGraph() = default;
|
|
|
|
~MockPoseGraph() override = default;
|
|
|
|
|
|
|
|
MOCK_METHOD0(RunFinalOptimization, void());
|
|
|
|
MOCK_METHOD0(GetAllSubmapData,
|
2018-03-03 06:21:28 +08:00
|
|
|
mapping::MapById<mapping::SubmapId, SubmapData>());
|
2018-02-07 01:13:31 +08:00
|
|
|
MOCK_METHOD0(GetAllSubmapPoses,
|
2018-03-03 06:21:28 +08:00
|
|
|
mapping::MapById<mapping::SubmapId, SubmapPose>());
|
|
|
|
MOCK_METHOD1(GetLocalToGlobalTransform, transform::Rigid3d(int));
|
|
|
|
MOCK_METHOD0(GetTrajectoryNodes,
|
|
|
|
mapping::MapById<mapping::NodeId, mapping::TrajectoryNode>());
|
2018-02-07 01:13:31 +08:00
|
|
|
MOCK_METHOD0(
|
2018-03-03 06:21:28 +08:00
|
|
|
GetTrajectoryNodePoses,
|
|
|
|
mapping::MapById<mapping::NodeId, mapping::TrajectoryNodePose>());
|
|
|
|
MOCK_METHOD0(GetLandmarkPoses, std::map<std::string, transform::Rigid3d>());
|
2018-02-07 01:13:31 +08:00
|
|
|
MOCK_METHOD1(IsTrajectoryFinished, bool(int));
|
2018-03-03 06:21:28 +08:00
|
|
|
MOCK_METHOD0(GetTrajectoryData,
|
|
|
|
std::map<int, mapping::PoseGraphInterface::TrajectoryData>());
|
2018-02-07 01:13:31 +08:00
|
|
|
MOCK_METHOD0(constraints, std::vector<Constraint>());
|
2018-03-03 06:21:28 +08:00
|
|
|
MOCK_METHOD0(ToProto, mapping::proto::PoseGraph());
|
2018-02-07 01:13:31 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace testing
|
2018-03-03 06:21:28 +08:00
|
|
|
} // namespace cloud
|
|
|
|
} // namespace cartographer
|
2018-02-07 01:13:31 +08:00
|
|
|
|
2018-03-02 21:16:49 +08:00
|
|
|
#endif // CARTOGRAPHER_GRPC_INTERNAL_TESTING_MOCK_POSE_GRAPH_H
|