Skip to content

Commit

Permalink
Remove white lines and debug variables
Browse files Browse the repository at this point in the history
  • Loading branch information
MSECode committed Oct 26, 2023
1 parent 2f04b4a commit 388b177
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion conf/iCubFindDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ checkandset_dependency(OpenCV)
checkandset_dependency(Qt5)

if(icub_firmware_shared_FOUND AND ICUB_USE_icub_firmware_shared)
if(icub_firmware_shared_VERSION VERSION_LESS 1.36.2)
if(icub_firmware_shared_VERSION VERSION_LESS 1.36.3)
message(FATAL_ERROR "An old version of icub-firmware-shared has been detected: at least 1.36.2 is required")
endif()
endif()
Expand Down
28 changes: 13 additions & 15 deletions src/libraries/icubmod/embObjMotionControl/embObjMotionControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ using namespace yarp::dev::eomc;
#define PARSER_MOTION_CONTROL_VERSION 6





static inline bool NOT_YET_IMPLEMENTED(const char *txt)
{
yError() << txt << " is not yet implemented for embObjMotionControl";
Expand All @@ -70,7 +73,8 @@ static bool nv_not_found(void)
}


int _printCounter = 0;





Expand Down Expand Up @@ -334,7 +338,7 @@ bool embObjMotionControl::initializeInterfaces(measureConvFactors &f)
bool embObjMotionControl::open(yarp::os::Searchable &config)
{
// - first thing to do is verify if the eth manager is available. then i parse info about the eth board.
_printCounter = 0;

ethManager = eth::TheEthManager::instance();
if(NULL == ethManager)
{
Expand Down Expand Up @@ -790,6 +794,8 @@ bool embObjMotionControl::fromConfig_Step2(yarp::os::Searchable &config)


///////// GENERAL MECHANICAL INFO


{
if(!_mcparser->parseAxisInfo(config, _axisMap, _axesInfo))
return false;
Expand Down Expand Up @@ -1585,18 +1591,6 @@ bool embObjMotionControl::update(eOprotID32_t id32, double timestamp, void *rxda
}
}


if ((_printCounter % 1000) == 0)
{
_printCounter = 0;
if(!getTemperaturesRaw(_temperatureValues))
{
yError("ERROR IN GETTING SOME TEMPERATURES");
}
}
++_printCounter;


return true;
}

Expand Down Expand Up @@ -3494,6 +3488,11 @@ bool embObjMotionControl::getRemoteVariableRaw(std::string key, yarp::os::Bottle
Bottle& r = val.addList(); for (int i = 0; i < _njoints; i++) { int tmp = 0; getHasHallSensorRaw(i, tmp); r.addInt32(tmp); }
return true;
}
else if (key == "hasTempSensor")
{
Bottle& r = val.addList(); for (int i = 0; i < _njoints; i++) { int tmp = 0; getHasTempSensorsRaw(i, tmp); r.addInt32(tmp); }
return true;
}
else if (key == "TemperatureSensorType")
{
Bottle& r = val.addList(); for (int i = 0; i<_njoints; i++) { int tmp = 0; getTemperatureSensorTypeRaw(i, tmp); r.addInt32(tmp); }
Expand Down Expand Up @@ -5440,4 +5439,3 @@ bool embObjMotionControl::getLastJointFaultRaw(int j, int& fault, std::string& m
}

// eof

Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,8 @@ class yarp::dev::embObjMotionControl: public DeviceDriver,
double * _temperatureValues;
std::vector<eomc::kalmanFilterParams_t> _kalman_params; /** Kalman filter parameters */


std::vector<std::unique_ptr<eomc::ITemperatureSensor>> _temperatureSensorsVector;

eomc::focBasedSpecificInfo_t * _foc_based_info;

std::vector<eomc::encoder_t> _jointEncs;
Expand Down
5 changes: 3 additions & 2 deletions src/libraries/icubmod/embObjMotionControl/eomcParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ using namespace yarp::dev;
using namespace yarp::os;
using namespace yarp::dev::eomc;

static constexpr double _temperatureFactor_degcel2raw_pt100 = 1;
static constexpr double _temperatureFactor_degcel2raw_pt1000 = 1;



yarp::dev::eomc::Parser::Parser(int numofjoints, string boardname)
{
Expand Down Expand Up @@ -2205,6 +2205,7 @@ bool Parser::parseGearboxValues(yarp::os::Searchable &config, double gearbox_M2J
}
}


return true;
}

Expand Down
3 changes: 0 additions & 3 deletions src/libraries/icubmod/embObjMotionControl/eomcParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,7 @@ class Parser
bool parseJointsetCfgGroup(yarp::os::Searchable &config, std::vector<JointsSet> &jsets, std::vector<int> &jointtoset);
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 parseTemperatureLimits(yarp::os::Searchable &config, std::vector<temperatureLimits_t> &temperatureLimits);

bool parseJointsLimits(yarp::os::Searchable &config, std::vector<jointLimits_t> &jointsLimits);
bool parseRotorsLimits(yarp::os::Searchable &config, std::vector<rotorLimits_t> &rotorsLimits);
bool parseCouplingInfo(yarp::os::Searchable &config, couplingInfo_t &couplingInfo);
Expand All @@ -631,7 +629,6 @@ class Parser
bool parseImpedanceGroup(yarp::os::Searchable &config,std::vector<impedanceParameters_t> &impedance);
bool parseDeadzoneValue(yarp::os::Searchable &config, double deadzone[], bool *found);
bool parseKalmanFilterParams(yarp::os::Searchable &config, std::vector<kalmanFilterParams_t> &kalmanFilterParams);

};

}}}; //close namespaces
Expand Down

0 comments on commit 388b177

Please sign in to comment.