YARP
Yet Another Robot Platform
ImplementImpedanceControl.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_IMPLEMENTIMPEDANCECONTROL_H
10 #define YARP_DEV_IMPLEMENTIMPEDANCECONTROL_H
11 
13 #include <yarp/dev/api.h>
14 
15 namespace yarp {
16  namespace dev {
17  class ImplementImpedanceControl;
18  }
19 }
20 
22 {
23 protected:
25  void *helper;
26 
33  bool initialize (int size, const int *amap, const double *enc, const double *zos, const double *nw);
34 
39  bool uninitialize ();
40 
41 public:
42  /* Constructor.
43  * @param y is the pointer to the class instance inheriting from this
44  * implementation.
45  */
47 
52 
53  bool getAxes(int *ax) override;
54  bool getImpedance(int j, double *stiffness, double *damping) override;
55  bool setImpedance(int j, double stiffness, double damping) override;
56  bool setImpedanceOffset(int j, double offset) override;
57  bool getImpedanceOffset(int j, double* offset) override;
58  bool getCurrentImpedanceLimit(int j, double *min_stiff, double *max_stiff, double *min_damp, double *max_damp) override;
59 
60 };
61 
62 #endif // YARP_DEV_IMPLEMENTIMPEDANCECONTROL_H
yarp::dev::IImpedanceControl
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:75
yarp::dev::ImplementImpedanceControl::iImpedanceRaw
yarp::dev::IImpedanceControlRaw * iImpedanceRaw
Definition: ImplementImpedanceControl.h:24
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
Interface for control boards implementing impedance control.
Definition: IImpedanceControl.h:28
yarp::dev::ImplementImpedanceControl::~ImplementImpedanceControl
virtual ~ImplementImpedanceControl()
Destructor.
Definition: ImplementImpedanceControl.cpp:38
yarp::dev::ImplementImpedanceControl
Definition: ImplementImpedanceControl.h:22
yarp::dev::IImpedanceControl::getAxes
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
yarp::dev::ImplementImpedanceControl::uninitialize
bool uninitialize()
Clean up internal data and memory.
Definition: ImplementImpedanceControl.cpp:43
yarp::dev::IImpedanceControl::setImpedanceOffset
virtual bool setImpedanceOffset(int j, double offset)=0
Set current force Offset for a specific joint.
IImpedanceControl.h
yarp::dev::ImplementImpedanceControl::initialize
bool initialize(int size, const int *amap, const double *enc, const double *zos, const double *nw)
Initialize the internal data and alloc memory.
Definition: ImplementImpedanceControl.cpp:27
YARP_dev_API
#define YARP_dev_API
Definition: api.h:19
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::dev::ImplementImpedanceControl::ImplementImpedanceControl
ImplementImpedanceControl(yarp::dev::IImpedanceControlRaw *y)
Definition: ImplementImpedanceControl.cpp:21
api.h
yarp::dev::ImplementImpedanceControl::helper
void * helper
Definition: ImplementImpedanceControl.h:25