Apollo 11.0
自动驾驶开放平台
lane_way_tool.h
浏览该文件的文档.
1/******************************************************************************
2 * Copyright 2023 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
21#pragma once
22
23#include <memory>
24#include <string>
25#include <vector>
26
27#include "modules/common_msgs/external_command_msgs/geometry.pb.h"
28
29#include "cyber/cyber.h"
31
32namespace apollo {
33namespace hdmap {
34class HDMap;
35} // namespace hdmap
36namespace routing {
37class LaneWaypoint;
38} // namespace routing
39namespace localization {
40class LocalizationEstimate;
41} // namespace localization
42} // namespace apollo
43
44namespace apollo { // namespace apollo
45namespace external_command { // namespace external_command
46
47class MessageReader;
48
50 public:
51 explicit LaneWayTool(const std::shared_ptr<cyber::Node> &node);
60 apollo::routing::LaneWaypoint *lane_way_point) const;
68 apollo::routing::LaneWaypoint *lane_way_point) const;
70 std::vector<apollo::routing::LaneWaypoint> *lane_way_points) const;
78 const std::string &parking_id,
79 std::vector<apollo::routing::LaneWaypoint> *lane_way_points) const;
80
81 bool IsParkandgoScenario() const;
82
84 hdmap::AreaInfoConstPtr &area_info,
85 std::vector<apollo::routing::LaneWaypoint> *lane_way_points) const;
86
87 private:
88 const hdmap::HDMap *hdmap_;
89 MessageReader *message_reader_;
90};
91
92} // namespace external_command
93} // namespace apollo
bool ConvertToLaneWayPoint(const apollo::external_command::Pose &pose, apollo::routing::LaneWaypoint *lane_way_point) const
Convert the pose with (x,y) and heading(or not) to lane_way_point.
bool GetVehicleLaneWayPoints(std::vector< apollo::routing::LaneWaypoint > *lane_way_points) const
bool GetVehicleLaneWayPoint(apollo::routing::LaneWaypoint *lane_way_point) const
Get the current vehicle pose and find the mapping point to the nearest lane.
bool GetParkingLaneWayPoint(const std::string &parking_id, std::vector< apollo::routing::LaneWaypoint > *lane_way_points) const
Get the parking space center point projected to lane way point
bool GetPreciseParkingLaneWayPoint(hdmap::AreaInfoConstPtr &area_info, std::vector< apollo::routing::LaneWaypoint > *lane_way_points) const
High-precision map loader interface.
Definition hdmap.h:54
std::shared_ptr< const AreaInfo > AreaInfoConstPtr
class register implement
Definition arena_queue.h:37