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 std::mutex m_imp_mutex;
25
35 bool initialize (int size, const int *amap, const double *enc, const double *zos);
36
41 bool uninitialize();
42
43public:
50
55
56 yarp::dev::ReturnValue getAxes(size_t& axes) override;
57 yarp::dev::ReturnValue setRefVelocity(int jnt, double vel) override;
58 yarp::dev::ReturnValue setRefVelocity(const std::vector<double>& vels) override;
59 yarp::dev::ReturnValue setRefVelocity(const std::vector<int>& jnts, const std::vector<double>& vels) override;
60 yarp::dev::ReturnValue getRefVelocity(const int jnt, double& vel) override;
61 yarp::dev::ReturnValue getRefVelocity(std::vector<double>& vels) override;
62 yarp::dev::ReturnValue getRefVelocity(const std::vector<int>& jnts, std::vector<double>& vels) override;
63};
64
65#endif // YARP_DEV_IVELOCITYDIRECTIMPL_H
Interface for control boards implementing direct velocity control.
Interface for control boards implementing direct velocity control.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::ReturnValue setRefVelocity(int jnt, double vel) override
Set the velocity of single joint.
yarp::dev::ReturnValue getRefVelocity(const int jnt, double &vel) override
Get the last reference velocity set by setRefVelocity() for a 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