|
WB-Toolbox
5.6.1
ASimulinkToolboxforWholeBodyControl
|
Store the configuration for whole-body blocks. More...
#include <Configuration.h>
Store the configuration for whole-body blocks.
This class stores the content of the WBToolbox.Configuration Matlab class and its related configuration block. This in principle is Simulink specific, but nothing prevents using it from C++ for instantiating a wbt::RobotInterface object.
Its usage is specific for using yarp::dev::RemoteControlBoardRemapper and iDynTree::KinDynComputations objects contained in the wbt::RobotInterface class.
Classes | |
| class | impl |
Public Member Functions | |
| Configuration (const std::string &confKey={}) | |
| Configuration (const Configuration &conf) | |
| ~Configuration () | |
| void | setParameters (const std::string &robotName, const std::string &urdfFile, const std::vector< std::string > &controlledJoints, const std::vector< std::string > &controlBoardsNames, const std::string &localName, const std::array< double, 3 > &gravityVector) |
| Initialize the object. More... | |
| void | setRobotName (const std::string &robotName) |
| Set the name of the robot. More... | |
| void | setUrdfFile (const std::string &urdfFile) |
| Set the name of the file containing the urdf model. More... | |
| void | setControlledJoints (const std::vector< std::string > &controlledJoints) |
| Set the subset of controlled joints. More... | |
| void | setControlBoardsNames (const std::vector< std::string > &controlBoardsNames) |
| Set the names of the used ControlBoard names. More... | |
| void | setLocalName (const std::string &localName) |
| Set the prefix appended to the opened ports. More... | |
| void | setGravityVector (const std::array< double, 3 > &gravityVector) |
| Set the gravity vector. More... | |
| const std::string & | getRobotName () const |
| Get the name of the robot. More... | |
| const std::string & | getUrdfFile () const |
| Get the name of the file containing the urdf model. More... | |
| const std::vector< std::string > & | getControlledJoints () const |
| Get the subset of controlled joints. More... | |
| const std::vector< std::string > & | getControlBoardsNames () const |
| Get the names of the used ControlBoard names. More... | |
| const std::string & | getLocalName () const |
| Get the prefix appended to the opened ports. A leading "/" is always present. More... | |
| const std::string | getUniqueId () const |
| Generate a unique identifier. More... | |
| const std::array< double, 3 > & | getGravityVector () const |
| Get the gravity vector. More... | |
| const size_t & | getNumberOfDoFs () const |
| const std::string | getConfKey () const |
| Get the unique identifier of this configuration object. More... | |
| bool | isValid () const |
| Check if the congiguration is valid. More... | |
| bool | operator== (const Configuration &config) const |
Private Attributes | |
| std::unique_ptr< impl > | pImpl |
| Configuration::Configuration | ( | const std::string & | confKey = {} | ) |
| Configuration::Configuration | ( | const Configuration & | conf | ) |
|
default |
| const std::string Configuration::getConfKey | ( | ) | const |
Get the unique identifier of this configuration object.
| const std::vector< std::string > & Configuration::getControlBoardsNames | ( | ) | const |
Get the names of the used ControlBoard names.
| const std::vector< std::string > & Configuration::getControlledJoints | ( | ) | const |
Get the subset of controlled joints.
| const std::array< double, 3 > & Configuration::getGravityVector | ( | ) | const |
Get the gravity vector.
| const std::string & Configuration::getLocalName | ( | ) | const |
Get the prefix appended to the opened ports. A leading "/" is always present.
| const size_t & Configuration::getNumberOfDoFs | ( | ) | const |
Get the configured number of DoFs
| const std::string & Configuration::getRobotName | ( | ) | const |
Get the name of the robot.
| const std::string Configuration::getUniqueId | ( | ) | const |
Generate a unique identifier.
Get a string with a unique identifier generated from the name of the config block from Simulink. It might be useful when yarp ports must have a unique prefix (e.g. two RemoteControlBoardRemappers which share a ControlBoard)
| const std::string & Configuration::getUrdfFile | ( | ) | const |
Get the name of the file containing the urdf model.
| bool Configuration::isValid | ( | ) | const |
Check if the congiguration is valid.
I.e. all the required fields have been stored successfully.
| bool Configuration::operator== | ( | const Configuration & | config | ) | const |
| void Configuration::setControlBoardsNames | ( | const std::vector< std::string > & | controlBoardsNames | ) |
Set the names of the used ControlBoard names.
| controlBoardsNames | Names of the used ControlBoard names. |
| void Configuration::setControlledJoints | ( | const std::vector< std::string > & | controlledJoints | ) |
Set the subset of controlled joints.
| controlledJoints | Subset of controlled joints. |
| void Configuration::setGravityVector | ( | const std::array< double, 3 > & | gravityVector | ) |
Set the gravity vector.
| gravityVector | The gravity vector. |
| void Configuration::setLocalName | ( | const std::string & | localName | ) |
Set the prefix appended to the opened ports.
| localName | Prefix appended to the opened ports. |
| void Configuration::setParameters | ( | const std::string & | robotName, |
| const std::string & | urdfFile, | ||
| const std::vector< std::string > & | controlledJoints, | ||
| const std::vector< std::string > & | controlBoardsNames, | ||
| const std::string & | localName, | ||
| const std::array< double, 3 > & | gravityVector | ||
| ) |
Initialize the object.
| robotName | Name of the robot. |
| urdfFile | Name of the file containing the urdf model. |
| controlledJoints | Subset of controlled joints. |
| controlBoardsNames | Names of the used ControlBoard names. |
| localName | Prefix appended to the opened ports. |
| gravityVector | The gravity vector. |
| void Configuration::setRobotName | ( | const std::string & | robotName | ) |
Set the name of the robot.
| robotName | Name of the robot. |
| void Configuration::setUrdfFile | ( | const std::string & | urdfFile | ) |
Set the name of the file containing the urdf model.
| urdfFile | Name of the file containing the urdf model. |
|
private |