blockfactory icon indicating copy to clipboard operation
blockfactory copied to clipboard

Clarify status of support of stateful systems

Open traversaro opened this issue 6 years ago • 3 comments

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.

traversaro avatar Dec 23 '18 00:12 traversaro

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 .

traversaro avatar Dec 23 '18 00:12 traversaro

the following methods that seem to indicate that it supports discrete and continuous stateful systems

Few comments on this:

  • We never tried to exploit blockfactory for continuous system, all our experience with wb-toolbox consisted of discrete ones.
  • 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.

diegoferigo avatar Dec 25 '18 21:12 diegoferigo

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 .

traversaro avatar Dec 25 '18 21:12 traversaro