YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarp::dev::IControlMode Class Referenceabstract

Interface for setting control mode in control board. More...

#include <yarp/dev/IControlMode.h>

+ Inheritance diagram for yarp::dev::IControlMode:

Public Member Functions

virtual ~IControlMode ()
 
virtual yarp::dev::ReturnValue getAvailableControlModes (int j, std::vector< yarp::dev::SelectableControlModeEnum > &avail)=0
 Return a list of available control mode for the given joint.
 
virtual yarp::dev::ReturnValue getControlMode (int j, yarp::dev::ControlModeEnum &mode)=0
 Get the current control mode.
 
virtual yarp::dev::ReturnValue getControlMode (int j, int *mode)
 
virtual yarp::dev::ReturnValue getControlModes (std::vector< yarp::dev::ControlModeEnum > &mode)=0
 Get the current control mode (multiple joints).
 
virtual yarp::dev::ReturnValue getControlModes (const std::vector< int > &joints, std::vector< yarp::dev::ControlModeEnum > &mode)=0
 Get the current control mode for a subset of axes.
 
virtual yarp::dev::ReturnValue setControlMode (int j, yarp::dev::SelectableControlModeEnum mode)=0
 Set the current control mode.
 
virtual yarp::dev::ReturnValue setControlMode (const int j, const int mode)
 
virtual yarp::dev::ReturnValue setControlModes (const std::vector< int > &joints, const std::vector< yarp::dev::SelectableControlModeEnum > &mode)=0
 Set the current control mode for a subset of axes.
 
virtual yarp::dev::ReturnValue setControlModes (const std::vector< yarp::dev::SelectableControlModeEnum > &mode)=0
 Set the current control mode (multiple joints).
 

Detailed Description

Interface for setting control mode in control board.

Definition at line 64 of file IControlMode.h.

Constructor & Destructor Documentation

◆ ~IControlMode()

virtual yarp::dev::IControlMode::~IControlMode ( )
inlinevirtual

Definition at line 67 of file IControlMode.h.

Member Function Documentation

◆ getAvailableControlModes()

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::getAvailableControlModes ( int  j,
std::vector< yarp::dev::SelectableControlModeEnum > &  avail 
)
pure virtual

Return a list of available control mode for the given joint.

Parameters
jjoint number
availa vector that will contain the list of available control modes for joint j.
Returns
: true/false success failure.

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementControlMode.

◆ getControlMode() [1/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::getControlMode ( int  j,
int *  mode 
)
inlinevirtual

Reimplemented in yarp::dev::ImplementControlMode, and yarp::dev::xHandControlBoard.

Definition at line 85 of file IControlMode.h.

◆ getControlMode() [2/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::getControlMode ( int  j,
yarp::dev::ControlModeEnum &  mode 
)
pure virtual

Get the current control mode.

Parameters
jjoint number
modea vocab of the current control mode for joint j.
Returns
: true/false success failure.

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, yarp::dev::ImplementControlMode, and yarp::dev::ImplementControlMode.

◆ getControlModes() [1/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::getControlModes ( const std::vector< int > &  joints,
std::vector< yarp::dev::ControlModeEnum > &  mode 
)
pure virtual

Get the current control mode for a subset of axes.

Parameters
n_jointshow many joints this command is referring to
jointslist of joint numbers, the size of this array is n_joints
modesarray containing the new controlmodes, one value for each joint, the size is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 modes VOCAB_CM_POSITION VOCAB_CM_VELOCITY VOCAB_CM_POSITION
Returns
true/false success failure.

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementControlMode.

◆ getControlModes() [2/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::getControlModes ( std::vector< yarp::dev::ControlModeEnum > &  mode)
pure virtual

Get the current control mode (multiple joints).

Parameters
modesa vector containing vocabs for the current control modes of the joints.
Returns
: true/false success failure.

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementControlMode.

◆ setControlMode() [1/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::setControlMode ( const int  j,
const int  mode 
)
inlinevirtual

Reimplemented in yarp::dev::ImplementControlMode, and yarp::dev::xHandControlBoard.

Definition at line 124 of file IControlMode.h.

◆ setControlMode() [2/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::setControlMode ( int  j,
yarp::dev::SelectableControlModeEnum  mode 
)
pure virtual

Set the current control mode.

Parameters
jjoint number
modea vocab of the desired control mode for joint j.
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, yarp::dev::ImplementControlMode, and yarp::dev::ImplementControlMode.

◆ setControlModes() [1/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::setControlModes ( const std::vector< int > &  joints,
const std::vector< yarp::dev::SelectableControlModeEnum > &  mode 
)
pure virtual

Set the current control mode for a subset of axes.

Parameters
n_jointshow many joints this command is referring to
jointslist of joint numbers, the size of this array is n_joints
modesarray containing the new controlmodes, one value for each joint, the size is n_joints. The first value will be the new reference for the joint joints[0]. for example: n_joint 3 joints 0 2 4 modes VOCAB_CM_POSITION VOCAB_CM_VELOCITY VOCAB_CM_POSITION
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementControlMode.

◆ setControlModes() [2/2]

virtual yarp::dev::ReturnValue yarp::dev::IControlMode::setControlModes ( const std::vector< yarp::dev::SelectableControlModeEnum > &  mode)
pure virtual

Set the current control mode (multiple joints).

Parameters
modesa vector containing vocabs for the desired control modes of the joints.
Returns
true if the new controlMode was successfully set, false if the message was not received or the joint was unable to switch to the desired controlMode (e.g. the joint is on a fault condition or the desired mode is not implemented).

Implemented in ControlBoardRemappingEngine, ControlBoard_nwc_yarp, and yarp::dev::ImplementControlMode.


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