iCub-main
Loading...
Searching...
No Matches
eomcParser.h
Go to the documentation of this file.
1// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2
3
4/* Copyright (C) 2012 iCub Facility, Istituto Italiano di Tecnologia
5 * Author: Valentina Gaggero
6 * email: valentina.gaggero@iit.it
7 * Permission is granted to copy, distribute, and/or modify this program
8 * under the terms of the GNU General Public License, version 2 or any
9 * later version published by the Free Software Foundation.
10 *
11 * A copy of the license can be found at
12 * http://www.robotcub.org/icub/license/gpl.txt
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details
18 */
19
20#ifndef __mcParserh__
21#define __mcParserh__
22
23
24
25#include <string>
26#include <vector>
27#include <array>
28#include <map>
29#include <memory>
30
31// Yarp stuff
32#include <yarp/os/Bottle.h>
33//#include <yarp/os/Time.h>
34#include <yarp/os/Bottle.h>
35#include <yarp/dev/ControlBoardPid.h>
36#include <yarp/dev/ControlBoardHelper.h>
37
38#include <yarp/dev/PidEnums.h>
39#include <yarp/dev/ControlBoardInterfacesImpl.h>
40
41#include "EoMotionControl.h"
42#include <yarp/os/LogStream.h>
43
44
45// - public #define --------------------------------------------------------------------------------------------------
46
47
48namespace yarp {
49 namespace dev {
50 namespace eomc {
51
52
53//typedef enum
54//{
55// PidAlgo_simple = 0,
56// PIdAlgo_velocityInnerLoop = 1,
57// PidAlgo_currentInnerLoop =2
58//} PidAlgorithmType_t;
59
66
68{
69
70public:
71
72 virtual double convertTempCelsiusToRaw(const double temperature) = 0;
73
74 virtual double convertRawToTempCelsius(const double temperature) = 0;
75
77};
78
80{
81private:
82 // resistors of the voltage divider bridge
83 int _r_1;
84 int _r_2;
85 int _r_3;
86
87
88 double _ptc_offset; // offset of the temperature sensor line
89 double _ptc_gradient; // slope/gradient of the temperature sensor line
90 double _pga_gain; // ADC gain set for the tdb (temperature detection board)
91
92 int _vcc; // vcc that enters the voltage divider bridge
93 double _resolution_pga; // resolution of the internal pga of the tdb
94 double _resolution_tdb; // resolution used for the raw value for the output of the tdb
95
96 double _half_bridge_resistor_coeff;
97 double _first_res_coeff;
98 double _second_res_coeff;
99
100public:
101
103 {
104 _r_1 = 4700;
105 _r_2 = 4700;
106 _r_3 = 100;
107
108 _ptc_offset = 100.0;
109 _ptc_gradient = 0.3851;
110 _pga_gain = 2;
111 _vcc = 5;
112 _resolution_pga = 2.048;
113 _resolution_tdb = 32767;
114
115 // define here and calculate when the class object is built to speed up calculations
116 // since the value does not change in the sensor type class object
117 _half_bridge_resistor_coeff = (double)_r_3 / (double)(_r_2 + _r_3);
118 _first_res_coeff = _r_1*_r_2 + _r_1*_r_3 + _ptc_offset*_r_2 + _ptc_offset*_r_3;
119 _second_res_coeff = _r_3*_r_1 - _r_2*_ptc_offset;
120 }
121
122 TemperatureSensorPT100(const TemperatureSensorPT100& other) = default; // const copy constructor
123 TemperatureSensorPT100& operator=(const TemperatureSensorPT100& other) = default; // const copy assignment operator
124 TemperatureSensorPT100(TemperatureSensorPT100&& other) = default; // move constructor
125 TemperatureSensorPT100& operator=(TemperatureSensorPT100&& other) = default; // move assignment operator
126
127 ~TemperatureSensorPT100() = default; // destructor
128
129 virtual double convertTempCelsiusToRaw(const double temperature) override
130 {
131 double res = 0;
132
133 double tmp = (( (_ptc_offset + _ptc_gradient * temperature) / ((double)_r_1 + (_ptc_offset + _ptc_gradient * temperature))) - _half_bridge_resistor_coeff) * (double)_vcc;
134 res = (_resolution_tdb + 1) * ((_pga_gain * tmp) / _resolution_pga);
135
136 yDebug("Converted temperature limit to raw value:%f", res);
137 return res;
138 }
139
140 virtual double convertRawToTempCelsius(const double temperature) override
141 {
142 double res = 0;
143
144 double tmp = temperature * ((_resolution_pga) / (_pga_gain * _vcc * (_resolution_tdb + 1)));
145 double den = _ptc_gradient * (_r_2 - _r_2*tmp - _r_3*tmp);
146
147 res = (tmp * (_first_res_coeff) / den) + ((_second_res_coeff) / den);
148
149 return res;
150 }
151
154};
155
156
158{
159
160private:
161 // resistors of the voltage divider bridge
162 int _r_1;
163 int _r_2;
164 int _r_3;
165
166 double _ptc_offset; // offset of the temperature sensor line
167 double _ptc_gradient; // slope/gradient of the temperature sensor line
168 double _pga_gain; // ADC gain set for the tdb (temperature detection board)
169
170 int _vcc; // vcc that enters the voltage divider bridge
171 double _resolution_pga; // resolution of the internal pga of the tdb
172 double _resolution_tdb; // resolution used for the raw value for the output of the tdb
173
174 // define here and calculate when the class object is built to speed up calculations
175 // since the value does not change in the sensor type class object
176 double _half_bridge_resistor_coeff;
177 double _first_res_coeff;
178 double _second_res_coeff;
179
180public:
181
183 {
184 _r_1 = 4700;
185 _r_2 = 4700;
186 _r_3 = 1000;
187
188 _ptc_offset = 1000;
189 _ptc_gradient = 3.851;
190 _pga_gain = 2;
191 _vcc = 5;
192 _resolution_pga = 2.048;
193 _resolution_tdb = 32767;
194
195 _half_bridge_resistor_coeff = (double)_r_3 / (double)(_r_2 + _r_3);
196
197 _first_res_coeff = _r_1*_r_2 + _r_1*_r_3 + _ptc_offset*_r_2 + _ptc_offset*_r_3;
198 _second_res_coeff = _r_3*_r_1 - _r_2*_ptc_offset;
199 }
200
201 TemperatureSensorPT1000(const TemperatureSensorPT1000& other) = default; // const copy constructor
202 TemperatureSensorPT1000& operator=(const TemperatureSensorPT1000& other) = default; // const copy assignment operator
203 TemperatureSensorPT1000(TemperatureSensorPT1000&& other) = default; // move constructor
204 TemperatureSensorPT1000& operator=(TemperatureSensorPT1000&& other) = default; // move assignment operator
205
206 ~TemperatureSensorPT1000() = default; // destructor
207
208 virtual double convertTempCelsiusToRaw(const double temperature) override
209 {
210 double res = 0;
211
212 double tmp = (( (_ptc_offset + _ptc_gradient * temperature) / ((double)_r_1 + (_ptc_offset + _ptc_gradient * temperature))) - _half_bridge_resistor_coeff) * (double)_vcc;
213 res = (_resolution_tdb + 1) * ((_pga_gain * tmp) / _resolution_pga);
214
215 yDebug("Converted temperature limit to raw value:%f", res);
216 return res;
217 }
218
219 virtual double convertRawToTempCelsius(const double temperature) override
220 {
221 double res = 0;
222
223 double tmp = temperature * ((_resolution_pga) / (_pga_gain * _vcc * (_resolution_tdb + 1)));
224 double den = _ptc_gradient * (_r_2 - _r_2*tmp - _r_3*tmp);
225
226 res = (tmp * (_first_res_coeff) / den) + ((_second_res_coeff) / den);
227
228 return res;
229 }
230
233};
234
235
237{
238
239public:
240
242 {
243 yInfo("Private varibales NOT DEFINED for class TemperatureSensorNONE");
244 }
245
247
248 virtual double convertTempCelsiusToRaw(const double temperature) override
249 {
250 yInfo("convertTempCelsiusToRaw METHOD, NOT IMPLEMENTED for class TemperatureSensorNONE");
251 return 0;
252 }
253
254 virtual double convertRawToTempCelsius(const double temperature) override
255 {
256 return 0;
257 }
258
261};
262
263
265{
266public:
267 //PidAlgorithmType_t type;
268
269 yarp::dev::PidFeedbackUnitsEnum fbk_PidUnits;
270 yarp::dev::PidOutputUnitsEnum out_PidUnits;
271 eOmc_ctrl_out_type_t out_type;
272
273 virtual ~Pid_Algorithm(){}
274
275 eOmc_ctrl_out_type_t getOutputType() { return out_type; }
276
277 void setUnits(yarp::dev::PidFeedbackUnitsEnum fu, yarp::dev::PidOutputUnitsEnum ou)
278 {
279 fbk_PidUnits = fu;
280 out_PidUnits = ou;
281 }
282
283 virtual yarp::dev::Pid getPID(int joint) = 0;
284};
285
286
288{
289public:
290 yarp::dev::Pid *pid;
291
292 Pid_Algorithm_simple(int nj, eOmc_ctrl_out_type_t ot)
293 {
294 out_type = ot;
295
296 pid = new yarp::dev::Pid[nj];
297 };
298
300 {
301 if (pid) delete[] pid;
302 };
303
304 yarp::dev::Pid getPID(int joint) override
305 {
306 return pid[joint];
307 }
308};
309
310/*
311class PidAlgorithm_VelocityInnerLoop: public Pid_Algorithm
312{
313public:
314 yarp::dev::Pid *extPid; //pos, trq, velocity
315 //yarp::dev::Pid *innerVelPid;
316 PidAlgorithm_VelocityInnerLoop(int nj)
317 {
318 extPid = new yarp::dev::Pid[nj];
319 //innerVelPid = new yarp::dev::Pid[nj];
320 };
321 ~PidAlgorithm_VelocityInnerLoop()
322 {
323 if(extPid)
324 {
325 delete[]extPid;
326 }
327 //if(innerVelPid)
328 //{
329 // delete[]innerVelPid;
330 //}
331 }
332
333 eOmc_ctrl_out_type_t getOutputType() override
334 {
335 return eomc_ctrl_out_type_vel;
336 }
337};
338
339
340class PidAlgorithm_CurrentInnerLoop: public Pid_Algorithm
341{
342 public:
343 yarp::dev::Pid *extPid;
344 yarp::dev::Pid *innerCurrLoop;
345 PidAlgorithm_CurrentInnerLoop(int nj)
346 {
347 extPid = allocAndCheck<yarp::dev::Pid>(nj);
348 innerCurrLoop = allocAndCheck<yarp::dev::Pid>(nj);
349 };
350 ~PidAlgorithm_CurrentInnerLoop()
351 {
352 checkAndDestroy(extPid);
353 checkAndDestroy(innerCurrLoop);
354 }
355
356 eOmc_ctrl_out_type_t getOutputType() override
357 {
358 return eomc_ctrl_out_type_cur;
359 }
360};
361*/
362
364{
365public:
366
367 yarp::dev::Pid pid;
368 yarp::dev::PidFeedbackUnitsEnum fbk_PidUnits;
369 yarp::dev::PidOutputUnitsEnum out_PidUnits;
370 eOmc_ctrl_out_type_t out_type;
371
372 //PidAlgorithmType_t controlLaw;
373
376
377 PidInfo()//:usernamePidSelected("none")
378 {
379 enabled = false;
380 //controlLaw = PidAlgo_simple;
381
382 out_type = eomc_ctrl_out_type_n_a;
383 fbk_PidUnits = yarp::dev::PidFeedbackUnitsEnum::RAW_MACHINE_UNITS;
384 out_PidUnits = yarp::dev::PidOutputUnitsEnum::RAW_MACHINE_UNITS;
385 }
387 {
388 //delete (usernamePidSelected);
389 }
390
391 //void dumpdata(void);
392
393};
394
395class TrqPidInfo : public PidInfo
396{
397public:
398 double kbemf;
399 double ktau;
406};
407
419
420
422{
423public:
424 int id; //num of set. it can be between 0 and max number of joint (_njoints)
425 std::vector<int> joints; //list of joints belongig to this set2joint
426
427 eOmc_jointset_configuration_t cfg;
428
429 JointsSet(int num=0)
430 {
431 id=num;
432 joints.resize(0);
433 cfg.candotorquecontrol=0;
434 cfg.usespeedfeedbackfrommotors=0;
435 cfg.pidoutputtype=eomc_pidoutputtype_unknown;
436 cfg.dummy=0;
437 cfg.constraints.type=eomc_jsetconstraint_unknown;
438 cfg.constraints.param1=0;
439 cfg.constraints.param2=0;
440 }
441public:
442 int getNumberofJoints(void) {return (joints.size());}
443 eOmc_jointset_configuration_t* getConfiguration(void) {return &cfg;}
444 void setUseSpeedFeedbackFromMotors(bool flag){cfg.usespeedfeedbackfrommotors = flag;}
445 void setPidOutputType(eOmc_pidoutputtype_t type){cfg.pidoutputtype = type;}
446 void setCanDoTorqueControl(bool flag) {cfg.candotorquecontrol = flag;}
447 void dumpdata();
448};
449
450typedef struct
451{
453} timeouts_t;
454
455typedef struct
456{
461
462
463typedef struct
464{
465 double posMin;
466 double posMax;
467 double posHwMax;
468 double posHwMin;
469 double velMax;
471
472typedef struct
473{
474 double posMin;
475 double posMax;
476 double pwmMax;
478
479
480typedef struct
481{
482 std::vector<double> matrixJ2M;
483 std::vector<double> matrixM2J;
484 std::vector<double> matrixE2J;
486
487typedef struct
488{
490 std::string name;
491 JointTypeEnum type;
492} axisInfo_t;
493
494typedef struct
495{
496 double min_stiff;
497 double max_stiff;
498 double min_damp;
499 double max_damp;
500 double param_a;
501 double param_b;
502 double param_c;
504
505
512
513
514// LuGre friction model parameters
515typedef struct
516{
517 double Km; // Motor torque constant (not strictly LuGre) but required to compute the net torque [Nm/A]
518 double Kw; // Viscous friction constant [Nm/(rad/s)]
519 double S0; // LuGre bristle analogy eleastic constant [Nm/rad]
520 double S1; // LuGre bristle analogy viscous constant [Nm/(rad/s)]
521 double Vth; // Stribeck velocity threshold [rad/s]
522 double Fc_pos; // Coulomb friction constant (positive rotation) [Nm]
523 double Fc_neg; // Coulomb friction constant (negative rotation) [Nm]
524 double Fs_pos; // Stribeck friction constant (positive rotation) [Nm]
525 double Fs_neg; // Stribeck friction constant (negative rotation) [Nm]
527
528typedef struct
529{
531 std::array<float32_t, 3> x0;
532 std::array<float32_t, 3> Q;
533 float32_t R;
534 float32_t P0;
536
537
538typedef struct
539{
542} temperatureLimits_t; // limits expressed as raw values after conversion is applied
543
544//template <class T>
545
547{
548
549private:
550 int _njoints;
551 std::string _boardname;
552 bool _verbosewhenok;
553
554 std::map<std::string, Pid_Algorithm*> minjerkAlgoMap;
555 //std::map<std::string, Pid_Algorithm*> directAlgoMap;
556 std::map<std::string, Pid_Algorithm*> torqueAlgoMap;
557
558 //std::map<std::string, Pid_Algorithm*> currentAlgoMap;
559 //std::map<std::string, Pid_Algorithm*> speedAlgoMap;
560
561 std::vector<std::string> _positionControlLaw;
562 std::vector<std::string> _velocityControlLaw;
563 std::vector<std::string> _mixedControlLaw;
564 //std::vector<std::string> _posDirectControlLaw;
565 //std::vector<std::string> _velDirectControlLaw;
566 std::vector<std::string> _torqueControlLaw;
567 std::vector<std::string> _currentControlLaw;
568 std::vector<std::string> _speedControlLaw;
569
570 double *_kbemf;
571 double *_ktau;
572 int *_filterType;
573 double *_viscousPos;
574 double *_viscousNeg;
575 double *_coulombPos;
576 double *_coulombNeg;
577 double *_velocityThres;
578
579
580
581
582
583 //PID parsing functions
584 bool parseControlsGroup(yarp::os::Searchable &config);
585
586 bool parseSelectedPositionControl(yarp::os::Searchable &config);
587 bool parseSelectedVelocityControl(yarp::os::Searchable &config);
588 bool parseSelectedMixedControl(yarp::os::Searchable &config);
589 //bool parseSelectedPosDirectControl(yarp::os::Searchable &config);
590 //bool parseSelectedVelDirectControl(yarp::os::Searchable &config);
591 bool parseSelectedTorqueControl(yarp::os::Searchable &config);
592
593 bool parseSelectedCurrentPid(yarp::os::Searchable &config, bool pidisMandatory, PidInfo *pids);
594 bool parseSelectedSpeedPid(yarp::os::Searchable &config, bool pidisMandatory, PidInfo *pids);
595
596 bool parsePid_minJerk_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
597 bool parsePid_minJerk_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
598 bool parsePid_minJerk_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
599
600 //bool parsePid_direct_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
601 //bool parsePid_direct_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
602 //bool parsePid_direct_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
603
604 bool parsePid_torque_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
605 bool parsePid_torque_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
606 bool parsePid_torque_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
607
608 bool parsePidsGroup2FOC(yarp::os::Bottle& pidsGroup, Pid myPid[]);
609 bool parsePidsGroupSimple(yarp::os::Bottle& pidsGroup, Pid myPid[]);
610 bool parsePidsGroupExtended(yarp::os::Bottle& pidsGroup, Pid myPid[]);
611 bool parsePidsGroupDeluxe(yarp::os::Bottle& pidsGroup, Pid myPid[]);
612
613 bool parsePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], std::string prefix);
614 bool getCorrectPidForEachJoint(PidInfo *ppids/*, PidInfo *vpids*/, TrqPidInfo *tpids);
615 bool parsePidUnitsType(yarp::os::Bottle &bPid, yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
616
617 bool checkJointTypes(PidInfo *pids, const std::string &pid_type);
618 bool checkSinglePid(PidInfo &firstPid, PidInfo &currentPid, const int &firstjoint, const int &currentjoint, const std::string &pid_type);
619
620 bool convert(std::string const &fromstring, eOmc_jsetconstraint_t &jsetconstraint, bool& formaterror);
621 bool convert(yarp::os::Bottle &bottle, std::vector<double> &matrix, bool &formaterror, int targetsize);
622
623 //general utils functions
624 bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &out, const std::string &key1, const std::string &txt, int size, bool mandatory=true);
625 template <class T>
626 bool checkAndSetVectorSize(std::vector<T> &vec, int size, const std::string &funcName)
627 {
628 if(size > (int)vec.capacity())
629 {
630 yError() << "embObjMC BOARD " << _boardname << " in " << funcName.c_str() << ": try to insert " << size << "element in vector with " << vec.capacity() << " elements";
631 return false;
632 }
633
634 vec.resize(size);
635 return true;
636 }
637
639 void debugUtil_printControlLaws(void);
640
641
642public:
643 Parser(int numofjoints, std::string boardname);
644 ~Parser();
645
646 bool parsePids(yarp::os::Searchable &config, PidInfo *ppids/*, PidInfo *vpids*/, TrqPidInfo *tpids, PidInfo *cpids, PidInfo *spids, bool lowLevPidisMandatory);
647 bool parseFocGroup(yarp::os::Searchable &config, focBasedSpecificInfo_t *foc_based_info, std::string groupName, std::vector<std::unique_ptr<eomc::ITemperatureSensor>>& temperatureSensorsVector);
648 //bool parseCurrentPid(yarp::os::Searchable &config, PidInfo *cpids);//deprecated
649 bool parseJointsetCfgGroup(yarp::os::Searchable &config, std::vector<JointsSet> &jsets, std::vector<int> &jointtoset);
650 bool parseTimeoutsGroup(yarp::os::Searchable &config, std::vector<timeouts_t> &timeouts, int defaultVelocityTimeout);
651 bool parseCurrentLimits(yarp::os::Searchable &config, std::vector<motorCurrentLimits_t> &currLimits);
652 bool parseTemperatureLimits(yarp::os::Searchable &config, std::vector<temperatureLimits_t> &temperatureLimits);
653 bool parseJointsLimits(yarp::os::Searchable &config, std::vector<jointLimits_t> &jointsLimits);
654 bool parseRotorsLimits(yarp::os::Searchable &config, std::vector<rotorLimits_t> &rotorsLimits);
655 bool parseCouplingInfo(yarp::os::Searchable &config, couplingInfo_t &couplingInfo);
656 bool parseMotioncontrolVersion(yarp::os::Searchable &config, int &version);
657 bool parseBehaviourFalgs(yarp::os::Searchable &config, bool &useRawEncoderData, bool &pwmIsLimited );
658 bool isVerboseEnabled(yarp::os::Searchable &config);
659 bool parseAxisInfo(yarp::os::Searchable &config, int axisMap[], std::vector<axisInfo_t> &axisInfo);
660 bool parseEncoderFactor(yarp::os::Searchable &config, double encoderFactor[]);
661 bool parsefullscalePWM(yarp::os::Searchable &config, double dutycycleToPWM[]);
662 bool parseAmpsToSensor(yarp::os::Searchable &config, double ampsToSensor[]);
663 bool parseGearboxValues(yarp::os::Searchable &config, double gearbox_M2J[], double gearbox_E2J[]);
664 bool parseMechanicalsFlags(yarp::os::Searchable &config, int useMotorSpeedFbk[]);
665 bool parseImpedanceGroup(yarp::os::Searchable &config,std::vector<impedanceParameters_t> &impedance);
666 bool parseLugreGroup(yarp::os::Searchable &config,std::vector<lugreParameters_t> &lugre);
667 bool parseDeadzoneValue(yarp::os::Searchable &config, double deadzone[], bool *found);
668 bool parseKalmanFilterParams(yarp::os::Searchable &config, std::vector<kalmanFilterParams_t> &kalmanFilterParams);
669};
670
671}}}; //close namespaces
672
673#endif // include guard
virtual double convertRawToTempCelsius(const double temperature)=0
virtual double convertTempCelsiusToRaw(const double temperature)=0
virtual motor_temperatureSensorTypeEnum_t getType()=0
void setPidOutputType(eOmc_pidoutputtype_t type)
Definition eomcParser.h:445
eOmc_jointset_configuration_t cfg
Definition eomcParser.h:427
void setUseSpeedFeedbackFromMotors(bool flag)
Definition eomcParser.h:444
eOmc_jointset_configuration_t * getConfiguration(void)
Definition eomcParser.h:443
std::vector< int > joints
Definition eomcParser.h:425
void setCanDoTorqueControl(bool flag)
Definition eomcParser.h:446
bool parseJointsetCfgGroup(yarp::os::Searchable &config, std::vector< JointsSet > &jsets, std::vector< int > &jointtoset)
bool parseJointsLimits(yarp::os::Searchable &config, std::vector< jointLimits_t > &jointsLimits)
bool parseAmpsToSensor(yarp::os::Searchable &config, double ampsToSensor[])
bool parseMechanicalsFlags(yarp::os::Searchable &config, int useMotorSpeedFbk[])
bool parseMotioncontrolVersion(yarp::os::Searchable &config, int &version)
bool parseLugreGroup(yarp::os::Searchable &config, std::vector< lugreParameters_t > &lugre)
bool parseAxisInfo(yarp::os::Searchable &config, int axisMap[], std::vector< axisInfo_t > &axisInfo)
bool parseFocGroup(yarp::os::Searchable &config, focBasedSpecificInfo_t *foc_based_info, std::string groupName, std::vector< std::unique_ptr< eomc::ITemperatureSensor > > &temperatureSensorsVector)
bool parseCouplingInfo(yarp::os::Searchable &config, couplingInfo_t &couplingInfo)
bool parsePids(yarp::os::Searchable &config, PidInfo *ppids, TrqPidInfo *tpids, PidInfo *cpids, PidInfo *spids, bool lowLevPidisMandatory)
bool parseTemperatureLimits(yarp::os::Searchable &config, std::vector< temperatureLimits_t > &temperatureLimits)
bool parseDeadzoneValue(yarp::os::Searchable &config, double deadzone[], bool *found)
bool isVerboseEnabled(yarp::os::Searchable &config)
bool parseTimeoutsGroup(yarp::os::Searchable &config, std::vector< timeouts_t > &timeouts, int defaultVelocityTimeout)
bool parseCurrentLimits(yarp::os::Searchable &config, std::vector< motorCurrentLimits_t > &currLimits)
bool parseEncoderFactor(yarp::os::Searchable &config, double encoderFactor[])
bool parsefullscalePWM(yarp::os::Searchable &config, double dutycycleToPWM[])
bool parseRotorsLimits(yarp::os::Searchable &config, std::vector< rotorLimits_t > &rotorsLimits)
bool parseImpedanceGroup(yarp::os::Searchable &config, std::vector< impedanceParameters_t > &impedance)
bool parseKalmanFilterParams(yarp::os::Searchable &config, std::vector< kalmanFilterParams_t > &kalmanFilterParams)
bool parseGearboxValues(yarp::os::Searchable &config, double gearbox_M2J[], double gearbox_E2J[])
bool parseBehaviourFalgs(yarp::os::Searchable &config, bool &useRawEncoderData, bool &pwmIsLimited)
std::string usernamePidSelected
Definition eomcParser.h:374
yarp::dev::PidFeedbackUnitsEnum fbk_PidUnits
Definition eomcParser.h:368
eOmc_ctrl_out_type_t out_type
Definition eomcParser.h:370
yarp::dev::PidOutputUnitsEnum out_PidUnits
Definition eomcParser.h:369
yarp::dev::Pid getPID(int joint) override
Definition eomcParser.h:304
Pid_Algorithm_simple(int nj, eOmc_ctrl_out_type_t ot)
Definition eomcParser.h:292
yarp::dev::PidFeedbackUnitsEnum fbk_PidUnits
Definition eomcParser.h:269
eOmc_ctrl_out_type_t getOutputType()
Definition eomcParser.h:275
void setUnits(yarp::dev::PidFeedbackUnitsEnum fu, yarp::dev::PidOutputUnitsEnum ou)
Definition eomcParser.h:277
eOmc_ctrl_out_type_t out_type
Definition eomcParser.h:271
yarp::dev::PidOutputUnitsEnum out_PidUnits
Definition eomcParser.h:270
virtual yarp::dev::Pid getPID(int joint)=0
virtual double convertRawToTempCelsius(const double temperature) override
Definition eomcParser.h:254
virtual double convertTempCelsiusToRaw(const double temperature) override
Definition eomcParser.h:248
virtual motor_temperatureSensorTypeEnum_t getType() override
Definition eomcParser.h:259
virtual double convertTempCelsiusToRaw(const double temperature) override
Definition eomcParser.h:208
virtual motor_temperatureSensorTypeEnum_t getType() override
Definition eomcParser.h:231
TemperatureSensorPT1000 & operator=(const TemperatureSensorPT1000 &other)=default
TemperatureSensorPT1000 & operator=(TemperatureSensorPT1000 &&other)=default
virtual double convertRawToTempCelsius(const double temperature) override
Definition eomcParser.h:219
TemperatureSensorPT1000(const TemperatureSensorPT1000 &other)=default
TemperatureSensorPT1000(TemperatureSensorPT1000 &&other)=default
virtual double convertRawToTempCelsius(const double temperature) override
Definition eomcParser.h:140
TemperatureSensorPT100(TemperatureSensorPT100 &&other)=default
TemperatureSensorPT100 & operator=(const TemperatureSensorPT100 &other)=default
TemperatureSensorPT100 & operator=(TemperatureSensorPT100 &&other)=default
virtual double convertTempCelsiusToRaw(const double temperature) override
Definition eomcParser.h:129
TemperatureSensorPT100(const TemperatureSensorPT100 &other)=default
virtual motor_temperatureSensorTypeEnum_t getType() override
Definition eomcParser.h:152
double viscousPos
motor torque constant
Definition eomcParser.h:400
double ktau
back-emf compensation parameter
Definition eomcParser.h:399
motor_temperatureSensorTypeEnum_t
Definition eomcParser.h:61
@ motor_temperature_sensor_pt100
Definition eomcParser.h:62
@ motor_temperature_sensor_pt1000
Definition eomcParser.h:63
@ motor_temperature_sensor_none
Definition eomcParser.h:64
Copyright (C) 2008 RobotCub Consortium.
out
Definition sine.m:8
std::vector< double > matrixM2J
Definition eomcParser.h:483
std::vector< double > matrixE2J
Definition eomcParser.h:484
std::vector< double > matrixJ2M
Definition eomcParser.h:482
double posHwMax
user joint limits, min
Definition eomcParser.h:467
double posHwMin
hardaware joint limits, max
Definition eomcParser.h:468
double velMax
hardaware joint limits, min
Definition eomcParser.h:469
double posMax
user joint limits, max
Definition eomcParser.h:466
std::array< float32_t, 3 > x0
Definition eomcParser.h:531
std::array< float32_t, 3 > Q
Definition eomcParser.h:532