delphyne
|
Specializes BasicVector with specific getters and setters.
#include <src/gen/driving_command.h>
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 | |
DrivingCommand & | operator= (const DrivingCommand &other) |
DrivingCommand & | operator= (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... | |
typedef DrivingCommandIndices K |
An abbreviation for our row index constants.
DrivingCommand | ( | ) |
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 | ( | const DrivingCommand< T > & | other | ) |
|
noexcept |
const T& acceleration | ( | ) | const |
The signed acceleration, positive means speed up; negative means slow down, but should not move in reverse.
acceleration
is expressed in units of m/s^2.
|
final |
|
static |
drake::boolean<T> IsValid | ( | ) | const |
Returns whether the current values of this vector are well-formed.
DrivingCommand& operator= | ( | const DrivingCommand< T > & | other | ) |
|
noexcept |
void set_acceleration | ( | const T & | acceleration | ) |
void set_steering_angle | ( | const T & | steering_angle | ) |
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.
const T& steering_angle | ( | ) | const |
The desired steering angle of a virtual center wheel, positive results in the vehicle turning left.
steering_angle
is expressed in units of rad. 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.
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.