YARP
Yet Another Robot Platform
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 
13 namespace yarp {
14  namespace dev {
15  class IVelocityControl;
16  class IVelocityControlRaw;
17  }
18 }
19 
26 {
27 public:
31  virtual ~IVelocityControlRaw() {}
32 
39  virtual bool getAxes(int *axis) = 0;
40 
47  virtual bool velocityMoveRaw(int j, double sp)=0;
48 
54  virtual bool velocityMoveRaw(const double *sp)=0;
55 
62  virtual bool setRefAccelerationRaw(int j, double acc)=0;
63 
69  virtual bool setRefAccelerationsRaw(const double *accs)=0;
70 
77  virtual bool getRefAccelerationRaw(int j, double *acc)=0;
78 
84  virtual bool getRefAccelerationsRaw(double *accs)=0;
85 
90  virtual bool stopRaw(int j)=0;
91 
95  virtual bool stopRaw()=0;
96 
104  virtual bool velocityMoveRaw(const int n_joint, const int *joints, const double *spds)=0;
105 
111  virtual bool getRefVelocityRaw(const int joint, double *vel) {return false;}
112 
117  virtual bool getRefVelocitiesRaw(double *vels) {return false;}
118 
126  virtual bool getRefVelocitiesRaw(const int n_joint, const int *joints, double *vels) { return false;}
127 
134  virtual bool setRefAccelerationsRaw(const int n_joint, const int *joints, const double *accs)=0;
135 
142  virtual bool getRefAccelerationsRaw(const int n_joint, const int *joints, double *accs)=0;
143 
148  virtual bool stopRaw(const int n_joint, const int *joints)=0;
149 };
150 
157 {
158 public:
162  virtual ~IVelocityControl() {}
163 
170  virtual bool getAxes(int *axes) = 0;
171 
178  virtual bool velocityMove(int j, double sp)=0;
179 
185  virtual bool velocityMove(const double *sp)=0;
186 
193  virtual bool setRefAcceleration(int j, double acc)=0;
194 
200  virtual bool setRefAccelerations(const double *accs)=0;
201 
208  virtual bool getRefAcceleration(int j, double *acc)=0;
209 
215  virtual bool getRefAccelerations(double *accs)=0;
216 
221  virtual bool stop(int j)=0;
222 
226  virtual bool stop()=0;
227 
239  virtual bool velocityMove(const int n_joint, const int *joints, const double *spds)=0;
240 
246  virtual bool getRefVelocity(const int joint, double *vel) {return false;}
247 
252  virtual bool getRefVelocities(double *vels) {return false;}
253 
261  virtual bool getRefVelocities(const int n_joint, const int *joints, double *vels) { return false;}
262 
275  virtual bool setRefAccelerations(const int n_joint, const int *joints, const double *accs)=0;
276 
289  virtual bool getRefAccelerations(const int n_joint, const int *joints, double *accs)=0;
290 
296  virtual bool stop(const int n_joint, const int *joints)=0;
297 };
298 
302 
303 #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
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:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18