WB-Toolbox  6.0.0
ASimulinkToolboxforWholeBodyControl
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
wbt::base::RobotInterface Class Reference

Class for handling model and robot resources. More...

#include <RobotInterface.h>

Detailed Description

Class for handling model and robot resources.

This class is a wrapper of yarp::dev::RemoteControlBoardRemapper and iDynTree::KinDynComputations. By filling information in a wbt::Configuration object, it provides a simple initialization and combined usage of these two resources.

See also
wbt::Configuration

Classes

class  impl
 

Public Member Functions

 RobotInterface ()=delete
 
 RobotInterface (const wbt::base::Configuration &config)
 
 ~RobotInterface ()
 
const wbt::base::ConfigurationgetConfiguration () const
 Get the stored configuration. More...
 
const std::shared_ptr< iDynTree::KinDynComputations > getKinDynComputations ()
 Get the object to operate on the configured model. More...
 
template<typename T >
bool getInterface (T *&interface)
 Get a Yarp interface. More...
 
template<>
bool getInterface (yarp::dev::IControlMode *&interface)
 
template<>
bool getInterface (yarp::dev::IPositionControl *&interface)
 
template<>
bool getInterface (yarp::dev::IPositionDirect *&interface)
 
template<>
bool getInterface (yarp::dev::IVelocityControl *&interface)
 
template<>
bool getInterface (yarp::dev::ITorqueControl *&interface)
 
template<>
bool getInterface (yarp::dev::IPWMControl *&interface)
 
template<>
bool getInterface (yarp::dev::ICurrentControl *&interface)
 
template<>
bool getInterface (yarp::dev::IEncoders *&interface)
 
template<>
bool getInterface (yarp::dev::IMotorEncoders *&interface)
 
template<>
bool getInterface (yarp::dev::IControlLimits *&interface)
 
template<>
bool getInterface (yarp::dev::IPidControl *&interface)
 

Private Attributes

std::unique_ptr< implpImpl
 

Constructor & Destructor Documentation

◆ RobotInterface() [1/2]

wbt::base::RobotInterface::RobotInterface ( )
delete

◆ RobotInterface() [2/2]

RobotInterface::RobotInterface ( const wbt::base::Configuration config)

◆ ~RobotInterface()

RobotInterface::~RobotInterface ( )

Member Function Documentation

◆ getConfiguration()

const Configuration & RobotInterface::getConfiguration ( ) const

Get the stored configuration.

Returns
A reference of the configuration this object refers to.

◆ getInterface() [1/12]

template<typename T >
bool wbt::base::RobotInterface::getInterface ( T *&  interface)

Get a Yarp interface.

The interface is lazy-evaluated. The handling of the memory is not responsibility of the caller. It is handled internally.

Parameters
[out]interfaceThe object that will contain the pointer to the interface.
Returns
True for success, false otherwise.

◆ getInterface() [2/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IControlLimits *&  interface)

◆ getInterface() [3/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IControlMode *&  interface)

◆ getInterface() [4/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::ICurrentControl *&  interface)

◆ getInterface() [5/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IEncoders *&  interface)

◆ getInterface() [6/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IMotorEncoders *&  interface)

◆ getInterface() [7/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IPidControl *&  interface)

◆ getInterface() [8/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IPositionControl *&  interface)

◆ getInterface() [9/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IPositionDirect *&  interface)

◆ getInterface() [10/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IPWMControl *&  interface)

◆ getInterface() [11/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::ITorqueControl *&  interface)

◆ getInterface() [12/12]

template<>
bool RobotInterface::getInterface ( yarp::dev::IVelocityControl *&  interface)

◆ getKinDynComputations()

const std::shared_ptr< iDynTree::KinDynComputations > RobotInterface::getKinDynComputations ( )

Get the object to operate on the configured model.

Returns
A shared_ptr to the KinDynComputations object.

Member Data Documentation

◆ pImpl

std::unique_ptr<impl> wbt::base::RobotInterface::pImpl
private

The documentation for this class was generated from the following files: