YARP
Yet Another Robot Platform
ImplementTorqueControl.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_IMPLEMENTTORQUECONTROL_H
7 #define YARP_DEV_IMPLEMENTTORQUECONTROL_H
8 
10 #include <yarp/dev/api.h>
11 
12 namespace yarp {
13  namespace dev {
14  class ImplementTorqueControl;
15  }
16 }
17 
18 namespace yarp {
19 namespace dev {
20 namespace impl {
21 
22 template <typename T>
23 class FixedSizeBuffersManager;
24 
25 } // namespace impl
26 } // namespace dev
27 } // namespace yarp
28 
30 {
31 protected:
33  void *helper;
44  bool initialize (int size, const int *amap, const double *enc, const double *zos, const double *nw, const double* amps, const double* dutys, const double* bemfs, const double* ktaus);
45 
50  bool uninitialize ();
51 
52 public:
53  /* Constructor.
54  * @param y is the pointer to the class instance inheriting from this
55  * implementation.
56  */
58 
62  virtual ~ImplementTorqueControl();
63 
64  bool getAxes(int *ax) override;
65  bool getRefTorque(int j, double *) override;
66  bool getRefTorques(double *t) override;
67  bool setRefTorques(const double *t) override;
68  bool setRefTorque(int j, double t) override;
69  bool setRefTorques(const int n_joint, const int *joints, const double *t) override;
70  bool getTorques(double *t) override;
71  bool getTorque(int j, double *t) override;
72  bool setMotorTorqueParams(int j, const yarp::dev::MotorTorqueParameters params) override;
73  bool getMotorTorqueParams(int j, yarp::dev::MotorTorqueParameters *params) override;
74  bool getTorqueRange(int j, double *min, double *max) override;
75  bool getTorqueRanges(double *min, double *max) override;
76 };
77 
78 #endif // YARP_DEV_IMPLEMENTTORQUECONTROL_H
float t
Interface for control boards implementing torque control.
Interface for control boards implementing torque control.
virtual bool setRefTorque(int j, double t)=0
Set the reference value of the torque for a given joint.
virtual bool setRefTorques(const double *t)=0
Set the reference value of the torque for all joints.
virtual bool getRefTorques(double *t)=0
Get the reference value of the torque for all joints.
virtual bool setMotorTorqueParams(int j, const yarp::dev::MotorTorqueParameters params)
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
virtual bool getMotorTorqueParams(int j, yarp::dev::MotorTorqueParameters *params)
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
virtual bool getTorques(double *t)=0
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
virtual bool getAxes(int *ax)=0
Get the number of controlled axes.
virtual bool getTorqueRange(int j, double *min, double *max)=0
Get the full scale of the torque sensor of a given joint.
virtual bool getTorqueRanges(double *min, double *max)=0
Get the full scale of the torque sensors of all joints.
virtual bool getRefTorque(int j, double *t)=0
Get the reference value of the torque for a given joint.
virtual bool getTorque(int j, double *t)=0
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
bool initialize(int size, const int *amap, const double *enc, const double *zos, const double *nw, const double *amps, const double *dutys, const double *bemfs, const double *ktaus)
Initialize the internal data and alloc memory.
yarp::dev::ITorqueControlRaw * iTorqueRaw
ImplementTorqueControl(yarp::dev::ITorqueControlRaw *y)
bool uninitialize()
Clean up internal data and memory.
The main, catch-all namespace for YARP.
Definition: dirs.h:16
#define YARP_dev_API
Definition: api.h:18