Drake

Describes a dynamical system that is compatible with most of our tools for design and analysis. More...

Collaboration diagram for System Concept:

Classes

class  CascadeSystem< System1, System2 >
 CascadeSystem<System1,System2> More...
 
class  FeedbackSystem< System1, System2 >
 FeedbackSystem<System1,System2> More...
 
class  AffineSystem< StateVec, InputVec, OutputVec >
 AffineSystem<StateVector, InputVector, OutputVector> More...
 
class  PDControlSystem< System >
 PDControlSystem<System> More...
 
class  BotVisualizer< RobotStateVector >
 BotVisualizer<RobotStateVector> More...
 
class  RigidBodySystem
 Implements the System concept by wrapping the RigidBodyTree algorithms with additional sensors and actuators/forces. More...
 

Functions

template<typename System >
std::size_t getNumStates (const System &sys)
 getNumStates() More...
 
template<typename System >
std::size_t getNumInputs (const System &sys)
 getNumInputs() More...
 
template<typename System >
std::size_t getNumOutputs (const System &sys)
 getNumOutputs() More...
 
template<typename Scalar , typename System >
System::template StateVector< Scalar > createStateVector (const System &sys)
 Create a new, uninitialized state vector for the system. More...
 

Detailed Description

Describes a dynamical system that is compatible with most of our tools for design and analysis.

Every model of this concept must implement
X::StateVector type for the internal state of the system, which models the Vector<ScalarType> concept
X::InputVector type for the input to the system, which models the Vector<ScalarType> concept
X::OutputVector type for the output from the system, which models the Vector<ScalarType> concept
template <ScalarType> StateVector<ScalarType>
X::dynamics(const ScalarType& *t,
            const StateVector<ScalarType>& x,
            const InputVector<ScalarType>& u)
\( \dot{x} = \text{dynamics}(t, x, u) \)
template <ScalarType> OutputVector<ScalarType>
X::output(const ScalarType& t,
          const StateVector<ScalarType>& x,
          const InputVector<ScalarType>& u)
\( y = \text{output}(t, x, u) \)
bool isTimeVarying() should return false if output() and dynamics() methods do not depend on time.
Default: true
bool isDirectFeedthrough() should return false if output() does not depend directly on the input u.
Default: true
size_t getNumStates() only required if the state vector is dynamically-sized
size_t getNumInputs() only required if the input vector is dynamically-sized
size_t getNumOutputs() only required if the output vector is dynamically-sized

(always try to label your methods with const if possible)

todo: dynamics and output should be implemented as Drake::Function(s) with input-output relationships defined. then we would no longer specify isTimeVarying and isDirectFeedthrough (we could extract them from the input-output relationship)

todo: move xdot and y to be arguments instead of return values, to be consistent with Drake::Function.

Coming soon. Support for:
  • deterministic discrete update
  • input limits
  • state constraints (must also allow for slack variables)
  • zero-crossings (to inform the tools of discontinuities in the dynamics)

Function Documentation

System::template StateVector< Scalar > createStateVector ( const System &  sys)

Create a new, uninitialized state vector for the system.

Implemented concepts:
System Concept
Returns
a new, uninitialized state vector for the system.

Here is the call graph for this function:

Here is the caller graph for this function:

std::size_t Drake::getNumInputs ( const System &  sys)

getNumInputs()

Retrieve the size of the input vector

Implemented concepts:
System Concept
Return values
RowsAtCompileTimeor the result of getNumInputs() for dynamically sized vectors

Here is the call graph for this function:

Here is the caller graph for this function:

std::size_t Drake::getNumOutputs ( const System &  sys)

getNumOutputs()

Retrieve the size of the output vector

Implemented concepts:
System Concept
Return values
RowsAtCompileTimeor the result of getNumOutputs() for dynamically sized vectors

Here is the call graph for this function:

Here is the caller graph for this function:

std::size_t Drake::getNumStates ( const System &  sys)

getNumStates()

Retrieve the size of the state vector

Implemented concepts:
System Concept
Return values
RowsAtCompileTimeor the result of getNumStates() for dynamically sized vectors

Here is the call graph for this function:

Here is the caller graph for this function: