Open traversaro opened 5 years ago
Until we properly support stateful systems, it may be also reasonable to remove calls to updateDiscreteState
such as https://github.com/robotology/blockfactory/blob/master/sources/Mex/src/BlockFactory.cpp#L280 .
the following methods that seem to indicate that it supports discrete and continuous stateful systems
Few comments on this:
For what concern instead discrete systems, we already have stateful blocks. For example the DiscreteFilter retains previous data in its implementation, however it does not exploit anything provided by BlockFactory and the methods you reported. There is just a note in the documentation of core::Block.
Related WB-Toolbox discussion: https://github.com/robotology/wb-toolbox/issues/165 .
The
blockfactory::core::Block
interface of blockfactory support the following methods that seem to indicate that it supports discrete and continuous stateful systems:blockfactory::core::Block::numberOfDiscreteStates()
blockfactory::core::Block::numberOfContinuousStates()
blockfactory::core::Block::updateDiscreteState(const BlockInformation* blockInfo)
blockfactory::core::Block::stateDerivative(const BlockInformation* blockInfo)
however in practice it is not clear if these functions are used at all and how they are supposed to be used, as
BlockInformation
contain no state information at all. It may be worth to document that this methods are not used at all, and eventually remove that notice when will support stateful systems.