Drake
ContinuousState< T > Class Template Reference

The ContinuousState is a container for all the State variables that are unique to continuous Systems, i.e. More...

#include <drake/systems/framework/state.h>

Public Member Functions

 ContinuousState (std::unique_ptr< StateVector< T >> state)
 Constructs a ContinuousState for a system that does not have second-order structure: All of the state is misc_continuous_state_. More...
 
 ContinuousState (std::unique_ptr< StateVector< T >> state, int num_q, int num_v, int num_z)
 Constructs a ContinuousState that exposes second-order structure. More...
 
const StateVector< T > & get_state () const
 Returns the entire state vector. More...
 
StateVector< T > * get_mutable_state ()
 Returns a mutable pointer to the entire state vector, never null. More...
 
const StateVector< T > & get_generalized_position () const
 Returns the subset of the state vector that is generalized position q. More...
 
StateVector< T > * get_mutable_generalized_position ()
 Returns a mutable pointer to the subset of the state vector that is generalized position q. More...
 
const StateVector< T > & get_generalized_velocity () const
 Returns the subset of the state vector that is generalized velocity v. More...
 
StateVector< T > * get_mutable_generalized_velocity ()
 Returns a mutable pointer to the subset of the state vector that is generalized velocity v. More...
 
const StateVector< T > & get_misc_continuous_state () const
 Returns the subset of the state vector that is other continuous state z. More...
 
StateVector< T > * get_mutable_misc_continuous_state ()
 Returns a mutable pointer to the subset of the state vector that is other continuous state z. More...
 

Detailed Description

template<typename T>
class drake::systems::ContinuousState< T >

The ContinuousState is a container for all the State variables that are unique to continuous Systems, i.e.

Systems that satisfy ContinuousSystemInterface and have defined dynamics at all times.

Template Parameters
TA mathematical type compatible with Eigen's Scalar.

Constructor & Destructor Documentation

ContinuousState ( std::unique_ptr< StateVector< T >>  state)
inlineexplicit

Constructs a ContinuousState for a system that does not have second-order structure: All of the state is misc_continuous_state_.

ContinuousState ( std::unique_ptr< StateVector< T >>  state,
int  num_q,
int  num_v,
int  num_z 
)
inline

Constructs a ContinuousState that exposes second-order structure.

The contents of state must be laid out as follows:

/// (index 0)|--q--|--v--|--z--|(index state.size() - 1)
///
/// Where q is generalized position
///       v is generalized velocity
///       z is other continuous state
/// 
@param num_q The number of position variables.
@param num_v The number of velocity variables.
@param num_z The number of other variables.  

Member Function Documentation

const StateVector<T>& get_generalized_position ( ) const
inline

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

Here is the caller graph for this function:

const StateVector<T>& get_generalized_velocity ( ) const
inline

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

Here is the caller graph for this function:

const StateVector<T>& get_misc_continuous_state ( ) const
inline

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

Here is the caller graph for this function:

StateVector<T>* get_mutable_generalized_position ( )
inline

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

StateVector<T>* get_mutable_generalized_velocity ( )
inline

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

Here is the caller graph for this function:

StateVector<T>* get_mutable_misc_continuous_state ( )
inline

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

StateVector<T>* get_mutable_state ( )
inline

Returns a mutable pointer to the entire state vector, never null.

Here is the caller graph for this function:

const StateVector<T>& get_state ( ) const
inline

Returns the entire state vector.

Here is the caller graph for this function:


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