|
YARP
Yet Another Robot Platform
|
|
Go to the documentation of this file.
17 #define JOINTIDCHECK if (m >= castToMapper(helper)->axes()){yError("motor id out of bound"); return false;}
Control board, encoder interface.
virtual bool setMotorEncoderCountsPerRevolutionRaw(int m, const double cpr)=0
Sets number of counts per revolution for motor encoder m.
bool getMotorEncodersTimed(double *encs, double *time) override
Read the instantaneous position of all motor encoders.
virtual bool setMotorEncodersRaw(const double *vals)=0
Set the value of all motor encoders.
void velE2A(double enc, int j, double &ang, int &k)
virtual bool getMotorEncoderSpeedRaw(int m, double *sp)=0
Read the istantaneous speed of a motor encoder.
void posE2A(double enc, int j, double &ang, int &k)
bool setMotorEncoders(const double *vals) override
Set the value of all motor encoders.
bool setMotorEncoder(int m, const double val) override
Set the value of the motor encoder for a given motor.
virtual ~ImplementMotorEncoders()
virtual bool getMotorEncoderTimedRaw(int m, double *encs, double *stamp)=0
Read the instantaneous position of a motor encoder.
virtual bool getMotorEncoderRaw(int m, double *v)=0
Read the value of a motor encoder.
bool getMotorEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all motor encoders.
T * getData()
Return the data pointer.
bool getMotorEncoderSpeeds(double *spds) override
Read the instantaneous speed of all motor encoders.
bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override
Gets number of counts per revolution for motor encoder m.
Buffer< T > getBuffer()
Get a buffer and fill its information in @buffer.
bool getMotorEncoderAcceleration(int m, double *spds) override
Read the instantaneous acceleration of a motor encoder.
bool resetMotorEncoder(int m) override
Reset motor encoder, single motor.
bool getNumberOfMotorEncoders(int *num) override
Get the number of available motor encoders.
bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
An interface for the device drivers.
IMotorEncodersRaw * iMotorEncoders
virtual bool getMotorEncodersRaw(double *encs)=0
Read the position of all motor encoders.
virtual bool getMotorEncoderAccelerationRaw(int m, double *spds)=0
Read the instantaneous acceleration of a motor encoder.
bool getMotorEncoderTimed(int m, double *v, double *t) override
Read the instantaneous position of a motor encoder.
bool getMotorEncoders(double *encs) override
Read the position of all motor encoders.
void posA2E(double ang, int j, double &enc, int &k)
virtual bool getMotorEncoderSpeedsRaw(double *spds)=0
Read the instantaneous speed of all motor encoders.
Buffer contains info about a buffer of type T and it is used to exchange information with yarp::dev::...
ImplementMotorEncoders(yarp::dev::IMotorEncodersRaw *y)
bool resetMotorEncoders() override
Reset motor encoders.
virtual bool resetMotorEncoderRaw(int m)=0
Reset motor encoder, single motor.
void releaseBuffer(Buffer< T > &buffer)
Release a buffer.
bool getMotorEncoderSpeed(int m, double *spds) override
Read the istantaneous speed of a motor encoder.
virtual bool getMotorEncodersTimedRaw(double *encs, double *stamps)=0
Read the instantaneous position of all motor encoders.
An interface to the operating system, including Port based communication.
yarp::dev::ControlBoardHelper * castToMapper(void *p)
virtual bool getMotorEncoderCountsPerRevolutionRaw(int m, double *cpr)=0
Gets number of counts per revolution for motor encoder m.
void accE2A(double enc, int j, double &ang, int &k)
virtual bool setMotorEncoderRaw(int m, const double val)=0
Set the value of the motor encoder for a given motor.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
virtual bool getMotorEncoderAccelerationsRaw(double *accs)=0
Read the instantaneous acceleration of all motor encoders.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::impl::FixedSizeBuffersManager< double > * buffManager
bool getMotorEncoder(int m, double *v) override
Read the value of a motor encoder.
virtual bool resetMotorEncodersRaw()=0
Reset motor encoders.