YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
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
12namespace yarp::dev {
13class ImplementTorqueControl;
14}
15
16namespace yarp::dev::impl {
17
18template <typename T>
19class FixedSizeBuffersManager;
20
21} // namespace yarp::dev::impl
22
24{
25protected:
27 void *helper;
38 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);
39
44 bool uninitialize ();
45
46public:
47 /* Constructor.
48 * @param y is the pointer to the class instance inheriting from this
49 * implementation.
50 */
52
57
58 bool getAxes(int *ax) override;
59 bool getRefTorque(int j, double *) override;
60 bool getRefTorques(double *t) override;
61 bool setRefTorques(const double *t) override;
62 bool setRefTorque(int j, double t) override;
63 bool setRefTorques(const int n_joint, const int *joints, const double *t) override;
64 bool getTorques(double *t) override;
65 bool getTorque(int j, double *t) override;
66 bool setMotorTorqueParams(int j, const yarp::dev::MotorTorqueParameters params) override;
67 bool getMotorTorqueParams(int j, yarp::dev::MotorTorqueParameters *params) override;
68 bool getTorqueRange(int j, double *min, double *max) override;
69 bool getTorqueRanges(double *min, double *max) override;
70};
71
72#endif // YARP_DEV_IMPLEMENTTORQUECONTROL_H
float t
Interface for control boards implementing torque control.
Interface for control boards implementing torque control.
bool getRefTorques(double *t) override
Get the reference value of the torque for all joints.
bool setMotorTorqueParams(int j, const yarp::dev::MotorTorqueParameters params) override
Set a subset of motor parameters (bemf, ktau etc) useful for torque control.
yarp::dev::impl::FixedSizeBuffersManager< double > * doubleBuffManager
bool getTorque(int j, double *t) override
Get the value of the torque on a given joint (this is the feedback if you have a torque sensor).
yarp::dev::impl::FixedSizeBuffersManager< int > * intBuffManager
bool getTorqueRanges(double *min, double *max) override
Get the full scale of the torque sensors of all joints.
bool setRefTorques(const double *t) override
Set the reference value of the torque for all joints.
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
bool uninitialize()
Clean up internal data and memory.
bool getTorqueRange(int j, double *min, double *max) override
Get the full scale of the torque sensor of a given joint.
bool getTorques(double *t) override
Get the value of the torque for all joints (this is the feedback if you have torque sensors).
bool getRefTorque(int j, double *) override
Get the reference value of the torque for a given joint.
bool getAxes(int *ax) override
Get the number of controlled axes.
bool setRefTorque(int j, double t) override
Set the reference value of the torque for a given joint.
bool getMotorTorqueParams(int j, yarp::dev::MotorTorqueParameters *params) override
Get a subset of motor parameters (bemf, ktau etc) useful for torque control.
A manager of fixed size buffers in multi-thread environment.
For streams capable of holding different kinds of content, check what they actually have.
Definition jointData.cpp:13
The main, catch-all namespace for YARP.
Definition dirs.h:16
#define YARP_dev_API
Definition api.h:18