YARP
Yet Another Robot Platform
yarp::dev::IPositionDirect Class Referenceabstract

Interface for a generic control board device implementing position control. More...

#include <yarp/dev/IPositionDirect.h>

+ Inheritance diagram for yarp::dev::IPositionDirect:

Detailed Description

Interface for a generic control board device implementing position control.

This interface is used to send high frequency streaming commands to the boards, the aim is to reach low level control in firmware bypassing the trajetory generator.

Definition at line 31 of file IPositionDirect.h.

Public Member Functions

virtual ~IPositionDirect ()
 Destructor. More...
 
virtual bool getAxes (int *ax)=0
 Get the number of controlled axes. More...
 
virtual bool setPosition (int j, double ref)=0
 Set new position for a single axis. More...
 
virtual bool setPositions (const int n_joint, const int *joints, const double *refs)=0
 Set new reference point for all axes. More...
 
virtual bool setPositions (const double *refs)=0
 Set new position for a set of axis. More...
 
virtual bool getRefPosition (const int joint, double *ref)
 Get the last position reference for the specified axis. More...
 
virtual bool getRefPositions (double *refs)
 Get the last position reference for all axes. More...
 
virtual bool getRefPositions (const int n_joint, const int *joints, double *refs)
 Get the last position reference for the specified group of axes. More...
 

Constructor & Destructor Documentation

◆ ~IPositionDirect()

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

Destructor.

Definition at line 38 of file IPositionDirect.h.

Member Function Documentation

◆ getAxes()

virtual bool yarp::dev::IPositionDirect::getAxes ( int *  ax)
pure virtual

Get the number of controlled axes.

This command asks the number of controlled axes for the current physical interface.

Returns
the number of controlled axes.

Implemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, FakeMotionControl, yarp::dev::ControlBoardRemapper, yarp::dev::StubImplPositionDirectRaw, and yarp::dev::ImplementPositionDirect.

◆ getRefPosition()

virtual bool yarp::dev::IPositionDirect::getRefPosition ( const int  joint,
double *  ref 
)
inlinevirtual

Get the last position reference for the specified axis.

This is the dual of setPositionsRaw and shall return only values sent using IPositionDirect interface. If other interfaces like IPositionControl are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionControl::PositionMove.

Parameters
reflast reference sent using setPosition(s) functions
Returns
true/false on success/failure

Reimplemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, and yarp::dev::ImplementPositionDirect.

Definition at line 82 of file IPositionDirect.h.

◆ getRefPositions() [1/2]

virtual bool yarp::dev::IPositionDirect::getRefPositions ( double *  refs)
inlinevirtual

Get the last position reference for all axes.

This is the dual of setPositionsRaw and shall return only values sent using IPositionDirect interface. If other interfaces like IPositionControl are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionControl::PositionMove.

Parameters
refarray containing last reference sent using setPosition(s) functions
Returns
true/false on success/failure

Reimplemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, and yarp::dev::ImplementPositionDirect.

Definition at line 93 of file IPositionDirect.h.

◆ getRefPositions() [2/2]

virtual bool yarp::dev::IPositionDirect::getRefPositions ( const int  n_joint,
const int *  joints,
double *  refs 
)
inlinevirtual

Get the last position reference for the specified group of axes.

This is the dual of setPositionsRaw and shall return only values sent using IPositionDirect interface. If other interfaces like IPositionControl are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionControl::PositionMove.

Parameters
refarray containing last reference sent using setPosition(s) functions
Returns
true/false on success/failure

Reimplemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, and yarp::dev::ImplementPositionDirect.

Definition at line 104 of file IPositionDirect.h.

◆ setPosition()

virtual bool yarp::dev::IPositionDirect::setPosition ( int  j,
double  ref 
)
pure virtual

Set new position for a single axis.

Parameters
jjoint number
refspecifies the new ref point
Returns
true/false on success/failure

Implemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, yarp::dev::StubImplPositionDirectRaw, and yarp::dev::ImplementPositionDirect.

◆ setPositions() [1/2]

virtual bool yarp::dev::IPositionDirect::setPositions ( const int  n_joint,
const int *  joints,
const double *  refs 
)
pure virtual

Set new reference point for all axes.

Parameters
n_jointhow many joints this command is referring to
jointslist of joints controlled. The size of this array is n_joints
refsarray, new reference points, 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 refs 10 30 40
Returns
true/false on success/failure

Implemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, yarp::dev::StubImplPositionDirectRaw, and yarp::dev::ImplementPositionDirect.

◆ setPositions() [2/2]

virtual bool yarp::dev::IPositionDirect::setPositions ( const double *  refs)
pure virtual

Set new position for a set of axis.

Parameters
refsspecifies the new reference points
Returns
true/false on success/failure

Implemented in yarp::dev::RemoteControlBoard, yarp::dev::ControlBoardWrapper, yarp::dev::ControlBoardRemapper, yarp::dev::StubImplPositionDirectRaw, and yarp::dev::ImplementPositionDirect.


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