YARP
Yet Another Robot Platform
IImpedanceControl.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_IIMPEDANCECONTROL_H
7 #define YARP_DEV_IIMPEDANCECONTROL_H
8 
9 #include <yarp/dev/api.h>
10 #include <yarp/os/Vocab.h>
11 
12 namespace yarp{
13  namespace dev {
14  class IImpedanceControlRaw;
15  class IImpedanceControl;
16  }
17 }
18 
25 {
26 public:
30  virtual ~IImpedanceControlRaw() {}
31 
37  virtual bool getAxes(int *ax) = 0;
38 
42  virtual bool getImpedanceRaw(int j, double *stiffness, double *damping)=0;
43 
47  virtual bool setImpedanceRaw(int j, double stiffness, double damping)=0;
48 
52  virtual bool setImpedanceOffsetRaw(int j, double offset)=0;
53 
57  virtual bool getImpedanceOffsetRaw(int j, double* offset)=0;
58 
62  virtual bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0;
63 };
64 
65 
72 {
73 public:
77  virtual ~IImpedanceControl() {}
78 
84  virtual bool getAxes(int *ax) = 0;
85 
89  virtual bool getImpedance(int j, double *stiffness, double *damping)=0;
90 
94  virtual bool setImpedance(int j, double stiffness, double damping)=0;
95 
99  virtual bool setImpedanceOffset(int j, double offset)=0;
100 
104  virtual bool getImpedanceOffset(int j, double* offset)=0;
105 
109  virtual bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0;
110 
111 };
112 
113 //interface
115 
118 
119 #endif // YARP_DEV_IIMPEDANCECONTROL_H
constexpr yarp::conf::vocab32_t VOCAB_IMPEDANCE
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY
constexpr yarp::conf::vocab32_t VOCAB_POSITION
Interface for control boards implementing impedance control.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool getImpedanceOffsetRaw(int j, double *offset)=0
Get current force Offset for a specific joint.
virtual bool setImpedanceOffsetRaw(int j, double offset)=0
Set current force Offset for a specific joint.
virtual bool getImpedanceRaw(int j, double *stiffness, double *damping)=0
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
virtual ~IImpedanceControlRaw()
Destructor.
virtual bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0
Get the current impedandance limits for a specific joint.
virtual bool setImpedanceRaw(int j, double stiffness, double damping)=0
Set current impedance parameters (stiffness,damping) for a specific joint.
Interface for control boards implementing impedance control.
virtual bool setImpedance(int j, double stiffness, double damping)=0
Set current impedance gains (stiffness,damping) for a specific joint.
virtual bool getImpedanceOffset(int j, double *offset)=0
Get current force Offset for a specific joint.
virtual bool setImpedanceOffset(int j, double offset)=0
Set current force Offset for a specific joint.
virtual bool getImpedance(int j, double *stiffness, double *damping)=0
Get current impedance gains (stiffness,damping,offset) for a specific joint.
virtual bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0
Get the current impedandance limits for a specific joint.
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual ~IImpedanceControl()
Destructor.
std::int32_t vocab32_t
Definition: numeric.h:78
constexpr yarp::conf::vocab32_t createVocab32(char a, char b=0, char c=0, char d=0)
Create a vocab from chars.
Definition: Vocab.h:28
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18