scenario_simulator_v2 C++ API
sim_model_ideal_steer_vel.hpp
Go to the documentation of this file.
1 // Copyright 2021 The Autoware Foundation.
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 SIMPLE_PLANNING_SIMULATOR__VEHICLE_MODEL__SIM_MODEL_IDEAL_STEER_VEL_HPP_
16 #define SIMPLE_PLANNING_SIMULATOR__VEHICLE_MODEL__SIM_MODEL_IDEAL_STEER_VEL_HPP_
17 
18 #include <eigen3/Eigen/Core>
19 #include <eigen3/Eigen/LU>
20 #include <iostream>
22 
28 {
29 public:
34  explicit SimModelIdealSteerVel(double wheelbase);
35 
40 
41 private:
42  enum IDX { X = 0, Y, YAW };
43  enum IDX_U {
44  VX_DES = 0,
45  STEER_DES,
46  };
47 
48  const double wheelbase_;
49  double prev_vx_ = 0.0;
50  double current_ax_ = 0.0;
51 
55  double getX() override;
56 
60  double getY() override;
61 
65  double getYaw() override;
66 
70  double getVx() override;
71 
75  double getVy() override;
76 
80  double getAx() override;
81 
85  double getWz() override;
86 
90  double getSteer() override;
91 
96  void update(const double & dt) override;
97 
103  Eigen::VectorXd calcModel(const Eigen::VectorXd & state, const Eigen::VectorXd & input) override;
104 };
105 
106 #endif // SIMPLE_PLANNING_SIMULATOR__VEHICLE_MODEL__SIM_MODEL_IDEAL_STEER_VEL_HPP_
calculate ideal steering dynamics
Definition: sim_model_ideal_steer_vel.hpp:28
SimModelIdealSteerVel(double wheelbase)
constructor
Definition: sim_model_ideal_steer_vel.cpp:17
~SimModelIdealSteerVel()=default
destructor
simple_planning_simulator vehicle model class to calculate vehicle dynamics
Definition: sim_model_interface.hpp:26