diff --git a/iCubGenova11/CMakeLists.txt b/iCubGenova11/CMakeLists.txt
index dfec567898..45feb56b49 100644
--- a/iCubGenova11/CMakeLists.txt
+++ b/iCubGenova11/CMakeLists.txt
@@ -10,4 +10,5 @@ yarp_install(DIRECTORY cartesian DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/$
yarp_install(DIRECTORY wrappers DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY hardware DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
yarp_install(DIRECTORY camera DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
-yarp_install(DIRECTORY estimators DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
+yarp_install(DIRECTORY estimators DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
+yarp_install(DIRECTORY checker DESTINATION ${ICUBCONTRIB_ROBOTS_INSTALL_DIR}/${appname})
diff --git a/iCubGenova11/calibrators/left_arm-calib.xml b/iCubGenova11/calibrators/left_arm-calib.xml
index d5466212ed..f6048e598e 100644
--- a/iCubGenova11/calibrators/left_arm-calib.xml
+++ b/iCubGenova11/calibrators/left_arm-calib.xml
@@ -31,7 +31,7 @@
2 2 2 2 90 90 90 90 90 90 90 90 90 90 90 90
- (0 1 2 3) (4) (5 6 7) (8 9 11 13) (10 12 14 15)
+ (0 1 2 3) (4) (5 6 7) (8 9 11 13) (10 12 14)
left_arm-mc_remapper
diff --git a/iCubGenova11/calibrators/right_arm-calib.xml b/iCubGenova11/calibrators/right_arm-calib.xml
index f42631312f..9d82a14b65 100644
--- a/iCubGenova11/calibrators/right_arm-calib.xml
+++ b/iCubGenova11/calibrators/right_arm-calib.xml
@@ -33,7 +33,7 @@
- (0 1 2 3) (4) (5 6) (8 9 11 13) (10 12 14 15)
+ (0 1 2 3) (4) (5 6) (8 9 11 13) (10 12 14)
@@ -47,4 +47,3 @@
-
diff --git a/iCubGenova11/checker/fineCalibrationCheckerConfig.xml b/iCubGenova11/checker/fineCalibrationCheckerConfig.xml
new file mode 100644
index 0000000000..92f857d999
--- /dev/null
+++ b/iCubGenova11/checker/fineCalibrationCheckerConfig.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ fineCalibrationChecker
+ iCubGenova11
+ /left_arm/raw_data
+
+ (l_shoulder_pitch, l_shoulder_roll, l_shoulder_yaw, l_elbow)
+
+ (58559, 22639, 48830, 51983)
+
+ (0, -9.2, -17.1, -2.7 )
+ (262144, 262144, 262144, 262144)
+
+
+
+
+ left_arm-eb1-j0_3-mc
+
+
+
+
+
+
+
diff --git a/iCubGenova11/icub_all_no_legs.xml b/iCubGenova11/icub_all_no_legs.xml
index 3eaf962f4d..cf8801a774 100644
--- a/iCubGenova11/icub_all_no_legs.xml
+++ b/iCubGenova11/icub_all_no_legs.xml
@@ -95,5 +95,9 @@
+
+
+
+
diff --git a/iCubGenova11/wrappers/motorControl/left_arm-mc-rawval-nws_wrapper.xml b/iCubGenova11/wrappers/motorControl/left_arm-mc-rawval-nws_wrapper.xml
new file mode 100644
index 0000000000..28b19a62b1
--- /dev/null
+++ b/iCubGenova11/wrappers/motorControl/left_arm-mc-rawval-nws_wrapper.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ /left_arm/raw_data
+ 2
+
+ left_arm-eb1-j0_3-mc
+
+
+
\ No newline at end of file
diff --git a/iCubGenova11/wrappers/motorControl/right_arm-mc-rawval-nws_wrapper.xml b/iCubGenova11/wrappers/motorControl/right_arm-mc-rawval-nws_wrapper.xml
new file mode 100644
index 0000000000..6912c0ad75
--- /dev/null
+++ b/iCubGenova11/wrappers/motorControl/right_arm-mc-rawval-nws_wrapper.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ /right_arm/raw_data
+ 2
+
+ right_arm-eb3-j0_3-mc
+
+
+
\ No newline at end of file
diff --git a/tests/dry-run/check-xml/schemas/wrapper.xsd b/tests/dry-run/check-xml/schemas/wrapper.xsd
index 70068f93e5..45e9271163 100644
--- a/tests/dry-run/check-xml/schemas/wrapper.xsd
+++ b/tests/dry-run/check-xml/schemas/wrapper.xsd
@@ -75,6 +75,7 @@
+
diff --git a/tests/dry-run/check-xml/src/check-xml.cpp b/tests/dry-run/check-xml/src/check-xml.cpp
index 86577d7db5..1ec5d114a1 100644
--- a/tests/dry-run/check-xml/src/check-xml.cpp
+++ b/tests/dry-run/check-xml/src/check-xml.cpp
@@ -110,7 +110,51 @@ bool loadXmlFile(const std::string& robot_dir, const std::string& filename, pugi
}
}
-bool checkWrappersRemappers(const std::string& robot_dir, std::vector& vectorAllFiles,
+/**
+check wrappers that are independent from calibrators and remappers
+1- find devices that are inside hardware/motorControl whose file ends with -mc.xml
+2- for each file found, look for the device name and save in a list
+3- compare this list of targets with the devices inside *-rawval-nws_wrapper.xml
+ */
+bool checkMotorControlWrappers(const std::string& robot_dir, std::vector& vectorAllFiles, std::vector& vectorUnremapped, bool& pass){
+ std::vector list_of_targets;
+ pugi::xml_document doc_mc;
+ std::string device, target;
+
+ for (auto ele : vectorAllFiles)
+ {
+ if(ele.find("hardware/motorControl") != std::string::npos && ele.find("-mc.xml") != std::string::npos) {
+ if(!loadXmlFile(robot_dir, ele, doc_mc)) return false;
+ pugi::xpath_node device_name = doc_mc.select_node("device");
+ device = trim(device_name.node().attribute("name").value());
+ std::cout << "Adding device: " << device << " to the list of targets to be checked" << std::endl;
+ list_of_targets.push_back(device);
+ doc_mc.reset();
+ }
+ }
+
+ for (auto ele : vectorAllFiles)
+ {
+ if(ele.find("wrappers/motorControl") != std::string::npos && ele.find("rawval-nws_wrapper.xml") != std::string::npos) {
+ if(!loadXmlFile(robot_dir, ele, doc_mc)) return false;
+ pugi::xpath_node action_startup = doc_mc.select_node("//action[@phase='startup']/param[@name='device']/text()");
+ target = trim(action_startup.node().value());
+ if(std::find(list_of_targets.begin(), list_of_targets.end(), target) != list_of_targets.end()){
+ vectorUnremapped.push_back(ele);
+ std::cout << target << " - MOTOR CONTROL WRAPPER CHECK PASSED!" << std::endl;
+ }
+ else{
+ std::cerr << target << " - MOTOR CONTROL WRAPPER CHECK FAILED!" << std::endl;
+ pass = false;
+ }
+ doc_mc.reset();
+ }
+ }
+
+ return true;
+}
+
+bool checkWrappersRemappers(const std::string& robot_dir, std::vector& vectorAllFiles, std::vector& vectorUnremapped,
const std::string& part, const std::string& target, bool& pass){
bool found = false;
pugi::xml_document doc_wrapper, doc_remapper;
@@ -133,6 +177,12 @@ bool checkWrappersRemappers(const std::string& robot_dir, std::vector& vect
}
bool checkCalibratorsWrappersRemappers(const std::string& robot_dir, std::vector& vectorAllFiles, bool& pass){
+ // save first list of unremapped devices to skip the check for wrappers/remappers
+ // we cannot check the single element inside the for loop by passing ele to method
+ // since we first need to fill the list of targets by looking in hardware/motorControl directory
+ // while the unramapped devices are inside wrappers/motorControl directory
+ std::vector vectorUnremapped;
+ checkMotorControlWrappers(robot_dir, vectorAllFiles, vectorUnremapped, pass);
+
for (auto ele : vectorAllFiles)
{
std::string part, target1, target2;
@@ -209,7 +266,7 @@ bool checkCalibratorsWrappersRemappers(const std::string& robot_dir, std::vector
pass = false;
}
- checkWrappersRemappers(robot_dir, vectorAllFiles, part, target1, pass);
+ checkWrappersRemappers(robot_dir, vectorAllFiles, vectorUnremapped, part, target1, pass);
if(ele.find("arm") != std::string::npos){
checkCartesian(robot_dir, vectorAllFiles, part, target1, pass);
}
@@ -248,7 +305,7 @@ int main(int argc, char *argv[]) {
std::cout << std::endl << "2 - test included xml files presence **************" << std::endl << std::endl;
if(!checkIncludedFiles(robot_dir, vectorAllFiles, filename, doc)) return EXIT_FAILURE;
-
+
// checks calibrators/wrappers/remappers/cartesian xml files consistency
std::cout << std::endl << "3 - test calibrators/wrappers/remappers/cartesian xml files consistency **************" << std::endl << std::endl;