Apollo 11.0
自动驾驶开放平台
online_localization_expert.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2018 The Apollo Authors. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
17#pragma once
18
19#include "localization_msf/sins_struct.h"
20#include "modules/common_msgs/sensor_msgs/gnss_best_pose.pb.h"
22#include "modules/common_msgs/localization_msgs/localization.pb.h"
23#include "modules/common_msgs/localization_msgs/localization_status.pb.h"
24
29namespace apollo {
30namespace localization {
31namespace msf {
32
34 public:
37
38 bool Init(const LocalizationIntegParam &param);
39
40 void AddImu(const ImuData &data);
44 const MeasureData &data);
45
46 void GetFusionStatus(MsfStatus *msf_status, MsfSensorMsgStatus *sensor_status,
47 LocalizationIntegStatus *integstatus);
48 void GetGnssStatus(MsfStatus *msf_status);
49
50 private:
51 void CheckImuDelayStatus(const double &cur_imu_time);
52 void CheckImuMissingStatus(const double &cur_imu_time);
53 void CheckGnssLidarMsfStatus(const double &cur_imu_time);
54 void SetLocalizationStatus(const LocalizationEstimate &data);
55
56 private:
57 MsfStatus msf_status_;
58 std::mutex msf_status_mutex_;
59
60 MsfSensorMsgStatus sensor_status_;
61
62 double latest_gnsspos_timestamp_ = 0.0;
63 std::mutex latest_gnsspos_timestamp_mutex_;
64
65 double latest_lidar_timestamp_ = 0.0;
66 std::mutex latest_lidar_timestamp_mutex_;
67
68 double imu_delay_time_threshold_1_ = 0.1;
69 double imu_delay_time_threshold_2_ = 0.05;
70 double imu_delay_time_threshold_3_ = 0.02;
71
72 double imu_missing_time_threshold_1_ = 0.1;
73 double imu_missing_time_threshold_2_ = 0.05;
74 double imu_missing_time_threshold_3_ = 0.01;
75
76 double bestgnsspose_loss_time_threshold_ = 2.0;
77 double lidar_loss_time_threshold_ = 2.0;
78
79 double localization_std_x_threshold_1_ = 0.15;
80 double localization_std_y_threshold_1_ = 0.15;
81
82 double localization_std_x_threshold_2_ = 0.3;
83 double localization_std_y_threshold_2_ = 0.3;
84
85 LocalizationIntegStatus integ_status_;
86};
87
88} // namespace msf
89} // namespace localization
90} // namespace apollo
void GetFusionStatus(MsfStatus *msf_status, MsfSensorMsgStatus *sensor_status, LocalizationIntegStatus *integstatus)
void AddFusionLocalization(const LocalizationEstimate &data)
void AddGnssBestPose(const drivers::gnss::GnssBestPose &msg, const MeasureData &data)
void AddLidarLocalization(const LocalizationEstimate &data)
The class of LocalizationIntegParam
class register implement
Definition arena_queue.h:37