Apollo 11.0
自动驾驶开放平台
relative_map.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 <string>
20
25#include "modules/common_msgs/planning_msgs/navigation.pb.h"
26#include "modules/map/relative_map/proto/relative_map_config.pb.h"
27#include "modules/common_msgs/perception_msgs/perception_obstacle.pb.h"
28
29namespace apollo {
30namespace relative_map {
31
33 public:
35
39 std::string Name() const { return "RelativeMap"; }
40
46 common::VehicleStateProvider* vehicle_state_provider);
47
53
57 void Stop();
58
62 virtual ~RelativeMap() = default;
63
68 bool Process(MapMsg* const map_msg);
69
70 void OnPerception(
71 const perception::PerceptionObstacles& perception_obstacles);
72 void OnChassis(const canbus::Chassis& chassis);
73 void OnLocalization(const localization::LocalizationEstimate& localization);
74 void OnNavigationInfo(const NavigationInfo& navigation_info);
75
76 private:
77 bool CreateMapFromNavigationLane(MapMsg* map_msg);
78 RelativeMapConfig config_;
79 apollo::common::monitor::MonitorLogBuffer monitor_logger_buffer_;
80
81 NavigationLane navigation_lane_;
82 perception::PerceptionObstacles perception_obstacles_;
83 canbus::Chassis chassis_;
85
86 std::mutex navigation_lane_mutex_;
87 common::VehicleStateProvider* vehicle_state_provider_;
88};
89
90} // namespace relative_map
91} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
NavigationLane generates a real-time relative map based on navagation lines.
void OnNavigationInfo(const NavigationInfo &navigation_info)
virtual ~RelativeMap()=default
destructor
void OnLocalization(const localization::LocalizationEstimate &localization)
std::string Name() const
module name
void OnChassis(const canbus::Chassis &chassis)
apollo::common::Status Start()
module start function
void Stop()
module stop function
bool Process(MapMsg *const map_msg)
main logic of the relative_map module, runs periodically triggered by timer.
apollo::common::Status Init(common::VehicleStateProvider *vehicle_state_provider)
module initialization function
void OnPerception(const perception::PerceptionObstacles &perception_obstacles)
The class of MonitorLogBuffer
class register implement
Definition arena_queue.h:37
This file provides the declaration of the class NavigationLane.