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_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H
00018 #define CARTOGRAPHER_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H
00019
00020 #include "cartographer/cloud/proto/map_builder_service.pb.h"
00021 #include "cartographer/sensor/internal/dispatchable.h"
00022 #include "google/protobuf/util/message_differencer.h"
00023
00024 namespace cartographer {
00025 namespace cloud {
00026 namespace testing {
00027
00028 using DataPredicateType = std::function<bool(const sensor::Data &)>;
00029 using ProtoPredicateType =
00030 std::function<bool(const google::protobuf::Message &)>;
00031
00032 template <typename T>
00033 DataPredicateType BuildDataPredicateEquals(const T &proto);
00034
00035 template <>
00036 DataPredicateType BuildDataPredicateEquals<proto::AddImuDataRequest>(
00037 const proto::AddImuDataRequest &proto);
00038 template <>
00039 DataPredicateType BuildDataPredicateEquals<proto::AddFixedFramePoseDataRequest>(
00040 const proto::AddFixedFramePoseDataRequest &proto);
00041 template <>
00042 DataPredicateType BuildDataPredicateEquals<proto::AddOdometryDataRequest>(
00043 const proto::AddOdometryDataRequest &proto);
00044 template <>
00045 DataPredicateType BuildDataPredicateEquals<proto::AddLandmarkDataRequest>(
00046 const proto::AddLandmarkDataRequest &proto);
00047 template <>
00048 DataPredicateType BuildDataPredicateEquals<proto::AddRangefinderDataRequest>(
00049 const proto::AddRangefinderDataRequest &proto);
00050
00051 ProtoPredicateType BuildProtoPredicateEquals(
00052 const google::protobuf::Message *proto);
00053
00054 }
00055 }
00056 }
00057
00058 #endif // CARTOGRAPHER_CLOUD_INTERNAL_TESTING_TEST_HELPERS_H