Apollo 11.0
自动驾驶开放平台
open_space_trajectory_optimizer_park.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
25#include "modules/planning/tasks/open_space_trajectory_optimizer_park/proto/open_space_trajectory_optimizer_park.pb.h"
29
30#include "cyber/common/log.h"
35
36namespace apollo {
37namespace planning {
38
40 public:
41 bool Init(const std::string &config_dir, const std::string &name,
42 const std::shared_ptr<DependencyInjector> &injector) override;
44
45 private:
46 void Stop();
47
48 apollo::common::Status Process() override;
49
50 void Optimize();
51
52 void GenerateTrajectoryThread();
53
54 void LoadResult(
55 DiscretizedTrajectory* const trajectory_data);
56
57 void ReuseLastFrameDebug(const Frame* last_frame);
58
59 private:
60 std::unique_ptr<Optimizer> trajectory_optimizer_;
62 bool thread_init_flag_ = false;
63 bool replan_flag_ = false;
64 std::future<void> task_future_;
65 bool trajectory_update_ = false;
66 std::mutex data_mutex_;
67};
68
71
72} // namespace planning
73} // namespace apollo
A general class to denote the return status of an API call.
Definition status.h:43
Frame holds all data for one planning cycle.
Definition frame.h:62
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