Apollo 11.0
自动驾驶开放平台
stage_precise_parking.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>
26#include "modules/common_msgs/external_command_msgs/precise_parking_command.pb.h"
30
31namespace apollo {
32namespace planning {
33
34class StagePreciseParking : public Stage {
35public:
36 bool Init(
37 const StagePipeline &config,
38 const std::shared_ptr<DependencyInjector> &injector,
39 const std::string &config_dir,
40 void *context);
41
42 StageResult Process(const common::TrajectoryPoint &planning_init_point, Frame *frame) override;
43
44private:
45 bool GetOpenspaceRoi(Frame *frame);
46 void SetOrigin(const std::vector<Vec2d> &points, const Vec2d &ego_pos, Frame *frame);
47 void GetEndPose(Frame *frame);
48 bool FuseLineSegments(std::vector<std::vector<common::math::Vec2d>> &line_segments_vec);
49 bool FormulateBoundaryConstraints(
50 const std::vector<std::vector<common::math::Vec2d>> &roi_parking_boundary,
51 Frame *const frame);
52 StageResult FinishStage(Frame *frame);
53 bool LoadObstacleInVertices(
54 const std::vector<std::vector<common::math::Vec2d>> &roi_parking_boundary,
55 Frame *const frame);
56
57 PreciseParkingContext *precise_parking_context_;
58 common::math::Vec2d origin_point_;
59 double origin_heading_;
60};
61
63
64} // namespace planning
65} // namespace apollo
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
Frame holds all data for one planning cycle.
Definition frame.h:62
StageResult Process(const common::TrajectoryPoint &planning_init_point, Frame *frame) override
Each stage does its business logic inside Process function.
bool Init(const StagePipeline &config, const std::shared_ptr< DependencyInjector > &injector, const std::string &config_dir, void *context)
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
class register implement
Definition arena_queue.h:37