YARP
Yet Another Robot Platform
ControlBoardWrapperMotorEncoders.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERMOTORENCODERS_H
10 #define YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERMOTORENCODERS_H
11 
13 
15 
17  virtual public ControlBoardWrapperCommon,
19 {
20 public:
21  bool getNumberOfMotorEncoders(int* num) override;
22  bool resetMotorEncoder(int m) override;
23  bool resetMotorEncoders() override;
24  bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override;
25  bool getMotorEncoderCountsPerRevolution(int m, double* cpr) override;
26  bool setMotorEncoder(int m, const double val) override;
27  bool setMotorEncoders(const double* vals) override;
28  bool getMotorEncoder(int m, double* v) override;
29  bool getMotorEncoders(double* encs) override;
30  bool getMotorEncodersTimed(double* encs, double* t) override;
31  bool getMotorEncoderTimed(int m, double* v, double* t) override;
32  bool getMotorEncoderSpeed(int m, double* sp) override;
33  bool getMotorEncoderSpeeds(double* spds) override;
34  bool getMotorEncoderAcceleration(int m, double* acc) override;
35  bool getMotorEncoderAccelerations(double* accs) override;
36 };
37 
38 #endif // YARP_DEV_CONTROLBOARDWRAPPER_CONTROLBOARDWRAPPERMOTORENCODERS_H
ControlBoardWrapperMotorEncoders::getMotorEncoderAccelerations
bool getMotorEncoderAccelerations(double *accs) override
Read the instantaneous acceleration of all motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:285
t
float t
Definition: FfmpegWriter.cpp:74
ControlBoardWrapperMotorEncoders::setMotorEncoderCountsPerRevolution
bool setMotorEncoderCountsPerRevolution(int m, const double cpr) override
Sets number of counts per revolution for motor encoder m.
Definition: ControlBoardWrapperMotorEncoders.cpp:93
ControlBoardWrapperMotorEncoders::getMotorEncodersTimed
bool getMotorEncodersTimed(double *encs, double *t) override
Read the instantaneous position of all motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:174
ControlBoardWrapperMotorEncoders::getMotorEncoderCountsPerRevolution
bool getMotorEncoderCountsPerRevolution(int m, double *cpr) override
Gets number of counts per revolution for motor encoder m.
Definition: ControlBoardWrapperMotorEncoders.cpp:110
ControlBoardWrapperMotorEncoders::getMotorEncoderTimed
bool getMotorEncoderTimed(int m, double *v, double *t) override
Read the instantaneous position of a motor encoder.
Definition: ControlBoardWrapperMotorEncoders.cpp:204
ControlBoardWrapperMotorEncoders::getNumberOfMotorEncoders
bool getNumberOfMotorEncoders(int *num) override
Get the number of available motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:312
ControlBoardWrapperMotorEncoders
Definition: ControlBoardWrapperMotorEncoders.h:19
ControlBoardWrapperMotorEncoders::getMotorEncoderSpeeds
bool getMotorEncoderSpeeds(double *spds) override
Read the instantaneous speed of all motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:240
ControlBoardWrapperMotorEncoders::getMotorEncoderSpeed
bool getMotorEncoderSpeed(int m, double *sp) override
Read the istantaneous speed of a motor encoder.
Definition: ControlBoardWrapperMotorEncoders.cpp:222
ControlBoardWrapperMotorEncoders::setMotorEncoder
bool setMotorEncoder(int m, const double val) override
Set the value of the motor encoder for a given motor.
Definition: ControlBoardWrapperMotorEncoders.cpp:53
ControlBoardWrapperMotorEncoders::getMotorEncoders
bool getMotorEncoders(double *encs) override
Read the position of all motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:146
ControlBoardWrapperMotorEncoders::getMotorEncoder
bool getMotorEncoder(int m, double *v) override
Read the value of a motor encoder.
Definition: ControlBoardWrapperMotorEncoders.cpp:128
ControlBoardWrapperCommon.h
ControlBoardWrapperCommon
Definition: ControlBoardWrapperCommon.h:19
yarp::dev::IMotorEncoders
Control board, encoder interface.
Definition: IMotorEncoders.h:155
ControlBoardWrapperMotorEncoders::setMotorEncoders
bool setMotorEncoders(const double *vals) override
Set the value of all motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:70
ControlBoardWrapperMotorEncoders::resetMotorEncoder
bool resetMotorEncoder(int m) override
Reset motor encoder, single motor.
Definition: ControlBoardWrapperMotorEncoders.cpp:13
IMotorEncoders.h
ControlBoardWrapperMotorEncoders::getMotorEncoderAcceleration
bool getMotorEncoderAcceleration(int m, double *acc) override
Read the instantaneous acceleration of a motor encoder.
Definition: ControlBoardWrapperMotorEncoders.cpp:267
ControlBoardWrapperMotorEncoders::resetMotorEncoders
bool resetMotorEncoders() override
Reset motor encoders.
Definition: ControlBoardWrapperMotorEncoders.cpp:30