YARP
Yet Another Robot Platform
ControlBoardWrapperPositionControl Class Reference

#include <ControlBoardWrapper/ControlBoardWrapperPositionControl.h>

+ Inheritance diagram for ControlBoardWrapperPositionControl:

Public Member Functions

bool getAxes (int *ax) override
 Get the number of controlled axes. More...
 
bool positionMove (int j, double ref) override
 Set new reference point for a single axis. More...
 
bool positionMove (const double *refs) override
 Set new reference point for all axes. More...
 
bool positionMove (const int n_joints, const int *joints, const double *refs) override
 Set new reference point for a subset of joints. More...
 
bool getTargetPosition (const int joint, double *ref) override
 Get the last position reference for the specified axis. More...
 
bool getTargetPositions (double *refs) override
 Get the last position reference for all axes. More...
 
bool getTargetPositions (const int n_joint, const int *joints, double *refs) override
 Get the last position reference for the specified group of axes. More...
 
bool relativeMove (int j, double delta) override
 Set relative position. More...
 
bool relativeMove (const double *deltas) override
 Set relative position, all joints. More...
 
bool relativeMove (const int n_joints, const int *joints, const double *deltas) override
 Set relative position for a subset of joints. More...
 
bool checkMotionDone (int j, bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool checkMotionDone (bool *flag) override
 Check if the current trajectory is terminated. More...
 
bool checkMotionDone (const int n_joints, const int *joints, bool *flags) override
 Check if the current trajectory is terminated. More...
 
bool setRefSpeed (int j, double sp) override
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory. More...
 
bool setRefSpeeds (const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefSpeeds (const int n_joints, const int *joints, const double *spds) override
 Set reference speed on all joints. More...
 
bool setRefAcceleration (int j, double acc) override
 Set reference acceleration for a joint. More...
 
bool setRefAccelerations (const double *accs) override
 Set reference acceleration on all joints. More...
 
bool setRefAccelerations (const int n_joints, const int *joints, const double *accs) override
 Set reference acceleration on all joints. More...
 
bool getRefSpeed (int j, double *ref) override
 Get reference speed for a joint. More...
 
bool getRefSpeeds (double *spds) override
 Get reference speed of all joints. More...
 
bool getRefSpeeds (const int n_joints, const int *joints, double *spds) override
 Get reference speed of all joints. More...
 
bool getRefAcceleration (int j, double *acc) override
 Get reference acceleration for a joint. More...
 
bool getRefAccelerations (double *accs) override
 Get reference acceleration of all joints. More...
 
bool getRefAccelerations (const int n_joints, const int *joints, double *accs) override
 Get reference acceleration for a joint. More...
 
bool stop (int j) override
 Stop motion, single joint. More...
 
bool stop () override
 Stop motion, multiple joints. More...
 
bool stop (const int n_joints, const int *joints) override
 Stop motion for subset of joints. More...
 
- Public Member Functions inherited from ControlBoardWrapperCommon
bool getAxes (int *ax)
 
bool setRefAcceleration (int j, double acc)
 
bool setRefAccelerations (const double *accs)
 
bool setRefAccelerations (const int n_joints, const int *joints, const double *accs)
 
bool getRefAcceleration (int j, double *acc)
 
bool getRefAccelerations (double *accs)
 
bool getRefAccelerations (const int n_joints, const int *joints, double *accs)
 
bool stop (int j)
 
bool stop ()
 
bool stop (const int n_joint, const int *joints)
 
bool getNumberOfMotors (int *num)
 
bool getCurrent (int m, double *curr)
 
bool getCurrents (double *currs)
 
void printError (const std::string &func_name, const std::string &info, bool result)
 
- Public Member Functions inherited from yarp::dev::IPositionControl
virtual ~IPositionControl ()
 Destructor. More...
 

Additional Inherited Members

- Public Attributes inherited from ControlBoardWrapperCommon
WrappedDevice device
 
size_t controlledJoints {0}
 
std::string partName
 
std::mutex rpcDataMutex
 
MultiJointData rpcData
 
std::mutex timeMutex
 
yarp::os::Stamp time
 

Detailed Description

Definition at line 17 of file ControlBoardWrapperPositionControl.h.

Member Function Documentation

◆ checkMotionDone() [1/3]

bool ControlBoardWrapperPositionControl::checkMotionDone ( bool *  flag)
overridevirtual

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)

Implements yarp::dev::IPositionControl.

Definition at line 307 of file ControlBoardWrapperPositionControl.cpp.

◆ checkMotionDone() [2/3]

bool ControlBoardWrapperPositionControl::checkMotionDone ( const int  n_joint,
const int *  joints,
bool *  flag 
)
overridevirtual

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.

Implements yarp::dev::IPositionControl.

Definition at line 346 of file ControlBoardWrapperPositionControl.cpp.

◆ checkMotionDone() [3/3]

bool ControlBoardWrapperPositionControl::checkMotionDone ( int  j,
bool *  flag 
)
overridevirtual

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)

Implements yarp::dev::IPositionControl.

Definition at line 282 of file ControlBoardWrapperPositionControl.cpp.

◆ getAxes()

bool ControlBoardWrapperPositionControl::getAxes ( int *  ax)
inlineoverridevirtual

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.

Implements yarp::dev::IPositionControl.

Definition at line 22 of file ControlBoardWrapperPositionControl.h.

◆ getRefAcceleration()

bool ControlBoardWrapperPositionControl::getRefAcceleration ( int  j,
double *  acc 
)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 47 of file ControlBoardWrapperPositionControl.h.

◆ getRefAccelerations() [1/2]

bool ControlBoardWrapperPositionControl::getRefAccelerations ( const int  n_joint,
const int *  joints,
double *  accs 
)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 49 of file ControlBoardWrapperPositionControl.h.

◆ getRefAccelerations() [2/2]

bool ControlBoardWrapperPositionControl::getRefAccelerations ( double *  accs)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 48 of file ControlBoardWrapperPositionControl.h.

◆ getRefSpeed()

bool ControlBoardWrapperPositionControl::getRefSpeed ( int  j,
double *  ref 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 473 of file ControlBoardWrapperPositionControl.cpp.

◆ getRefSpeeds() [1/2]

bool ControlBoardWrapperPositionControl::getRefSpeeds ( const int  n_joint,
const int *  joints,
double *  spds 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 525 of file ControlBoardWrapperPositionControl.cpp.

◆ getRefSpeeds() [2/2]

bool ControlBoardWrapperPositionControl::getRefSpeeds ( double *  spds)
overridevirtual

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.

Implements yarp::dev::IPositionControl.

Definition at line 498 of file ControlBoardWrapperPositionControl.cpp.

◆ getTargetPosition()

bool ControlBoardWrapperPositionControl::getTargetPosition ( const int  joint,
double *  ref 
)
overridevirtual

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 from yarp::dev::IPositionControl.

Definition at line 107 of file ControlBoardWrapperPositionControl.cpp.

◆ getTargetPositions() [1/2]

bool ControlBoardWrapperPositionControl::getTargetPositions ( const int  n_joint,
const int *  joints,
double *  refs 
)
overridevirtual

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 from yarp::dev::IPositionControl.

Definition at line 160 of file ControlBoardWrapperPositionControl.cpp.

◆ getTargetPositions() [2/2]

bool ControlBoardWrapperPositionControl::getTargetPositions ( double *  refs)
overridevirtual

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 from yarp::dev::IPositionControl.

Definition at line 133 of file ControlBoardWrapperPositionControl.cpp.

◆ positionMove() [1/3]

bool ControlBoardWrapperPositionControl::positionMove ( const double *  refs)
overridevirtual

Set new reference point for all axes.

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

Implements yarp::dev::IPositionControl.

Definition at line 38 of file ControlBoardWrapperPositionControl.cpp.

◆ positionMove() [2/3]

bool ControlBoardWrapperPositionControl::positionMove ( const int  n_joint,
const int *  joints,
const double *  refs 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 77 of file ControlBoardWrapperPositionControl.cpp.

◆ positionMove() [3/3]

bool ControlBoardWrapperPositionControl::positionMove ( int  j,
double  ref 
)
overridevirtual

Set new reference point for a single axis.

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

Implements yarp::dev::IPositionControl.

Definition at line 14 of file ControlBoardWrapperPositionControl.cpp.

◆ relativeMove() [1/3]

bool ControlBoardWrapperPositionControl::relativeMove ( const double *  deltas)
overridevirtual

Set relative position, all joints.

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

Implements yarp::dev::IPositionControl.

Definition at line 229 of file ControlBoardWrapperPositionControl.cpp.

◆ relativeMove() [2/3]

bool ControlBoardWrapperPositionControl::relativeMove ( const int  n_joint,
const int *  joints,
const double *  deltas 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 252 of file ControlBoardWrapperPositionControl.cpp.

◆ relativeMove() [3/3]

bool ControlBoardWrapperPositionControl::relativeMove ( int  j,
double  delta 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 205 of file ControlBoardWrapperPositionControl.cpp.

◆ setRefAcceleration()

bool ControlBoardWrapperPositionControl::setRefAcceleration ( int  j,
double  acc 
)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 41 of file ControlBoardWrapperPositionControl.h.

◆ setRefAccelerations() [1/2]

bool ControlBoardWrapperPositionControl::setRefAccelerations ( const double *  accs)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 42 of file ControlBoardWrapperPositionControl.h.

◆ setRefAccelerations() [2/2]

bool ControlBoardWrapperPositionControl::setRefAccelerations ( const int  n_joint,
const int *  joints,
const double *  accs 
)
inlineoverridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 43 of file ControlBoardWrapperPositionControl.h.

◆ setRefSpeed()

bool ControlBoardWrapperPositionControl::setRefSpeed ( int  j,
double  sp 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 383 of file ControlBoardWrapperPositionControl.cpp.

◆ setRefSpeeds() [1/2]

bool ControlBoardWrapperPositionControl::setRefSpeeds ( const double *  spds)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 406 of file ControlBoardWrapperPositionControl.cpp.

◆ setRefSpeeds() [2/2]

bool ControlBoardWrapperPositionControl::setRefSpeeds ( const int  n_joint,
const int *  joints,
const double *  spds 
)
overridevirtual

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

Implements yarp::dev::IPositionControl.

Definition at line 443 of file ControlBoardWrapperPositionControl.cpp.

◆ stop() [1/3]

bool ControlBoardWrapperPositionControl::stop ( )
inlineoverridevirtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 51 of file ControlBoardWrapperPositionControl.h.

◆ stop() [2/3]

bool ControlBoardWrapperPositionControl::stop ( const int  n_joint,
const int *  joints 
)
inlineoverridevirtual

Stop motion for subset of joints.

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

Implements yarp::dev::IPositionControl.

Definition at line 52 of file ControlBoardWrapperPositionControl.h.

◆ stop() [3/3]

bool ControlBoardWrapperPositionControl::stop ( int  j)
inlineoverridevirtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 50 of file ControlBoardWrapperPositionControl.h.


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