536 std::string _boardname;
539 std::map<std::string, Pid_Algorithm*> minjerkAlgoMap;
541 std::map<std::string, Pid_Algorithm*> torqueAlgoMap;
546 std::vector<std::string> _positionControlLaw;
547 std::vector<std::string> _velocityControlLaw;
548 std::vector<std::string> _mixedControlLaw;
551 std::vector<std::string> _torqueControlLaw;
552 std::vector<std::string> _currentControlLaw;
553 std::vector<std::string> _speedControlLaw;
562 double *_velocityThres;
569 bool parseControlsGroup(yarp::os::Searchable &config);
571 bool parseSelectedPositionControl(yarp::os::Searchable &config);
572 bool parseSelectedVelocityControl(yarp::os::Searchable &config);
573 bool parseSelectedMixedControl(yarp::os::Searchable &config);
576 bool parseSelectedTorqueControl(yarp::os::Searchable &config);
578 bool parseSelectedCurrentPid(yarp::os::Searchable &config,
bool pidisMandatory,
PidInfo *pids);
579 bool parseSelectedSpeedPid(yarp::os::Searchable &config,
bool pidisMandatory,
PidInfo *pids);
581 bool parsePid_minJerk_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
582 bool parsePid_minJerk_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
583 bool parsePid_minJerk_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
589 bool parsePid_torque_outPwm(yarp::os::Bottle &b_pid, std::string controlLaw);
590 bool parsePid_torque_outCur(yarp::os::Bottle &b_pid, std::string controlLaw);
591 bool parsePid_torque_outVel(yarp::os::Bottle &b_pid, std::string controlLaw);
593 bool parsePidsGroup2FOC(yarp::os::Bottle& pidsGroup, Pid myPid[]);
594 bool parsePidsGroupSimple(yarp::os::Bottle& pidsGroup, Pid myPid[]);
595 bool parsePidsGroupExtended(yarp::os::Bottle& pidsGroup, Pid myPid[]);
596 bool parsePidsGroupDeluxe(yarp::os::Bottle& pidsGroup, Pid myPid[]);
598 bool parsePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], std::string prefix);
600 bool parsePidUnitsType(yarp::os::Bottle &bPid, yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
602 bool checkJointTypes(
PidInfo *pids,
const std::string &pid_type);
603 bool checkSinglePid(
PidInfo &firstPid,
PidInfo ¤tPid,
const int &firstjoint,
const int ¤tjoint,
const std::string &pid_type);
605 bool convert(std::string
const &fromstring, eOmc_jsetconstraint_t &jsetconstraint,
bool& formaterror);
606 bool convert(yarp::os::Bottle &bottle, std::vector<double> &matrix,
bool &formaterror,
int targetsize);
609 bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &
out,
const std::string &key1,
const std::string &txt,
int size,
bool mandatory=
true);
611 bool checkAndSetVectorSize(std::vector<T> &vec,
int size,
const std::string &funcName)
613 if(size > (
int)vec.capacity())
615 yError() <<
"embObjMC BOARD " << _boardname <<
" in " << funcName.c_str() <<
": try to insert " << size <<
"element in vector with " << vec.capacity() <<
" elements";
624 void debugUtil_printControlLaws(
void);
628 Parser(
int numofjoints, std::string boardname);
632 bool parseFocGroup(yarp::os::Searchable &config,
focBasedSpecificInfo_t *foc_based_info, std::string groupName, std::vector<std::unique_ptr<eomc::ITemperatureSensor>>& temperatureSensorsVector);
634 bool parseJointsetCfgGroup(yarp::os::Searchable &config, std::vector<JointsSet> &jsets, std::vector<int> &jointtoset);
635 bool parseTimeoutsGroup(yarp::os::Searchable &config, std::vector<timeouts_t> &timeouts,
int defaultVelocityTimeout);
636 bool parseCurrentLimits(yarp::os::Searchable &config, std::vector<motorCurrentLimits_t> &currLimits);
637 bool parseTemperatureLimits(yarp::os::Searchable &config, std::vector<temperatureLimits_t> &temperatureLimits);
638 bool parseJointsLimits(yarp::os::Searchable &config, std::vector<jointLimits_t> &jointsLimits);
639 bool parseRotorsLimits(yarp::os::Searchable &config, std::vector<rotorLimits_t> &rotorsLimits);
642 bool parseBehaviourFalgs(yarp::os::Searchable &config,
bool &useRawEncoderData,
bool &pwmIsLimited );
644 bool parseAxisInfo(yarp::os::Searchable &config,
int axisMap[], std::vector<axisInfo_t> &axisInfo);
648 bool parseGearboxValues(yarp::os::Searchable &config,
double gearbox_M2J[],
double gearbox_E2J[]);
650 bool parseImpedanceGroup(yarp::os::Searchable &config,std::vector<impedanceParameters_t> &impedance);
651 bool parseDeadzoneValue(yarp::os::Searchable &config,
double deadzone[],
bool *found);
652 bool parseKalmanFilterParams(yarp::os::Searchable &config, std::vector<kalmanFilterParams_t> &kalmanFilterParams);