24 const std::string &_context)
28 yarp::os::ResourceFinder skinRF;
29 skinRF.setDefaultContext(_context.c_str());
30 skinRF.setDefaultConfigFile(_from.c_str());
31 skinRF.configure(0,NULL);
33 yarp::os::Bottle &skinConf = skinRF.findGroup(
"SKIN_EVENTS");
35 if(!skinConf.isNull())
37 yInfo(
"[iCubSkin] SKIN_EVENTS section found");
39 yarp::os::Bottle* skinPartList;
40 if(skinConf.check(
"skinParts"))
42 skinPartList = skinConf.find(
"skinParts").asList();
46 yError(
"[iCubSkin] No skinParts field found!");
50 yarp::os::Bottle *taxelPosFiles;
51 if(skinConf.check(
"taxelPositionFiles"))
53 taxelPosFiles = skinConf.find(
"taxelPositionFiles").asList();
57 yError(
"[iCubSkin] No taxelPositionFiles field found!");
61 for (
int i = 0; i < skinPartList->size(); ++i)
63 std::string taxelPosFile = taxelPosFiles->get(i).asString().c_str();
64 std::string filePath = skinRF.findFile(taxelPosFile.c_str());
67 yInfo(
"[iCubSkin] filePath [%i] %s\n",i,filePath.c_str());
69 if (
p.setTaxelPosesFromFile(filePath))
78 yError(
"[iCubSkin] No skin configuration files found.");
84 yError(
"[iCubSkin] No valid ini file found. Skin is empty!");