YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IEncoders.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IENCODERS_H
7#define YARP_DEV_IENCODERS_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/dev/api.h>
11
12namespace yarp::dev {
13class IEncodersRaw;
14class IEncoders;
15}
16
23{
24public:
28 virtual ~IEncodersRaw() {}
29
35 virtual bool getAxes(int *ax) = 0;
36
42 virtual bool resetEncoderRaw(int j)=0;
43
48 virtual bool resetEncodersRaw()=0;
49
56 virtual bool setEncoderRaw(int j, double val)=0;
57
63 virtual bool setEncodersRaw(const double *vals)=0;
64
71 virtual bool getEncoderRaw(int j, double *v)=0;
72
78 virtual bool getEncodersRaw(double *encs)=0;
79
86 virtual bool getEncoderSpeedRaw(int j, double *sp)=0;
87
93 virtual bool getEncoderSpeedsRaw(double *spds)=0;
94
100 virtual bool getEncoderAccelerationRaw(int j, double *spds)=0;
101
107 virtual bool getEncoderAccelerationsRaw(double *accs)=0;
108};
109
116{
117public:
121 virtual ~IEncoders() {}
122
128 virtual bool getAxes(int *ax) = 0;
129
135 virtual bool resetEncoder(int j)=0;
136
141 virtual bool resetEncoders()=0;
142
149 virtual bool setEncoder(int j, double val)=0;
150
156 virtual bool setEncoders(const double *vals)=0;
157
164 virtual bool getEncoder(int j, double *v)=0;
165
171 virtual bool getEncoders(double *encs)=0;
172
179 virtual bool getEncoderSpeed(int j, double *sp)=0;
180
186 virtual bool getEncoderSpeeds(double *spds)=0;
187
193 virtual bool getEncoderAcceleration(int j, double *spds)=0;
194
200 virtual bool getEncoderAccelerations(double *accs)=0;
201};
202
203// interface IEncoders sets
208
209// interface IEncoders gets
214
215#endif // YARP_DEV_IENCODERS_H
constexpr yarp::conf::vocab32_t VOCAB_E_RESET
Definition IEncoders.h:204
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_ACCELERATIONS
Definition IEncoders.h:213
constexpr yarp::conf::vocab32_t VOCAB_ENCODER
Definition IEncoders.h:206
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_SPEEDS
Definition IEncoders.h:211
constexpr yarp::conf::vocab32_t VOCAB_E_RESETS
Definition IEncoders.h:205
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_SPEED
Definition IEncoders.h:210
constexpr yarp::conf::vocab32_t VOCAB_ENCODER_ACCELERATION
Definition IEncoders.h:212
constexpr yarp::conf::vocab32_t VOCAB_ENCODERS
Definition IEncoders.h:207
Control board, encoder interface.
Definition IEncoders.h:23
virtual bool getEncoderSpeedsRaw(double *spds)=0
Read the instantaneous acceleration of an axis.
virtual bool resetEncoderRaw(int j)=0
Reset encoder, single joint.
virtual bool setEncoderRaw(int j, double val)=0
Set the value of the encoder for a given joint.
virtual bool getEncoderSpeedRaw(int j, double *sp)=0
Read the instantaneous speed of an axis.
virtual bool getEncoderAccelerationsRaw(double *accs)=0
Read the instantaneous acceleration of all axes.
virtual bool getEncodersRaw(double *encs)=0
Read the position of all axes.
virtual bool getEncoderRaw(int j, double *v)=0
Read the value of an encoder.
virtual bool getEncoderAccelerationRaw(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool resetEncodersRaw()=0
Reset encoders.
virtual bool setEncodersRaw(const double *vals)=0
Set the value of all encoders.
virtual ~IEncodersRaw()
Destructor.
Definition IEncoders.h:28
Control board, encoder interface.
Definition IEncoders.h:116
virtual bool getEncoderSpeed(int j, double *sp)=0
Read the istantaneous speed of an axis.
virtual bool getEncoderAccelerations(double *accs)=0
Read the instantaneous acceleration of all axes.
virtual bool setEncoder(int j, double val)=0
Set the value of the encoder for a given joint.
virtual bool getEncoder(int j, double *v)=0
Read the value of an encoder.
virtual ~IEncoders()
Destructor.
Definition IEncoders.h:121
virtual bool resetEncoder(int j)=0
Reset encoder, single joint.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool setEncoders(const double *vals)=0
Set the value of all encoders.
virtual bool getEncoders(double *encs)=0
Read the position of all axes.
virtual bool getEncoderSpeeds(double *spds)=0
Read the instantaneous speed of all axes.
virtual bool getEncoderAcceleration(int j, double *spds)=0
Read the instantaneous acceleration of an axis.
virtual bool resetEncoders()=0
Reset encoders.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18