delphyne
UnicycleCar< T > Class Template Referencefinal

Detailed Description

template<typename T>
class delphyne::UnicycleCar< T >

UnicylceCar is a parameter-free model of a car governed by the second-order equations.

\begin{eqnarray*} \dot{x} &=& v \cos(\theta) \\ % \dot{y} &=& v \sin(\theta) \\ % \dot{\theta} &=& u_{\omega} \\ % \dot{v} &=& u_{a} \end{eqnarray*}

state vector (planar Cartesian):

  • position: x, y, heading; heading is 0 rad when pointed +x, pi/2 rad when pointed +y; heading is defined around the +z axis, so positive-turn-left
  • velocity

input vector:

  • angular rotation rate: a positive angle means a positive change in heading (left turn);
  • acceleration

output port 0: same as state vector. output port 1: A PoseVector containing X_WC, where C is the car frame. output port 2: A FrameVelocity containing Xdot_WC, where C is the car frame.

Template Parameters
Tmust support certain arithmetic operations; for details, see drake::symbolic::Expression.

Instantiated templates for the following ScalarTypes are provided:

  • double

They are already available to link against in the containing library.

#include <src/systems/unicycle_car.h>

Inheritance diagram for UnicycleCar< T >:
[legend]

Public Member Functions

 UnicycleCar (const SimpleCarState< T > &initial_context_state=SimpleCarState< T >())
 Initialise the background context on construction. More...
 
void DoCalcTimeDerivatives (const drake::systems::Context< T > &context, drake::systems::ContinuousState< T > *derivatives) const override
 
const drake::systems::OutputPort< T > & state_output () const
 
const drake::systems::OutputPort< T > & pose_output () const
 
const drake::systems::OutputPort< T > & velocity_output () const
 

Constructor & Destructor Documentation

◆ UnicycleCar()

UnicycleCar ( const SimpleCarState< T > &  initial_context_state = SimpleCarState<T>())

Initialise the background context on construction.

The alternative is to back-fill these context values after the system has been added to a diagram and the subsystem context retrieved, but before execution.

Parameters
[in]initial_context_stateThe continuous state.

Member Function Documentation

◆ DoCalcTimeDerivatives()

void DoCalcTimeDerivatives ( const drake::systems::Context< T > &  context,
drake::systems::ContinuousState< T > *  derivatives 
) const
override

◆ pose_output()

const drake::systems::OutputPort< T > & pose_output

◆ state_output()

const drake::systems::OutputPort< T > & state_output

◆ velocity_output()

const drake::systems::OutputPort< T > & velocity_output

The documentation for this class was generated from the following files: