delphyne
DrivingCommand< T > Class Template Referencefinal

Detailed Description

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

Specializes BasicVector with specific getters and setters.

#include <src/gen/driving_command.h>

Inheritance diagram for DrivingCommand< T >:
[legend]

Public Types

typedef DrivingCommandIndices K
 An abbreviation for our row index constants. More...
 

Public Member Functions

 DrivingCommand ()
 Default constructor. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible,

MoveAssignable

 DrivingCommand (const DrivingCommand &other)
 
 DrivingCommand (DrivingCommand &&other) noexcept
 
DrivingCommandoperator= (const DrivingCommand &other)
 
DrivingCommandoperator= (DrivingCommand &&other) noexcept
 
template<typename U = T>
std::enable_if< std::is_same< U, drake::symbolic::Expression >::value >::type SetToNamedVariables ()
 Create a symbolic::Variable for each element with the known variable name. More...
 
DrivingCommand< T > * DoClone () const final
 

Getters and Setters

const T & steering_angle () const
 The desired steering angle of a virtual center wheel, positive results in the vehicle turning left. More...
 
void set_steering_angle (const T &steering_angle)
 
DRAKE_VECTOR_GEN_NODISCARD DrivingCommand< T > with_steering_angle (const T &steering_angle) const
 Fluent setter that matches steering_angle(). More...
 
const T & acceleration () const
 The signed acceleration, positive means speed up; negative means slow down, but should not move in reverse. More...
 
void set_acceleration (const T &acceleration)
 
DRAKE_VECTOR_GEN_NODISCARD DrivingCommand< T > with_acceleration (const T &acceleration) const
 Fluent setter that matches acceleration(). More...
 
drake::boolean< T > IsValid () const
 Returns whether the current values of this vector are well-formed. More...
 
static const std::vector< std::string > & GetCoordinateNames ()
 See DrivingCommandIndices::GetCoordinateNames(). More...
 

Member Typedef Documentation

◆ K

An abbreviation for our row index constants.

Constructor & Destructor Documentation

◆ DrivingCommand() [1/3]

Default constructor.

Sets all rows to their default value:

  • steering_angle defaults to 0.0 rad.
  • acceleration defaults to 0.0 m/s^2.

◆ DrivingCommand() [2/3]

DrivingCommand ( const DrivingCommand< T > &  other)

◆ DrivingCommand() [3/3]

DrivingCommand ( DrivingCommand< T > &&  other)
noexcept

Member Function Documentation

◆ acceleration()

const T& acceleration ( ) const

The signed acceleration, positive means speed up; negative means slow down, but should not move in reverse.

Note
acceleration is expressed in units of m/s^2.

◆ DoClone()

DrivingCommand<T>* DoClone ( ) const
final

◆ GetCoordinateNames()

static const std::vector<std::string>& GetCoordinateNames ( )
static

◆ IsValid()

drake::boolean<T> IsValid ( ) const

Returns whether the current values of this vector are well-formed.

◆ operator=() [1/2]

DrivingCommand& operator= ( const DrivingCommand< T > &  other)

◆ operator=() [2/2]

DrivingCommand& operator= ( DrivingCommand< T > &&  other)
noexcept

◆ set_acceleration()

void set_acceleration ( const T &  acceleration)

◆ set_steering_angle()

void set_steering_angle ( const T &  steering_angle)

◆ SetToNamedVariables()

std::enable_if<std::is_same<U, drake::symbolic::Expression>::value>::type SetToNamedVariables ( )

Create a symbolic::Variable for each element with the known variable name.

This is only available for T == symbolic::Expression.

◆ steering_angle()

const T& steering_angle ( ) const

The desired steering angle of a virtual center wheel, positive results in the vehicle turning left.

Note
steering_angle is expressed in units of rad.

◆ with_acceleration()

DRAKE_VECTOR_GEN_NODISCARD DrivingCommand<T> with_acceleration ( const T &  acceleration) const

Fluent setter that matches acceleration().

Returns a copy of this with acceleration set to a new value.

◆ with_steering_angle()

DRAKE_VECTOR_GEN_NODISCARD DrivingCommand<T> with_steering_angle ( const T &  steering_angle) const

Fluent setter that matches steering_angle().

Returns a copy of this with steering_angle set to a new value.


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