551 std::string _boardname;
554 std::map<std::string, Pid_Algorithm*> minjerkAlgoMap;
556 std::map<std::string, Pid_Algorithm*> torqueAlgoMap;
561 std::vector<std::string> _positionControlLaw;
562 std::vector<std::string> _velocityControlLaw;
563 std::vector<std::string> _mixedControlLaw;
566 std::vector<std::string> _torqueControlLaw;
567 std::vector<std::string> _currentControlLaw;
568 std::vector<std::string> _speedControlLaw;
577 double *_velocityThres;
584 bool parseControlsGroup(yarp::os::Searchable &config);
586 bool parseSelectedPositionControl(yarp::os::Searchable &config);
587 bool parseSelectedVelocityControl(yarp::os::Searchable &config);
588 bool parseSelectedMixedControl(yarp::os::Searchable &config);
591 bool parseSelectedTorqueControl(yarp::os::Searchable &config);
593 bool parseSelectedCurrentPid(yarp::os::Searchable &config,
bool pidisMandatory,
PidInfo *pids);
594 bool parseSelectedSpeedPid(yarp::os::Searchable &config,
bool pidisMandatory,
PidInfo *pids);
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);
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);
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[]);
613 bool parsePidsGroup(yarp::os::Bottle& pidsGroup, yarp::dev::Pid myPid[], std::string prefix);
615 bool parsePidUnitsType(yarp::os::Bottle &bPid, yarp::dev::PidFeedbackUnitsEnum &fbk_pidunits, yarp::dev::PidOutputUnitsEnum& out_pidunits);
617 bool checkJointTypes(
PidInfo *pids,
const std::string &pid_type);
618 bool checkSinglePid(
PidInfo &firstPid,
PidInfo ¤tPid,
const int &firstjoint,
const int ¤tjoint,
const std::string &pid_type);
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);
624 bool extractGroup(yarp::os::Bottle &input, yarp::os::Bottle &
out,
const std::string &key1,
const std::string &txt,
int size,
bool mandatory=
true);
626 bool checkAndSetVectorSize(std::vector<T> &vec,
int size,
const std::string &funcName)
628 if(size > (
int)vec.capacity())
630 yError() <<
"embObjMC BOARD " << _boardname <<
" in " << funcName.c_str() <<
": try to insert " << size <<
"element in vector with " << vec.capacity() <<
" elements";
639 void debugUtil_printControlLaws(
void);
643 Parser(
int numofjoints, std::string boardname);
647 bool parseFocGroup(yarp::os::Searchable &config,
focBasedSpecificInfo_t *foc_based_info, std::string groupName, std::vector<std::unique_ptr<eomc::ITemperatureSensor>>& temperatureSensorsVector);
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);
657 bool parseBehaviourFalgs(yarp::os::Searchable &config,
bool &useRawEncoderData,
bool &pwmIsLimited );
659 bool parseAxisInfo(yarp::os::Searchable &config,
int axisMap[], std::vector<axisInfo_t> &axisInfo);
663 bool parseGearboxValues(yarp::os::Searchable &config,
double gearbox_M2J[],
double gearbox_E2J[]);
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);