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

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

#include <yarp/dev/IPositionControl.h>

+ Inheritance diagram for yarp::dev::IPositionControl:

Public Member Functions

virtual ~IPositionControl ()
 Destructor.
 
virtual bool getAxes (int *ax)=0
 Get the number of controlled axes.
 
virtual bool positionMove (int j, double ref)=0
 Set new reference point for a single axis.
 
virtual bool positionMove (const double *refs)=0
 Set new reference point for all axes.
 
virtual bool relativeMove (int j, double delta)=0
 Set relative position.
 
virtual bool relativeMove (const double *deltas)=0
 Set relative position, all joints.
 
virtual bool checkMotionDone (int j, bool *flag)=0
 Check if the current trajectory is terminated.
 
virtual bool checkMotionDone (bool *flag)=0
 Check if the current trajectory is terminated.
 
virtual bool setRefSpeed (int j, double sp)=0
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
 
virtual bool setRefSpeeds (const double *spds)=0
 Set reference speed on all joints.
 
virtual bool setRefAcceleration (int j, double acc)=0
 Set reference acceleration for a joint.
 
virtual bool setRefAccelerations (const double *accs)=0
 Set reference acceleration on all joints.
 
virtual bool getRefSpeed (int j, double *ref)=0
 Get reference speed for a joint.
 
virtual bool getRefSpeeds (double *spds)=0
 Get reference speed of all joints.
 
virtual bool getRefAcceleration (int j, double *acc)=0
 Get reference acceleration for a joint.
 
virtual bool getRefAccelerations (double *accs)=0
 Get reference acceleration of all joints.
 
virtual bool stop (int j)=0
 Stop motion, single joint.
 
virtual bool stop ()=0
 Stop motion, multiple joints.
 
virtual bool positionMove (const int n_joint, const int *joints, const double *refs)=0
 Set new reference point for a subset of joints.
 
virtual bool relativeMove (const int n_joint, const int *joints, const double *deltas)=0
 Set relative position for a subset of joints.
 
virtual bool checkMotionDone (const int n_joint, const int *joints, bool *flag)=0
 Check if the current trajectory is terminated.
 
virtual bool setRefSpeeds (const int n_joint, const int *joints, const double *spds)=0
 Set reference speed on all joints.
 
virtual bool setRefAccelerations (const int n_joint, const int *joints, const double *accs)=0
 Set reference acceleration on all joints.
 
virtual bool getRefSpeeds (const int n_joint, const int *joints, double *spds)=0
 Get reference speed of all joints.
 
virtual bool getRefAccelerations (const int n_joint, const int *joints, double *accs)=0
 Get reference acceleration for a joint.
 
virtual bool stop (const int n_joint, const int *joints)=0
 Stop motion for subset of joints.
 
virtual bool getTargetPosition (const int joint, double *ref)
 Get the last position reference for the specified axis.
 
virtual bool getTargetPositions (double *refs)
 Get the last position reference for all axes.
 
virtual bool getTargetPositions (const int n_joint, const int *joints, double *refs)
 Get the last position reference for the specified group of axes.
 

Detailed Description

Interface for a generic control board device implementing position control.

Examples
dev/fake_motor/fake_motor.cpp, and dev/motortest/motortest.cpp.

Definition at line 251 of file IPositionControl.h.

Constructor & Destructor Documentation

◆ ~IPositionControl()

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

Destructor.

Definition at line 257 of file IPositionControl.h.

Member Function Documentation

◆ checkMotionDone() [1/3]

virtual bool yarp::dev::IPositionControl::checkMotionDone ( bool *  flag)
pure virtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
flagis a pointer to return value ("and" of all joints)
Returns
true/false on network communication (value you actually want is stored in *flag)

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ checkMotionDone() [2/3]

virtual bool yarp::dev::IPositionControl::checkMotionDone ( const int  n_joint,
const int *  joints,
bool *  flag 
)
pure virtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jointspointer to the array of joint numbers
flagpointer to return value (logical "and" of all set of joints)
Returns
true/false if network communication went well.

Implemented in DynamixelAX12FtdiDriver, RemoteControlBoard, FakeBot, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ checkMotionDone() [3/3]

virtual bool yarp::dev::IPositionControl::checkMotionDone ( int  j,
bool *  flag 
)
pure virtual

Check if the current trajectory is terminated.

Non blocking.

Parameters
jis the axis number
flagis a pointer to return value
Returns
true/false on network communication (value you actually want is stored in *flag)

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getAxes()

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

Get the number of controlled axes.

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

Parameters
axpointer to storage
Returns
true/false.

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, FakeLaserWithMotor, FakeMotionControl, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getRefAcceleration()

virtual bool yarp::dev::IPositionControl::getRefAcceleration ( int  j,
double *  acc 
)
pure virtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jjoint number
accpointer to storage for the return value
Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getRefAccelerations() [1/2]

virtual bool yarp::dev::IPositionControl::getRefAccelerations ( const int  n_joint,
const int *  joints,
double *  accs 
)
pure virtual

Get reference acceleration for a joint.

Returns the acceleration used to generate the trajectory profile.

Parameters
jointspointer to the array of joint numbers
accspointer to the array that will store the acceleration values
Returns
true/false on success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ getRefAccelerations() [2/2]

virtual bool yarp::dev::IPositionControl::getRefAccelerations ( double *  accs)
pure virtual

Get reference acceleration of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
accspointer to the array that will store the acceleration values.
Returns
true/false on success or failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getRefSpeed()

virtual bool yarp::dev::IPositionControl::getRefSpeed ( int  j,
double *  ref 
)
pure virtual

Get reference speed for a joint.

Returns the speed used to generate the trajectory profile.

Parameters
jjoint number
refpointer to storage for the return value
Returns
true/false on success or failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getRefSpeeds() [1/2]

virtual bool yarp::dev::IPositionControl::getRefSpeeds ( const int  n_joint,
const int *  joints,
double *  spds 
)
pure virtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array that will store the speed values.
Returns
true/false upon success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ getRefSpeeds() [2/2]

virtual bool yarp::dev::IPositionControl::getRefSpeeds ( double *  spds)
pure virtual

Get reference speed of all joints.

These are the values used during the interpolation of the trajectory.

Parameters
spdspointer to the array that will store the speed values.

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ getTargetPosition()

virtual bool yarp::dev::IPositionControl::getTargetPosition ( const int  joint,
double *  ref 
)
inlinevirtual

Get the last position reference for the specified axis.

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

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented in ControlBoardRemapper, RemoteControlBoard, and yarp::dev::ImplementPositionControl.

Definition at line 447 of file IPositionControl.h.

◆ getTargetPositions() [1/2]

virtual bool yarp::dev::IPositionControl::getTargetPositions ( 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 PositionMove and shall return only values sent using IPositionControl interface. If other interfaces like IPositionDirect are implemented by the device, this call must ignore their values, i.e. this call must never return a reference sent using IPositionDirect::SetPosition

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented in ControlBoardRemapper, RemoteControlBoard, and yarp::dev::ImplementPositionControl.

Definition at line 469 of file IPositionControl.h.

◆ getTargetPositions() [2/2]

virtual bool yarp::dev::IPositionControl::getTargetPositions ( double *  refs)
inlinevirtual

Get the last position reference for all axes.

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

Parameters
reflast reference sent using PositionMove functions
Returns
true/false on success/failure

Reimplemented in ControlBoardRemapper, RemoteControlBoard, and yarp::dev::ImplementPositionControl.

Definition at line 458 of file IPositionControl.h.

◆ positionMove() [1/3]

virtual bool yarp::dev::IPositionControl::positionMove ( const double *  refs)
pure virtual

Set new reference point for all axes.

Parameters
refsarray, new reference points.
Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ positionMove() [2/3]

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

Set new reference point for a subset of joints.

Parameters
jointspointer to the array of joint numbers
refspointer to the array specifying the new reference points
Returns
true/false on success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ positionMove() [3/3]

virtual bool yarp::dev::IPositionControl::positionMove ( int  j,
double  ref 
)
pure virtual

Set new reference point for a single axis.

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

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ relativeMove() [1/3]

virtual bool yarp::dev::IPositionControl::relativeMove ( const double *  deltas)
pure virtual

Set relative position, all joints.

Parameters
deltaspointer to the relative commands
Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ relativeMove() [2/3]

virtual bool yarp::dev::IPositionControl::relativeMove ( const int  n_joint,
const int *  joints,
const double *  deltas 
)
pure virtual

Set relative position for a subset of joints.

Parameters
jointspointer to the array of joint numbers
deltaspointer to the array of relative commands
Returns
true/false on success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, SerialServoBoard, yarp::dev::ImplementPositionControl, RemoteControlBoard, and ControlBoardRemapper.

◆ relativeMove() [3/3]

virtual bool yarp::dev::IPositionControl::relativeMove ( int  j,
double  delta 
)
pure virtual

Set relative position.

The command is relative to the current position of the axis.

Parameters
jjoint axis number
deltarelative command
Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ setRefAcceleration()

virtual bool yarp::dev::IPositionControl::setRefAcceleration ( int  j,
double  acc 
)
pure virtual

Set reference acceleration for a joint.

This value is used during the trajectory generation.

Parameters
jjoint number
accacceleration value
Returns
true/false upon success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ setRefAccelerations() [1/2]

virtual bool yarp::dev::IPositionControl::setRefAccelerations ( const double *  accs)
pure virtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
accspointer to the array of acceleration values
Returns
true/false upon success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ setRefAccelerations() [2/2]

virtual bool yarp::dev::IPositionControl::setRefAccelerations ( const int  n_joint,
const int *  joints,
const double *  accs 
)
pure virtual

Set reference acceleration on all joints.

This is the valure that is used during the generation of the trajectory.

Parameters
jointspointer to the array of joint numbers
accspointer to the array with acceleration values
Returns
true/false upon success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ setRefSpeed()

virtual bool yarp::dev::IPositionControl::setRefSpeed ( int  j,
double  sp 
)
pure virtual

Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.

Parameters
jjoint number
spspeed value
Returns
true/false upon success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ setRefSpeeds() [1/2]

virtual bool yarp::dev::IPositionControl::setRefSpeeds ( const double *  spds)
pure virtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
spdspointer to the array of speed values.
Returns
true/false upon success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ setRefSpeeds() [2/2]

virtual bool yarp::dev::IPositionControl::setRefSpeeds ( const int  n_joint,
const int *  joints,
const double *  spds 
)
pure virtual

Set reference speed on all joints.

These values are used during the interpolation of the trajectory.

Parameters
jointspointer to the array of joint numbers
spdspointer to the array with speed values.
Returns
true/false upon success/failure

Implemented in DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ stop() [1/3]

virtual bool yarp::dev::IPositionControl::stop ( )
pure virtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.

◆ stop() [2/3]

virtual bool yarp::dev::IPositionControl::stop ( const int  n_joint,
const int *  joints 
)
pure virtual

Stop motion for subset of joints.

Parameters
jointspointer to the array of joint numbers
Returns
true/false on success/failure

Implemented in RemoteControlBoard, DynamixelAX12FtdiDriver, FakeBot, SerialServoBoard, yarp::dev::ImplementPositionControl, and ControlBoardRemapper.

◆ stop() [3/3]

virtual bool yarp::dev::IPositionControl::stop ( int  j)
pure virtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implemented in ControlBoardRemapper, DynamixelAX12FtdiDriver, FakeBot, RemoteControlBoard, SerialServoBoard, and yarp::dev::ImplementPositionControl.


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