Apollo 11.0
自动驾驶开放平台
open_space_path_planning.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#include <string>
23#include <memory>
24#include <vector>
25#include "modules/planning/tasks/open_space_path_planning/proto/open_space_path_planning.pb.h"
26
27#include "cyber/common/log.h"
35
36namespace apollo {
37namespace planning {
38
40 std::vector<double> start_pose;
41 std::vector<double> end_pose;
42 std::vector<double> XYbounds;
45 Eigen::MatrixXi obstacles_edges_num;
46 Eigen::MatrixXd obstacles_A;
47 Eigen::MatrixXd obstacles_b;
48 std::vector<std::vector<common::math::Vec2d>> obstacles_vertices_vec;
49 std::vector<std::vector<common::math::Vec2d>> soft_boundary_vertices_vec;
51};
52
54 public:
55 bool Init(const std::string &config_dir, const std::string &name,
56 const std::shared_ptr<DependencyInjector> &injector) override;
58
59 private:
60 void Stop();
61 apollo::common::Status Process() override;
62 void PathPlanning();
63 void GeneratePathThread();
64 void LoadResult(DiscretizedTrajectory* const trajectory_data);
67 std::future<void> task_future_;
68 std::atomic<bool> thread_init_flag_{false};
69 std::atomic<bool> data_ready_{false};
70 std::atomic<bool> path_update_{false};
71 std::mutex data_mutex_;
72 std::unique_ptr<HybridAStar> path_finder_;
73 HybridAStartResult result_;
74};
75
77
78} // namespace planning
79} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
Implements a class of 2-dimensional vectors.
Definition vec2d.h:42
bool Init(const std::string &config_dir, const std::string &name, const std::shared_ptr< DependencyInjector > &injector) override
Planning module main class.
#define CYBER_PLUGIN_MANAGER_REGISTER_PLUGIN(name, base)
class register implement
Definition arena_queue.h:37
std::vector< std::vector< common::math::Vec2d > > soft_boundary_vertices_vec
std::vector< std::vector< common::math::Vec2d > > obstacles_vertices_vec