YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IPositionDirect.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
7#ifndef YARP_IPOSITIONDIRECT_H
8#define YARP_IPOSITIONDIRECT_H
9
10#include <yarp/os/Vocab.h>
11#include <yarp/dev/api.h>
13
14namespace yarp::dev {
15class IPositionDirect;
16class IPositionDirectRaw;
17}
18
28{
29
30public:
34 virtual ~IPositionDirect() {}
35
41 virtual yarp::dev::ReturnValue getAxes(size_t& ax)=0;
42
48 virtual yarp::dev::ReturnValue setPosition(int j, double ref)=0;
49
61 virtual yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs)=0;
62
67 virtual yarp::dev::ReturnValue setPositions(const double *refs)=0;
68
78 virtual yarp::dev::ReturnValue getRefPosition(const int joint, double *ref) =0;
79
89 virtual yarp::dev::ReturnValue getRefPositions(double *refs)=0;
90
100 virtual yarp::dev::ReturnValue getRefPositions(const int n_joint, const int *joints, double *refs) =0;
101};
102
103
104
114{
115public:
120
126 virtual yarp::dev::ReturnValue getAxes(size_t& axes) = 0;
127
133 virtual yarp::dev::ReturnValue setPositionRaw(int j, double ref)=0;
134
145 virtual yarp::dev::ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs)=0;
146
147
152 virtual yarp::dev::ReturnValue setPositionsRaw(const double *refs)=0;
153
163 virtual yarp::dev::ReturnValue getRefPositionRaw(const int joint, double *ref)=0;
164
175
176
186 virtual yarp::dev::ReturnValue getRefPositionsRaw(const int n_joint, const int *joints, double *refs)=0;
187};
188
189// Interface name
191
195
196#endif // YARP_IPOSITIONDIRECT_H
constexpr yarp::conf::vocab32_t VOCAB_POSITIONDIRECTCONTROL_INTERFACE
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECTS
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECT
constexpr yarp::conf::vocab32_t VOCAB_POSITION_DIRECT_GROUP
Interface for a generic control board device implementing position control in encoder coordinates.
virtual yarp::dev::ReturnValue setPositionsRaw(const double *refs)=0
Set new position for a set of axes.
virtual yarp::dev::ReturnValue setPositionRaw(int j, double ref)=0
Set new position for a single axis.
virtual yarp::dev::ReturnValue getAxes(size_t &axes)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue getRefPositionsRaw(const int n_joint, const int *joints, double *refs)=0
Get the last position reference for the specified group of axes.
virtual yarp::dev::ReturnValue getRefPositionsRaw(double *refs)=0
Get the last position reference for all axes.
virtual yarp::dev::ReturnValue setPositionsRaw(const int n_joint, const int *joints, const double *refs)=0
Set new reference point for all axes.
virtual yarp::dev::ReturnValue getRefPositionRaw(const int joint, double *ref)=0
Get the last position reference for the specified axis.
virtual ~IPositionDirectRaw()
Destructor.
Interface for a generic control board device implementing position control.
virtual yarp::dev::ReturnValue getRefPosition(const int joint, double *ref)=0
Get the last position reference for the specified axis.
virtual yarp::dev::ReturnValue getRefPositions(const int n_joint, const int *joints, double *refs)=0
Get the last position reference for the specified group of axes.
virtual yarp::dev::ReturnValue setPositions(const int n_joint, const int *joints, const double *refs)=0
Set new reference point for all axes.
virtual yarp::dev::ReturnValue getAxes(size_t &ax)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue setPosition(int j, double ref)=0
Set new position for a single axis.
virtual yarp::dev::ReturnValue getRefPositions(double *refs)=0
Get the last position reference for all axes.
virtual ~IPositionDirect()
Destructor.
virtual yarp::dev::ReturnValue setPositions(const double *refs)=0
Set new position for a set of axis.
std::int32_t vocab32_t
Definition numeric.h:78
For streams capable of holding different kinds of content, check what they actually have.
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition Vocab32.h:27
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18