Drake

The ContinuousState is a container for all the State variables that are unique to continuous Systems, i.e. More...
#include <drake/systems/framework/continuous_state.h>
Public Member Functions  
ContinuousState (std::unique_ptr< VectorBase< T >> state)  
Constructs a ContinuousState for a system that does not have secondorder structure: All of the state is misc_continuous_state_. More...  
ContinuousState (std::unique_ptr< VectorBase< T >> state, int num_q, int num_v, int num_z)  
Constructs a ContinuousState that exposes secondorder structure. More...  
ContinuousState ()  
Constructs a zerolength ContinuousState. More...  
virtual  ~ContinuousState () 
int  size () const 
Returns the size of the entire continuous state vector. More...  
T &  operator[] (std::size_t idx) 
const T &  operator[] (std::size_t idx) const 
const VectorBase< T > &  get_vector () const 
Returns the entire continuous state vector. More...  
VectorBase< T > *  get_mutable_vector () 
Returns a mutable pointer to the entire continuous state vector, which is never nullptr. More...  
const VectorBase< T > &  get_generalized_position () const 
Returns the subset of the state vector that is generalized position q . More...  
VectorBase< T > *  get_mutable_generalized_position () 
Returns a mutable pointer to the subset of the state vector that is generalized position q . More...  
const VectorBase< T > &  get_generalized_velocity () const 
Returns the subset of the continuous state vector that is generalized velocity v . More...  
VectorBase< T > *  get_mutable_generalized_velocity () 
Returns a mutable pointer to the subset of the continuous state vector that is generalized velocity v . More...  
const VectorBase< T > &  get_misc_continuous_state () const 
Returns the subset of the continuous state vector that is other continuous state z . More...  
VectorBase< T > *  get_mutable_misc_continuous_state () 
Returns a mutable pointer to the subset of the continuous state vector that is other continuous state z . More...  
void  CopyFrom (const ContinuousState< T > &other) 
Copies the values from another ContinuousState of the same scalar type into this State. More...  
void  SetFrom (const ContinuousState< double > &other) 
Initializes this ContinuousState (regardless of scalar type) from a State<double>. More...  
void  SetFromVector (const Eigen::Ref< const VectorX< T >> &value) 
Sets the entire continuous state vector from an Eigen expression. More...  
VectorX< T >  CopyToVector () const 
Returns a copy of the entire continuous state vector into an Eigen vector. More...  
Does not allow copy, move, or assignment  
ContinuousState (const ContinuousState &)=delete  
ContinuousState &  operator= (const ContinuousState &)=delete 
ContinuousState (ContinuousState &&)=delete  
ContinuousState &  operator= (ContinuousState &&)=delete 
Protected Member Functions  
ContinuousState (std::unique_ptr< VectorBase< T >> state, std::unique_ptr< VectorBase< T >> q, std::unique_ptr< VectorBase< T >> v, std::unique_ptr< VectorBase< T >> z)  
Constructs a continuous state that exposes secondorder structure, with no particular constraints on the layout. More...  
The ContinuousState is a container for all the State variables that are unique to continuous Systems, i.e.
Systems that have defined dynamics at all times.
T  A mathematical type compatible with Eigen's Scalar. 

delete 

delete 

inlineexplicit 
Constructs a ContinuousState for a system that does not have secondorder structure: All of the state is misc_continuous_state_.

inline 
Constructs a ContinuousState that exposes secondorder structure.
The contents of state
must be laid out as follows:
(index 0)qvz(index state.size()  1)
Where q is generalized position v is generalized velocity z is other continuous state
state  The source of continuous state information. 
num_q  The number of position variables. 
num_v  The number of velocity variables. 
num_z  The number of other variables. 

inline 
Constructs a zerolength ContinuousState.

inlinevirtual 

inlineprotected 
Constructs a continuous state that exposes secondorder structure, with no particular constraints on the layout.
state
.state  The entire continuous state. 
q  The subset of state that is generalized position. 
v  The subset of state that is generalized velocity. 
z  The subset of state that is neither position nor velocity. 

inline 
Copies the values from another ContinuousState of the same scalar type into this State.

inline 
Returns a copy of the entire continuous state vector into an Eigen vector.

inline 
Returns the subset of the state vector that is generalized position q
.

inline 
Returns the subset of the continuous state vector that is generalized velocity v
.

inline 
Returns the subset of the continuous state vector that is other continuous state z
.

inline 
Returns a mutable pointer to the subset of the state vector that is generalized position q
.

inline 
Returns a mutable pointer to the subset of the continuous state vector that is generalized velocity v
.

inline 
Returns a mutable pointer to the subset of the continuous state vector that is other continuous state z
.

inline 
Returns a mutable pointer to the entire continuous state vector, which is never nullptr.

inline 
Returns the entire continuous state vector.

delete 

delete 

inline 

inline 

inline 
Initializes this ContinuousState (regardless of scalar type) from a State<double>.
All scalar types in Drake must support initialization from doubles.

inline 
Sets the entire continuous state vector from an Eigen expression.

inline 
Returns the size of the entire continuous state vector.