Drake
IdmPlannerParameters< T > Class Template Reference

Specializes BasicVector with specific getters and setters. More...

#include <drake/automotive/gen/idm_planner_parameters.h>

Inheritance diagram for IdmPlannerParameters< T >:
[legend]
Collaboration diagram for IdmPlannerParameters< T >:
[legend]

Public Types

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

Public Member Functions

 IdmPlannerParameters ()
 Default constructor. More...
 
IdmPlannerParameters< T > * DoClone () const override
 Returns a new BasicVector containing a copy of the entire vector. More...
 
decltype(T()< T()) IsValid () const
 Returns whether the current values of this vector are well-formed. More...
 
void CalcInequalityConstraint (VectorX< T > *value) const override
 Populates a vector value suitable for a SystemConstraint inequality constraint. More...
 
Getters and Setters
const T & v_ref () const
 desired velocity in free traffic More...
 
void set_v_ref (const T &v_ref)
 
const T & a () const
 max acceleration More...
 
void set_a (const T &a)
 
const T & b () const
 comfortable braking deceleration More...
 
void set_b (const T &b)
 
const T & s_0 () const
 minimum desired net distance More...
 
void set_s_0 (const T &s_0)
 
const T & time_headway () const
 desired time headway to vehicle in front More...
 
void set_time_headway (const T &time_headway)
 
const T & delta () const
 free-road exponent More...
 
void set_delta (const T &delta)
 
const T & bloat_diameter () const
 diameter of circle about the vehicle's pose that encloses its physical footprint More...
 
void set_bloat_diameter (const T &bloat_diameter)
 
const T & distance_lower_limit () const
 lower saturation bound on net distance to prevent near-singular IDM solutions More...
 
void set_distance_lower_limit (const T &distance_lower_limit)
 
const T & scan_ahead_distance () const
 distance to scan ahead on road for a leading vehicle More...
 
void set_scan_ahead_distance (const T &scan_ahead_distance)
 
- Public Member Functions inherited from BasicVector< T >
 BasicVector (int size)
 Initializes with the given size using the drake::dummy_value<T>, which is NaN when T = double. More...
 
 BasicVector (const VectorX< T > &data)
 Constructs a BasicVector with the specified data. More...
 
int size () const override
 Returns the number of elements in the vector. More...
 
void set_value (const Eigen::Ref< const VectorX< T >> &value)
 Sets the vector to the given value. More...
 
Eigen::VectorBlock< const VectorX< T > > get_value () const
 Returns the entire vector as a const Eigen::VectorBlock. More...
 
Eigen::VectorBlock< VectorX< T > > get_mutable_value ()
 Returns the entire vector as a mutable Eigen::VectorBlock, which allows mutation of the values, but does not allow resizing the vector itself. More...
 
const T & GetAtIndex (int index) const override
 Returns the element at the given index in the vector. More...
 
T & GetAtIndex (int index) override
 Returns the element at the given index in the vector. More...
 
void SetFromVector (const Eigen::Ref< const VectorX< T >> &value) override
 Replaces the entire vector with the contents of value. More...
 
VectorX< T > CopyToVector () const override
 Copies the entire state to a vector with no semantics. More...
 
void ScaleAndAddToVector (const T &scale, Eigen::Ref< VectorX< T >> vec) const override
 Adds a scaled version of this vector to Eigen vector vec, which must be the same size. More...
 
void SetZero () override
 
NormInf () const override
 Computes the infinity norm for this vector. More...
 
std::unique_ptr< BasicVector< T > > Clone () const
 Copies the entire vector to a new BasicVector, with the same concrete implementation type. More...
 
 BasicVector (const BasicVector &)=delete
 
BasicVectoroperator= (const BasicVector &)=delete
 
 BasicVector (BasicVector &&)=delete
 
BasicVectoroperator= (BasicVector &&)=delete
 
- Public Member Functions inherited from VectorBase< T >
virtual ~VectorBase ()
 
T & operator[] (std::size_t idx)
 
const T & operator[] (std::size_t idx) const
 
void SetAtIndex (int index, const T &value)
 Replaces the state at the given index with the value. More...
 
virtual void SetFrom (const VectorBase< T > &value)
 Replaces the entire vector with the contents of value. More...
 
VectorBasePlusEqScaled (const T &scale, const VectorBase< T > &rhs)
 Add in scaled vector rhs to this vector. More...
 
VectorBasePlusEqScaled (const std::initializer_list< std::pair< T, const VectorBase< T > & >> &rhs_scale)
 Add in multiple scaled vectors to this vector. More...
 
VectorBaseoperator+= (const VectorBase< T > &rhs)
 Add in vector rhs to this vector. More...
 
VectorBaseoperator-= (const VectorBase< T > &rhs)
 Subtract in vector rhs to this vector. More...
 
 VectorBase (const VectorBase &)=delete
 
VectorBaseoperator= (const VectorBase &)=delete
 
 VectorBase (VectorBase &&)=delete
 
VectorBaseoperator= (VectorBase &&)=delete
 

Static Public Member Functions

static const std::vector< std::string > & GetCoordinateNames ()
 See IdmPlannerParametersIndices::GetCoordinateNames(). More...
 
- Static Public Member Functions inherited from BasicVector< T >
static std::unique_ptr< BasicVector< T > > Make (const std::initializer_list< T > &data)
 Constructs a BasicVector whose elements are the elements of data. More...
 
template<typename... Fargs>
static std::unique_ptr< BasicVector< T > > Make (Fargs &&...args)
 Constructs a BasicVector where each element is constructed using the placewise-corresponding member of args as the sole constructor argument. More...
 

Additional Inherited Members

- Protected Member Functions inherited from VectorBase< T >
 VectorBase ()
 
- Static Protected Member Functions inherited from BasicVector< T >
template<typename F , typename... Fargs>
static void MakeRecursive (BasicVector< T > *data, int index, F constructor_arg, Fargs &&...recursive_args)
 Sets data at index to an object of type T, which must have a single-argument constructor invoked via constructor_arg, and then recursively invokes itself on the next index with recursive args. More...
 
template<typename F , typename... Fargs>
static void MakeRecursive (BasicVector< T > *data, int index, F constructor_arg)
 Base case for the MakeRecursive template recursion. More...
 

Detailed Description

template<typename T>
class drake::automotive::IdmPlannerParameters< T >

Specializes BasicVector with specific getters and setters.

Member Typedef Documentation

An abbreviation for our row index constants.

Constructor & Destructor Documentation

Default constructor.

Sets all rows to their default value:

  • v_ref defaults to 10.0 m/s.
  • a defaults to 1.0 m/s^2.
  • b defaults to 3.0 m/s^2.
  • s_0 defaults to 1.0 m.
  • time_headway defaults to 0.1 s.
  • delta defaults to 4.0 dimensionless.
  • bloat_diameter defaults to 4.5 m.
  • distance_lower_limit defaults to 1e-2 m.
  • scan_ahead_distance defaults to 100.0 m.

Member Function Documentation

const T& a ( ) const
inline

max acceleration

Note
a is expressed in units of m/s^2.
a has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

const T& b ( ) const
inline

comfortable braking deceleration

Note
b is expressed in units of m/s^2.
b has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

const T& bloat_diameter ( ) const
inline

diameter of circle about the vehicle's pose that encloses its physical footprint

Note
bloat_diameter is expressed in units of m.
bloat_diameter has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

void CalcInequalityConstraint ( VectorX< T > *  value) const
inlineoverridevirtual

Populates a vector value suitable for a SystemConstraint inequality constraint.

For all indices i in the result vector, the validity constraint is result[i] >= 0. For a given subclass type, the size of the result must not vary over time. The VectorBase default implementation sets the value to be empty (no constraints).

Reimplemented from VectorBase< T >.

const T& delta ( ) const
inline

free-road exponent

Note
delta is expressed in units of dimensionless.
delta has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

const T& distance_lower_limit ( ) const
inline

lower saturation bound on net distance to prevent near-singular IDM solutions

Note
distance_lower_limit is expressed in units of m.
distance_lower_limit has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

IdmPlannerParameters<T>* DoClone ( ) const
inlineoverridevirtual

Returns a new BasicVector containing a copy of the entire vector.

Caller must take ownership, and may rely on the NVI wrapper to initialize the clone elementwise.

Subclasses of BasicVector must override DoClone to return their covariant type.

Reimplemented from BasicVector< T >.

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

See IdmPlannerParametersIndices::GetCoordinateNames().

Here is the call graph for this function:

decltype(T() < T()) IsValid ( ) const
inline

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

Here is the call graph for this function:

Here is the caller graph for this function:

const T& s_0 ( ) const
inline

minimum desired net distance

Note
s_0 is expressed in units of m.
s_0 has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

const T& scan_ahead_distance ( ) const
inline

distance to scan ahead on road for a leading vehicle

Note
scan_ahead_distance is expressed in units of m.
scan_ahead_distance has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

void set_a ( const T &  a)
inline
void set_b ( const T &  b)
inline
void set_bloat_diameter ( const T &  bloat_diameter)
inline
void set_delta ( const T &  delta)
inline
void set_distance_lower_limit ( const T &  distance_lower_limit)
inline
void set_s_0 ( const T &  s_0)
inline
void set_scan_ahead_distance ( const T &  scan_ahead_distance)
inline
void set_time_headway ( const T &  time_headway)
inline
void set_v_ref ( const T &  v_ref)
inline
const T& time_headway ( ) const
inline

desired time headway to vehicle in front

Note
time_headway is expressed in units of s.
time_headway has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:

const T& v_ref ( ) const
inline

desired velocity in free traffic

Note
v_ref is expressed in units of m/s.
v_ref has a limited domain of [0.0, +Inf].

Here is the caller graph for this function:


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