YARP
Yet Another Robot Platform
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 bool getControlMode (int j, int *mode)=0
 Get the current control mode. More...
 
virtual bool getControlModes (int *modes)=0
 Get the current control mode (multiple joints). More...
 
virtual bool getControlModes (const int n_joint, const int *joints, int *modes)=0
 Get the current control mode for a subset of axes. More...
 
virtual bool setControlMode (const int j, const int mode)=0
 Set the current control mode. More...
 
virtual bool setControlModes (const int n_joint, const int *joints, int *modes)=0
 Set the current control mode for a subset of axes. More...
 
virtual bool setControlModes (int *modes)=0
 Set the current control mode (multiple joints). More...
 

Detailed Description

Interface for setting control mode in control board.

Definition at line 27 of file IControlMode.h.

Constructor & Destructor Documentation

◆ ~IControlMode()

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

Definition at line 30 of file IControlMode.h.

Member Function Documentation

◆ getControlMode()

virtual bool yarp::dev::IControlMode::getControlMode ( int  j,
int *  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 RemoteControlBoard, ControlBoardWrapperControlMode, ControlBoardRemapper, and yarp::dev::ImplementControlMode.

◆ getControlModes() [1/2]

virtual bool yarp::dev::IControlMode::getControlModes ( const int  n_joint,
const int *  joints,
int *  modes 
)
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 yarp::dev::ImplementControlMode, RemoteControlBoard, ControlBoardWrapperControlMode, and ControlBoardRemapper.

◆ getControlModes() [2/2]

virtual bool yarp::dev::IControlMode::getControlModes ( int *  modes)
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 yarp::dev::ImplementControlMode, RemoteControlBoard, ControlBoardWrapperControlMode, and ControlBoardRemapper.

◆ setControlMode()

virtual bool yarp::dev::IControlMode::setControlMode ( const int  j,
const int  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 yarp::dev::ImplementControlMode, RemoteControlBoard, ControlBoardWrapperControlMode, and ControlBoardRemapper.

◆ setControlModes() [1/2]

virtual bool yarp::dev::IControlMode::setControlModes ( const int  n_joint,
const int *  joints,
int *  modes 
)
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 ControlBoardWrapperControlMode, ControlBoardRemapper, yarp::dev::ImplementControlMode, and RemoteControlBoard.

◆ setControlModes() [2/2]

virtual bool yarp::dev::IControlMode::setControlModes ( int *  modes)
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 yarp::dev::ImplementControlMode, RemoteControlBoard, ControlBoardWrapperControlMode, and ControlBoardRemapper.


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