Apollo  6.0
Open source self driving car software
spline_2d_solver.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2017 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 <vector>
24 
29 
30 namespace apollo {
31 namespace planning {
32 
34  public:
35  Spline2dSolver(const std::vector<double>& t_knots, const uint32_t order)
36  : spline_(t_knots, order),
37  kernel_(t_knots, order),
38  constraint_(t_knots, order) {}
39 
40  virtual ~Spline2dSolver() = default;
41 
42  virtual void Reset(const std::vector<double>& t_knots,
43  const uint32_t order) = 0;
44 
45  // customize setup
47  virtual Spline2dKernel* mutable_kernel() = 0;
48  virtual Spline2d* mutable_spline() = 0;
49 
50  // solve
51  virtual bool Solve() = 0;
52 
53  // extract
54  virtual const Spline2d& spline() const = 0;
55 
56  protected:
60 };
61 
62 } // namespace planning
63 } // namespace apollo
: piecewise smoothing spline 2d class
Spline2dKernel kernel_
Definition: spline_2d_solver.h:58
virtual Spline2dConstraint * mutable_constraint()=0
Definition: spline_2d.h:34
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
virtual ~Spline2dSolver()=default
Planning module main class. It processes GPS and IMU as input, to generate planning info...
virtual void Reset(const std::vector< double > &t_knots, const uint32_t order)=0
Definition: spline_2d_constraint.h:33
Spline2dSolver(const std::vector< double > &t_knots, const uint32_t order)
Definition: spline_2d_solver.h:35
Definition: spline_2d_kernel.h:32
virtual const Spline2d & spline() const =0
: quadratic programming base class
virtual Spline2d * mutable_spline()=0
Spline2d spline_
Definition: spline_2d_solver.h:57
Spline2dConstraint constraint_
Definition: spline_2d_solver.h:59
Definition: spline_2d_solver.h:33
virtual Spline2dKernel * mutable_kernel()=0