Apollo  6.0
Open source self driving car software
waypoint_sampler.h
Go to the documentation of this file.
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 
21 #pragma once
22 
23 #include "modules/common/proto/pnc_point.pb.h"
31 #include "modules/planning/proto/dp_poly_path_config.pb.h"
34 
35 namespace apollo {
36 namespace planning {
37 
39  public:
40  explicit WaypointSampler(const WaypointSamplerConfig &config)
41  : config_(config) {}
42  virtual ~WaypointSampler() = default;
43 
44  virtual void Init(const ReferenceLineInfo *reference_line_info,
45  const common::SLPoint &init_sl_point_,
46  const common::FrenetFramePoint &init_frenet_frame_point);
47 
48  virtual void SetDebugLogger(apollo::planning_internal::Debug *debug) {
49  planning_debug_ = debug;
50  }
51 
52  virtual bool SamplePathWaypoints(
53  const common::TrajectoryPoint &init_point,
54  std::vector<std::vector<common::SLPoint>> *const points);
55 
56  protected:
57  const WaypointSamplerConfig &config_;
59  common::SLPoint init_sl_point_;
60  common::FrenetFramePoint init_frenet_frame_point_;
61  apollo::planning_internal::Debug *planning_debug_ = nullptr;
62 };
63 
64 } // namespace planning
65 } // namespace apollo
Definition: waypoint_sampler.h:38
common::SLPoint init_sl_point_
Definition: waypoint_sampler.h:59
apollo::planning_internal::Debug * planning_debug_
Definition: waypoint_sampler.h:61
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
Planning module main class. It processes GPS and IMU as input, to generate planning info...
const WaypointSamplerConfig & config_
Definition: waypoint_sampler.h:57
ReferenceLineInfo holds all data for one reference line.
Definition: reference_line_info.h:54
common::FrenetFramePoint init_frenet_frame_point_
Definition: waypoint_sampler.h:60
virtual void SetDebugLogger(apollo::planning_internal::Debug *debug)
Definition: waypoint_sampler.h:48
virtual bool SamplePathWaypoints(const common::TrajectoryPoint &init_point, std::vector< std::vector< common::SLPoint >> *const points)
WaypointSampler(const WaypointSamplerConfig &config)
Definition: waypoint_sampler.h:40
const ReferenceLineInfo * reference_line_info_
Definition: waypoint_sampler.h:58
virtual ~WaypointSampler()=default
virtual void Init(const ReferenceLineInfo *reference_line_info, const common::SLPoint &init_sl_point_, const common::FrenetFramePoint &init_frenet_frame_point)