YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementVelocityDirect.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_IVELOCITYDIRECTIMPL_H
7#define YARP_DEV_IVELOCITYDIRECTIMPL_H
8
9
11#include <yarp/os/Log.h>
12
13namespace yarp::dev {
14class ImplementVelocityDirect;
15}
16
18{
19protected:
20 IVelocityDirectRaw *m_iVelocityDirectRaw=nullptr;
21 void *m_helper=nullptr;
22 std::vector<int> m_buffer_ints;
23 std::vector<double> m_buffer_doubles;
24
34 bool initialize (int size, const int *amap, const double *enc, const double *zos);
35
40 bool uninitialize();
41
42public:
49
54
55 yarp::dev::ReturnValue getAxes(size_t& axes) override;
56 yarp::dev::ReturnValue setDesiredVelocity(int jnt, double vel) override;
57 yarp::dev::ReturnValue setDesiredVelocity(const std::vector<double>& vels) override;
58 yarp::dev::ReturnValue setDesiredVelocity(const std::vector<int>& jnts, const std::vector<double>& vels) override;
59 yarp::dev::ReturnValue getDesiredVelocity(const int jnt, double& vel) override;
60 yarp::dev::ReturnValue getDesiredVelocity(std::vector<double>& vels) override;
61 yarp::dev::ReturnValue getDesiredVelocity(const std::vector<int>& jnts, std::vector<double>& vels) override;
62};
63
64#endif // YARP_DEV_IVELOCITYDIRECTIMPL_H
Interface for control boards implementing direct velocity control.
Interface for control boards implementing direct velocity control.
yarp::dev::ReturnValue getDesiredVelocity(const int jnt, double &vel) override
Get the last reference velocity set by setDesiredVelocity() for a single joint.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::ReturnValue setDesiredVelocity(int jnt, double vel) override
Set the velocity of single joint.
bool initialize(int size, const int *amap, const double *enc, const double *zos)
Initialize the internal data and alloc memory.
yarp::dev::ReturnValue getAxes(size_t &axes) override
Get the number of controlled axes.
For streams capable of holding different kinds of content, check what they actually have.
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18