YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IVelocityControl.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef YARP_DEV_IVELOCITYCONTROL_H
8#define YARP_DEV_IVELOCITYCONTROL_H
9
10#include <yarp/os/Vocab.h>
11#include <yarp/dev/api.h>
12
13namespace yarp::dev {
14class IVelocityControl;
15class IVelocityControlRaw;
16}
17
24{
25public:
30
37 virtual bool getAxes(int *axis) = 0;
38
45 virtual bool velocityMoveRaw(int j, double sp)=0;
46
52 virtual bool velocityMoveRaw(const double *sp)=0;
53
60 virtual bool setRefAccelerationRaw(int j, double acc)=0;
61
67 virtual bool setRefAccelerationsRaw(const double *accs)=0;
68
75 virtual bool getRefAccelerationRaw(int j, double *acc)=0;
76
82 virtual bool getRefAccelerationsRaw(double *accs)=0;
83
88 virtual bool stopRaw(int j)=0;
89
93 virtual bool stopRaw()=0;
94
102 virtual bool velocityMoveRaw(const int n_joint, const int *joints, const double *spds)=0;
103
109 virtual bool getRefVelocityRaw(const int joint, double *vel) {return false;}
110
115 virtual bool getRefVelocitiesRaw(double *vels) {return false;}
116
124 virtual bool getRefVelocitiesRaw(const int n_joint, const int *joints, double *vels) { return false;}
125
132 virtual bool setRefAccelerationsRaw(const int n_joint, const int *joints, const double *accs)=0;
133
140 virtual bool getRefAccelerationsRaw(const int n_joint, const int *joints, double *accs)=0;
141
146 virtual bool stopRaw(const int n_joint, const int *joints)=0;
147};
148
155{
156public:
160 virtual ~IVelocityControl() {}
161
168 virtual bool getAxes(int *axes) = 0;
169
176 virtual bool velocityMove(int j, double sp)=0;
177
183 virtual bool velocityMove(const double *sp)=0;
184
191 virtual bool setRefAcceleration(int j, double acc)=0;
192
198 virtual bool setRefAccelerations(const double *accs)=0;
199
206 virtual bool getRefAcceleration(int j, double *acc)=0;
207
213 virtual bool getRefAccelerations(double *accs)=0;
214
219 virtual bool stop(int j)=0;
220
224 virtual bool stop()=0;
225
237 virtual bool velocityMove(const int n_joint, const int *joints, const double *spds)=0;
238
244 virtual bool getRefVelocity(const int joint, double *vel) {return false;}
245
250 virtual bool getRefVelocities(double *vels) {return false;}
251
259 virtual bool getRefVelocities(const int n_joint, const int *joints, double *vels) { return false;}
260
273 virtual bool setRefAccelerations(const int n_joint, const int *joints, const double *accs)=0;
274
287 virtual bool getRefAccelerations(const int n_joint, const int *joints, double *accs)=0;
288
294 virtual bool stop(const int n_joint, const int *joints)=0;
295};
296
300
301#endif // YARP_DEV_IVELOCITYCONTROL_H
constexpr yarp::conf::vocab32_t VOCAB_VEL_PIDS
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVE_GROUP
constexpr yarp::conf::vocab32_t VOCAB_VEL_PID
Interface for control boards implementig velocity control in encoder coordinates.
virtual bool getAxes(int *axis)=0
Get the number of controlled axes.
virtual bool setRefAccelerationRaw(int j, double acc)=0
Set reference acceleration for a joint.
virtual ~IVelocityControlRaw()
Destructor.
virtual bool stopRaw(int j)=0
Stop motion, single joint.
virtual bool velocityMoveRaw(int j, double sp)=0
Start motion at a given speed, single joint.
virtual bool setRefAccelerationsRaw(const double *accs)=0
Set reference acceleration on all joints.
virtual bool stopRaw()=0
Stop motion, multiple joints.
virtual bool getRefVelocitiesRaw(const int n_joint, const int *joints, double *vels)
Get the last reference speed set by velocityMove for a group of joints.
virtual bool getRefVelocityRaw(const int joint, double *vel)
Get the last reference speed set by velocityMove for single joint.
virtual bool setRefAccelerationsRaw(const int n_joint, const int *joints, const double *accs)=0
Set reference acceleration for a subset of joints.
virtual bool getRefAccelerationsRaw(const int n_joint, const int *joints, double *accs)=0
Get reference acceleration for a subset of joints.
virtual bool stopRaw(const int n_joint, const int *joints)=0
Stop motion for a subset of joints.
virtual bool getRefVelocitiesRaw(double *vels)
Get the last reference speed set by velocityMove for all joints.
virtual bool velocityMoveRaw(const double *sp)=0
Start motion at a given speed, multiple joints.
virtual bool getRefAccelerationRaw(int j, double *acc)=0
Get reference acceleration for a joint.
virtual bool velocityMoveRaw(const int n_joint, const int *joints, const double *spds)=0
Start motion at a given speed for a subset of joints.
virtual bool getRefAccelerationsRaw(double *accs)=0
Get reference acceleration of all joints.
Interface for control boards implementing velocity control.
virtual bool stop(const int n_joint, const int *joints)=0
Stop motion for a subset of joints.
virtual bool setRefAcceleration(int j, double acc)=0
Set reference acceleration for a joint.
virtual bool getRefVelocity(const int joint, double *vel)
Get the last reference speed set by velocityMove for single joint.
virtual bool velocityMove(const double *sp)=0
Start motion at a given speed, multiple joints.
virtual bool getRefAccelerations(const int n_joint, const int *joints, double *accs)=0
Get reference acceleration for a subset of joints.
virtual bool stop()=0
Stop motion, multiple joints.
virtual ~IVelocityControl()
Destructor.
virtual bool setRefAccelerations(const double *accs)=0
Set reference acceleration on all joints.
virtual bool getRefVelocities(const int n_joint, const int *joints, double *vels)
Get the last reference speed set by velocityMove for a group of joints.
virtual bool velocityMove(const int n_joint, const int *joints, const double *spds)=0
Start motion at a given speed for a subset of joints.
virtual bool setRefAccelerations(const int n_joint, const int *joints, const double *accs)=0
Set reference acceleration for a subset of joints.
virtual bool getAxes(int *axes)=0
Get the number of controlled axes.
virtual bool stop(int j)=0
Stop motion, single joint.
virtual bool getRefAcceleration(int j, double *acc)=0
Get reference acceleration for a joint.
virtual bool getRefAccelerations(double *accs)=0
Get reference acceleration of all joints.
virtual bool velocityMove(int j, double sp)=0
Start motion at a given speed, single joint.
virtual bool getRefVelocities(double *vels)
Get the last reference speed set by velocityMove for all joints.
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