YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
IVelocityDirect.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025-2025 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IVELOCITYDIRECT_H
7#define YARP_DEV_IVELOCITYDIRECT_H
8
9#include <yarp/os/Vocab.h>
10#include <yarp/dev/api.h>
12#include <vector>
13
14namespace yarp::dev {
15class IVelocityDirect;
16class IVelocityDirectRaw;
17}
18
25{
26public:
31
37 virtual yarp::dev::ReturnValue getAxes(size_t& axes) = 0;
38
45 virtual yarp::dev::ReturnValue setDesiredVelocityRaw(int jnt, double vel)=0;
46
52 virtual yarp::dev::ReturnValue setDesiredVelocityRaw(const std::vector<double>& vels)=0;
53
60 virtual yarp::dev::ReturnValue setDesiredVelocityRaw(const std::vector<int>& jnts, const std::vector<double>& vels)=0;
61
67 virtual yarp::dev::ReturnValue getDesiredVelocityRaw(const int jnt, double& vel) = 0;
68
73 virtual yarp::dev::ReturnValue getDesiredVelocityRaw(std::vector<double>& vels) = 0;
74
80 virtual yarp::dev::ReturnValue getDesiredVelocityRaw(const std::vector<int>& jnts, std::vector<double>& vels)=0;
81};
82
89{
90public:
94 virtual ~IVelocityDirect() {}
95
101 virtual yarp::dev::ReturnValue getAxes(size_t& axes) = 0;
102
109 virtual yarp::dev::ReturnValue setDesiredVelocity(int jnt, double vel)=0;
110
116 virtual yarp::dev::ReturnValue setDesiredVelocity(const std::vector<double>& vels)=0;
117
124 virtual yarp::dev::ReturnValue setDesiredVelocity(const std::vector<int>& jnts, const std::vector<double>& vels)=0;
125
131 virtual yarp::dev::ReturnValue getDesiredVelocity(const int jnt, double& vel) = 0;
132
137 virtual yarp::dev::ReturnValue getDesiredVelocity(std::vector<double>& vels) = 0;
138
144 virtual yarp::dev::ReturnValue getDesiredVelocity(const std::vector<int>& jnts, std::vector<double>& vels)=0;
145};
146
147
151
152#endif // YARP_DEV_IVELOCITYDIRECT_H
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_DIRECT_SET_ONE
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_DIRECT_SET_GROUP
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY_DIRECT_SET_ALL
Interface for control boards implementing direct velocity control.
virtual yarp::dev::ReturnValue getAxes(size_t &axes)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue getDesiredVelocityRaw(const int jnt, double &vel)=0
Get the last reference velocity set by setDesiredVelocity() for a single joint.
virtual yarp::dev::ReturnValue getDesiredVelocityRaw(std::vector< double > &vels)=0
Get the last reference velocity set by setDesiredVelocity() for all joints.
virtual yarp::dev::ReturnValue setDesiredVelocityRaw(const std::vector< int > &jnts, const std::vector< double > &vels)=0
Set the velocity of a subset of joints.
virtual yarp::dev::ReturnValue setDesiredVelocityRaw(int jnt, double vel)=0
Set the velocity of single joint.
virtual yarp::dev::ReturnValue getDesiredVelocityRaw(const std::vector< int > &jnts, std::vector< double > &vels)=0
Get the last reference velocity set by setDesiredVelocity() for a group of joints.
virtual ~IVelocityDirectRaw()
Destructor.
virtual yarp::dev::ReturnValue setDesiredVelocityRaw(const std::vector< double > &vels)=0
Set the velocity of all joints.
Interface for control boards implementing direct velocity control.
virtual yarp::dev::ReturnValue setDesiredVelocity(const std::vector< int > &jnts, const std::vector< double > &vels)=0
Set the velocity of a subset of joints.
virtual yarp::dev::ReturnValue getDesiredVelocity(const int jnt, double &vel)=0
Get the last reference velocity set by setDesiredVelocity() for a single joint.
virtual ~IVelocityDirect()
Destructor.
virtual yarp::dev::ReturnValue getAxes(size_t &axes)=0
Get the number of controlled axes.
virtual yarp::dev::ReturnValue getDesiredVelocity(std::vector< double > &vels)=0
Get the last reference velocity set by setDesiredVelocity() for all joints.
virtual yarp::dev::ReturnValue getDesiredVelocity(const std::vector< int > &jnts, std::vector< double > &vels)=0
Get the last reference velocity set by setDesiredVelocity() for a group of joints.
virtual yarp::dev::ReturnValue setDesiredVelocity(int jnt, double vel)=0
Set the velocity of single joint.
virtual yarp::dev::ReturnValue setDesiredVelocity(const std::vector< double > &vels)=0
Set the velocity of 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.
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