YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
ImplementImpedanceControl.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_DEV_IMPLEMENTIMPEDANCECONTROL_H
7#define YARP_DEV_IMPLEMENTIMPEDANCECONTROL_H
8
10#include <yarp/dev/api.h>
11#include <vector>
12
13namespace yarp::dev {
14class ImplementImpedanceControl;
15}
16
18{
19protected:
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
32 bool initialize (int size, const int *amap, const double *enc, const double *zos, const double *nw);
33
38 bool uninitialize ();
39
40public:
41 /* Constructor.
42 * @param y is the pointer to the class instance inheriting from this
43 * implementation.
44 */
46
51
52 yarp::dev::ReturnValue getAxes(size_t& ax) override;
53 yarp::dev::ReturnValue getImpedance(int j, double *stiffness, double *damping) override;
54 yarp::dev::ReturnValue setImpedance(int j, double stiffness, double damping) override;
55 yarp::dev::ReturnValue setImpedanceOffset(int j, double offset) override;
56 yarp::dev::ReturnValue getImpedanceOffset(int j, double* offset) override;
57 yarp::dev::ReturnValue getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override;
58
59};
60
61#endif // YARP_DEV_IMPLEMENTIMPEDANCECONTROL_H
Interface for control boards implementing impedance control.
Interface for control boards implementing impedance control.
bool uninitialize()
Clean up internal data and memory.
yarp::dev::ReturnValue getImpedance(int j, double *stiffness, double *damping) override
Get current impedance gains (stiffness,damping,offset) for a specific joint.
yarp::dev::ReturnValue getImpedanceOffset(int j, double *offset) override
Get current force Offset for a specific joint.
bool initialize(int size, const int *amap, const double *enc, const double *zos, const double *nw)
Initialize the internal data and alloc memory.
yarp::dev::ReturnValue setImpedanceOffset(int j, double offset) override
Set current force Offset for a specific joint.
yarp::dev::ReturnValue getAxes(size_t &ax) override
Get the number of controlled axes.
yarp::dev::ReturnValue setImpedance(int j, double stiffness, double damping) override
Set current impedance gains (stiffness,damping) for a specific joint.
yarp::dev::ReturnValue getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override
Get the current impedance limits for a specific joint.
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