YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
SerialServoBoard Class Reference

SerialServoBoard: Documentation to be added More...

#include <SerialServoBoard/SerialServoBoard.h>

+ Inheritance diagram for SerialServoBoard:

Public Member Functions

bool getAxes (int *ax) override
 Get the number of controlled axes.
 
bool positionMove (int j, double ref) override
 Set new reference point for a single axis.
 
bool positionMove (const double *refs) override
 Set new reference point for all axes.
 
bool relativeMove (int j, double delta) override
 Set relative position.
 
bool relativeMove (const double *deltas) override
 Set relative position, all joints.
 
bool checkMotionDone (int j, bool *flag) override
 Check if the current trajectory is terminated.
 
bool checkMotionDone (bool *flag) override
 Check if the current trajectory is terminated.
 
bool setRefSpeed (int j, double sp) override
 Set reference speed for a joint, this is the speed used during the interpolation of the trajectory.
 
bool setRefSpeeds (const double *spds) override
 Set reference speed on all joints.
 
bool setRefAcceleration (int j, double acc) override
 Set reference acceleration for a joint.
 
bool setRefAccelerations (const double *accs) override
 Set reference acceleration on all joints.
 
bool getRefSpeed (int j, double *ref) override
 Get reference speed for a joint.
 
bool getRefSpeeds (double *spds) override
 Get reference speed of all joints.
 
bool getRefAcceleration (int j, double *acc) override
 Get reference acceleration for a joint.
 
bool getRefAccelerations (double *accs) override
 Get reference acceleration of all joints.
 
bool stop (int j) override
 Stop motion, single joint.
 
bool stop () override
 Stop motion, multiple joints.
 
bool positionMove (const int n_joint, const int *joints, const double *refs) override
 Set new reference point for a subset of joints.
 
bool relativeMove (const int n_joint, const int *joints, const double *deltas) override
 Set relative position for a subset of joints.
 
bool checkMotionDone (const int n_joint, const int *joints, bool *flags) override
 Check if the current trajectory is terminated.
 
bool setRefSpeeds (const int n_joint, const int *joints, const double *spds) override
 Set reference speed on all joints.
 
bool setRefAccelerations (const int n_joint, const int *joints, const double *accs) override
 Set reference acceleration on all joints.
 
bool getRefSpeeds (const int n_joint, const int *joints, double *spds) override
 Get reference speed of all joints.
 
bool getRefAccelerations (const int n_joint, const int *joints, double *accs) override
 Get reference acceleration for a joint.
 
bool stop (const int n_joint, const int *joints) override
 Stop motion for subset of joints.
 
bool open (Searchable &config) override
 Open the DeviceDriver.
 
bool close () override
 Close the DeviceDriver.
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 DeviceDriver ()
 
 DeviceDriver (const DeviceDriver &other)=delete
 
 DeviceDriver (DeviceDriver &&other) noexcept=delete
 
DeviceDriveroperator= (const DeviceDriver &other)=delete
 
DeviceDriveroperator= (DeviceDriver &&other) noexcept=delete
 
virtual ~DeviceDriver ()
 
virtual std::string id () const
 Return the id assigned to the PolyDriver.
 
virtual void setId (const std::string &id)
 Set the id for this device.
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver.
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others.
 
- Public Member Functions inherited from yarp::dev::IPositionControl
virtual ~IPositionControl ()
 Destructor.
 
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.
 

Public Attributes

int servoboard
 
ISerialDeviceserial
 
PolyDriver dd
 
bool(* move )(int j, double ref, double *positions, double *speeds, ISerialDevice *serial)
 
doublepositions
 
doublespeeds
 

Detailed Description

SerialServoBoard: Documentation to be added

Definition at line 43 of file SerialServoBoard.h.

Member Function Documentation

◆ checkMotionDone() [1/3]

bool SerialServoBoard::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 178 of file SerialServoBoard.cpp.

◆ checkMotionDone() [2/3]

bool SerialServoBoard::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 265 of file SerialServoBoard.cpp.

◆ checkMotionDone() [3/3]

bool SerialServoBoard::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 170 of file SerialServoBoard.cpp.

◆ close()

bool SerialServoBoard::close ( )
overridevirtual

Close the DeviceDriver.

Returns
true/false on success/failure.

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 103 of file SerialServoBoard.cpp.

◆ getAxes()

bool SerialServoBoard::getAxes ( int ax)
overridevirtual

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 114 of file SerialServoBoard.cpp.

◆ getRefAcceleration()

bool SerialServoBoard::getRefAcceleration ( int  j,
double acc 
)
overridevirtual

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 234 of file SerialServoBoard.cpp.

◆ getRefAccelerations() [1/2]

bool SerialServoBoard::getRefAccelerations ( const int  n_joint,
const int joints,
double accs 
)
overridevirtual

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 281 of file SerialServoBoard.cpp.

◆ getRefAccelerations() [2/2]

bool SerialServoBoard::getRefAccelerations ( double accs)
overridevirtual

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 240 of file SerialServoBoard.cpp.

◆ getRefSpeed()

bool SerialServoBoard::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 216 of file SerialServoBoard.cpp.

◆ getRefSpeeds() [1/2]

bool SerialServoBoard::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 277 of file SerialServoBoard.cpp.

◆ getRefSpeeds() [2/2]

bool SerialServoBoard::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 224 of file SerialServoBoard.cpp.

◆ open()

bool SerialServoBoard::open ( Searchable config)
overridevirtual

Open the DeviceDriver.

Parameters
configis a list of parameters for the device. Which parameters are effective for your device can vary. See device invocation examples. If there is no example for your device, you can run the "yarpdev" program with the verbose flag set to probe what parameters the device is checking. If that fails too, you'll need to read the source code (please nag one of the yarp developers to add documentation for your device).
Returns
true/false upon success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 31 of file SerialServoBoard.cpp.

◆ positionMove() [1/3]

bool SerialServoBoard::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 142 of file SerialServoBoard.cpp.

◆ positionMove() [2/3]

bool SerialServoBoard::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 257 of file SerialServoBoard.cpp.

◆ positionMove() [3/3]

bool SerialServoBoard::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 134 of file SerialServoBoard.cpp.

◆ relativeMove() [1/3]

bool SerialServoBoard::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 160 of file SerialServoBoard.cpp.

◆ relativeMove() [2/3]

bool SerialServoBoard::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 261 of file SerialServoBoard.cpp.

◆ relativeMove() [3/3]

bool SerialServoBoard::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 152 of file SerialServoBoard.cpp.

◆ setRefAcceleration()

bool SerialServoBoard::setRefAcceleration ( int  j,
double  acc 
)
overridevirtual

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 204 of file SerialServoBoard.cpp.

◆ setRefAccelerations() [1/2]

bool SerialServoBoard::setRefAccelerations ( const double accs)
overridevirtual

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 210 of file SerialServoBoard.cpp.

◆ setRefAccelerations() [2/2]

bool SerialServoBoard::setRefAccelerations ( const int  n_joint,
const int joints,
const double accs 
)
overridevirtual

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 273 of file SerialServoBoard.cpp.

◆ setRefSpeed()

bool SerialServoBoard::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 186 of file SerialServoBoard.cpp.

◆ setRefSpeeds() [1/2]

bool SerialServoBoard::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 194 of file SerialServoBoard.cpp.

◆ setRefSpeeds() [2/2]

bool SerialServoBoard::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 269 of file SerialServoBoard.cpp.

◆ stop() [1/3]

bool SerialServoBoard::stop ( )
overridevirtual

Stop motion, multiple joints.

Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 252 of file SerialServoBoard.cpp.

◆ stop() [2/3]

bool SerialServoBoard::stop ( const int  n_joint,
const int joints 
)
overridevirtual

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 285 of file SerialServoBoard.cpp.

◆ stop() [3/3]

bool SerialServoBoard::stop ( int  j)
overridevirtual

Stop motion, single joint.

Parameters
jjoint number
Returns
true/false on success/failure

Implements yarp::dev::IPositionControl.

Definition at line 246 of file SerialServoBoard.cpp.

Member Data Documentation

◆ dd

PolyDriver SerialServoBoard::dd

Definition at line 50 of file SerialServoBoard.h.

◆ move

bool(* SerialServoBoard::move) (int j, double ref, double *positions, double *speeds, ISerialDevice *serial)

Definition at line 52 of file SerialServoBoard.h.

◆ positions

double* SerialServoBoard::positions

Definition at line 54 of file SerialServoBoard.h.

◆ serial

ISerialDevice* SerialServoBoard::serial

Definition at line 48 of file SerialServoBoard.h.

◆ servoboard

int SerialServoBoard::servoboard

Definition at line 46 of file SerialServoBoard.h.

◆ speeds

double* SerialServoBoard::speeds

Definition at line 55 of file SerialServoBoard.h.


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