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

Control board, encoder interface. More...

#include <yarp/dev/IMotorEncoders.h>

+ Inheritance diagram for yarp::dev::IMotorEncoders:

Public Member Functions

virtual ~IMotorEncoders ()
 Destructor.
 
virtual yarp::dev::ReturnValue getNumberOfMotorEncoders (int *num)=0
 Get the number of available motor encoders.
 
virtual yarp::dev::ReturnValue resetMotorEncoder (int m)=0
 Reset motor encoder, single motor.
 
virtual yarp::dev::ReturnValue resetMotorEncoders ()=0
 Reset motor encoders.
 
virtual yarp::dev::ReturnValue setMotorEncoderCountsPerRevolution (int m, const double cpr)=0
 Sets number of counts per revolution for motor encoder m.
 
virtual yarp::dev::ReturnValue getMotorEncoderCountsPerRevolution (int m, double *cpr)=0
 Gets number of counts per revolution for motor encoder m.
 
virtual yarp::dev::ReturnValue setMotorEncoder (int m, const double val)=0
 Set the value of the motor encoder for a given motor.
 
virtual yarp::dev::ReturnValue setMotorEncoders (const double *vals)=0
 Set the value of all motor encoders.
 
virtual yarp::dev::ReturnValue getMotorEncoder (int m, double *v)=0
 Read the value of a motor encoder.
 
virtual yarp::dev::ReturnValue getMotorEncoders (double *encs)=0
 Read the position of all motor encoders.
 
virtual yarp::dev::ReturnValue getMotorEncodersTimed (double *encs, double *time)=0
 Read the instantaneous position of all motor encoders.
 
virtual yarp::dev::ReturnValue getMotorEncoderTimed (int m, double *encs, double *time)=0
 Read the instantaneous position of a motor encoder.
 
virtual yarp::dev::ReturnValue getMotorEncoderSpeed (int m, double *sp)=0
 Read the instantaneous speed of a motor encoder.
 
virtual yarp::dev::ReturnValue getMotorEncoderSpeeds (double *spds)=0
 Read the instantaneous speed of all motor encoders.
 
virtual yarp::dev::ReturnValue getMotorEncoderAcceleration (int m, double *acc)=0
 Read the instantaneous acceleration of a motor encoder.
 
virtual yarp::dev::ReturnValue getMotorEncoderAccelerations (double *accs)=0
 Read the instantaneous acceleration of all motor encoders.
 

Detailed Description

Control board, encoder interface.

Definition at line 150 of file IMotorEncoders.h.

Constructor & Destructor Documentation

◆ ~IMotorEncoders()

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

Destructor.

Definition at line 156 of file IMotorEncoders.h.

Member Function Documentation

◆ getMotorEncoder()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoder ( int  m,
double *  v 
)
pure virtual

Read the value of a motor encoder.

Parameters
mmotor encoder number
vpointer to storage for the return value
Returns
true/false

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoderAcceleration()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderAcceleration ( int  m,
double *  acc 
)
pure virtual

Read the instantaneous acceleration of a motor encoder.

Parameters
mmotor number
accpointer to the array that will contain the output
Returns
true if successful, false otherwise.

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoderAccelerations()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderAccelerations ( double *  accs)
pure virtual

Read the instantaneous acceleration of all motor encoders.

Parameters
accspointer to the array that will contain the output
Returns
true if successful, false otherwise.

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoderCountsPerRevolution()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderCountsPerRevolution ( int  m,
double *  cpr 
)
pure virtual

Gets number of counts per revolution for motor encoder m.

Parameters
mmotor number
cprvals pointer to the new value
Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoders()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoders ( double *  encs)
pure virtual

Read the position of all motor encoders.

Parameters
encspointer to the array that will contain the output
Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoderSpeed()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderSpeed ( int  m,
double *  sp 
)
pure virtual

Read the instantaneous speed of a motor encoder.

Parameters
mmotor number
sppointer to storage for the output
Returns
true if successful, false otherwise.

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncoderSpeeds()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderSpeeds ( double *  spds)
pure virtual

Read the instantaneous speed of all motor encoders.

Parameters
spdspointer to storage for the output values
Returns
true if successful, false otherwise.

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ getMotorEncodersTimed()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncodersTimed ( double *  encs,
double *  time 
)
pure virtual

Read the instantaneous position of all motor encoders.

Parameters
encspointer to the array that will contain the output
timepointer to the array that will contain individual timestamps
Returns
true if successful, false otherwise.

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, yarp::dev::ImplementMotorEncoders, and ControlBoard_nwc_yarp.

◆ getMotorEncoderTimed()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getMotorEncoderTimed ( int  m,
double *  encs,
double *  time 
)
pure virtual

Read the instantaneous position of a motor encoder.

Parameters
mmotor index
encsencoder value (pointer to)
timecorresponding timestamp (pointer to)
Returns
true if successful, false otherwise.

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ getNumberOfMotorEncoders()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::getNumberOfMotorEncoders ( int *  num)
pure virtual

Get the number of available motor encoders.

Parameters
mpointer to a value representing the number of available motor encoders.
Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ resetMotorEncoder()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::resetMotorEncoder ( int  m)
pure virtual

Reset motor encoder, single motor.

Set the encoder value to zero.

Parameters
mmotor number
Returns
true/false

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ resetMotorEncoders()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::resetMotorEncoders ( )
pure virtual

Reset motor encoders.

Set the motor encoders value to zero.

Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ setMotorEncoder()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::setMotorEncoder ( int  m,
const double  val 
)
pure virtual

Set the value of the motor encoder for a given motor.

Parameters
mmotor number
valnew value
Returns
true/false

Implemented in ControlBoard_nwc_yarp, yarp::dev::xHandControlBoard, ControlBoardRemapper, and yarp::dev::ImplementMotorEncoders.

◆ setMotorEncoderCountsPerRevolution()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::setMotorEncoderCountsPerRevolution ( int  m,
const double  cpr 
)
pure virtual

Sets number of counts per revolution for motor encoder m.

Parameters
mmotor number
cprnew value
Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.

◆ setMotorEncoders()

virtual yarp::dev::ReturnValue yarp::dev::IMotorEncoders::setMotorEncoders ( const double *  vals)
pure virtual

Set the value of all motor encoders.

Parameters
valspointer to the new values
Returns
true/false

Implemented in yarp::dev::xHandControlBoard, ControlBoardRemapper, ControlBoard_nwc_yarp, and yarp::dev::ImplementMotorEncoders.


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