Drake
|
Describes a dynamical system that is compatible with most of our tools for design and analysis. More...
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... | |
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.
System::template StateVector< Scalar > createStateVector | ( | const System & | sys | ) |
Create a new, uninitialized state vector for the system.
std::size_t Drake::getNumInputs | ( | const System & | sys | ) |
Retrieve the size of the input vector
RowsAtCompileTime | or the result of getNumInputs() for dynamically sized vectors |
std::size_t Drake::getNumOutputs | ( | const System & | sys | ) |
Retrieve the size of the output vector
RowsAtCompileTime | or the result of getNumOutputs() for dynamically sized vectors |
std::size_t Drake::getNumStates | ( | const System & | sys | ) |
Retrieve the size of the state vector
RowsAtCompileTime | or the result of getNumStates() for dynamically sized vectors |