YARP
Yet Another Robot Platform
IImpedanceControl.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_DEV_IIMPEDANCECONTROL_H
10 #define YARP_DEV_IIMPEDANCECONTROL_H
11 
12 #include <yarp/dev/api.h>
13 #include <yarp/os/Vocab.h>
14 
15 namespace yarp{
16  namespace dev {
17  class IImpedanceControlRaw;
18  class IImpedanceControl;
19  }
20 }
21 
28 {
29 public:
33  virtual ~IImpedanceControlRaw() {}
34 
40  virtual bool getAxes(int *ax) = 0;
41 
45  virtual bool getImpedanceRaw(int j, double *stiffness, double *damping)=0;
46 
50  virtual bool setImpedanceRaw(int j, double stiffness, double damping)=0;
51 
55  virtual bool setImpedanceOffsetRaw(int j, double offset)=0;
56 
60  virtual bool getImpedanceOffsetRaw(int j, double* offset)=0;
61 
65  virtual bool getCurrentImpedanceLimitRaw(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0;
66 };
67 
68 
75 {
76 public:
80  virtual ~IImpedanceControl() {}
81 
87  virtual bool getAxes(int *ax) = 0;
88 
92  virtual bool getImpedance(int j, double *stiffness, double *damping)=0;
93 
97  virtual bool setImpedance(int j, double stiffness, double damping)=0;
98 
102  virtual bool setImpedanceOffset(int j, double offset)=0;
103 
107  virtual bool getImpedanceOffset(int j, double* offset)=0;
108 
112  virtual bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp)=0;
113 
114 };
115 
116 //interface
118 
121 
122 #endif // YARP_DEV_IIMPEDANCECONTROL_H
yarp::dev::IImpedanceControlRaw::getCurrentImpedanceLimitRaw
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.
yarp::os::createVocab
constexpr yarp::conf::vocab32_t createVocab(char a, char b=0, char c=0, char d=0)
Definition: Vocab.h:22
yarp::dev::IImpedanceControl
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:75
yarp::dev::IImpedanceControlRaw::getImpedanceOffsetRaw
virtual bool getImpedanceOffsetRaw(int j, double *offset)=0
Get current force Offset for a specific joint.
yarp::dev::IImpedanceControl::getCurrentImpedanceLimit
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.
yarp::dev::IImpedanceControl::setImpedance
virtual bool setImpedance(int j, double stiffness, double damping)=0
Set current impedance gains (stiffness,damping) for a specific joint.
yarp::dev::IImpedanceControlRaw::getAxes
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
yarp::dev::IImpedanceControlRaw::setImpedanceRaw
virtual bool setImpedanceRaw(int j, double stiffness, double damping)=0
Set current impedance parameters (stiffness,damping) for a specific joint.
yarp::dev::IImpedanceControlRaw
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:28
yarp::dev::IImpedanceControl::~IImpedanceControl
virtual ~IImpedanceControl()
Destructor.
Definition: IImpedanceControl.h:80
yarp::dev::IImpedanceControl::getAxes
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
yarp::dev::IImpedanceControlRaw::setImpedanceOffsetRaw
virtual bool setImpedanceOffsetRaw(int j, double offset)=0
Set current force Offset for a specific joint.
yarp::dev::IImpedanceControl::setImpedanceOffset
virtual bool setImpedanceOffset(int j, double offset)=0
Set current force Offset for a specific joint.
VOCAB_IMPEDANCE
constexpr yarp::conf::vocab32_t VOCAB_IMPEDANCE
Definition: IImpedanceControl.h:117
VOCAB_POSITION
constexpr yarp::conf::vocab32_t VOCAB_POSITION
Definition: IImpedanceControl.h:119
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
yarp::dev::IImpedanceControlRaw::~IImpedanceControlRaw
virtual ~IImpedanceControlRaw()
Destructor.
Definition: IImpedanceControl.h:33
yarp::dev::IImpedanceControl::getImpedanceOffset
virtual bool getImpedanceOffset(int j, double *offset)=0
Get current force Offset for a specific joint.
yarp::dev::IImpedanceControl::getImpedance
virtual bool getImpedance(int j, double *stiffness, double *damping)=0
Get current impedance gains (stiffness,damping,offset) for a specific joint.
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::conf::vocab32_t
std::int32_t vocab32_t
Definition: numeric.h:52
Vocab.h
VOCAB_VELOCITY
constexpr yarp::conf::vocab32_t VOCAB_VELOCITY
Definition: IImpedanceControl.h:120
yarp::dev::IImpedanceControlRaw::getImpedanceRaw
virtual bool getImpedanceRaw(int j, double *stiffness, double *damping)=0
Get current impedance parameters (stiffness,damping,offset) for a specific joint.
api.h