|
WB-Toolbox
5.6.1
ASimulinkToolboxforWholeBodyControl
|
Extension of blockfactory::core::Block for simplifying the development of whole-body blocks. More...
#include <WBBlock.h>
Extension of blockfactory::core::Block for simplifying the development of whole-body blocks.
This class provides support of parsing the parameters for creating a wbt::RobotInterface object, and helpers for retrieving iDynTree::KinDynComputations and wbt::RobotInterface objects.
In addition to block_parameters, wbt::WBBlock requires:
| Type | Index | Rows | Cols | Name |
|---|---|---|---|---|
| ::STRUCT_STRING | 0 + Block::NumberOfParameters | 1 | 1 | "RobotName" |
| ::STRUCT_STRING | 0 + Block::NumberOfParameters | 1 | 1 | "UrdfFile" |
| ::STRUCT_CELL_STRING | 0 + Block::NumberOfParameters | 1 | 1 | "ControlledJoints" |
| ::STRUCT_CELL_STRING | 0 + Block::NumberOfParameters | 1 | 1 | "ControlBoardsNames" |
| ::STRUCT_STRING | 0 + Block::NumberOfParameters | 1 | 1 | "LocalName" |
| ::STRUCT_DOUBLE | 0 + Block::NumberOfParameters | 1 | 3 | "GravityVector" |
| ::STRING | 1 + Block::NumberOfParameters | 1 | 1 | "ConfBlockName" |
Classes | |
| struct | iDynTreeRobotState |
Container for data structures used for using iDynTree::KinDynComputations::setRobotState More... | |
Public Member Functions | |
| WBBlock () | |
| ~WBBlock () override | |
| unsigned | numberOfParameters () override |
| bool | parseParameters (blockfactory::core::BlockInformation *blockInfo) override |
| bool | configureSizeAndPorts (blockfactory::core::BlockInformation *blockInfo) override |
| bool | initialize (blockfactory::core::BlockInformation *blockInfo) override |
Static Public Attributes | |
| static constexpr unsigned | NumberOfParameters = Block::NumberOfParameters + 2 |
| The number of parameters WBBlock requires. More... | |
Protected Member Functions | |
| std::shared_ptr< iDynTree::KinDynComputations > | getKinDynComputations () const |
| Helper for retrieving the iDynTree::KinDynComputations object. More... | |
| const std::shared_ptr< wbt::base::RobotInterface > | getRobotInterface () const |
| Helper for retrieving the wbt::RobotInterface object. More... | |
| bool | setRobotState (wbt::base::InputSignalPtr basePose, wbt::base::InputSignalPtr jointsPos, wbt::base::InputSignalPtr baseVelocity, wbt::base::InputSignalPtr jointsVelocity, iDynTree::KinDynComputations *kinDyn) |
| Helper for setting the robot state inside the iDynTree::KinDynComputations object. More... | |
Protected Attributes | |
| std::unique_ptr< iDynTreeRobotState > | m_robotState |
| std::string | m_confBlockName |
| std::shared_ptr< wbt::base::RobotInterface > | m_robotInterface |
| WBBlock::WBBlock | ( | ) |
|
overridedefault |
|
override |
|
protected |
Helper for retrieving the iDynTree::KinDynComputations object.
|
protected |
Helper for retrieving the wbt::RobotInterface object.
|
override |
|
override |
|
override |
|
protected |
Helper for setting the robot state inside the iDynTree::KinDynComputations object.
| basePose | The vector containing the base pose. |
| jointsPos | The vector containing the joints positions. |
| baseVelocity | The vector containing the base velocity. |
| jointsVelocity | The vector containing the joints velocities. |
| kinDyn | A pointer to the block's KinDynComputations object. |
|
protected |
|
protected |
|
protected |
|
staticconstexpr |
The number of parameters WBBlock requires.