Drake
bicycle_car.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include <Eigen/Geometry>
6 
11 
12 namespace drake {
13 namespace automotive {
14 
64 template <typename T>
65 class BicycleCar final : public systems::LeafSystem<T> {
66  public:
68 
69 
70  BicycleCar();
71 
73  template <typename U>
74  explicit BicycleCar(const BicycleCar<U>&);
75 
76  ~BicycleCar() override;
77 
80 
84 
87 
88  private:
89  void CopyOutState(const systems::Context<T>& context,
90  BicycleCarState<T>* output) const;
91 
92  void DoCalcTimeDerivatives(
93  const systems::Context<T>& context,
94  systems::ContinuousState<T>* derivatives) const override;
95 
96  void ImplCalcTimeDerivatives(const BicycleCarParameters<T>& params,
97  const BicycleCarState<T>& state,
98  const systems::BasicVector<T>& steering,
100  BicycleCarState<T>* derivatives) const;
101 
102  int steering_input_port_{};
103  int force_input_port_{};
104  int state_output_port_{};
105 };
106 
107 } // namespace automotive
108 } // namespace drake
double force
Definition: system_identification_test.cc:205
const systems::InputPortDescriptor< T > & get_force_input_port() const
Returns a descriptor of the input port that contains the applied powertrain force.
Definition: bicycle_car.cc:59
~BicycleCar() override
Definition: bicycle_car.cc:50
Definition: automotive_demo.cc:88
const systems::InputPortDescriptor< T > & get_steering_input_port() const
Returns a descriptor of the input port that contains the steering angle.
Definition: bicycle_car.cc:53
Context is an abstract base class template that represents all the inputs to a System: time...
Definition: query_handle.h:10
const systems::OutputPort< T > & get_state_output_port() const
Returns the output port that contains the bicycle states.
Definition: bicycle_car.cc:65
InputPortDescriptor is a notation for specifying the kind of input a System accepts, on a given port.
Definition: input_port_descriptor.h:21
An OutputPort belongs to a System and represents the properties of one of that System&#39;s output ports...
Definition: output_port.h:67
BicycleCar()
Default constructor.
Definition: bicycle_car.cc:18
Specializes BasicVector with specific getters and setters.
Definition: bicycle_car_parameters.h:41
A superclass template that extends System with some convenience utilities that are not applicable to ...
Definition: leaf_system.h:82
BasicVector is a semantics-free wrapper around an Eigen vector that satisfies VectorBase.
Definition: basic_vector.h:25
BicycleCar implements a nonlinear rigid body bicycle model from Althoff & Dolan (2014) [1]...
Definition: bicycle_car.h:65
ContinuousState is a container for all the continuous state variables xc.
Definition: continuous_state.h:44
#define DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN deletes the special member functions for copy-construction, copy-assignment, move-construction, and move-assignment.
Definition: drake_copyable.h:35
Specializes BasicVector with specific getters and setters.
Definition: bicycle_car_state.h:41
Provides careful macros to selectively enable or disable the special member functions for copy-constr...