Autoware.Auto
nlp_path_planner.hpp
Go to the documentation of this file.
1 // Copyright 2020 Embotech AG, Zurich, Switzerland. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //    http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef PARKING_PLANNER__NLP_PATH_PLANNER_HPP_
16 #define PARKING_PLANNER__NLP_PATH_PLANNER_HPP_
17 
18 #include <casadi/casadi.hpp>
19 #include <common/types.hpp>
20 #include <vector>
21 
22 #include "visibility_control.hpp"
24 #include "nlp_adapters.hpp"
25 #include "bicycle_model.hpp"
26 
27 namespace autoware
28 {
29 
30 namespace motion
31 {
32 
33 namespace planning
34 {
35 
36 namespace parking_planner
37 {
38 
40 struct NLPResults
41 {
42  // cppcheck-suppress syntaxError
44  casadi::Dict m_solve_info;
45 };
46 
47 class PARKING_PLANNER_PUBLIC NLPPathPlanner
48 {
49 public:
61  const NLPCostWeights<float64_t> & cost_weights,
62  const VehicleState<float64_t> & lower_state_bounds,
63  const VehicleState<float64_t> & upper_state_bounds,
64  const VehicleCommand<float64_t> & lower_command_bounds,
65  const VehicleCommand<float64_t> & upper_command_bounds
66  );
67 
78  NLPResults plan_nlp(
79  const VehicleState<float64_t> & current_state,
80  const VehicleState<float64_t> & goal_state,
81  const Trajectory<float64_t> & initial_guess,
82  const std::vector<Polytope2D<float64_t>> & obstacles,
83  const BicycleModelParameters<float64_t> & model_parameters
84  ) const;
85 
95  bool check_trajectory(
96  const Trajectory<float64_t> & trajectory,
97  const VehicleState<float64_t> & initial_state,
98  const VehicleState<float64_t> & goal_state,
99  const std::vector<Polytope2D<float64_t>> & obstacles,
100  const BicycleModelParameters<float64_t> & model_parameters,
101  const float64_t tolerance
102  ) const;
103 
104 private:
105  NLPCostWeights<float64_t> m_cost_weights;
106  VehicleState<float64_t> m_lower_state_bounds;
107  VehicleState<float64_t> m_upper_state_bounds;
108  VehicleCommand<float64_t> m_lower_command_bounds;
109  VehicleCommand<float64_t> m_upper_command_bounds;
110 };
111 
112 
113 } // namespace parking_planner
114 } // namespace planning
115 } // namespace motion
116 } // namespace autoware
117 
118 #endif // PARKING_PLANNER__NLP_PATH_PLANNER_HPP_
types.hpp
This file includes common type definition.
autoware::motion::planning::parking_planner::VehicleCommand< float64_t >
nlp_adapters.hpp
autoware::motion::planning::parking_planner::NLPResults::m_trajectory
Trajectory< float64_t > m_trajectory
Definition: nlp_path_planner.hpp:43
autoware::motion::planning::parking_planner::NLPCostWeights< float64_t >
autoware::motion::planning::parking_planner::Polytope2D
Class describing a polytope in two-dimensional space.
Definition: geometry.hpp:244
bicycle_model.hpp
autoware
This file defines the lanelet2_map_provider_node class.
Definition: quick_sort.hpp:24
autoware::motion::planning::parking_planner::VehicleState< float64_t >
autoware::motion::planning::parking_planner::NLPResults
Definition: nlp_path_planner.hpp:40
autoware::motion::planning::parking_planner::NLPPathPlanner
Definition: nlp_path_planner.hpp:47
motion
Definition: controller_base.hpp:30
autoware::motion::planning::parking_planner::Trajectory
std::vector< TrajectoryStep< T > > Trajectory
Class to represent a dynamic trajectory.
Definition: parking_planner_types.hpp:200
autoware::motion::planning::parking_planner::BicycleModelParameters< float64_t >
autoware::common::types::float64_t
double float64_t
Definition: types.hpp:37
visibility_control.hpp
parking_planner_types.hpp
autoware::motion::planning::parking_planner::NLPResults::m_solve_info
casadi::Dict m_solve_info
Definition: nlp_path_planner.hpp:44