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{
457} timeouts_t;
458
459typedef struct
460{
465
466
467typedef struct
468{
469 double posMin;
470 double posMax;
471 double posHwMax;
472 double posHwMin;
473 double velMax;
475
476typedef struct
477{
478 double posMin;
479 double posMax;
480 double pwmMax;
482
483
484typedef struct
485{
486 std::vector<double> matrixJ2M;
487 std::vector<double> matrixM2J;
488 std::vector<double> matrixE2J;
490
491typedef struct
492{
494 std::string name;
495 JointTypeEnum type;
496} axisInfo_t;
497
498typedef struct
499{
500 double min_stiff;
501 double max_stiff;
502 double min_damp;
503 double max_damp;
504 double param_a;
505 double param_b;
506 double param_c;
508
509
516
517
518// LuGre friction model parameters
519typedef struct
520{
521 double Km; // Motor torque constant (not strictly LuGre) but required to compute the net torque [Nm/A]
522 double Kw; // Viscous friction constant [Nm/(rad/s)]
523 double S0; // LuGre bristle analogy eleastic constant [Nm/rad]
524 double S1; // LuGre bristle analogy viscous constant [Nm/(rad/s)]
525 double Vth; // Stribeck velocity threshold [rad/s]
526 double Fc_pos; // Coulomb friction constant (positive rotation) [Nm]
527 double Fc_neg; // Coulomb friction constant (negative rotation) [Nm]
528 double Fs_pos; // Stribeck friction constant (positive rotation) [Nm]
529 double Fs_neg; // Stribeck friction constant (negative rotation) [Nm]
531
532typedef struct
533{
535 std::array<float32_t, 3> x0;
536 std::array<float32_t, 3> Q;
537 float32_t R;
538 float32_t P0;
540
541
542typedef struct
543{
546} temperatureLimits_t; // limits expressed as raw values after conversion is applied
547
548//template <class T>
549
551{
552
553private:
554 int _njoints;
555 std::string _boardname;
556 bool _verbosewhenok;
557
558 std::map<std::string, Pid_Algorithm*> minjerkAlgoMap;
559 //std::map<std::string, Pid_Algorithm*> directAlgoMap;
560 std::map<std::string, Pid_Algorithm*> torqueAlgoMap;
561
562 //std::map<std::string, Pid_Algorithm*> currentAlgoMap;
563 //std::map<std::string, Pid_Algorithm*> speedAlgoMap;
564
565 std::vector<std::string> _positionControlLaw;
566 std::vector<std::string> _velocityControlLaw;
567 std::vector<std::string> _mixedControlLaw;
568 //std::vector<std::string> _posDirectControlLaw;
569 //std::vector<std::string> _velDirectControlLaw;
570 std::vector<std::string> _torqueControlLaw;
571 std::vector<std::string> _currentControlLaw;
572 std::vector<std::string> _speedControlLaw;
573
574 double *_kbemf;
575 double *_ktau;
576 int *_filterType;
577 double *_viscousPos;
578 double *_viscousNeg;
579 double *_coulombPos;
580 double *_coulombNeg;
581 double *_velocityThres;
582
583
584
585
586
587 //PID parsing functions
588 bool parseControlsGroup(yarp::os::Searchable &config);
589
590 bool parseSelectedPositionControl(yarp::os::Searchable &config);
591 bool parseSelectedVelocityControl(yarp::os::Searchable &config);
592 bool parseSelectedMixedControl(yarp::os::Searchable &config);
593 //bool parseSelectedPosDirectControl(yarp::os::Searchable &config);
594 //bool parseSelectedVelDirectControl(yarp::os::Searchable &config);
595 bool parseSelectedTorqueControl(yarp::os::Searchable &config);
596
597 bool parseSelectedCurrentPid(yarp::os::Searchable &config, bool pidisMandatory, PidInfo *pids);
598 bool parseSelectedSpeedPid(yarp::os::Searchable &config, bool pidisMandatory, PidInfo *pids);
599
600 bool parsePid_minJerk_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
601 bool parsePid_minJerk_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
602 bool parsePid_minJerk_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
603
604 //bool parsePid_direct_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
605 //bool parsePid_direct_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
606 //bool parsePid_direct_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
607
608 bool parsePid_torque_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
609 bool parsePid_torque_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
610 bool parsePid_torque_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
611
612 bool parsePidsGroup2FOC(yarp::os::Bottle& pidsGroup, Pid myPid[]);
613 bool parsePidsGroupSimple(yarp::os::Bottle& pidsGroup, Pid myPid[]);
614 bool parsePidsGroupExtended(yarp::os::Bottle& pidsGroup, Pid myPid[]);
615 bool parsePidsGroupDeluxe(yarp::os::Bottle& pidsGroup, Pid myPid[]);
616
617 bool parsePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], std::string prefix);
618 bool getCorrectPidForEachJoint(PidInfo *ppids/*, PidInfo *vpids*/, TrqPidInfo *tpids);
619 bool parsePidUnitsType(yarp::os::Bottle &bPid, yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
620
621 bool checkJointTypes(PidInfo *pids, const std::string &pid_type);
622 bool checkSinglePid(PidInfo &firstPid, PidInfo &currentPid, const int &firstjoint, const int &currentjoint, const std::string &pid_type);
623
624 bool convert(std::string const &fromstring, eOmc_jsetconstraint_t &jsetconstraint, bool& formaterror);
625 bool convert(yarp::os::Bottle &bottle, std::vector<double> &matrix, bool &formaterror, int targetsize);
626
627 //general utils functions
628 bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &out, const std::string &key1, const std::string &txt, int size, bool mandatory=true);
629 template <class T>
630 bool checkAndSetVectorSize(std::vector<T> &vec, int size, const std::string &funcName)
631 {
632 if(size > (int)vec.capacity())
633 {
634 yError() << "embObjMC BOARD " << _boardname << " in " << funcName.c_str() << ": try to insert " << size << "element in vector with " << vec.capacity() << " elements";
635 return false;
636 }
637
638 vec.resize(size);
639 return true;
640 }
641
643 void debugUtil_printControlLaws(void);
644
645
646public:
647 Parser(int numofjoints, std::string boardname);
648 ~Parser();
649
650 bool parsePids(yarp::os::Searchable &config, PidInfo *ppids/*, PidInfo *vpids*/, TrqPidInfo *tpids, PidInfo *cpids, PidInfo *spids, bool lowLevPidisMandatory);
651 bool parseFocGroup(yarp::os::Searchable &config, focBasedSpecificInfo_t *foc_based_info, std::string groupName, std::vector<std::unique_ptr<eomc::ITemperatureSensor>>& temperatureSensorsVector);
652 //bool parseCurrentPid(yarp::os::Searchable &config, PidInfo *cpids);//deprecated
653 bool parseJointsetCfgGroup(yarp::os::Searchable &config, std::vector<JointsSet> &jsets, std::vector<int> &jointtoset);
654 bool parseTimeoutsGroup(yarp::os::Searchable &config, std::vector<timeouts_t> &timeouts, int defaultTimeout);
655 bool parseCurrentLimits(yarp::os::Searchable &config, std::vector<motorCurrentLimits_t> &currLimits);
656 bool parseTemperatureLimits(yarp::os::Searchable &config, std::vector<temperatureLimits_t> &temperatureLimits);
657 bool parseJointsLimits(yarp::os::Searchable &config, std::vector<jointLimits_t> &jointsLimits);
658 bool parseRotorsLimits(yarp::os::Searchable &config, std::vector<rotorLimits_t> &rotorsLimits);
659 bool parseCouplingInfo(yarp::os::Searchable &config, couplingInfo_t &couplingInfo);
660 bool parseMotioncontrolVersion(yarp::os::Searchable &config, int &version);
661 bool parseBehaviourFalgs(yarp::os::Searchable &config, bool &useRawEncoderData, bool &pwmIsLimited);
662 bool isVerboseEnabled(yarp::os::Searchable &config);
663 bool parseAxisInfo(yarp::os::Searchable &config, int axisMap[], std::vector<axisInfo_t> &axisInfo);
664 bool parseEncoderFactor(yarp::os::Searchable &config, double encoderFactor[]);
665 bool parsefullscalePWM(yarp::os::Searchable &config, double dutycycleToPWM[]);
666 bool parseAmpsToSensor(yarp::os::Searchable &config, double ampsToSensor[]);
667 bool parseGearboxValues(yarp::os::Searchable &config, double gearbox_M2J[], double gearbox_E2J[]);
668 bool parseMechanicalsFlags(yarp::os::Searchable &config, int useMotorSpeedFbk[]);
669 bool parseImpedanceGroup(yarp::os::Searchable &config,std::vector<impedanceParameters_t> &impedance);
670 bool parseLugreGroup(yarp::os::Searchable &config,std::vector<lugreParameters_t> &lugre);
671 bool parseDeadzoneValue(yarp::os::Searchable &config, double deadzone[], bool *found);
672 bool parseKalmanFilterParams(yarp::os::Searchable &config, std::vector<kalmanFilterParams_t> &kalmanFilterParams);
673 bool parseMaintenanceModeGroup(yarp::os::Searchable &config, bool &skipRecalibrationEnabled);
674};
675
676}}}; //close namespaces
677
678#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 parseTimeoutsGroup(yarp::os::Searchable &config, std::vector< timeouts_t > &timeouts, int defaultTimeout)
bool parseMaintenanceModeGroup(yarp::os::Searchable &config, bool &skipRecalibrationEnabled)
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 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:487
std::vector< double > matrixE2J
Definition eomcParser.h:488
std::vector< double > matrixJ2M
Definition eomcParser.h:486
double posHwMax
user joint limits, min
Definition eomcParser.h:471
double posHwMin
hardaware joint limits, max
Definition eomcParser.h:472
double velMax
hardaware joint limits, min
Definition eomcParser.h:473
double posMax
user joint limits, max
Definition eomcParser.h:470
std::array< float32_t, 3 > x0
Definition eomcParser.h:535
std::array< float32_t, 3 > Q
Definition eomcParser.h:536