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>
13
14namespace yarp::dev {
15class IVelocityControl;
16class IVelocityControlRaw;
17}
18
25{
26public:
31
38 virtual yarp::dev::ReturnValue getAxes(size_t& axis) = 0;
39
46 virtual yarp::dev::ReturnValue velocityMoveRaw(int j, double sp)=0;
47
53 virtual yarp::dev::ReturnValue velocityMoveRaw(const double *sp)=0;
54
61 virtual yarp::dev::ReturnValue setTrajAccelerationRaw(int j, double acc)=0;
62
68 virtual yarp::dev::ReturnValue setTrajAccelerationsRaw(const double *accs)=0;
69
76 virtual yarp::dev::ReturnValue getTrajAccelerationRaw(int j, double *acc)=0;
77
84
90
95
103 virtual yarp::dev::ReturnValue velocityMoveRaw(const int n_joint, const int *joints, const double *spds)=0;
104
110 virtual yarp::dev::ReturnValue getTargetVelocityRaw(const int joint, double *vel)=0;
111
117
125 virtual yarp::dev::ReturnValue getTargetVelocitiesRaw(const int n_joint, const int *joints, double *vels)=0;
126
133 virtual yarp::dev::ReturnValue setTrajAccelerationsRaw(const int n_joint, const int *joints, const double *accs)=0;
134
141 virtual yarp::dev::ReturnValue getTrajAccelerationsRaw(const int n_joint, const int *joints, double *accs)=0;
142
147 virtual yarp::dev::ReturnValue stopRaw(const int n_joint, const int *joints)=0;
148};
149
156{
157public:
161 virtual ~IVelocityControl() {}
162
169 virtual yarp::dev::ReturnValue getAxes(size_t& axes) = 0;
170
177 virtual yarp::dev::ReturnValue velocityMove(int j, double sp)=0;
178
184 virtual yarp::dev::ReturnValue velocityMove(const double *sp)=0;
185
192 virtual yarp::dev::ReturnValue setTrajAcceleration(int j, double acc)=0;
193
199 virtual yarp::dev::ReturnValue setTrajAccelerations(const double *accs)=0;
200
207 virtual yarp::dev::ReturnValue getTrajAcceleration(int j, double *acc)=0;
208
215
220 virtual yarp::dev::ReturnValue stop(int j)=0;
221
226
238 virtual yarp::dev::ReturnValue velocityMove(const int n_joint, const int *joints, const double *spds)=0;
239
245 virtual yarp::dev::ReturnValue getTargetVelocity(const int joint, double *vel)=0;
246
252
260 virtual yarp::dev::ReturnValue getTargetVelocities(const int n_joint, const int *joints, double *vels)=0;
261
274 virtual yarp::dev::ReturnValue setTrajAccelerations(const int n_joint, const int *joints, const double *accs)=0;
275
288 virtual yarp::dev::ReturnValue getTrajAccelerations(const int n_joint, const int *joints, double *accs)=0;
289
295 virtual yarp::dev::ReturnValue stop(const int n_joint, const int *joints)=0;
296};
297
298// Interface name
300
306
307#endif // YARP_DEV_IVELOCITYCONTROL_H
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVE
constexpr yarp::conf::vocab32_t VOCAB_VEL_PIDS
constexpr yarp::conf::vocab32_t VOCAB_VELOCITYCONTROL_INTERFACE
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVE_GROUP
constexpr yarp::conf::vocab32_t VOCAB_VEL_PID
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_MOVES
Interface for control boards implementing velocity control in encoder coordinates.
virtual yarp::dev::ReturnValue setTrajAccelerationsRaw(const double *accs)=0
Set reference acceleration on all joints.
virtual yarp::dev::ReturnValue getTargetVelocitiesRaw(const int n_joint, const int *joints, double *vels)=0
Get the last reference speed set by velocityMove for a group of joints.
virtual yarp::dev::ReturnValue getAxes(size_t &axis)=0
Get the number of controlled axes.
virtual ~IVelocityControlRaw()
Destructor.
virtual yarp::dev::ReturnValue velocityMoveRaw(const int n_joint, const int *joints, const double *spds)=0
Start motion at a given speed for a subset of joints.
virtual yarp::dev::ReturnValue stopRaw(int j)=0
Stop motion, single joint.
virtual yarp::dev::ReturnValue setTrajAccelerationRaw(int j, double acc)=0
Set reference acceleration for a joint.
virtual yarp::dev::ReturnValue stopRaw(const int n_joint, const int *joints)=0
Stop motion for a subset of joints.
virtual yarp::dev::ReturnValue getTargetVelocityRaw(const int joint, double *vel)=0
Get the last reference speed set by velocityMove for single joint.
virtual yarp::dev::ReturnValue getTargetVelocitiesRaw(double *vels)=0
Get the last reference speed set by velocityMove for all joints.
virtual yarp::dev::ReturnValue setTrajAccelerationsRaw(const int n_joint, const int *joints, const double *accs)=0
Set reference acceleration for a subset of joints.
virtual yarp::dev::ReturnValue velocityMoveRaw(const double *sp)=0
Start motion at a given speed, multiple joints.
virtual yarp::dev::ReturnValue getTrajAccelerationsRaw(double *accs)=0
Get reference acceleration of all joints.
virtual yarp::dev::ReturnValue getTrajAccelerationRaw(int j, double *acc)=0
Get reference acceleration for a joint.
virtual yarp::dev::ReturnValue velocityMoveRaw(int j, double sp)=0
Start motion at a given speed, single joint.
virtual yarp::dev::ReturnValue getTrajAccelerationsRaw(const int n_joint, const int *joints, double *accs)=0
Get reference acceleration for a subset of joints.
virtual yarp::dev::ReturnValue stopRaw()=0
Stop motion, multiple joints.
Interface for control boards implementing velocity control.
virtual yarp::dev::ReturnValue setTrajAccelerations(const int n_joint, const int *joints, const double *accs)=0
Set reference acceleration for a subset of joints.
virtual yarp::dev::ReturnValue velocityMove(const double *sp)=0
Start motion at a given speed, multiple joints.
virtual yarp::dev::ReturnValue stop(int j)=0
Stop motion, single joint.
virtual yarp::dev::ReturnValue getTargetVelocities(double *vels)=0
Get the last reference speed set by velocityMove for all joints.
virtual yarp::dev::ReturnValue getTargetVelocity(const int joint, double *vel)=0
Get the last reference speed set by velocityMove for single joint.
virtual yarp::dev::ReturnValue getTrajAccelerations(double *accs)=0
Get reference acceleration of all joints.
virtual yarp::dev::ReturnValue setTrajAcceleration(int j, double acc)=0
Set reference acceleration for a joint.
virtual ~IVelocityControl()
Destructor.
virtual yarp::dev::ReturnValue stop()=0
Stop motion, multiple joints.
virtual yarp::dev::ReturnValue velocityMove(int j, double sp)=0
Start motion at a given speed, single joint.
virtual yarp::dev::ReturnValue getAxes(size_t &axes)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue velocityMove(const int n_joint, const int *joints, const double *spds)=0
Start motion at a given speed for a subset of joints.
virtual yarp::dev::ReturnValue setTrajAccelerations(const double *accs)=0
Set reference acceleration on all joints.
virtual yarp::dev::ReturnValue stop(const int n_joint, const int *joints)=0
Stop motion for a subset of joints.
virtual yarp::dev::ReturnValue getTrajAccelerations(const int n_joint, const int *joints, double *accs)=0
Get reference acceleration for a subset of joints.
virtual yarp::dev::ReturnValue getTrajAcceleration(int j, double *acc)=0
Get reference acceleration for a joint.
virtual yarp::dev::ReturnValue getTargetVelocities(const int n_joint, const int *joints, double *vels)=0
Get the last reference speed set by velocityMove for a group of joints.
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