From 8e42a5ec502c68b10f6db89ee882da09d97f7a33 Mon Sep 17 00:00:00 2001 From: "Daniele E. Domenichelli" Date: Tue, 11 Jun 2019 11:50:49 +0200 Subject: [PATCH] Generate documentation --- doxygen/doc/html/CameraTest_8cpp_source.html | 181 ++ doxygen/doc/html/CameraTest_8h_source.html | 128 + ...trolReachingToleranceTest_8cpp_source.html | 280 ++ ...ontrolReachingToleranceTest_8h_source.html | 124 + ...trolSimpleP2pMovementTest_8cpp_source.html | 207 ++ ...ontrolSimpleP2pMovementTest_8h_source.html | 119 + .../doc/html/ControlModes_8cpp_source.html | 641 +++++ doxygen/doc/html/ControlModes_8h_source.html | 172 ++ .../doc/html/DemoRedBallTest_8cpp_source.html | 459 +++ .../doc/html/DemoRedBallTest_8h_source.html | 152 + .../doc/html/ExampleFixture_8cpp_source.html | 133 + .../doc/html/ExampleFixture_8h_source.html | 113 + doxygen/doc/html/ExampleTest_8cpp_source.html | 144 + doxygen/doc/html/ExampleTest_8h_source.html | 117 + ...ternalPid_2plotDataPosition_8m_source.html | 110 + .../doc/html/FtSensorTest_8cpp_source.html | 155 + doxygen/doc/html/FtSensorTest_8h_source.html | 124 + ...GazeControlSimpleLookTest_8cpp_source.html | 199 ++ .../GazeControlSimpleLookTest_8h_source.html | 119 + .../doc/html/MotorStiction_8cpp_source.html | 539 ++++ doxygen/doc/html/MotorStiction_8h_source.html | 175 ++ doxygen/doc/html/MotorTest_8cpp_source.html | 412 +++ doxygen/doc/html/MotorTest_8h_source.html | 138 + .../html/OpenloopConsistency_8cpp_source.html | 545 ++++ .../html/OpenloopConsistency_8h_source.html | 162 ++ .../doc/html/PortsFrequency_8cpp_source.html | 238 ++ .../doc/html/PortsFrequency_8h_source.html | 166 ++ ...ontrolAccuracyExternalPid_8cpp_source.html | 469 +++ ...nControlAccuracyExternalPid_8h_source.html | 159 + .../PositionControlAccuracy_8cpp_source.html | 428 +++ .../PositionControlAccuracy_8h_source.html | 153 + .../doc/html/PositionDirect_8cpp_source.html | 338 +++ .../doc/html/PositionDirect_8h_source.html | 158 + doxygen/doc/html/README_8md_source.html | 73 + .../SensorsDuplicateReadings_8cpp_source.html | 220 ++ .../SensorsDuplicateReadings_8h_source.html | 160 ++ .../doc/html/SkinWrapperTest_8cpp_source.html | 203 ++ .../doc/html/SkinWrapperTest_8h_source.html | 122 + .../doc/html/SystemStatus_8cpp_source.html | 202 ++ doxygen/doc/html/SystemStatus_8h_source.html | 133 + .../TorqueControlAccuracy_8cpp_source.html | 375 +++ .../html/TorqueControlAccuracy_8h_source.html | 148 + .../TorqueControlConsistency_8cpp_source.html | 396 +++ .../TorqueControlConsistency_8h_source.html | 163 ++ ...ControlGravityConsistency_8cpp_source.html | 227 ++ ...ueControlGravityConsistency_8h_source.html | 127 + ...rqueControlStiffDampCheck_8cpp_source.html | 634 ++++ ...TorqueControlStiffDampCheck_8h_source.html | 155 + doxygen/doc/html/annotated.html | 100 + doxygen/doc/html/bc_s.png | Bin 0 -> 676 bytes doxygen/doc/html/bdwn.png | Bin 0 -> 147 bytes doxygen/doc/html/classCameraTest.html | 118 + ...CartesianControlReachingToleranceTest.html | 112 + ...CartesianControlSimpleP2pMovementTest.html | 112 + doxygen/doc/html/classControlModes.html | 155 + doxygen/doc/html/classDemoRedBallTest.html | 113 + doxygen/doc/html/classExampleTest.html | 115 + doxygen/doc/html/classFtSensorTest.html | 113 + .../html/classGazeControlSimpleLookTest.html | 110 + doxygen/doc/html/classImu.html | 129 + doxygen/doc/html/classJointLimits.html | 154 + .../doc/html/classMotorEncodersSignCheck.html | 138 + doxygen/doc/html/classMotorTest.html | 135 + .../doc/html/classMovementReferencesTest.html | 128 + .../html/classOpticalEncodersConsistency.html | 162 ++ .../doc/html/classOpticalEncodersDrift.html | 141 + .../html/classPositionControlAccuracy.html | 142 + ...lassPositionControlAccuracyExernalPid.html | 150 + doxygen/doc/html/classPositionDirect.html | 143 + .../html/classSensorsDuplicateReadings.html | 118 + doxygen/doc/html/classSkinWrapperTest.html | 104 + .../doc/html/classTorqueControlAccuracy.html | 136 + .../classTorqueControlGravityConsistency.html | 106 + doxygen/doc/html/classes.html | 113 + doxygen/doc/html/closed.png | Bin 0 -> 132 bytes .../dir_0c804fff733e48d30e1bfca9c425d2ef.html | 78 + .../dir_1ff6e3a7912c7481e100b734d4f6c773.html | 78 + .../dir_22920df90588b6b2fe85332a8ebd338b.html | 78 + .../dir_2cd82cc5f0bc63ecdc472ec984cf3931.html | 78 + .../dir_2e031885cc4d3ad1ede3959cab4922b2.html | 78 + .../dir_34519bff5ae72130fe71a8620cbf1fc0.html | 78 + .../dir_3931dff736a77fff33906f875a0db8d7.html | 78 + .../dir_3b1318bac6af3327e49b6f2c90562c86.html | 78 + .../dir_52bb83cdfa78eea1d57abbea3c8e3d28.html | 78 + .../dir_558c7ef467b8503bdadaa3baf0d6d956.html | 78 + .../dir_588ff9359adf1870eba017afede6f94d.html | 78 + .../dir_58c9f48d72e7737305eca65c820f5d4c.html | 78 + .../dir_59425e443f801f1f2fd8bbe4959a3ccf.html | 80 + .../dir_5eba7e4699fbf6bf477756242c12a311.html | 78 + .../dir_6355ee7e8e7fccbf90712e6e68524328.html | 78 + .../dir_67a6d6fd93427d49c4a56e9e89568513.html | 78 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.html | 86 + .../dir_684cb237cc589112c257fb2b82bbd35f.html | 82 + .../dir_6fc1adc4fe0a69d5cc9f87dc6006118e.html | 78 + .../dir_77ddb71cb6ac5d6664d62b97f5abbc63.html | 78 + .../dir_7afe760acf634ae748bef9bf87f73d01.html | 78 + .../dir_7f61241abd7fbdf9954805296c6d0bed.html | 78 + .../dir_977d3371830c4bec444f000fc75dc817.html | 80 + .../dir_9d63e44c2cb0ede5b4e8da10f50f63e8.html | 78 + .../dir_9e7e413093116f0711b4468be0f53b25.html | 78 + .../dir_9f31a7a24dbe04ff6c400c17d7d6f27b.html | 78 + .../dir_a74cd033cebccd01e109eef31bc43830.html | 78 + .../dir_bb6085b5660958491f908beff56f4e11.html | 82 + .../dir_c4278cdbadca2a5e8f60a98cd2517319.html | 82 + .../dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html | 78 + .../dir_d0781ab5bdb71555a7f6c72636ba8088.html | 78 + .../dir_d6cc1804077fb7a0bee471bebe09c948.html | 78 + .../dir_de7c96bd180ef87bf5425ed419472c36.html | 78 + .../dir_e570188f87838128b6c12995b595ee3e.html | 82 + .../dir_ea8250e1e424defa140420a75e35c564.html | 78 + .../dir_ec9ed375a115a2645126306c0ce5bc8a.html | 78 + .../dir_f0b080432f22d2b191784a0df690e6ac.html | 78 + .../dir_f821a201e4a79ecb65e6cdb9d62ed3ae.html | 78 + .../dir_f9de59b413a1f1ae04ea264c82cc2719.html | 78 + .../dir_ff120bfd69174aceba0b7c2c1b4a03e3.html | 78 + doxygen/doc/html/doc.png | Bin 0 -> 746 bytes doxygen/doc/html/doxygen.css | 1793 ++++++++++++ doxygen/doc/html/doxygen.png | Bin 0 -> 3779 bytes doxygen/doc/html/doxygen.svg | 26 + doxygen/doc/html/dynsections.js | 128 + .../encoderConsistencyPlotAll_8m_source.html | 121 + doxygen/doc/html/files.html | 183 ++ doxygen/doc/html/folderclosed.png | Bin 0 -> 616 bytes doxygen/doc/html/folderopen.png | Bin 0 -> 597 bytes doxygen/doc/html/group__icub-tests.html | 154 + .../iKiniDynConsistencyTest_8cpp_source.html | 343 +++ .../iKiniDynConsistencyTest_8h_source.html | 144 + doxygen/doc/html/imu_8cpp_source.html | 321 +++ doxygen/doc/html/imu_8h_source.html | 144 + doxygen/doc/html/index.html | 94 + doxygen/doc/html/installation.html | 122 + doxygen/doc/html/jointLimits_8cpp_source.html | 502 ++++ doxygen/doc/html/jointLimits_8h_source.html | 159 + doxygen/doc/html/jquery.js | 35 + .../html/md_C_1_dev_icub-tests_README.html | 93 + ...ub-tests_src_cartesian-control_README.html | 83 + ...ev_icub-tests_src_gaze-control_README.html | 82 + ...b-tests_src_models-consistency_README.html | 80 + ...icub-tests_src_skinWrapperTest_README.html | 80 + ...i_Workspace_iit_src_icub-tests_README.html | 91 + ...ub-tests_src_cartesian-control_README.html | 79 + ...rc_icub-tests_src_gaze-control_README.html | 78 + ...b-tests_src_models-consistency_README.html | 76 + ...icub-tests_src_skinWrapperTest_README.html | 76 + ...icub-tests_icub-tests_gh-pages_README.html | 101 + ...gh-pages_src_cartesian-control_README.html | 83 + ...ests_gh-pages_src_gaze-control_README.html | 82 + ...h-pages_src_models-consistency_README.html | 80 + ...s_gh-pages_src_skinWrapperTest_README.html | 80 + ...icub_tests_icub_tests_gh_pages_README.html | 99 + ...gh_pages_src_cartesian_control_README.html | 81 + ...ests_gh_pages_src_gaze_control_README.html | 80 + ...h_pages_src_models_consistency_README.html | 78 + ...s_gh_pages_src_skinWrapperTest_README.html | 78 + doxygen/doc/html/menu.js | 51 + doxygen/doc/html/menudata.js | 32 + doxygen/doc/html/modules.html | 79 + .../motorEncodersConsistency_8cpp_source.html | 712 +++++ .../motorEncodersConsistency_8h_source.html | 208 ++ .../motorEncodersSignCheck_8cpp_source.html | 345 +++ .../motorEncodersSignCheck_8h_source.html | 152 + .../movementReferencesTest_8cpp_source.html | 473 +++ .../movementReferencesTest_8h_source.html | 154 + doxygen/doc/html/nav_f.png | Bin 0 -> 153 bytes doxygen/doc/html/nav_g.png | Bin 0 -> 95 bytes doxygen/doc/html/nav_h.png | Bin 0 -> 98 bytes doxygen/doc/html/oneFile__plot_8m_source.html | 112 + doxygen/doc/html/open.png | Bin 0 -> 123 bytes .../opticalEncodersDrift_8cpp_source.html | 471 +++ .../html/opticalEncodersDrift_8h_source.html | 157 + doxygen/doc/html/pages.html | 85 + .../doc/html/plotDataPosition_8m_source.html | 110 + .../doc/html/plotDataTorque_8m_source.html | 108 + ...ternalPid_2plotDataPosition_8m_source.html | 108 + ...-accuracy_2plotDataPosition_8m_source.html | 108 + doxygen/doc/html/search/all_0.html | 37 + doxygen/doc/html/search/all_0.js | 4 + doxygen/doc/html/search/all_1.html | 37 + doxygen/doc/html/search/all_1.js | 7 + doxygen/doc/html/search/all_2.html | 37 + doxygen/doc/html/search/all_2.js | 4 + doxygen/doc/html/search/all_3.html | 37 + doxygen/doc/html/search/all_3.js | 4 + doxygen/doc/html/search/all_4.html | 37 + doxygen/doc/html/search/all_4.js | 4 + doxygen/doc/html/search/all_5.html | 37 + doxygen/doc/html/search/all_5.js | 4 + doxygen/doc/html/search/all_6.html | 37 + doxygen/doc/html/search/all_6.js | 11 + doxygen/doc/html/search/all_7.html | 37 + doxygen/doc/html/search/all_7.js | 4 + doxygen/doc/html/search/all_8.html | 37 + doxygen/doc/html/search/all_8.js | 6 + doxygen/doc/html/search/all_9.html | 37 + doxygen/doc/html/search/all_9.js | 5 + doxygen/doc/html/search/all_a.html | 37 + doxygen/doc/html/search/all_a.js | 6 + doxygen/doc/html/search/all_b.html | 37 + doxygen/doc/html/search/all_b.js | 5 + doxygen/doc/html/search/all_c.html | 37 + doxygen/doc/html/search/all_c.js | 5 + doxygen/doc/html/search/all_d.html | 37 + doxygen/doc/html/search/all_d.js | 4 + doxygen/doc/html/search/classes_0.html | 37 + doxygen/doc/html/search/classes_0.js | 7 + doxygen/doc/html/search/classes_1.html | 37 + doxygen/doc/html/search/classes_1.js | 4 + doxygen/doc/html/search/classes_2.html | 37 + doxygen/doc/html/search/classes_2.js | 4 + doxygen/doc/html/search/classes_3.html | 37 + doxygen/doc/html/search/classes_3.js | 4 + doxygen/doc/html/search/classes_4.html | 37 + doxygen/doc/html/search/classes_4.js | 4 + doxygen/doc/html/search/classes_5.html | 37 + doxygen/doc/html/search/classes_5.js | 4 + doxygen/doc/html/search/classes_6.html | 37 + doxygen/doc/html/search/classes_6.js | 4 + doxygen/doc/html/search/classes_7.html | 37 + doxygen/doc/html/search/classes_7.js | 6 + doxygen/doc/html/search/classes_8.html | 37 + doxygen/doc/html/search/classes_8.js | 5 + doxygen/doc/html/search/classes_9.html | 37 + doxygen/doc/html/search/classes_9.js | 6 + doxygen/doc/html/search/classes_a.html | 37 + doxygen/doc/html/search/classes_a.js | 5 + doxygen/doc/html/search/classes_b.html | 37 + doxygen/doc/html/search/classes_b.js | 5 + doxygen/doc/html/search/close.png | Bin 0 -> 273 bytes doxygen/doc/html/search/close.svg | 31 + doxygen/doc/html/search/groups_0.html | 37 + doxygen/doc/html/search/groups_0.js | 4 + doxygen/doc/html/search/mag_sel.png | Bin 0 -> 465 bytes doxygen/doc/html/search/mag_sel.svg | 74 + doxygen/doc/html/search/nomatches.html | 13 + doxygen/doc/html/search/pages_0.html | 37 + doxygen/doc/html/search/pages_0.js | 10 + doxygen/doc/html/search/pages_1.html | 37 + doxygen/doc/html/search/pages_1.js | 4 + doxygen/doc/html/search/search.css | 257 ++ doxygen/doc/html/search/search.js | 816 ++++++ doxygen/doc/html/search/search_l.png | Bin 0 -> 567 bytes doxygen/doc/html/search/search_m.png | Bin 0 -> 158 bytes doxygen/doc/html/search/search_r.png | Bin 0 -> 553 bytes doxygen/doc/html/search/searchdata.js | 24 + doxygen/doc/html/splitbar.png | Bin 0 -> 314 bytes ...2cartesian-control_2README_8md_source.html | 73 + .../src_2gaze-control_2README_8md_source.html | 73 + ...models-consistency_2README_8md_source.html | 73 + ...c_2skinWrapperTest_2README_8md_source.html | 73 + doxygen/doc/html/sync_off.png | Bin 0 -> 853 bytes doxygen/doc/html/sync_on.png | Bin 0 -> 845 bytes doxygen/doc/html/tab_a.png | Bin 0 -> 142 bytes doxygen/doc/html/tab_b.png | Bin 0 -> 169 bytes doxygen/doc/html/tab_h.png | Bin 0 -> 177 bytes doxygen/doc/html/tab_s.png | Bin 0 -> 184 bytes doxygen/doc/html/tabs.css | 1 + .../torqueStiffDamp__plotAll_8m_source.html | 139 + .../html/torqueStiffDamp__plot_8m_source.html | 106 + doxygen/doc/html/writing-and-running.html | 276 ++ doxygen/doc/latex/Makefile | 43 + doxygen/doc/latex/annotated.tex | 25 + doxygen/doc/latex/classCameraTest.tex | 58 + ...sCartesianControlReachingToleranceTest.tex | 55 + ...sCartesianControlSimpleP2pMovementTest.tex | 55 + doxygen/doc/latex/classControlModes.tex | 97 + doxygen/doc/latex/classDemoRedBallTest.tex | 57 + doxygen/doc/latex/classExampleTest.tex | 57 + doxygen/doc/latex/classFtSensorTest.tex | 57 + .../latex/classGazeControlSimpleLookTest.tex | 54 + doxygen/doc/latex/classImu.tex | 71 + doxygen/doc/latex/classJointLimits.tex | 84 + .../doc/latex/classMotorEncodersSignCheck.tex | 74 + doxygen/doc/latex/classMotorTest.tex | 64 + .../doc/latex/classMovementReferencesTest.tex | 62 + .../latex/classOpticalEncodersConsistency.tex | 83 + .../doc/latex/classOpticalEncodersDrift.tex | 77 + .../latex/classPositionControlAccuracy.tex | 79 + ...classPositionControlAccuracyExernalPid.tex | 83 + doxygen/doc/latex/classPositionDirect.tex | 78 + .../latex/classSensorsDuplicateReadings.tex | 62 + doxygen/doc/latex/classSkinWrapperTest.tex | 40 + .../doc/latex/classTorqueControlAccuracy.tex | 76 + .../classTorqueControlGravityConsistency.tex | 44 + .../dir_0c804fff733e48d30e1bfca9c425d2ef.tex | 2 + .../dir_1ff6e3a7912c7481e100b734d4f6c773.tex | 2 + .../dir_22920df90588b6b2fe85332a8ebd338b.tex | 2 + .../dir_2cd82cc5f0bc63ecdc472ec984cf3931.tex | 2 + .../dir_2e031885cc4d3ad1ede3959cab4922b2.tex | 2 + .../dir_34519bff5ae72130fe71a8620cbf1fc0.tex | 2 + .../dir_3931dff736a77fff33906f875a0db8d7.tex | 2 + .../dir_3b1318bac6af3327e49b6f2c90562c86.tex | 2 + .../dir_52bb83cdfa78eea1d57abbea3c8e3d28.tex | 2 + .../dir_588ff9359adf1870eba017afede6f94d.tex | 2 + .../dir_58c9f48d72e7737305eca65c820f5d4c.tex | 2 + .../dir_5eba7e4699fbf6bf477756242c12a311.tex | 2 + .../dir_6355ee7e8e7fccbf90712e6e68524328.tex | 2 + .../dir_67a6d6fd93427d49c4a56e9e89568513.tex | 2 + .../dir_68267d1309a1af8e8297ef4c3efbcdba.tex | 9 + .../dir_684cb237cc589112c257fb2b82bbd35f.tex | 5 + .../dir_6fc1adc4fe0a69d5cc9f87dc6006118e.tex | 2 + .../dir_77ddb71cb6ac5d6664d62b97f5abbc63.tex | 2 + .../dir_7afe760acf634ae748bef9bf87f73d01.tex | 2 + .../dir_7f61241abd7fbdf9954805296c6d0bed.tex | 2 + .../dir_9d63e44c2cb0ede5b4e8da10f50f63e8.tex | 2 + .../dir_9e7e413093116f0711b4468be0f53b25.tex | 2 + .../dir_9f31a7a24dbe04ff6c400c17d7d6f27b.tex | 2 + .../dir_a74cd033cebccd01e109eef31bc43830.tex | 2 + .../dir_bb6085b5660958491f908beff56f4e11.tex | 5 + .../dir_c4278cdbadca2a5e8f60a98cd2517319.tex | 5 + .../dir_cfafba98a580ce4b62f8a6fa96d7cbb0.tex | 2 + .../dir_d0781ab5bdb71555a7f6c72636ba8088.tex | 2 + .../dir_d6cc1804077fb7a0bee471bebe09c948.tex | 2 + .../dir_de7c96bd180ef87bf5425ed419472c36.tex | 2 + .../dir_e570188f87838128b6c12995b595ee3e.tex | 5 + .../dir_ea8250e1e424defa140420a75e35c564.tex | 2 + .../dir_ec9ed375a115a2645126306c0ce5bc8a.tex | 2 + .../dir_f0b080432f22d2b191784a0df690e6ac.tex | 2 + .../dir_f821a201e4a79ecb65e6cdb9d62ed3ae.tex | 2 + .../dir_f9de59b413a1f1ae04ea264c82cc2719.tex | 2 + .../dir_ff120bfd69174aceba0b7c2c1b4a03e3.tex | 2 + doxygen/doc/latex/doxygen.sty | 576 ++++ doxygen/doc/latex/group__icub-tests.tex | 67 + doxygen/doc/latex/index.tex | 7 + doxygen/doc/latex/installation.tex | 38 + doxygen/doc/latex/longtable_doxygen.sty | 448 +++ doxygen/doc/latex/make.bat | 28 + .../latex/md_C_1_dev_icub-tests_README.tex | 22 + ...cub-tests_src_cartesian-control_README.tex | 9 + ...dev_icub-tests_src_gaze-control_README.tex | 8 + ...ub-tests_src_models-consistency_README.tex | 5 + ..._icub-tests_src_skinWrapperTest_README.tex | 5 + ...li_Workspace_iit_src_icub-tests_README.tex | 39 + ...cub-tests_src_cartesian-control_README.tex | 9 + ...src_icub-tests_src_gaze-control_README.tex | 8 + ...ub-tests_src_models-consistency_README.tex | 5 + ..._icub-tests_src_skinWrapperTest_README.tex | 5 + ..._icub-tests_icub-tests_gh-pages_README.tex | 40 + ..._gh-pages_src_cartesian-control_README.tex | 9 + ...tests_gh-pages_src_gaze-control_README.tex | 8 + ...gh-pages_src_models-consistency_README.tex | 5 + ...ts_gh-pages_src_skinWrapperTest_README.tex | 5 + ..._icub_tests_icub_tests_gh_pages_README.tex | 40 + ..._gh_pages_src_cartesian_control_README.tex | 9 + ...tests_gh_pages_src_gaze_control_README.tex | 8 + ...gh_pages_src_models_consistency_README.tex | 5 + ...ts_gh_pages_src_skinWrapperTest_README.tex | 5 + doxygen/doc/latex/modules.tex | 4 + doxygen/doc/latex/refman.tex | 231 ++ doxygen/doc/latex/tabu_doxygen.sty | 2557 +++++++++++++++++ doxygen/doc/latex/writing-and-running.tex | 256 ++ index.html | 6 +- 351 files changed, 36027 insertions(+), 3 deletions(-) create mode 100644 doxygen/doc/html/CameraTest_8cpp_source.html create mode 100644 doxygen/doc/html/CameraTest_8h_source.html create mode 100644 doxygen/doc/html/CartesianControlReachingToleranceTest_8cpp_source.html create mode 100644 doxygen/doc/html/CartesianControlReachingToleranceTest_8h_source.html create mode 100644 doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8cpp_source.html create mode 100644 doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8h_source.html create mode 100644 doxygen/doc/html/ControlModes_8cpp_source.html create mode 100644 doxygen/doc/html/ControlModes_8h_source.html create mode 100644 doxygen/doc/html/DemoRedBallTest_8cpp_source.html create mode 100644 doxygen/doc/html/DemoRedBallTest_8h_source.html create mode 100644 doxygen/doc/html/ExampleFixture_8cpp_source.html create mode 100644 doxygen/doc/html/ExampleFixture_8h_source.html create mode 100644 doxygen/doc/html/ExampleTest_8cpp_source.html create mode 100644 doxygen/doc/html/ExampleTest_8h_source.html create mode 100644 doxygen/doc/html/ExternalPid_2plotDataPosition_8m_source.html create mode 100644 doxygen/doc/html/FtSensorTest_8cpp_source.html create mode 100644 doxygen/doc/html/FtSensorTest_8h_source.html create mode 100644 doxygen/doc/html/GazeControlSimpleLookTest_8cpp_source.html create mode 100644 doxygen/doc/html/GazeControlSimpleLookTest_8h_source.html create mode 100644 doxygen/doc/html/MotorStiction_8cpp_source.html create mode 100644 doxygen/doc/html/MotorStiction_8h_source.html create mode 100644 doxygen/doc/html/MotorTest_8cpp_source.html create mode 100644 doxygen/doc/html/MotorTest_8h_source.html create mode 100644 doxygen/doc/html/OpenloopConsistency_8cpp_source.html create mode 100644 doxygen/doc/html/OpenloopConsistency_8h_source.html create mode 100644 doxygen/doc/html/PortsFrequency_8cpp_source.html create mode 100644 doxygen/doc/html/PortsFrequency_8h_source.html create mode 100644 doxygen/doc/html/PositionControlAccuracyExternalPid_8cpp_source.html create mode 100644 doxygen/doc/html/PositionControlAccuracyExternalPid_8h_source.html create mode 100644 doxygen/doc/html/PositionControlAccuracy_8cpp_source.html create mode 100644 doxygen/doc/html/PositionControlAccuracy_8h_source.html create mode 100644 doxygen/doc/html/PositionDirect_8cpp_source.html create mode 100644 doxygen/doc/html/PositionDirect_8h_source.html create mode 100644 doxygen/doc/html/README_8md_source.html create mode 100644 doxygen/doc/html/SensorsDuplicateReadings_8cpp_source.html create mode 100644 doxygen/doc/html/SensorsDuplicateReadings_8h_source.html create mode 100644 doxygen/doc/html/SkinWrapperTest_8cpp_source.html create mode 100644 doxygen/doc/html/SkinWrapperTest_8h_source.html create mode 100644 doxygen/doc/html/SystemStatus_8cpp_source.html create mode 100644 doxygen/doc/html/SystemStatus_8h_source.html create mode 100644 doxygen/doc/html/TorqueControlAccuracy_8cpp_source.html create mode 100644 doxygen/doc/html/TorqueControlAccuracy_8h_source.html create mode 100644 doxygen/doc/html/TorqueControlConsistency_8cpp_source.html create mode 100644 doxygen/doc/html/TorqueControlConsistency_8h_source.html create mode 100644 doxygen/doc/html/TorqueControlGravityConsistency_8cpp_source.html create mode 100644 doxygen/doc/html/TorqueControlGravityConsistency_8h_source.html create mode 100644 doxygen/doc/html/TorqueControlStiffDampCheck_8cpp_source.html create mode 100644 doxygen/doc/html/TorqueControlStiffDampCheck_8h_source.html create mode 100644 doxygen/doc/html/annotated.html create mode 100644 doxygen/doc/html/bc_s.png create mode 100644 doxygen/doc/html/bdwn.png create mode 100644 doxygen/doc/html/classCameraTest.html create mode 100644 doxygen/doc/html/classCartesianControlReachingToleranceTest.html create mode 100644 doxygen/doc/html/classCartesianControlSimpleP2pMovementTest.html create mode 100644 doxygen/doc/html/classControlModes.html create mode 100644 doxygen/doc/html/classDemoRedBallTest.html create mode 100644 doxygen/doc/html/classExampleTest.html create mode 100644 doxygen/doc/html/classFtSensorTest.html create mode 100644 doxygen/doc/html/classGazeControlSimpleLookTest.html create mode 100644 doxygen/doc/html/classImu.html create mode 100644 doxygen/doc/html/classJointLimits.html create mode 100644 doxygen/doc/html/classMotorEncodersSignCheck.html create mode 100644 doxygen/doc/html/classMotorTest.html create mode 100644 doxygen/doc/html/classMovementReferencesTest.html create mode 100644 doxygen/doc/html/classOpticalEncodersConsistency.html create mode 100644 doxygen/doc/html/classOpticalEncodersDrift.html create mode 100644 doxygen/doc/html/classPositionControlAccuracy.html create mode 100644 doxygen/doc/html/classPositionControlAccuracyExernalPid.html create mode 100644 doxygen/doc/html/classPositionDirect.html create mode 100644 doxygen/doc/html/classSensorsDuplicateReadings.html create mode 100644 doxygen/doc/html/classSkinWrapperTest.html create mode 100644 doxygen/doc/html/classTorqueControlAccuracy.html create mode 100644 doxygen/doc/html/classTorqueControlGravityConsistency.html create mode 100644 doxygen/doc/html/classes.html create mode 100644 doxygen/doc/html/closed.png create mode 100644 doxygen/doc/html/dir_0c804fff733e48d30e1bfca9c425d2ef.html create mode 100644 doxygen/doc/html/dir_1ff6e3a7912c7481e100b734d4f6c773.html create mode 100644 doxygen/doc/html/dir_22920df90588b6b2fe85332a8ebd338b.html create mode 100644 doxygen/doc/html/dir_2cd82cc5f0bc63ecdc472ec984cf3931.html create mode 100644 doxygen/doc/html/dir_2e031885cc4d3ad1ede3959cab4922b2.html create mode 100644 doxygen/doc/html/dir_34519bff5ae72130fe71a8620cbf1fc0.html create mode 100644 doxygen/doc/html/dir_3931dff736a77fff33906f875a0db8d7.html create mode 100644 doxygen/doc/html/dir_3b1318bac6af3327e49b6f2c90562c86.html create mode 100644 doxygen/doc/html/dir_52bb83cdfa78eea1d57abbea3c8e3d28.html create mode 100644 doxygen/doc/html/dir_558c7ef467b8503bdadaa3baf0d6d956.html create mode 100644 doxygen/doc/html/dir_588ff9359adf1870eba017afede6f94d.html create mode 100644 doxygen/doc/html/dir_58c9f48d72e7737305eca65c820f5d4c.html create mode 100644 doxygen/doc/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html create mode 100644 doxygen/doc/html/dir_5eba7e4699fbf6bf477756242c12a311.html create mode 100644 doxygen/doc/html/dir_6355ee7e8e7fccbf90712e6e68524328.html create mode 100644 doxygen/doc/html/dir_67a6d6fd93427d49c4a56e9e89568513.html create mode 100644 doxygen/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html create mode 100644 doxygen/doc/html/dir_684cb237cc589112c257fb2b82bbd35f.html create mode 100644 doxygen/doc/html/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.html create mode 100644 doxygen/doc/html/dir_77ddb71cb6ac5d6664d62b97f5abbc63.html create mode 100644 doxygen/doc/html/dir_7afe760acf634ae748bef9bf87f73d01.html create mode 100644 doxygen/doc/html/dir_7f61241abd7fbdf9954805296c6d0bed.html create mode 100644 doxygen/doc/html/dir_977d3371830c4bec444f000fc75dc817.html create mode 100644 doxygen/doc/html/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.html create mode 100644 doxygen/doc/html/dir_9e7e413093116f0711b4468be0f53b25.html create mode 100644 doxygen/doc/html/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.html create mode 100644 doxygen/doc/html/dir_a74cd033cebccd01e109eef31bc43830.html create mode 100644 doxygen/doc/html/dir_bb6085b5660958491f908beff56f4e11.html create mode 100644 doxygen/doc/html/dir_c4278cdbadca2a5e8f60a98cd2517319.html create mode 100644 doxygen/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html create mode 100644 doxygen/doc/html/dir_d0781ab5bdb71555a7f6c72636ba8088.html create mode 100644 doxygen/doc/html/dir_d6cc1804077fb7a0bee471bebe09c948.html create mode 100644 doxygen/doc/html/dir_de7c96bd180ef87bf5425ed419472c36.html create mode 100644 doxygen/doc/html/dir_e570188f87838128b6c12995b595ee3e.html create mode 100644 doxygen/doc/html/dir_ea8250e1e424defa140420a75e35c564.html create mode 100644 doxygen/doc/html/dir_ec9ed375a115a2645126306c0ce5bc8a.html create mode 100644 doxygen/doc/html/dir_f0b080432f22d2b191784a0df690e6ac.html create mode 100644 doxygen/doc/html/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.html create mode 100644 doxygen/doc/html/dir_f9de59b413a1f1ae04ea264c82cc2719.html create mode 100644 doxygen/doc/html/dir_ff120bfd69174aceba0b7c2c1b4a03e3.html create mode 100644 doxygen/doc/html/doc.png create mode 100644 doxygen/doc/html/doxygen.css create mode 100644 doxygen/doc/html/doxygen.png create mode 100644 doxygen/doc/html/doxygen.svg create mode 100644 doxygen/doc/html/dynsections.js create mode 100644 doxygen/doc/html/encoderConsistencyPlotAll_8m_source.html create mode 100644 doxygen/doc/html/files.html create mode 100644 doxygen/doc/html/folderclosed.png create mode 100644 doxygen/doc/html/folderopen.png create mode 100644 doxygen/doc/html/group__icub-tests.html create mode 100644 doxygen/doc/html/iKiniDynConsistencyTest_8cpp_source.html create mode 100644 doxygen/doc/html/iKiniDynConsistencyTest_8h_source.html create mode 100644 doxygen/doc/html/imu_8cpp_source.html create mode 100644 doxygen/doc/html/imu_8h_source.html create mode 100644 doxygen/doc/html/index.html create mode 100644 doxygen/doc/html/installation.html create mode 100644 doxygen/doc/html/jointLimits_8cpp_source.html create mode 100644 doxygen/doc/html/jointLimits_8h_source.html create mode 100644 doxygen/doc/html/jquery.js create mode 100644 doxygen/doc/html/md_C_1_dev_icub-tests_README.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-tests_src_cartesian-control_README.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-tests_src_gaze-control_README.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-tests_src_models-consistency_README.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-tests_src_skinWrapperTest_README.html create mode 100644 doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.html create mode 100644 doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.html create mode 100644 doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.html create mode 100644 doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.html create mode 100644 doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html create mode 100644 doxygen/doc/html/menu.js create mode 100644 doxygen/doc/html/menudata.js create mode 100644 doxygen/doc/html/modules.html create mode 100644 doxygen/doc/html/motorEncodersConsistency_8cpp_source.html create mode 100644 doxygen/doc/html/motorEncodersConsistency_8h_source.html create mode 100644 doxygen/doc/html/motorEncodersSignCheck_8cpp_source.html create mode 100644 doxygen/doc/html/motorEncodersSignCheck_8h_source.html create mode 100644 doxygen/doc/html/movementReferencesTest_8cpp_source.html create mode 100644 doxygen/doc/html/movementReferencesTest_8h_source.html create mode 100644 doxygen/doc/html/nav_f.png create mode 100644 doxygen/doc/html/nav_g.png create mode 100644 doxygen/doc/html/nav_h.png create mode 100644 doxygen/doc/html/oneFile__plot_8m_source.html create mode 100644 doxygen/doc/html/open.png create mode 100644 doxygen/doc/html/opticalEncodersDrift_8cpp_source.html create mode 100644 doxygen/doc/html/opticalEncodersDrift_8h_source.html create mode 100644 doxygen/doc/html/pages.html create mode 100644 doxygen/doc/html/plotDataPosition_8m_source.html create mode 100644 doxygen/doc/html/plotDataTorque_8m_source.html create mode 100644 doxygen/doc/html/positionControl-accuracy-ExternalPid_2plotDataPosition_8m_source.html create mode 100644 doxygen/doc/html/positionControl-accuracy_2plotDataPosition_8m_source.html create mode 100644 doxygen/doc/html/search/all_0.html create mode 100644 doxygen/doc/html/search/all_0.js create mode 100644 doxygen/doc/html/search/all_1.html create mode 100644 doxygen/doc/html/search/all_1.js create mode 100644 doxygen/doc/html/search/all_2.html create mode 100644 doxygen/doc/html/search/all_2.js create mode 100644 doxygen/doc/html/search/all_3.html create mode 100644 doxygen/doc/html/search/all_3.js create mode 100644 doxygen/doc/html/search/all_4.html create mode 100644 doxygen/doc/html/search/all_4.js create mode 100644 doxygen/doc/html/search/all_5.html create mode 100644 doxygen/doc/html/search/all_5.js create mode 100644 doxygen/doc/html/search/all_6.html create mode 100644 doxygen/doc/html/search/all_6.js create mode 100644 doxygen/doc/html/search/all_7.html create mode 100644 doxygen/doc/html/search/all_7.js create mode 100644 doxygen/doc/html/search/all_8.html create mode 100644 doxygen/doc/html/search/all_8.js create mode 100644 doxygen/doc/html/search/all_9.html create mode 100644 doxygen/doc/html/search/all_9.js create mode 100644 doxygen/doc/html/search/all_a.html create mode 100644 doxygen/doc/html/search/all_a.js create mode 100644 doxygen/doc/html/search/all_b.html create mode 100644 doxygen/doc/html/search/all_b.js create mode 100644 doxygen/doc/html/search/all_c.html create mode 100644 doxygen/doc/html/search/all_c.js create mode 100644 doxygen/doc/html/search/all_d.html create mode 100644 doxygen/doc/html/search/all_d.js create mode 100644 doxygen/doc/html/search/classes_0.html create mode 100644 doxygen/doc/html/search/classes_0.js create mode 100644 doxygen/doc/html/search/classes_1.html create mode 100644 doxygen/doc/html/search/classes_1.js create mode 100644 doxygen/doc/html/search/classes_2.html create mode 100644 doxygen/doc/html/search/classes_2.js create mode 100644 doxygen/doc/html/search/classes_3.html create mode 100644 doxygen/doc/html/search/classes_3.js create mode 100644 doxygen/doc/html/search/classes_4.html create mode 100644 doxygen/doc/html/search/classes_4.js create mode 100644 doxygen/doc/html/search/classes_5.html create mode 100644 doxygen/doc/html/search/classes_5.js create mode 100644 doxygen/doc/html/search/classes_6.html create mode 100644 doxygen/doc/html/search/classes_6.js create mode 100644 doxygen/doc/html/search/classes_7.html create mode 100644 doxygen/doc/html/search/classes_7.js create mode 100644 doxygen/doc/html/search/classes_8.html create mode 100644 doxygen/doc/html/search/classes_8.js create mode 100644 doxygen/doc/html/search/classes_9.html create mode 100644 doxygen/doc/html/search/classes_9.js create mode 100644 doxygen/doc/html/search/classes_a.html create mode 100644 doxygen/doc/html/search/classes_a.js create mode 100644 doxygen/doc/html/search/classes_b.html create mode 100644 doxygen/doc/html/search/classes_b.js create mode 100644 doxygen/doc/html/search/close.png create mode 100644 doxygen/doc/html/search/close.svg create mode 100644 doxygen/doc/html/search/groups_0.html create mode 100644 doxygen/doc/html/search/groups_0.js create mode 100644 doxygen/doc/html/search/mag_sel.png create mode 100644 doxygen/doc/html/search/mag_sel.svg create mode 100644 doxygen/doc/html/search/nomatches.html create mode 100644 doxygen/doc/html/search/pages_0.html create mode 100644 doxygen/doc/html/search/pages_0.js create mode 100644 doxygen/doc/html/search/pages_1.html create mode 100644 doxygen/doc/html/search/pages_1.js create mode 100644 doxygen/doc/html/search/search.css create mode 100644 doxygen/doc/html/search/search.js create mode 100644 doxygen/doc/html/search/search_l.png create mode 100644 doxygen/doc/html/search/search_m.png create mode 100644 doxygen/doc/html/search/search_r.png create mode 100644 doxygen/doc/html/search/searchdata.js create mode 100644 doxygen/doc/html/splitbar.png create mode 100644 doxygen/doc/html/src_2cartesian-control_2README_8md_source.html create mode 100644 doxygen/doc/html/src_2gaze-control_2README_8md_source.html create mode 100644 doxygen/doc/html/src_2models-consistency_2README_8md_source.html create mode 100644 doxygen/doc/html/src_2skinWrapperTest_2README_8md_source.html create mode 100644 doxygen/doc/html/sync_off.png create mode 100644 doxygen/doc/html/sync_on.png create mode 100644 doxygen/doc/html/tab_a.png create mode 100644 doxygen/doc/html/tab_b.png create mode 100644 doxygen/doc/html/tab_h.png create mode 100644 doxygen/doc/html/tab_s.png create mode 100644 doxygen/doc/html/tabs.css create mode 100644 doxygen/doc/html/torqueStiffDamp__plotAll_8m_source.html create mode 100644 doxygen/doc/html/torqueStiffDamp__plot_8m_source.html create mode 100644 doxygen/doc/html/writing-and-running.html create mode 100644 doxygen/doc/latex/Makefile create mode 100644 doxygen/doc/latex/annotated.tex create mode 100644 doxygen/doc/latex/classCameraTest.tex create mode 100644 doxygen/doc/latex/classCartesianControlReachingToleranceTest.tex create mode 100644 doxygen/doc/latex/classCartesianControlSimpleP2pMovementTest.tex create mode 100644 doxygen/doc/latex/classControlModes.tex create mode 100644 doxygen/doc/latex/classDemoRedBallTest.tex create mode 100644 doxygen/doc/latex/classExampleTest.tex create mode 100644 doxygen/doc/latex/classFtSensorTest.tex create mode 100644 doxygen/doc/latex/classGazeControlSimpleLookTest.tex create mode 100644 doxygen/doc/latex/classImu.tex create mode 100644 doxygen/doc/latex/classJointLimits.tex create mode 100644 doxygen/doc/latex/classMotorEncodersSignCheck.tex create mode 100644 doxygen/doc/latex/classMotorTest.tex create mode 100644 doxygen/doc/latex/classMovementReferencesTest.tex create mode 100644 doxygen/doc/latex/classOpticalEncodersConsistency.tex create mode 100644 doxygen/doc/latex/classOpticalEncodersDrift.tex create mode 100644 doxygen/doc/latex/classPositionControlAccuracy.tex create mode 100644 doxygen/doc/latex/classPositionControlAccuracyExernalPid.tex create mode 100644 doxygen/doc/latex/classPositionDirect.tex create mode 100644 doxygen/doc/latex/classSensorsDuplicateReadings.tex create mode 100644 doxygen/doc/latex/classSkinWrapperTest.tex create mode 100644 doxygen/doc/latex/classTorqueControlAccuracy.tex create mode 100644 doxygen/doc/latex/classTorqueControlGravityConsistency.tex create mode 100644 doxygen/doc/latex/dir_0c804fff733e48d30e1bfca9c425d2ef.tex create mode 100644 doxygen/doc/latex/dir_1ff6e3a7912c7481e100b734d4f6c773.tex create mode 100644 doxygen/doc/latex/dir_22920df90588b6b2fe85332a8ebd338b.tex create mode 100644 doxygen/doc/latex/dir_2cd82cc5f0bc63ecdc472ec984cf3931.tex create mode 100644 doxygen/doc/latex/dir_2e031885cc4d3ad1ede3959cab4922b2.tex create mode 100644 doxygen/doc/latex/dir_34519bff5ae72130fe71a8620cbf1fc0.tex create mode 100644 doxygen/doc/latex/dir_3931dff736a77fff33906f875a0db8d7.tex create mode 100644 doxygen/doc/latex/dir_3b1318bac6af3327e49b6f2c90562c86.tex create mode 100644 doxygen/doc/latex/dir_52bb83cdfa78eea1d57abbea3c8e3d28.tex create mode 100644 doxygen/doc/latex/dir_588ff9359adf1870eba017afede6f94d.tex create mode 100644 doxygen/doc/latex/dir_58c9f48d72e7737305eca65c820f5d4c.tex create mode 100644 doxygen/doc/latex/dir_5eba7e4699fbf6bf477756242c12a311.tex create mode 100644 doxygen/doc/latex/dir_6355ee7e8e7fccbf90712e6e68524328.tex create mode 100644 doxygen/doc/latex/dir_67a6d6fd93427d49c4a56e9e89568513.tex create mode 100644 doxygen/doc/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex create mode 100644 doxygen/doc/latex/dir_684cb237cc589112c257fb2b82bbd35f.tex create mode 100644 doxygen/doc/latex/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.tex create mode 100644 doxygen/doc/latex/dir_77ddb71cb6ac5d6664d62b97f5abbc63.tex create mode 100644 doxygen/doc/latex/dir_7afe760acf634ae748bef9bf87f73d01.tex create mode 100644 doxygen/doc/latex/dir_7f61241abd7fbdf9954805296c6d0bed.tex create mode 100644 doxygen/doc/latex/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.tex create mode 100644 doxygen/doc/latex/dir_9e7e413093116f0711b4468be0f53b25.tex create mode 100644 doxygen/doc/latex/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.tex create mode 100644 doxygen/doc/latex/dir_a74cd033cebccd01e109eef31bc43830.tex create mode 100644 doxygen/doc/latex/dir_bb6085b5660958491f908beff56f4e11.tex create mode 100644 doxygen/doc/latex/dir_c4278cdbadca2a5e8f60a98cd2517319.tex create mode 100644 doxygen/doc/latex/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.tex create mode 100644 doxygen/doc/latex/dir_d0781ab5bdb71555a7f6c72636ba8088.tex create mode 100644 doxygen/doc/latex/dir_d6cc1804077fb7a0bee471bebe09c948.tex create mode 100644 doxygen/doc/latex/dir_de7c96bd180ef87bf5425ed419472c36.tex create mode 100644 doxygen/doc/latex/dir_e570188f87838128b6c12995b595ee3e.tex create mode 100644 doxygen/doc/latex/dir_ea8250e1e424defa140420a75e35c564.tex create mode 100644 doxygen/doc/latex/dir_ec9ed375a115a2645126306c0ce5bc8a.tex create mode 100644 doxygen/doc/latex/dir_f0b080432f22d2b191784a0df690e6ac.tex create mode 100644 doxygen/doc/latex/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.tex create mode 100644 doxygen/doc/latex/dir_f9de59b413a1f1ae04ea264c82cc2719.tex create mode 100644 doxygen/doc/latex/dir_ff120bfd69174aceba0b7c2c1b4a03e3.tex create mode 100644 doxygen/doc/latex/doxygen.sty create mode 100644 doxygen/doc/latex/group__icub-tests.tex create mode 100644 doxygen/doc/latex/index.tex create mode 100644 doxygen/doc/latex/installation.tex create mode 100644 doxygen/doc/latex/longtable_doxygen.sty create mode 100644 doxygen/doc/latex/make.bat create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-tests_README.tex create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-tests_src_cartesian-control_README.tex create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-tests_src_gaze-control_README.tex create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-tests_src_models-consistency_README.tex create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-tests_src_skinWrapperTest_README.tex create mode 100644 doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.tex create mode 100644 doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.tex create mode 100644 doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.tex create mode 100644 doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.tex create mode 100644 doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.tex create mode 100644 doxygen/doc/latex/modules.tex create mode 100644 doxygen/doc/latex/refman.tex create mode 100644 doxygen/doc/latex/tabu_doxygen.sty create mode 100644 doxygen/doc/latex/writing-and-running.tex diff --git a/doxygen/doc/html/CameraTest_8cpp_source.html b/doxygen/doc/html/CameraTest_8cpp_source.html new file mode 100644 index 00000000..b56b4052 --- /dev/null +++ b/doxygen/doc/html/CameraTest_8cpp_source.html @@ -0,0 +1,181 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/camera/CameraTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CameraTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 
+
22 #include <iostream>
+
23 #include <stdlib.h> // for abs()
+
24 #include <robottestingframework/TestAssert.h>
+
25 #include <robottestingframework/dll/Plugin.h>
+
26 #include <yarp/os/Network.h>
+
27 #include <yarp/os/Time.h>
+
28 #include <yarp/os/Property.h>
+
29 
+
30 #include "CameraTest.h"
+
31 
+
32 using namespace robottestingframework;
+
33 using namespace yarp::os;
+
34 using namespace yarp::sig;
+
35 
+
36 #define TIMES 1
+
37 #define FREQUENCY 30
+
38 #define TOLERANCE 5
+
39 
+
40 
+
41 // prepare the plugin
+
42 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(CameraTest)
+
43 
+
44 CameraTest::CameraTest() : yarp::robottestingframework::TestCase("CameraTest") {
+
45 }
+
46 
+
47 CameraTest::~CameraTest() { }
+
48 
+
49 bool CameraTest::setup(yarp::os::Property& property) {
+
50 
+
51  if(property.check("name"))
+
52  setName(property.find("name").asString());
+
53 
+
54  // updating parameters
+
55  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("portname"),
+
56  "The portname must be given as the test paramter!");
+
57  cameraPortName = property.find("portname").asString();
+
58  measure_time = property.check("measure_time") ? property.find("measure_time").asInt32() : TIMES;
+
59  expected_frequency = property.check("expected_frequency") ? property.find("expected_frequency").asInt32() : FREQUENCY;
+
60  tolerance = property.check("tolerance") ? property.find("tolerance").asInt32() : TOLERANCE;
+
61 
+
62  // opening port
+
63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(port.open("/CameraTest/image:i"),
+
64  "opening port, is YARP network available?");
+
65 
+
66  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Listening to camera for %d seconds",
+
67  measure_time));
+
68 
+
69  // connecting
+
70  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("connecting from %s to %s",
+
71  port.getName().c_str(), cameraPortName.c_str()));
+
72  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(Network::connect(cameraPortName, port.getName()),
+
73  "could not connect to remote port, camera unavailable");
+
74  return true;
+
75 }
+
76 
+
77 void CameraTest::tearDown() {
+
78  Network::disconnect(cameraPortName, port.getName());
+
79  port.close();
+
80 }
+
81 
+
82 void CameraTest::run() {
+
83  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Reading images...");
+
84  double timeStart=yarp::os::Time::now();
+
85  double timeNow=timeStart;
+
86 
+
87  int frames=0;
+
88  while(timeNow<timeStart+measure_time) {
+
89  Image *image=port.read(false);
+
90  if(image!=0)
+
91  frames++;
+
92  yarp::os::Time::delay(0.01);
+
93  timeNow=yarp::os::Time::now();
+
94  }
+
95 
+
96  int expectedFrames = measure_time*expected_frequency;
+
97  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Received %d frames, expecting %d",
+
98  frames,
+
99  expectedFrames));
+
100  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(abs(frames-expectedFrames)<tolerance,
+
101  "checking number of received frames");
+
102 }
+
Check if a camera is publishing images at desired framerate.
Definition: CameraTest.h:44
+
+ + + + diff --git a/doxygen/doc/html/CameraTest_8h_source.html b/doxygen/doc/html/CameraTest_8h_source.html new file mode 100644 index 00000000..6374b482 --- /dev/null +++ b/doxygen/doc/html/CameraTest_8h_source.html @@ -0,0 +1,128 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/camera/CameraTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CameraTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _CAMERATEST_H_
+
22 #define _CAMERATEST_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/os/BufferedPort.h>
+
27 #include <yarp/sig/Image.h>
+
28 
+
29 
+
44 class CameraTest : public yarp::robottestingframework::TestCase {
+
45 public:
+
46  CameraTest();
+
47  virtual ~CameraTest();
+
48 
+
49  virtual bool setup(yarp::os::Property& property);
+
50 
+
51  virtual void tearDown();
+
52 
+
53  virtual void run();
+
54 
+
55 private:
+
56  std::string cameraPortName;
+
57  int measure_time;
+
58  int expected_frequency;
+
59  int tolerance;
+
60  yarp::os::BufferedPort<yarp::sig::Image> port;
+
61 };
+
62 
+
63 #endif //_CAMERATEST_H
+
Check if a camera is publishing images at desired framerate.
Definition: CameraTest.h:44
+
+ + + + diff --git a/doxygen/doc/html/CartesianControlReachingToleranceTest_8cpp_source.html b/doxygen/doc/html/CartesianControlReachingToleranceTest_8cpp_source.html new file mode 100644 index 00000000..64b82931 --- /dev/null +++ b/doxygen/doc/html/CartesianControlReachingToleranceTest_8cpp_source.html @@ -0,0 +1,280 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/reaching-tolerance/CartesianControlReachingToleranceTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CartesianControlReachingToleranceTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <string>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/dev/CartesianControl.h>
+
26 #include <yarp/dev/IEncoders.h>
+
27 #include <yarp/sig/Matrix.h>
+
28 #include <yarp/math/Math.h>
+
29 
+
30 #include "CartesianControlReachingToleranceTest.h"
+
31 
+
32 using namespace std;
+
33 using namespace robottestingframework;
+
34 using namespace yarp::os;
+
35 using namespace yarp::dev;
+
36 using namespace yarp::sig;
+
37 using namespace yarp::math;
+
38 
+
39 // prepare the plugin
+
40 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(CartesianControlReachingToleranceTest)
+
41 
+
42 
+
43 /***********************************************************************************/
+
44 CartesianControlReachingToleranceTest::CartesianControlReachingToleranceTest() :
+
45  yarp::robottestingframework::TestCase("CartesianControlReachingToleranceTest")
+
46 {
+
47 }
+
48 
+
49 
+
50 /***********************************************************************************/
+
51 CartesianControlReachingToleranceTest::~CartesianControlReachingToleranceTest()
+
52 {
+
53 }
+
54 
+
55 
+
56 /***********************************************************************************/
+
57 bool CartesianControlReachingToleranceTest::setup(Property &property)
+
58 {
+
59  string robot=property.check("robot",Value("icubSim")).asString();
+
60  string arm=property.check("arm-type",Value("left")).asString();
+
61 
+
62  Property optCart;
+
63  optCart.put("device","cartesiancontrollerclient");
+
64  optCart.put("remote",("/"+robot+"/"+"cartesianController/"+arm+"_arm"));
+
65  optCart.put("local",("/"+getName()+"/cartesian/"+arm+"_arm"));
+
66 
+
67  Property optJoint;
+
68  optJoint.put("device","remote_controlboard");
+
69  optJoint.put("remote",("/"+robot+"/"+arm+"_arm"));
+
70  optJoint.put("local",("/"+getName()+"/joint/"+arm+"_arm"));
+
71 
+
72  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Opening Cartesian Controller Client for %s_arm",arm.c_str()));
+
73  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvCart.open(optCart),"Unable to open the client!");
+
74 
+
75  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Opening Joint Controller Client for %s_arm",arm.c_str()));
+
76  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvJoint.open(optJoint),"Unable to open the client!");
+
77  return true;
+
78 }
+
79 
+
80 
+
81 /***********************************************************************************/
+
82 void CartesianControlReachingToleranceTest::tearDown()
+
83 {
+
84  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing Cartesian Controller Client");
+
85  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvCart.close(),"Unable to close the client!");
+
86 
+
87  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing Joint Controller Client");
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvJoint.close(),"Unable to close the client!");
+
89 }
+
90 
+
91 
+
92 /***********************************************************************************/
+
93 double CartesianControlReachingToleranceTest::compute_error(const Vector &xh, const Vector &oh,
+
94  const Vector &x, const Vector &o)
+
95 {
+
96  Matrix H=axis2dcm(o);
+
97  H(0,3)=x[0];
+
98  H(1,3)=x[1];
+
99  H(2,3)=x[2];
+
100 
+
101  Vector e(6,0.0);
+
102  e[0]=xh[0]-H(0,3);
+
103  e[1]=xh[1]-H(1,3);
+
104  e[2]=xh[2]-H(2,3);
+
105  Matrix Des=axis2dcm(oh);
+
106  Vector ax=dcm2axis(Des*SE3inv(H));
+
107  e[3]=ax[3]*ax[0];
+
108  e[4]=ax[3]*ax[1];
+
109  e[5]=ax[3]*ax[2];
+
110 
+
111  return norm(e);
+
112 }
+
113 
+
114 
+
115 /***********************************************************************************/
+
116 void CartesianControlReachingToleranceTest::run()
+
117 {
+
118  ICartesianControl *iarm;
+
119  ROBOTTESTINGFRAMEWORK_TEST_CHECK(drvCart.view(iarm),"Opening the view on the Cartesian device!");
+
120 
+
121  IEncoders *ienc;
+
122  ROBOTTESTINGFRAMEWORK_TEST_CHECK(drvJoint.view(ienc),"Opening the view on the Joint device!");
+
123 
+
124  bool done;
+
125 
+
126  Vector x,o;
+
127  double t0=Time::now();
+
128  while (Time::now()-t0<5.0)
+
129  {
+
130  done=iarm->getPose(x,o);
+
131  if (done)
+
132  break;
+
133  Time::delay(0.1);
+
134  }
+
135  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Initial pose retrieved!");
+
136 
+
137  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Setting up the context");
+
138  int context;
+
139  iarm->storeContext(&context);
+
140 
+
141  Vector dof;
+
142  iarm->getDOF(dof); dof=1.0;
+
143  dof[0]=dof[1]=dof[2]=0.0;
+
144  iarm->setDOF(dof,dof);
+
145  iarm->setTrajTime(1.0);
+
146  iarm->setInTargetTol(0.02);
+
147 
+
148  double tol;
+
149  iarm->getInTargetTol(&tol);
+
150 
+
151  Vector pos2reach(3,0.0);
+
152  pos2reach[0]=-0.35;
+
153  pos2reach[1]=0.0;
+
154  pos2reach[2]=0.15;
+
155 
+
156  Matrix dcm2reach=zeros(3,3);
+
157  dcm2reach(0,0)=dcm2reach(2,1)=dcm2reach(1,2)=-1.0;
+
158  Vector ori2reach=dcm2axis(dcm2reach);
+
159 
+
160  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Reaching for the target: (%s, %s)",
+
161  pos2reach.toString(3,3).c_str(),ori2reach.toString(3,3).c_str()));
+
162  Vector xh,oh,qh;
+
163  iarm->goToPoseSync(pos2reach,ori2reach);
+
164  iarm->getDesired(xh,oh,qh);
+
165 
+
166  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
167  done=iarm->waitMotionDone(0.1,10.0);
+
168  iarm->stopControl();
+
169 
+
170  Vector xf,of;
+
171  iarm->getPose(xf,of);
+
172 
+
173  int nJoints;
+
174  ienc->getAxes(&nJoints);
+
175  Vector qf(nJoints);
+
176  ienc->getEncoders(qf.data());
+
177 
+
178  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Target reached!");
+
179  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Reaching tolerance: %g",tol));
+
180  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Solved pose: (%s, %s)",
+
181  xh.toString(3,3).c_str(),oh.toString(3,3).c_str()));
+
182  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Reached pose: (%s, %s)",
+
183  xf.toString(3,3).c_str(),of.toString(3,3).c_str()));
+
184  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Solved joints qh: (%s)",
+
185  qh.subVector(3,dof.length()-1).toString(3,3).c_str()));
+
186  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Reached joints qf: (%s)",
+
187  qf.subVector(0,6).toString(3,3).c_str()));
+
188  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Error: %g",compute_error(xh,oh,xf,of)));
+
189 
+
190  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Going back to starting pose");
+
191  iarm->goToPoseSync(x,o);
+
192 
+
193  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
194  done=iarm->waitMotionDone(1.0,5.0);
+
195  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Starting pose reached!");
+
196 
+
197  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Cleaning up the context");
+
198  iarm->restoreContext(context);
+
199  iarm->deleteContext(context);
+
200 }
+
201 
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/CartesianControlReachingToleranceTest_8h_source.html b/doxygen/doc/html/CartesianControlReachingToleranceTest_8h_source.html new file mode 100644 index 00000000..d463a466 --- /dev/null +++ b/doxygen/doc/html/CartesianControlReachingToleranceTest_8h_source.html @@ -0,0 +1,124 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/reaching-tolerance/CartesianControlReachingToleranceTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CartesianControlReachingToleranceTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _CARTESIANCONTROLREACHINGTOLERANCE_H_
+
22 #define _CARTESIANCONTROLREACHINGTOLERANCE_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/dev/PolyDriver.h>
+
27 #include <yarp/sig/Vector.h>
+
28 
+
40 class CartesianControlReachingToleranceTest : public yarp::robottestingframework::TestCase
+
41 {
+
42  yarp::dev::PolyDriver drvCart;
+
43  yarp::dev::PolyDriver drvJoint;
+
44 
+
45  double compute_error(const yarp::sig::Vector &xh, const yarp::sig::Vector &oh,
+
46  const yarp::sig::Vector &x, const yarp::sig::Vector &o);
+
47 
+
48 public:
+ + +
51  virtual bool setup(yarp::os::Property& property);
+
52  virtual void tearDown();
+
53  virtual void run();
+
54 };
+
55 
+
56 #endif
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8cpp_source.html b/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8cpp_source.html new file mode 100644 index 00000000..9b7fe15c --- /dev/null +++ b/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8cpp_source.html @@ -0,0 +1,207 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/simple-p2p-movement/CartesianControlSimpleP2pMovementTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CartesianControlSimpleP2pMovementTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <string>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/dev/CartesianControl.h>
+
26 #include <yarp/sig/Vector.h>
+
27 
+
28 #include "CartesianControlSimpleP2pMovementTest.h"
+
29 
+
30 using namespace std;
+
31 using namespace robottestingframework;
+
32 using namespace yarp::os;
+
33 using namespace yarp::dev;
+
34 using namespace yarp::sig;
+
35 
+
36 // prepare the plugin
+
37 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(CartesianControlSimpleP2pMovementTest)
+
38 
+
39 
+
40 /***********************************************************************************/
+
41 CartesianControlSimpleP2pMovementTest::CartesianControlSimpleP2pMovementTest() :
+
42  yarp::robottestingframework::TestCase("CartesianControlSimpleP2pMovementTest")
+
43 {
+
44 }
+
45 
+
46 
+
47 /***********************************************************************************/
+
48 CartesianControlSimpleP2pMovementTest::~CartesianControlSimpleP2pMovementTest()
+
49 {
+
50 }
+
51 
+
52 
+
53 /***********************************************************************************/
+
54 bool CartesianControlSimpleP2pMovementTest::setup(Property &property)
+
55 {
+
56  string robot=property.check("robot",Value("icubSim")).asString();
+
57  string arm=property.check("arm-type",Value("left")).asString();
+
58 
+
59  Property option;
+
60  option.put("device","cartesiancontrollerclient");
+
61  option.put("remote",("/"+robot+"/"+"cartesianController/"+arm+"_arm"));
+
62  option.put("local",("/"+getName()+"/"+arm+"_arm"));
+
63 
+
64  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Opening Cartesian Controller Client for %s_arm",arm.c_str()));
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(driver.open(option),"Unable to open the client!");
+
66  return true;
+
67 }
+
68 
+
69 
+
70 /***********************************************************************************/
+
71 void CartesianControlSimpleP2pMovementTest::tearDown()
+
72 {
+
73  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing Cartesian Controller Client");
+
74  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(driver.close(),"Unable to close the client!");
+
75 }
+
76 
+
77 
+
78 /***********************************************************************************/
+
79 void CartesianControlSimpleP2pMovementTest::run()
+
80 {
+
81  ICartesianControl *iarm;
+
82  ROBOTTESTINGFRAMEWORK_TEST_CHECK(driver.view(iarm),"Opening the view on the device!");
+
83 
+
84  bool done;
+
85 
+
86  Vector x,o;
+
87  double t0=Time::now();
+
88  while (Time::now()-t0<5.0)
+
89  {
+
90  done=iarm->getPose(x,o);
+
91  if (done)
+
92  break;
+
93  Time::delay(0.1);
+
94  }
+
95  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Initial pose retrieved!");
+
96 
+
97  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Setting up the context");
+
98  int context;
+
99  iarm->storeContext(&context);
+
100 
+
101  Vector dof;
+
102  iarm->getDOF(dof); dof=1.0;
+
103  iarm->setDOF(dof,dof);
+
104  iarm->setTrajTime(1.0);
+
105 
+
106  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Reaching for the target");
+
107  Vector xd(3,0.0); xd[0]=-0.4;
+
108  iarm->goToPositionSync(xd);
+
109 
+
110  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
111  done=iarm->waitMotionDone(1.0,5.0);
+
112  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Target reached!");
+
113 
+
114  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Going back to starting pose");
+
115  iarm->setLimits(0,0.0,0.0);
+
116  iarm->setLimits(1,0.0,0.0);
+
117  iarm->setLimits(2,0.0,0.0);
+
118  iarm->goToPoseSync(x,o);
+
119 
+
120  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
121  done=iarm->waitMotionDone(1.0,5.0);
+
122  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Starting pose reached!");
+
123 
+
124  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Cleaning up the context");
+
125  iarm->restoreContext(context);
+
126  iarm->deleteContext(context);
+
127 }
+
128 
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8h_source.html b/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8h_source.html new file mode 100644 index 00000000..4a0acc42 --- /dev/null +++ b/doxygen/doc/html/CartesianControlSimpleP2pMovementTest_8h_source.html @@ -0,0 +1,119 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/simple-p2p-movement/CartesianControlSimpleP2pMovementTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
CartesianControlSimpleP2pMovementTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _CARTESIANCONTROLSIMPLEP2PMOVEMENT_H_
+
22 #define _CARTESIANCONTROLSIMPLEP2PMOVEMENT_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/dev/PolyDriver.h>
+
27 
+
39 class CartesianControlSimpleP2pMovementTest : public yarp::robottestingframework::TestCase
+
40 {
+
41  yarp::dev::PolyDriver driver;
+
42 
+
43 public:
+ + +
46  virtual bool setup(yarp::os::Property& property);
+
47  virtual void tearDown();
+
48  virtual void run();
+
49 };
+
50 
+
51 #endif
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/ControlModes_8cpp_source.html b/doxygen/doc/html/ControlModes_8cpp_source.html new file mode 100644 index 00000000..06e9eeb2 --- /dev/null +++ b/doxygen/doc/html/ControlModes_8cpp_source.html @@ -0,0 +1,641 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/controlModes/ControlModes.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ControlModes.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/os/Vocab.h>
+
27 
+
28 #include "ControlModes.h"
+
29 
+
30 using namespace robottestingframework;
+
31 using namespace yarp::os;
+
32 using namespace yarp::dev;
+
33 
+
34 // prepare the plugin
+
35 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(ControlModes)
+
36 
+
37 ControlModes::ControlModes() : yarp::robottestingframework::TestCase("ControlModes") {
+
38  jointsList=0;
+
39  pos_tot=0;
+
40  dd=0;
+
41  ipos=0;
+
42  iamp=0;
+
43  icmd=0;
+
44  iimd=0;
+
45  ienc=0;
+
46  idir=0;
+
47  itrq=0;
+
48  ivel=0;
+
49  cmd_some=0;
+
50  cmd_tot=0;
+
51  prevcurr_some=0;
+
52  prevcurr_tot=0;
+
53 }
+
54 
+
55 ControlModes::~ControlModes() { }
+
56 
+
57 bool ControlModes::setup(yarp::os::Property& property) {
+
58 
+
59  if(property.check("name"))
+
60  setName(property.find("name").asString());
+
61 
+
62  // updating parameters
+
63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home positions must be given as the test parameter!");
+
67 
+
68  robotName = property.find("robot").asString();
+
69  partName = property.find("part").asString();
+
70  if(property.check("tolerance"))
+
71  tolerance = property.find("tolerance").asFloat64();
+
72  else
+
73  tolerance = 0.5;
+
74 
+
75  ROBOTTESTINGFRAMEWORK_TEST_REPORT(robottestingframework::Asserter::format("Tolerance of %.2f is used to check home position", tolerance));
+
76 
+
77  Bottle* jointsBottle = property.find("joints").asList();
+
78  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
79  n_cmd_joints = jointsBottle->size();
+
80  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0,"invalid number of joints, it must be >0");
+
81 
+
82  Property options;
+
83  options.put("device", "remote_controlboard");
+
84  options.put("remote", "/"+robotName+"/"+partName);
+
85  options.put("local", "/ControlModesTest/"+robotName+"/"+partName);
+
86 
+
87  dd = new PolyDriver(options);
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(idir),"Unable to open position direct interface");
+
90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iamp),"Unable to open ampliefier interface");
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
93  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
94  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ivel),"Unable to open velocity control interface");
+
96  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(itrq),"Unable to open torque control interface");
+
97  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ivar),"Unable to open remote variables interface");
+
98 
+
99  if (!ienc->getAxes(&n_part_joints))
+
100  {
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
102  }
+
103 
+
104  if (n_part_joints<=0)
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Error this part has in invalid (<=0) number of jonits");
+
106  else if (jointsBottle->size() == 1)
+
107  cmd_mode=single_joint;
+
108  else if (jointsBottle->size() < n_part_joints)
+
109  cmd_mode=some_joints;
+
110  else if (jointsBottle->size() == n_part_joints)
+
111  cmd_mode=all_joints;
+
112  else
+
113  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("invalid joint selection?");
+
114 
+
115  cmd_tot = new double[n_part_joints];
+
116  pos_tot=new double[n_part_joints];
+
117  jointsList=new int[n_cmd_joints];
+
118  cmd_some=new double[n_cmd_joints];
+
119  prevcurr_tot=new double[n_part_joints];
+
120  prevcurr_some=new double[n_cmd_joints];
+
121  jointTorqueCtrlEnabled = new int[n_part_joints];
+
122  home_pos = new double[n_cmd_joints];
+
123 
+
124  for (int i=0; i <n_cmd_joints; i++) jointsList[i]=jointsBottle->get(i).asInt32();
+
125 
+
126  Bottle* homePosBottle = property.find("home").asList();
+
127  for (int i=0; i <n_cmd_joints; i++) home_pos[i]=homePosBottle->get(i).asFloat64();
+
128 
+
129  checkJointWithTorqueMode();
+
130  return true;
+
131 }
+
132 
+
133 void ControlModes::tearDown()
+
134 {
+
135  if (jointsList) {delete jointsList; jointsList =0;}
+
136  if (dd) {delete dd; dd =0;}
+
137 }
+
138 
+
139 void ControlModes::getOriginalCurrentLimits()
+
140 {
+
141  for (int i=0; i<n_cmd_joints; i++)
+
142  {
+
143  iamp->getMaxCurrent(jointsList[i],&prevcurr_some[i]);
+
144  }
+
145  for (int i=0; i<n_part_joints; i++)
+
146  {
+
147  iamp->getMaxCurrent(i,&prevcurr_tot[i]);
+
148  }
+
149  yarp::os::Time::delay(0.010);
+
150 }
+
151 
+
152 void ControlModes::resetOriginalCurrentLimits()
+
153 {
+
154  for (int i=0; i<n_part_joints; i++)
+
155  {
+
156  iamp->setMaxCurrent(i,prevcurr_tot[i]);
+
157  }
+
158  yarp::os::Time::delay(0.010);
+
159 }
+
160 
+
161 void ControlModes::zeroCurrentLimits()
+
162 {
+
163  if (cmd_mode==single_joint)
+
164  {
+
165  for (int i=0; i<n_cmd_joints; i++)
+
166  {
+
167  iamp->setMaxCurrent(jointsList[i],0.0);
+
168  }
+
169  }
+
170  else if (cmd_mode==some_joints)
+
171  {
+
172  for (int i=0; i<n_cmd_joints; i++)
+
173  {
+
174  iamp->setMaxCurrent(jointsList[i],0.0);
+
175  }
+
176  }
+
177  else if (cmd_mode==all_joints)
+
178  {
+
179  for (int i=0; i<n_part_joints; i++)
+
180  {
+
181  iamp->setMaxCurrent(i,0.0);
+
182  }
+
183  }
+
184  else
+
185  {
+
186  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
187  }
+
188  yarp::os::Time::delay(0.010);
+
189 }
+
190 
+
191 void ControlModes::setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
192 {
+
193  for (int i=0; i<n_cmd_joints; i++)
+
194  {
+
195  setModeSingle(jointsList[i], desired_control_mode, desired_interaction_mode);
+
196  }
+
197 }
+
198 
+
199 void ControlModes::setModeSingle(int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
200 {
+
201  icmd->setControlMode(joint,desired_control_mode);
+
202  iimd->setInteractionMode(joint,desired_interaction_mode);
+
203  yarp::os::Time::delay(0.010);
+
204 }
+
205 
+
206 void ControlModes::verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
207 {
+
208  int cmode;
+
209  yarp::dev::InteractionModeEnum imode;
+
210  int timeout = 0;
+
211 
+
212  while (1)
+
213  {
+
214  int ok=0;
+
215  for (int i=0; i<n_cmd_joints; i++)
+
216  {
+
217  icmd->getControlMode (jointsList[i],&cmode);
+
218  iimd->getInteractionMode(jointsList[i],&imode);
+
219  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok++;
+
220  }
+
221  if (ok==n_cmd_joints) break;
+
222  if (timeout>100)
+
223  {
+
224  char sbuf[500];
+
225  sprintf(sbuf,"Test (%s) failed: current mode is (%s,%s), it should be (%s,%s)",title.c_str(), Vocab32::decode((NetInt32)cmode).c_str(), Vocab32::decode((NetInt32)imode).c_str(), Vocab32::decode((NetInt32)desired_control_mode).c_str(),Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
226  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
227  }
+
228  yarp::os::Time::delay(0.2);
+
229  timeout++;
+
230  }
+
231  char sbuf[500];
+
232  sprintf(sbuf,"Test (%s) passed: current mode is (%s,%s)",title.c_str(),Vocab32::decode((NetInt32)desired_control_mode).c_str(), Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
233  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
234 }
+
235 
+
236 void ControlModes::verifyModeSingle(int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
237 {
+
238  int cmode;
+
239  yarp::dev::InteractionModeEnum imode;
+
240  int timeout = 0;
+
241 
+
242  while (1)
+
243  {
+
244  bool ok = false;
+
245  icmd->getControlMode (joint,&cmode);
+
246  iimd->getInteractionMode(joint,&imode);
+
247  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok=true;
+
248 
+
249  if (ok) break;
+
250  if (timeout>100)
+
251  {
+
252  char sbuf[500];
+
253  sprintf(sbuf,"Test (%s) failed: current mode is (%s,%s), it should be (%s,%s)",title.c_str(), Vocab32::decode((NetInt32)cmode).c_str(), Vocab32::decode((NetInt32)imode).c_str(), Vocab32::decode((NetInt32)desired_control_mode).c_str(),Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
254  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
255  }
+
256  yarp::os::Time::delay(0.2);
+
257  timeout++;
+
258  }
+
259  char sbuf[500];
+
260  sprintf(sbuf,"Test (%s) passed: current mode is (%s,%s)",title.c_str(),Vocab32::decode((NetInt32)desired_control_mode).c_str(), Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
261  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
262 }
+
263 
+
264 void ControlModes::checkJointWithTorqueMode()
+
265 {
+
266  yarp::os::Bottle b;
+
267  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ivar->getRemoteVariable("torqueControlEnabled", b), "unable to get torqueControlEnabled");
+
268 
+
269  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE((b.size() != n_part_joints), "torqueControlEnabled var returns joint num not corret.");
+
270 
+
271  int j=0;
+
272  for(int i=0; i<b.size() && j<n_part_joints; i++)
+
273  {
+
274  yarp::os::Bottle *baux = b.get(i).asList();
+
275  for(int k=0; k<baux->size()&& j<n_part_joints; k++)
+
276  {
+
277  jointTorqueCtrlEnabled[j] = baux->get(k).asInt32();
+
278  j++;
+
279  }
+
280  }
+
281 }
+
282 
+
283 void ControlModes::verifyAmplifier(int desired_amplifier_mode, std::string title)
+
284 {
+
285  int amode;
+
286  int timeout = 0;
+
287 
+
288  while (1)
+
289  {
+
290  int ok=0;
+
291  for (int i=0; i<n_cmd_joints; i++)
+
292  {
+
293  iamp->getAmpStatus (jointsList[i],&amode);
+
294  //@@@@@@
+
295  amode = 0; // to complete using the proper interface
+
296  //@@@@@@
+
297  if (amode==desired_amplifier_mode) ok++;
+
298  }
+
299  if (ok==n_cmd_joints) break;
+
300  if (timeout>100)
+
301  {
+
302  char sbuf[500];
+
303  sprintf(sbuf,"Test (%s) failed: amplifier mode is (%d), it should be (%d)",title.c_str(), amode, desired_amplifier_mode);
+
304  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
305  }
+
306  yarp::os::Time::delay(0.2);
+
307  timeout++;
+
308  }
+
309  char sbuf[500];
+
310  sprintf(sbuf,"Test (%s) passed: amplifier mode is (%d)",title.c_str(), desired_amplifier_mode);
+
311  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
312 }
+
313 
+
314 void ControlModes::executeCmd()
+
315 {
+
316  if (cmd_mode==single_joint)
+
317  {
+
318  for (int i=0; i<n_cmd_joints; i++)
+
319  {
+
320  idir->setPosition(jointsList[i],cmd_single);
+
321  }
+
322  }
+
323  else if (cmd_mode==some_joints)
+
324  {
+
325  for (int i=0; i<n_cmd_joints; i++)
+
326  {
+
327  cmd_some[i]=cmd_single;
+
328  }
+
329  idir->setPositions(n_cmd_joints,jointsList, cmd_some);
+
330  }
+
331  else if (cmd_mode==all_joints)
+
332  {
+
333  for (int i=0; i<n_part_joints; i++)
+
334  {
+
335  cmd_tot[i]=cmd_single;
+
336  }
+
337  idir->setPositions(cmd_tot);
+
338  }
+
339  else
+
340  {
+
341  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
342  }
+
343 }
+
344 
+
345 void ControlModes::goHome()
+
346 {
+
347  for (int i=0; i<n_cmd_joints; i++)
+
348  {
+
349  ipos->setRefSpeed(jointsList[i],20.0);
+
350  ipos->positionMove(jointsList[i],home_pos[i]);
+
351  }
+
352 
+
353  int timeout = 0;
+
354  while (1)
+
355  {
+
356  int in_position=0;
+
357  for (int i=0; i<n_cmd_joints; i++)
+
358  {
+
359  ienc->getEncoder(jointsList[i],&pos_tot[jointsList[i]]);
+
360  if (fabs(pos_tot[jointsList[i]]-home_pos[i])<tolerance) in_position++;
+
361  }
+
362  if (in_position==n_cmd_joints) break;
+
363  if (timeout>100)
+
364  {
+
365  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
366  }
+
367  yarp::os::Time::delay(0.2);
+
368  timeout++;
+
369  }
+
370 }
+
371 
+
372 
+
373 void ControlModes::checkControlModeWithImCompliant(int desired_control_mode, std::string title)
+
374 {
+
375  char buff[500];
+
376  for (int i=0; i<n_cmd_joints; i++)
+
377  {
+
378  if(jointTorqueCtrlEnabled[jointsList[i]])
+
379  {
+
380  sprintf(buff, "joint %d has torque enabled. try to set %s and im_comp", jointsList[i], Vocab32::decode((NetInt32)desired_control_mode).c_str());
+
381  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
382  setModeSingle(jointsList[i],desired_control_mode,VOCAB_IM_COMPLIANT);
+
383  verifyModeSingle(jointsList[i], desired_control_mode,VOCAB_IM_COMPLIANT,title);
+
384  }
+
385  else
+
386  {
+
387  sprintf(buff, "joint %d doesn't support compliant interaction mode. test %s skipped", jointsList[i], title.c_str());
+
388  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
389  }
+
390  }
+
391 
+
392 }
+
393 void ControlModes::run()
+
394 {
+
395  char buff[500];
+
396  getOriginalCurrentLimits();
+
397  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
398  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test0");
+
399  verifyAmplifier(0,"test0b"); //@@@@@@ To be completed
+
400  goHome();
+
401 
+
402  //------ check all modes when stiff ------
+
403  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
404  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test1");
+
405  verifyAmplifier(0,"test1b");
+
406 
+
407  setMode(VOCAB_CM_POSITION_DIRECT,VOCAB_IM_STIFF);
+
408  verifyMode(VOCAB_CM_POSITION_DIRECT,VOCAB_IM_STIFF,"test2");
+
409  verifyAmplifier(0,"test2b");
+
410 
+
411  setMode(VOCAB_CM_VELOCITY,VOCAB_IM_STIFF);
+
412  verifyMode(VOCAB_CM_VELOCITY,VOCAB_IM_STIFF,"test3");
+
413  verifyAmplifier(0,"test3b");
+
414 
+
415  //torque
+
416  for (int i=0; i<n_cmd_joints; i++)
+
417  {
+
418  if(jointTorqueCtrlEnabled[jointsList[i]])
+
419  {
+
420  sprintf(buff, "joint %d has torque enabled. try to set cm_torque and im_stiff", jointsList[i]);
+
421  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
422  setModeSingle(jointsList[i],VOCAB_CM_TORQUE,VOCAB_IM_STIFF);
+
423  verifyModeSingle(jointsList[i], VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test4");
+
424  verifyAmplifier(0,"test4b");
+
425  }
+
426  else
+
427  {
+
428  sprintf(buff, "joint %d doesn't support torque control mode. test test4 skipped", jointsList[i]);
+
429  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
430  }
+
431  }
+
432 
+
433 
+
434  setMode(VOCAB_CM_MIXED,VOCAB_IM_STIFF);
+
435  verifyMode(VOCAB_CM_MIXED,VOCAB_IM_STIFF,"test5");
+
436  verifyAmplifier(0,"test5b");
+
437 
+
438  setMode(VOCAB_CM_PWM,VOCAB_IM_STIFF);
+
439  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test6");
+
440  verifyAmplifier(0,"test6b");
+
441 
+
442  setMode(VOCAB_CM_IDLE,VOCAB_IM_STIFF);
+
443  verifyMode(VOCAB_CM_IDLE,VOCAB_IM_STIFF,"test7");
+
444  verifyAmplifier(0,"test7b");
+
445 
+
446  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
447  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test8");
+
448  verifyAmplifier(0,"test8b");
+
449 
+
450  setMode(VOCAB_CM_FORCE_IDLE,VOCAB_IM_STIFF);
+
451  verifyMode(VOCAB_CM_IDLE,VOCAB_IM_STIFF,"test9"); //VOCAB_CM_IDLE is intentional
+
452  verifyAmplifier(0,"test9b");
+
453 
+
454  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
455  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test10");
+
456  verifyAmplifier(0,"test10b");
+
457  goHome();
+
458 
+
459  //------ check all modes when compliant ------
+
460  // note: not all joints can use compliant like interaction mode
+
461  for (int i=0; i<n_cmd_joints; i++)
+
462  {
+
463  if(jointTorqueCtrlEnabled[jointsList[i]])
+
464  {
+
465  sprintf(buff, "joint %d has torque enabled. try to set cm_torque and im_compliant", jointsList[i]);
+
466  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
467  setModeSingle(jointsList[i],VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT);
+
468  verifyModeSingle(jointsList[i], VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT,"test11");
+
469  }
+
470  }
+
471 
+
472 
+
473  checkControlModeWithImCompliant(VOCAB_CM_POSITION, "test11");
+
474  verifyAmplifier(0,"test11b");
+
475 
+
476 
+
477  checkControlModeWithImCompliant(VOCAB_CM_POSITION_DIRECT,"test12");
+
478  verifyAmplifier(0,"test12b");
+
479 
+
480  checkControlModeWithImCompliant(VOCAB_CM_VELOCITY,"test13");
+
481  verifyAmplifier(0,"test13b");
+
482 
+
483  checkControlModeWithImCompliant(VOCAB_CM_TORQUE,"test4");
+
484  verifyAmplifier(0,"test14b");
+
485 
+
486  checkControlModeWithImCompliant(VOCAB_CM_MIXED,"test15");
+
487  verifyAmplifier(0,"test15b");
+
488 
+
489  checkControlModeWithImCompliant(VOCAB_CM_PWM, "test16");
+
490  verifyAmplifier(0,"test16b");
+
491 
+
492  checkControlModeWithImCompliant(VOCAB_CM_IDLE,"test17");
+
493  verifyAmplifier(0,"test17b");
+
494 
+
495  checkControlModeWithImCompliant(VOCAB_CM_POSITION,"test18");
+
496  verifyAmplifier(0,"test18b");
+
497 
+
498  checkControlModeWithImCompliant(VOCAB_CM_IDLE,"test19"); //VOCAB_CM_IDLE is intentional
+
499  verifyAmplifier(0,"test19b");
+
500 
+
501  checkControlModeWithImCompliant(VOCAB_CM_POSITION,"test20");
+
502  verifyAmplifier(0,"test20b");
+
503  goHome();
+
504 
+
505  //------ create an intentional HW FAULT ------
+
506  zeroCurrentLimits();
+
507  verifyMode(VOCAB_CM_HW_FAULT, VOCAB_IM_STIFF,"test21");
+
508  verifyAmplifier(0,"test21b");
+
509  resetOriginalCurrentLimits();
+
510 
+
511  //------ check all modes when in HW_FAULT ------
+
512  setMode(VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT);
+
513  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test22");
+
514  verifyAmplifier(0,"test22b");
+
515 
+
516  setMode(VOCAB_CM_POSITION_DIRECT,VOCAB_IM_COMPLIANT);
+
517  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test23");
+
518  verifyAmplifier(0,"test23b");
+
519 
+
520  setMode(VOCAB_CM_VELOCITY,VOCAB_IM_COMPLIANT);
+
521  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test24");
+
522  verifyAmplifier(0,"test24b");
+
523 
+
524  setMode(VOCAB_CM_TORQUE,VOCAB_IM_COMPLIANT);
+
525  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test25");
+
526  verifyAmplifier(0,"test25b");
+
527 
+
528  setMode(VOCAB_CM_MIXED,VOCAB_IM_COMPLIANT);
+
529  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test26");
+
530  verifyAmplifier(0,"test26b");
+
531 
+
532  setMode(VOCAB_CM_PWM, VOCAB_IM_COMPLIANT);
+
533  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test27");
+
534  verifyAmplifier(0,"test27b");
+
535 
+
536  setMode(VOCAB_CM_IDLE,VOCAB_IM_COMPLIANT);
+
537  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test28");
+
538  verifyAmplifier(0,"test28b");
+
539 
+
540  setMode(VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT);
+
541  checkControlModeWithImCompliant(VOCAB_CM_HW_FAULT,"test29");
+
542  verifyAmplifier(0,"test29b");
+
543 
+
544  setMode(VOCAB_CM_FORCE_IDLE,VOCAB_IM_COMPLIANT);
+
545  for (int i=0; i<n_cmd_joints; i++)
+
546  {
+
547  if(jointTorqueCtrlEnabled[jointsList[i]])
+
548  {
+
549  verifyModeSingle(jointsList[i], VOCAB_CM_IDLE,VOCAB_IM_COMPLIANT,"test30-comp");
+
550  }
+
551  else
+
552  {
+
553  verifyModeSingle(jointsList[i], VOCAB_CM_IDLE,VOCAB_IM_STIFF,"test30-stiff");
+
554  }
+
555  }
+
556  verifyAmplifier(0,"test30b");
+
557 
+
558  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
559  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test31");
+
560  verifyAmplifier(0,"test31b");
+
561  goHome();
+
562 }
+
The test checks if the joint is able to go in all the available control/interaction modes and if tran...
Definition: ControlModes.h:53
+
+ + + + diff --git a/doxygen/doc/html/ControlModes_8h_source.html b/doxygen/doc/html/ControlModes_8h_source.html new file mode 100644 index 00000000..616cd5c1 --- /dev/null +++ b/doxygen/doc/html/ControlModes_8h_source.html @@ -0,0 +1,172 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/controlModes/ControlModes.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ControlModes.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _CONTROLMODES_H_
+
22 #define _CONTROLMODES_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
53 class ControlModes : public yarp::robottestingframework::TestCase {
+
54 public:
+
55  ControlModes();
+
56  virtual ~ControlModes();
+
57 
+
58  virtual bool setup(yarp::os::Property& property);
+
59 
+
60  virtual void tearDown();
+
61 
+
62  virtual void run();
+
63 
+
64  void goHome();
+
65  void executeCmd();
+
66  void setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
67  void verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
68  void verifyAmplifier(int desired_amplifier_mode, std::string title);
+
69 
+
70  void zeroCurrentLimits();
+
71  void getOriginalCurrentLimits();
+
72  void resetOriginalCurrentLimits();
+
73  void verifyModeSingle(int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
74  void setModeSingle(int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
75  void checkJointWithTorqueMode();
+
76  void checkControlModeWithImCompliant(int desired_control_mode, std::string title);
+
77 
+
78 private:
+
79  std::string robotName;
+
80  std::string partName;
+
81  int* jointsList;
+
82  int* jointTorqueCtrlEnabled;
+
83 
+
84  double *home_pos;
+
85  int n_part_joints;
+
86  int n_cmd_joints;
+
87  double tolerance;
+
88  enum cmd_mode_t
+
89  {
+
90  single_joint = 0,
+
91  all_joints = 1,
+
92  some_joints =2
+
93  } cmd_mode;
+
94 
+
95  yarp::dev::PolyDriver *dd;
+
96  yarp::dev::IPositionControl *ipos;
+
97  yarp::dev::IAmplifierControl *iamp;
+
98  yarp::dev::IControlMode *icmd;
+
99  yarp::dev::IInteractionMode *iimd;
+
100  yarp::dev::IEncoders *ienc;
+
101  yarp::dev::IPositionDirect *idir;
+
102  yarp::dev::IVelocityControl *ivel;
+
103  yarp::dev::ITorqueControl *itrq;
+
104  yarp::dev::IRemoteVariables *ivar;
+
105 
+
106  double cmd_single;
+
107  double* cmd_tot;
+
108  double* cmd_some;
+
109 
+
110  double prevcurr_single;
+
111  double* prevcurr_tot;
+
112  double* prevcurr_some;
+
113 
+
114  double* pos_tot;
+
115 };
+
116 
+
117 #endif //_CONTROLMODES_H
+
The test checks if the joint is able to go in all the available control/interaction modes and if tran...
Definition: ControlModes.h:53
+
+ + + + diff --git a/doxygen/doc/html/DemoRedBallTest_8cpp_source.html b/doxygen/doc/html/DemoRedBallTest_8cpp_source.html new file mode 100644 index 00000000..2e99c585 --- /dev/null +++ b/doxygen/doc/html/DemoRedBallTest_8cpp_source.html @@ -0,0 +1,459 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/demoRedBall/DemoRedBallTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
DemoRedBallTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <memory>
+
22 #include <algorithm>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <robottestingframework/TestAssert.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Network.h>
+
27 #include <yarp/os/BufferedPort.h>
+
28 #include <yarp/os/ResourceFinder.h>
+
29 #include <yarp/dev/GazeControl.h>
+
30 #include <yarp/sig/Matrix.h>
+
31 #include <yarp/math/Math.h>
+
32 
+
33 #include <iCub/ctrl/filters.h>
+
34 
+
35 #include "DemoRedBallTest.h"
+
36 
+
37 using namespace std;
+
38 using namespace robottestingframework;
+
39 using namespace yarp::os;
+
40 using namespace yarp::dev;
+
41 using namespace yarp::sig;
+
42 using namespace yarp::math;
+
43 using namespace iCub::ctrl;
+
44 
+
45 // prepare the plugin
+
46 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(DemoRedBallTest)
+
47 
+
48 
+
49 /***********************************************************************************/
+
50 DemoRedBallTest::DemoRedBallTest() : yarp::robottestingframework::TestCase("DemoRedBallTest")
+
51 {
+
52 }
+
53 
+
54 
+
55 /***********************************************************************************/
+
56 DemoRedBallTest::~DemoRedBallTest()
+
57 {
+
58 }
+
59 
+
60 
+
61 /***********************************************************************************/
+
62 bool DemoRedBallTest::setup(Property &property)
+
63 {
+
64  Time::useNetworkClock("/clock");
+
65 
+
66  string context=property.check("context",Value("demoRedBall")).asString();
+
67  string from=property.check("from",Value("config-test.ini")).asString();
+
68 
+
69  // retrieve demoRedBall parameters
+
70  ResourceFinder rf;
+
71  rf.setDefaultContext(context.c_str());
+
72  rf.setDefaultConfigFile(from.c_str());
+
73  rf.configure(0,NULL);
+
74 
+
75  // fallback values
+
76  params.robot="icubSim";
+
77  params.eye="left";
+
78  params.reach_tol=0.01;
+
79  params.use_torso=true;
+
80  params.use_left=true;
+
81  params.use_right=true;
+
82  params.home_arm.resize(7,0.0);
+
83 
+
84  Bottle &general=rf.findGroup("general");
+
85  if (!general.isNull())
+
86  {
+
87  params.robot=general.check("robot",Value(params.robot)).asString();
+
88  params.eye=general.check("eye",Value(params.eye)).asString();
+
89  params.reach_tol=general.check("reach_tol",Value(params.reach_tol)).asFloat64();
+
90  params.use_torso=(general.check("torso",Value(params.use_torso?"on":"off")).asString()=="on");
+
91  params.use_left=(general.check("left_arm",Value(params.use_left?"on":"off")).asString()=="on");
+
92  params.use_right=(general.check("right_arm",Value(params.use_right?"on":"off")).asString()=="on");
+
93  }
+
94 
+
95  Bottle &home_arm=rf.findGroup("home_arm");
+
96  if (!home_arm.isNull())
+
97  {
+
98  if (home_arm.check("poss"))
+
99  {
+
100  Bottle &poss=home_arm.findGroup("poss");
+
101  for (size_t i=0; i<std::min(params.home_arm.length(),(size_t)poss.size()-1); i++)
+
102  params.home_arm[i]=poss.get(1+i).asFloat64();
+
103  }
+
104  }
+
105 
+
106  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening Clients");
+
107  if (params.use_left)
+
108  {
+
109  Property optJoint;
+
110  optJoint.put("device","remote_controlboard");
+
111  optJoint.put("remote",("/"+params.robot+"/"+"left_arm"));
+
112  optJoint.put("local",("/"+getName()+"/joint/left_arm"));
+
113 
+
114  Property optCart;
+
115  optCart.put("device","cartesiancontrollerclient");
+
116  optCart.put("remote",("/"+params.robot+"/"+"cartesianController/left_arm"));
+
117  optCart.put("local",("/"+getName()+"/cartesian/left_arm"));
+
118 
+
119  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvJointArmL.open(optJoint)&&drvCartArmL.open(optCart),
+
120  "Unable to open clients for left_arm!");
+
121  }
+
122 
+
123  if (params.use_right)
+
124  {
+
125  Property optJoint;
+
126  optJoint.put("device","remote_controlboard");
+
127  optJoint.put("remote",("/"+params.robot+"/"+"right_arm"));
+
128  optJoint.put("local",("/"+getName()+"/joint/right_arm"));
+
129 
+
130  Property optCart;
+
131  optCart.put("device","cartesiancontrollerclient");
+
132  optCart.put("remote",("/"+params.robot+"/"+"cartesianController/right_arm"));
+
133  optCart.put("local",("/"+getName()+"/cartesian/right_arm"));
+
134 
+
135  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvJointArmR.open(optJoint)&&drvCartArmR.open(optCart),
+
136  "Unable to open clients for right_arm!");
+
137  }
+
138 
+
139  {
+
140  Property optJoint;
+
141  optJoint.put("device","remote_controlboard");
+
142  optJoint.put("remote",("/"+params.robot+"/"+"head"));
+
143  optJoint.put("local",("/"+getName()+"/joint/head"));
+
144 
+
145  Property optGaze;
+
146  optGaze.put("device","gazecontrollerclient");
+
147  optGaze.put("remote","/iKinGazeCtrl");
+
148  optGaze.put("local",("/"+getName()+"/gaze"));
+
149 
+
150  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvJointHead.open(optJoint)&&drvGaze.open(optGaze),
+
151  "Unable to open clients for head!");
+
152  }
+
153 
+
154  if (params.use_torso)
+
155  {
+
156  Property optJoint;
+
157  optJoint.put("device","remote_controlboard");
+
158  optJoint.put("remote",("/"+params.robot+"/"+"torso"));
+
159  optJoint.put("local",("/"+getName()+"/joint/torso"));
+
160 
+
161  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(drvJointTorso.open(optJoint),
+
162  "Unable to open clients for torso!");
+
163  }
+
164 
+
165  rpcPort.open("/"+getName()+"/rpc");
+
166  string dest="/demoRedBall/rpc";
+
167  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(Network::connect(rpcPort.getName(),dest),
+
168  Asserter::format("Unable to connect to %s!",dest.c_str()));
+
169 
+
170  guiPort.open("/"+getName()+"/gui:i");
+
171  string src="/demoRedBall/gui:o";
+
172  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(Network::connect(src,guiPort.getName()),
+
173  Asserter::format("Unable to connect to %s!",src.c_str()));
+
174 
+
175  return true;
+
176 }
+
177 
+
178 
+
179 /***********************************************************************************/
+
180 void DemoRedBallTest::tearDown()
+
181 {
+
182  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing Clients");
+
183  rpcPort.close();
+
184  guiPort.close();
+
185  if (params.use_left)
+
186  {
+
187  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvJointArmL.close()&&drvCartArmL.close(),
+
188  "Unable to close client for left_arm!");
+
189  }
+
190  if (params.use_right)
+
191  {
+
192  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvJointArmR.close()&&drvCartArmR.close(),
+
193  "Unable to close client for right_arm!");
+
194  }
+
195  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvJointHead.close()&&drvGaze.close(),
+
196  "Unable to close client for head!");
+
197  if (params.use_torso)
+
198  {
+
199  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(drvJointTorso.close(),"Unable to close client for left_arm!");
+
200  }
+
201 }
+
202 
+
203 
+
204 /***********************************************************************************/
+
205 bool DemoRedBallTest::getBallPosition(const Bottle* b, Vector& pos)
+
206 {
+
207  if (b->size()>=15)
+
208  {
+
209  if (b->get(0).isString() && (b->get(0).asString()=="object"))
+
210  {
+
211  pos.resize(3);
+
212  pos[0]=b->get(5).asFloat64()/1000.;
+
213  pos[1]=b->get(6).asFloat64()/1000.;
+
214  pos[2]=b->get(7).asFloat64()/1000.;
+
215  return true;
+
216  }
+
217  }
+
218  return false;
+
219 }
+
220 
+
221 
+
222 /***********************************************************************************/
+
223 void DemoRedBallTest::testBallPosition(const Vector &dpos)
+
224 {
+
225  Vector x,o,encs;
+
226  int nEncs; IEncoders* ienc;
+
227  bool done=false;
+
228  double t0;
+
229 
+
230  Bottle cmd,rep;
+
231  cmd.addString("update_pose");
+
232  cmd.addFloat64(dpos[0]);
+
233  cmd.addFloat64(dpos[1]);
+
234  cmd.addFloat64(dpos[2]);
+
235  rpcPort.write(cmd,rep);
+
236 
+
237  Time::delay(3.0);
+
238 
+
239  cmd.clear();
+
240  cmd.addString("start");
+
241  cmd.addFloat64(0.);
+
242  cmd.addFloat64(-50.);
+
243  cmd.addFloat64(10.);
+
244  rpcPort.write(cmd,rep);
+
245 
+
246  auto filt = make_unique<MedianFilter>(5, Vector{0., 0., 0.});
+
247 
+
248  IGazeControl* igaze;
+
249  drvGaze.view(igaze);
+
250 
+
251  t0=Time::now();
+
252  while (Time::now()-t0<10.0)
+
253  {
+
254  if (auto* gui=guiPort.read(false))
+
255  {
+
256  Vector pos;
+
257  if (getBallPosition(gui,pos))
+
258  {
+
259  filt->filt(pos);
+
260  }
+
261  }
+
262  igaze->getFixationPoint(x);
+
263  if (norm(filt->output()-x)<2.0*params.reach_tol)
+
264  {
+
265  done=true;
+
266  break;
+
267  }
+
268  Time::delay(0.01);
+
269  }
+
270  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Ball gazed at with the eyes!");
+
271 
+
272  filt->init(Vector{0., 0., 0.});
+
273  done=false;
+
274  t0=Time::now();
+
275  while (Time::now()-t0<10.0)
+
276  {
+
277  if (auto* gui=guiPort.read(false))
+
278  {
+
279  Vector pos;
+
280  if (getBallPosition(gui,pos))
+
281  {
+
282  filt->filt(pos);
+
283  }
+
284  }
+
285  arm_under_test.iarm->getPose(x,o);
+
286  if (norm(filt->output()-x)<params.reach_tol)
+
287  {
+
288  done=true;
+
289  break;
+
290  }
+
291  Time::delay(0.01);
+
292  }
+
293  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Ball reached with the hand!");
+
294 
+
295  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Going home");
+
296  cmd.clear();
+
297  cmd.addString("stop");
+
298  rpcPort.write(cmd,rep);
+
299 
+
300  arm_under_test.ienc->getAxes(&nEncs);
+
301  encs.resize(nEncs,0.0);
+
302  done=false;
+
303  t0=Time::now();
+
304  while (Time::now()-t0<10.0)
+
305  {
+
306  arm_under_test.ienc->getEncoders(encs.data());
+
307  if (norm(params.home_arm-encs.subVector(0,params.home_arm.length()-1))<5.0)
+
308  {
+
309  done=true;
+
310  break;
+
311  }
+
312  Time::delay(1.0);
+
313  }
+
314  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Arm has reached home!");
+
315 
+
316  drvJointHead.view(ienc);
+
317  ienc->getAxes(&nEncs);
+
318  encs.resize(nEncs,0.0);
+
319  done=false;
+
320  t0=Time::now();
+
321  while (Time::now()-t0<10.0)
+
322  {
+
323  ienc->getEncoders(encs.data());
+
324  if (norm(encs.subVector(0,3))<5.0)
+
325  {
+
326  done=true;
+
327  break;
+
328  }
+
329  Time::delay(1.0);
+
330  }
+
331  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Head has reached home!");
+
332 
+
333  if (params.use_torso)
+
334  {
+
335  drvJointTorso.view(ienc);
+
336  ienc->getAxes(&nEncs);
+
337  encs.resize(nEncs,0.0);
+
338  done=false;
+
339  t0=Time::now();
+
340  while (Time::now()-t0<10.0)
+
341  {
+
342  ienc->getEncoders(encs.data());
+
343  if (norm(encs.subVector(0,3))<5.0)
+
344  {
+
345  done=true;
+
346  break;
+
347  }
+
348  Time::delay(1.0);
+
349  }
+
350  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Torso has reached home!");
+
351  }
+
352 }
+
353 
+
354 
+
355 /***********************************************************************************/
+
356 void DemoRedBallTest::run()
+
357 {
+
358  if (params.use_torso || params.use_left)
+
359  {
+
360  Vector dpos(3,0.0);
+
361  dpos[1]=-0.06;
+
362  dpos[2]=-0.3;
+
363  drvJointArmL.view(arm_under_test.ienc);
+
364  drvCartArmL.view(arm_under_test.iarm);
+
365  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Reaching with the left hand");
+
366  testBallPosition(dpos);
+
367  }
+
368 
+
369  if (params.use_torso || params.use_right)
+
370  {
+
371  Vector dpos(3,0.0);
+
372  dpos[1]=+0.06;
+
373  dpos[2]=-0.3;
+
374  drvJointArmR.view(arm_under_test.ienc);
+
375  drvCartArmR.view(arm_under_test.iarm);
+
376  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Reaching with the right hand");
+
377  testBallPosition(dpos);
+
378  }
+
379 }
+
380 
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/DemoRedBallTest_8h_source.html b/doxygen/doc/html/DemoRedBallTest_8h_source.html new file mode 100644 index 00000000..64e51be7 --- /dev/null +++ b/doxygen/doc/html/DemoRedBallTest_8h_source.html @@ -0,0 +1,152 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/demoRedBall/DemoRedBallTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
DemoRedBallTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _DEMOREDBALL_H_
+
22 #define _DEMOREDBALL_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/os/Bottle.h>
+
27 #include <yarp/os/Property.h>
+
28 #include <yarp/os/RpcClient.h>
+
29 #include <yarp/os/BufferedPort.h>
+
30 #include <yarp/dev/PolyDriver.h>
+
31 #include <yarp/dev/IEncoders.h>
+
32 #include <yarp/dev/CartesianControl.h>
+
33 #include <yarp/sig/Vector.h>
+
34 
+
50 class DemoRedBallTest : public yarp::robottestingframework::TestCase
+
51 {
+
52  struct {
+
53  std::string robot;
+
54  std::string eye;
+
55  double reach_tol;
+
56  bool use_torso;
+
57  bool use_left;
+
58  bool use_right;
+
59  yarp::sig::Vector home_arm;
+
60  } params;
+
61 
+
62  yarp::dev::PolyDriver drvJointArmL;
+
63  yarp::dev::PolyDriver drvJointArmR;
+
64  yarp::dev::PolyDriver drvJointTorso;
+
65  yarp::dev::PolyDriver drvJointHead;
+
66  yarp::dev::PolyDriver drvCartArmL;
+
67  yarp::dev::PolyDriver drvCartArmR;
+
68  yarp::dev::PolyDriver drvGaze;
+
69 
+
70  struct {
+
71  yarp::dev::ICartesianControl *iarm;
+
72  yarp::dev::IEncoders *ienc;
+
73  } arm_under_test;
+
74 
+
75  yarp::os::RpcClient rpcPort;
+
76  yarp::os::BufferedPort<yarp::os::Bottle> guiPort;
+
77  void testBallPosition(const yarp::sig::Vector &pos);
+
78  bool getBallPosition(const yarp::os::Bottle* b, yarp::sig::Vector& pos);
+
79 
+
80 public:
+ +
82  virtual ~DemoRedBallTest();
+
83  virtual bool setup(yarp::os::Property& property);
+
84  virtual void tearDown();
+
85  virtual void run();
+
86 };
+
87 
+
88 #endif
+
This test verifies the point-to-point cartesian movement.
+
+ + + + diff --git a/doxygen/doc/html/ExampleFixture_8cpp_source.html b/doxygen/doc/html/ExampleFixture_8cpp_source.html new file mode 100644 index 00000000..34ed8418 --- /dev/null +++ b/doxygen/doc/html/ExampleFixture_8cpp_source.html @@ -0,0 +1,133 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleFixture/ExampleFixture.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleFixture.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <cstdio>
+
22 #include <ctime>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include "ExampleFixture.h"
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/os/Random.h>
+
27 
+
28 using namespace std;
+
29 using namespace robottestingframework;
+
30 using namespace yarp::os;
+
31 
+
32 ROBOTTESTINGFRAMEWORK_PREPARE_FIXTURE_PLUGIN(ExampleFixture)
+
33 
+
34 bool ExampleFixture::setup(int argc, char** argv) {
+
35  printf("ExampleFixture: setupping fixture...\n");
+
36  // do the setup here
+
37  Property prop;
+
38  prop.fromCommand(argc, argv, false);
+
39  if(!prop.check("probability")) {
+
40  printf("ExampleFixture: missing 'probability' param.\n");
+
41  return false;
+
42  }
+
43  probability = prop.find("probability").asFloat64();
+
44  Random::seed(time(NULL));
+
45  return true;
+
46 }
+
47 
+
48 bool ExampleFixture::check() {
+
49  // return a random boolean
+
50  return ((double)Random::uniform(0, 100) <= 100.0*probability);
+
51 }
+
52 
+
53 void ExampleFixture::tearDown() {
+
54  printf("ExampleFixture: tearing down the fixture...\n");
+
55 }
+
+ + + + diff --git a/doxygen/doc/html/ExampleFixture_8h_source.html b/doxygen/doc/html/ExampleFixture_8h_source.html new file mode 100644 index 00000000..25325379 --- /dev/null +++ b/doxygen/doc/html/ExampleFixture_8h_source.html @@ -0,0 +1,113 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleFixture/ExampleFixture.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleFixture.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _EXAMPLE_FIXTURE_H_
+
22 #define _EXAMPLE_FIXTURE_H_
+
23 
+
24 #include <robottestingframework/FixtureManager.h>
+
25 
+
26 class ExampleFixture : public robottestingframework::FixtureManager {
+
27 public:
+
28  virtual bool setup(int argc, char** argv);
+
29  virtual bool check();
+
30  virtual void tearDown();
+
31 private:
+
32  double probability;
+
33 };
+
34 
+
35 #endif //_EXAMPLE_FIXTURE_H_
+
+ + + + diff --git a/doxygen/doc/html/ExampleTest_8cpp_source.html b/doxygen/doc/html/ExampleTest_8cpp_source.html new file mode 100644 index 00000000..d92eecb3 --- /dev/null +++ b/doxygen/doc/html/ExampleTest_8cpp_source.html @@ -0,0 +1,144 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleTest/ExampleTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include "ExampleTest.h"
+
22 #include <robottestingframework/dll/Plugin.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 
+
25 using namespace std;
+
26 using namespace robottestingframework;
+
27 using namespace yarp::os;
+
28 
+
29 // prepare the plugin
+
30 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(ExampleTest)
+
31 
+
32 ExampleTest::ExampleTest() : yarp::robottestingframework::TestCase("ExampleTest") {
+
33 }
+
34 
+
35 ExampleTest::~ExampleTest() { }
+
36 
+
37 bool ExampleTest::setup(yarp::os::Property &property) {
+
38 
+
39  // initialization goes here ...
+
40  //updating the test name
+
41  if(property.check("name"))
+
42  setName(property.find("name").asString());
+
43 
+
44  string example = property.check("example", Value("default value")).asString();
+
45 
+
46  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Use '%s' for the example param!",
+
47  example.c_str()));
+
48  return true;
+
49 }
+
50 
+
51 void ExampleTest::tearDown() {
+
52  // finalization goes her ...
+
53 }
+
54 
+
55 void ExampleTest::run() {
+
56 
+
57  int a = 5; int b = 3;
+
58  ROBOTTESTINGFRAMEWORK_TEST_CHECK(a<b, "a smaller then b");
+
59  ROBOTTESTINGFRAMEWORK_TEST_CHECK(a>b, "a bigger then b");
+
60  ROBOTTESTINGFRAMEWORK_TEST_CHECK(a==b, "a equal to b");
+
61 
+
62  // add more
+
63  // ...
+
64 }
+
65 
+
This is just an example test, use it as a reference to implement new tests.
Definition: ExampleTest.h:41
+
+ + + + diff --git a/doxygen/doc/html/ExampleTest_8h_source.html b/doxygen/doc/html/ExampleTest_8h_source.html new file mode 100644 index 00000000..c6f3a0ca --- /dev/null +++ b/doxygen/doc/html/ExampleTest_8h_source.html @@ -0,0 +1,117 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleTest/ExampleTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _EXAMPLE_TEST_H_
+
22 #define _EXAMPLE_TEST_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 
+
41 class ExampleTest : public yarp::robottestingframework::TestCase {
+
42 public:
+
43  ExampleTest();
+
44  virtual ~ExampleTest();
+
45 
+
46  virtual bool setup(yarp::os::Property& property);
+
47 
+
48  virtual void tearDown();
+
49 
+
50  virtual void run();
+
51 };
+
52 
+
53 #endif //_EXAMPLE_TEST_H
+
This is just an example test, use it as a reference to implement new tests.
Definition: ExampleTest.h:41
+
+ + + + diff --git a/doxygen/doc/html/ExternalPid_2plotDataPosition_8m_source.html b/doxygen/doc/html/ExternalPid_2plotDataPosition_8m_source.html new file mode 100644 index 00000000..af49b60c --- /dev/null +++ b/doxygen/doc/html/ExternalPid_2plotDataPosition_8m_source.html @@ -0,0 +1,110 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy-ExternalPid/plotDataPosition.m Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
plotDataPosition.m
+
+
+
1 % iCub Robot Unit Tests (Robot Testing Framework)
+
2 %
+
3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
4 %
+
5 % This library is free software; you can redistribute it and/or
+
6 % modify it under the terms of the GNU Lesser General Public
+
7 % License as published by the Free Software Foundation; either
+
8 % version 2.1 of the License, or (at your option) any later version.
+
9 %
+
10 % This library is distributed in the hope that it will be useful,
+
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
+
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
13 % Lesser General Public License for more details.
+
14 %
+
15 % You should have received a copy of the GNU Lesser General Public
+
16 % License along with this library; if not, write to the Free Software
+
17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
18 
+
19 hold on;
+
20 data = load ('positionControlAccuracy_plot_head0.txt');
+
21 cycles = max(data(:,1));
+
22 for cyc=0:cycles;
+
23  cyc
+
24  vec = find(data(:,1)==cyc);
+
25  plot (data(vec,2), data(vec,3),'b');
+
26  plot (data(vec,2), data(vec,4),'r');
+
27 end
+
28 xlim ([-0.9 3]);
+
29 ylim ([-1 6]);
+
30 grid on;
+
+ + + + diff --git a/doxygen/doc/html/FtSensorTest_8cpp_source.html b/doxygen/doc/html/FtSensorTest_8cpp_source.html new file mode 100644 index 00000000..e79d6db8 --- /dev/null +++ b/doxygen/doc/html/FtSensorTest_8cpp_source.html @@ -0,0 +1,155 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ftsensor-tests/FtSensorTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FtSensorTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <cstdlib>
+
22 #include <robottestingframework/dll/Plugin.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 
+
25 #include <yarp/os/Time.h>
+
26 
+
27 #include "FtSensorTest.h"
+
28 
+
29 using namespace std;
+
30 using namespace robottestingframework;
+
31 using namespace yarp::os;
+
32 using namespace yarp::sig;
+
33 
+
34 // prepare the plugin
+
35 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(FtSensorTest)
+
36 
+
37 FtSensorTest::FtSensorTest() : yarp::robottestingframework::TestCase("FtSensorTest") {
+
38 }
+
39 
+
40 FtSensorTest::~FtSensorTest() { }
+
41 
+
42 bool FtSensorTest::setup(yarp::os::Property &configuration) {
+
43  // initialization goes here ...
+
44  if(configuration.check("name"))
+
45  setName(configuration.find("name").asString());
+
46 
+
47  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("portname"),
+
48  "Missing 'portname' parameter");
+
49  portname = configuration.find("portname").asString();
+
50 
+
51  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(port.open("/iCubTest/FTsensor"),
+
52  "opening port, is YARP network working?");
+
53 
+
54  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("connecting from %s to %s\n",
+
55  port.getName().c_str(), portname.c_str()));
+
56 
+
57  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(Network::connect(portname, port.getName()),
+
58  Asserter::format("could not connect to remote port %s, FT sensor unavailable",
+
59  portname.c_str()));
+
60  return true;
+
61 }
+
62 
+
63 void FtSensorTest::tearDown() {
+
64  // finalization goes here ...
+
65  Network::disconnect(portname, port.getName());
+
66  port.close();
+
67 }
+
68 
+
69 void FtSensorTest::run() {
+
70  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Reading FT sensors...");
+
71  Vector *readSensor = port.read();
+
72  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(readSensor, "could not read FT data from sensor");
+
73 
+
74  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(readSensor->size() == 6, "sensor has 6 values");
+
75 }
+
76 
+
Check if a FT sensor port is correctly publishing a vector with 6 values.
Definition: FtSensorTest.h:41
+
+ + + + diff --git a/doxygen/doc/html/FtSensorTest_8h_source.html b/doxygen/doc/html/FtSensorTest_8h_source.html new file mode 100644 index 00000000..8b99c610 --- /dev/null +++ b/doxygen/doc/html/FtSensorTest_8h_source.html @@ -0,0 +1,124 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ftsensor-tests/FtSensorTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FtSensorTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _FTSENSORTEST_H_
+
22 #define _FTSENSORTEST_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/BufferedPort.h>
+
26 #include <yarp/sig/Vector.h>
+
27 
+
28 
+
41 class FtSensorTest : public yarp::robottestingframework::TestCase {
+
42 public:
+
43  FtSensorTest();
+
44  virtual ~FtSensorTest();
+
45 
+
46  virtual bool setup(yarp::os::Property& configuration);
+
47 
+
48  virtual void tearDown();
+
49 
+
50  virtual void run();
+
51 
+
52 private:
+
53  yarp::os::BufferedPort<yarp::sig::Vector> port;
+
54  std::string portname;
+
55 };
+
56 
+
57 #endif //_FTSENSORTEST_H_
+
Check if a FT sensor port is correctly publishing a vector with 6 values.
Definition: FtSensorTest.h:41
+
+ + + + diff --git a/doxygen/doc/html/GazeControlSimpleLookTest_8cpp_source.html b/doxygen/doc/html/GazeControlSimpleLookTest_8cpp_source.html new file mode 100644 index 00000000..229ab6cb --- /dev/null +++ b/doxygen/doc/html/GazeControlSimpleLookTest_8cpp_source.html @@ -0,0 +1,199 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control/simple-look/GazeControlSimpleLookTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
GazeControlSimpleLookTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <robottestingframework/dll/Plugin.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <yarp/os/Time.h>
+
24 #include <yarp/dev/GazeControl.h>
+
25 #include <yarp/sig/Vector.h>
+
26 
+
27 #include "GazeControlSimpleLookTest.h"
+
28 
+
29 using namespace std;
+
30 using namespace robottestingframework;
+
31 using namespace yarp::os;
+
32 using namespace yarp::dev;
+
33 using namespace yarp::sig;
+
34 
+
35 // prepare the plugin
+
36 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(GazeControlSimpleLookTest)
+
37 
+
38 
+
39 /***********************************************************************************/
+
40 GazeControlSimpleLookTest::GazeControlSimpleLookTest() :
+
41  yarp::robottestingframework::TestCase("GazeControlSimpleLookTest")
+
42 {
+
43 }
+
44 
+
45 
+
46 /***********************************************************************************/
+
47 GazeControlSimpleLookTest::~GazeControlSimpleLookTest()
+
48 {
+
49 }
+
50 
+
51 
+
52 /***********************************************************************************/
+
53 bool GazeControlSimpleLookTest::setup(Property &property)
+
54 {
+
55  Property option;
+
56  option.put("device","gazecontrollerclient");
+
57  option.put("remote","/iKinGazeCtrl");
+
58  option.put("local",("/"+getName()+"/gaze"));
+
59 
+
60  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening Gaze Controller Client");
+
61  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(driver.open(option),"Unable to open the client!");
+
62  return true;
+
63 }
+
64 
+
65 
+
66 /***********************************************************************************/
+
67 void GazeControlSimpleLookTest::tearDown()
+
68 {
+
69  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing Gaze Controller Client");
+
70  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(driver.close(),"Unable to close the client!");
+
71 }
+
72 
+
73 
+
74 /***********************************************************************************/
+
75 void GazeControlSimpleLookTest::run()
+
76 {
+
77  IGazeControl *igaze;
+
78  ROBOTTESTINGFRAMEWORK_TEST_CHECK(driver.view(igaze),"Opening the view on the device!");
+
79 
+
80  bool done;
+
81 
+
82  Vector fp;
+
83  double t0=Time::now();
+
84  while (Time::now()-t0<5.0)
+
85  {
+
86  done=igaze->getFixationPoint(fp);
+
87  if (done)
+
88  break;
+
89  Time::delay(0.1);
+
90  }
+
91  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Initial fixation-point retrieved!");
+
92 
+
93  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Setting up the context");
+
94  int context;
+
95  igaze->storeContext(&context);
+
96 
+
97  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Looking at the target");
+
98  Vector fpd(3,0.0); fp[0]=-0.4;
+
99  igaze->lookAtFixationPoint(fpd);
+
100 
+
101  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
102  igaze->waitMotionDone(1.0,5.0);
+
103 
+
104  igaze->checkMotionDone(&done);
+
105  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Target reached!");
+
106 
+
107  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Going back");
+
108  igaze->lookAtFixationPoint(fp);
+
109 
+
110  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Waiting");
+
111  igaze->waitMotionDone(1.0,5.0);
+
112 
+
113  igaze->checkMotionDone(&done);
+
114  ROBOTTESTINGFRAMEWORK_TEST_CHECK(done,"Done!");
+
115 
+
116  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Cleaning up the context");
+
117  igaze->restoreContext(context);
+
118  igaze->deleteContext(context);
+
119 }
+
120 
+
This test verifies the simple gaze movements.
+
+ + + + diff --git a/doxygen/doc/html/GazeControlSimpleLookTest_8h_source.html b/doxygen/doc/html/GazeControlSimpleLookTest_8h_source.html new file mode 100644 index 00000000..a0b01b6c --- /dev/null +++ b/doxygen/doc/html/GazeControlSimpleLookTest_8h_source.html @@ -0,0 +1,119 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control/simple-look/GazeControlSimpleLookTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
GazeControlSimpleLookTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _GAZECONTROLSIMPLELOOK_H_
+
22 #define _GAZECONTROLSIMPLELOOK_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/dev/PolyDriver.h>
+
27 
+
38 class GazeControlSimpleLookTest : public yarp::robottestingframework::TestCase
+
39 {
+
40  yarp::dev::PolyDriver driver;
+
41 
+
42 public:
+ +
44  virtual ~GazeControlSimpleLookTest();
+
45  virtual bool setup(yarp::os::Property& property);
+
46  virtual void tearDown();
+
47  virtual void run();
+
48 };
+
49 
+
50 #endif
+
This test verifies the simple gaze movements.
+
+ + + + diff --git a/doxygen/doc/html/MotorStiction_8cpp_source.html b/doxygen/doc/html/MotorStiction_8cpp_source.html new file mode 100644 index 00000000..cc6f28b0 --- /dev/null +++ b/doxygen/doc/html/MotorStiction_8cpp_source.html @@ -0,0 +1,539 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-stiction/MotorStiction.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
MotorStiction.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/math/Math.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <fstream>
+
28 #include <algorithm>
+
29 #include <cstdlib>
+
30 #include "MotorStiction.h"
+
31 
+
32 //example1 -v -t MotorStiction.dll -p "--robot icub --part left_arm --joints ""(4)"" --home ""(45)"" --outputStep ""(0.5)"" --outputMax ""(50)"" --outputDelay ""(2.0)"" --threshold ""(5.0)"" "
+
33 
+
34 using namespace robottestingframework;
+
35 using namespace yarp::os;
+
36 using namespace yarp::dev;
+
37 
+
38 // prepare the plugin
+
39 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(MotorStiction)
+
40 
+
41 MotorStiction::MotorStiction() : yarp::robottestingframework::TestCase("MotorStiction") {
+
42  jointsList=0;
+
43  dd=0;
+
44  ipos=0;
+
45  iamp=0;
+
46  icmd=0;
+
47  iimd=0;
+
48  ienc=0;
+
49  ipwm = 0;
+
50 }
+
51 
+
52 MotorStiction::~MotorStiction() { }
+
53 
+
54 bool MotorStiction::setup(yarp::os::Property& property) {
+
55  if(property.check("name"))
+
56  setName(property.find("name").asString());
+
57 
+
58  // updating parameters
+
59  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
60  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
61  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
62  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position must be given as the test parameter!");
+
63 
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("outputStep"), "The output_step must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("outputDelay") , "The output_delay must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("outputMax"), "The output_max must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("threshold"), "The threshold must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("repeat"), "The repeat must be given as the test parameter!");
+
69 
+
70  robotName = property.find("robot").asString();
+
71  partName = property.find("part").asString();
+
72 
+
73  repeat = property.find("repeat").asInt32();
+
74  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(repeat>=0,"repeat must be greater than zero");
+
75 
+
76  Bottle* homeBottle = property.find("home").asList();
+
77  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse zero parameter");
+
78 
+
79  Bottle* jointsBottle = property.find("joints").asList();
+
80  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
81 
+
82  Bottle* output_step_Bottle = property.find("outputStep").asList();
+
83  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(output_step_Bottle!=0,"unable to parse joints parameter");
+
84 
+
85  Bottle* output_delay_Bottle = property.find("outputDelay").asList();
+
86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(output_delay_Bottle!=0,"unable to parse joints parameter");
+
87 
+
88  Bottle* output_max_Bottle = property.find("outputMax").asList();
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(output_max_Bottle!=0,"unable to parse joints parameter");
+
90 
+
91  Bottle* threshold_Bottle = property.find("threshold").asList();
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(threshold_Bottle!=0,"unable to parse joints parameter");
+
93 
+
94  Property options;
+
95  options.put("device", "remote_controlboard");
+
96  options.put("remote", "/"+robotName+"/"+partName);
+
97  options.put("local", "/MotorStictionTest/"+robotName+"/"+partName);
+
98 
+
99  dd = new PolyDriver(options);
+
100  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipwm),"Unable to open pwm control interface");
+
102  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iamp),"Unable to open ampliefier interface");
+
104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
107  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ilim),"Unable to open limits interface");
+
108 
+
109  if (!ienc->getAxes(&n_part_joints))
+
110  {
+
111  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
112  }
+
113 
+
114  int n_cmd_joints = jointsBottle->size();
+
115  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0 && n_cmd_joints<=n_part_joints,"invalid number of joints, it must be >0 & <= number of part joints");
+
116  for (int i=0; i <n_cmd_joints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
+
117 
+
118  home.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
+
119  opl_step.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_step[i]=output_step_Bottle->get(i).asFloat64();
+
120  opl_delay.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_delay[i]=output_delay_Bottle->get(i).asFloat64();
+
121  opl_max.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_max[i]=output_max_Bottle->get(i).asFloat64();
+
122  movement_threshold.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) movement_threshold[i]=threshold_Bottle->get(i).asFloat64();
+
123 
+
124  max_lims.resize(n_cmd_joints);
+
125  min_lims.resize(n_cmd_joints);
+
126  for (int i=0; i <n_cmd_joints; i++) ilim->getLimits((int)jointsList[i],&min_lims[i],&max_lims[i]);
+
127 
+
128  return true;
+
129 }
+
130 
+
131 void MotorStiction::tearDown()
+
132 {
+
133  char buff[500];
+
134  sprintf(buff,"Closing test module");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
135  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
136  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test0");
+
137  goHome();
+
138  if (dd) {delete dd; dd =0;}
+
139 }
+
140 
+
141 void MotorStiction::setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
142 {
+
143  for (unsigned int i=0; i<jointsList.size(); i++)
+
144  {
+
145  icmd->setControlMode((int)jointsList[i],desired_control_mode);
+
146  iimd->setInteractionMode((int)jointsList[i],desired_interaction_mode);
+
147  yarp::os::Time::delay(0.010);
+
148  }
+
149 }
+
150 
+
151 void MotorStiction::setModeSingle(int i, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
152 {
+
153  icmd->setControlMode((int)jointsList[i],desired_control_mode);
+
154  iimd->setInteractionMode((int)jointsList[i],desired_interaction_mode);
+
155  yarp::os::Time::delay(0.010);
+
156 }
+
157 
+
158 void MotorStiction::verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
159 {
+
160  int cmode;
+
161  yarp::dev::InteractionModeEnum imode;
+
162  int timeout = 0;
+
163 
+
164  while (1)
+
165  {
+
166  int ok=0;
+
167  for (unsigned int i=0; i<jointsList.size(); i++)
+
168  {
+
169  icmd->getControlMode ((int)jointsList[i],&cmode);
+
170  iimd->getInteractionMode((int)jointsList[i],&imode);
+
171  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok++;
+
172  }
+
173  if (ok==jointsList.size()) break;
+
174  if (timeout>100)
+
175  {
+
176  char sbuf[500];
+
177  sprintf(sbuf,"Test (%s) failed: current mode is (%d,%d), it should be (%d,%d)",title.c_str(), desired_control_mode,desired_interaction_mode,cmode,imode);
+
178  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
179  }
+
180  yarp::os::Time::delay(0.2);
+
181  timeout++;
+
182  }
+
183  char sbuf[500];
+
184  sprintf(sbuf,"Test (%s) passed: current mode is (%d,%d)",title.c_str(), desired_control_mode,desired_interaction_mode);
+
185  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
186 }
+
187 
+
188 void MotorStiction::goHome()
+
189 {
+
190  for (unsigned int i=0; i<jointsList.size(); i++)
+
191  {
+
192  ipos->setRefSpeed((int)jointsList[i],20.0);
+
193  ipos->positionMove((int)jointsList[i],home[i]);
+
194  yarp::os::Time::delay(0.010);
+
195  }
+
196 
+
197  char buff [500];
+
198  sprintf(buff,"Homing the whole part");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
199 
+
200  int in_position=0;
+
201  for (unsigned int i=0; i<jointsList.size(); i++)
+
202  {
+
203  double time_started = yarp::os::Time::now();
+
204  while (1)
+
205  {
+
206  double pos;
+
207  ienc->getEncoder((int)jointsList[i],&pos);
+
208  if (fabs(pos-home[i])<1.0) break;
+
209  if (yarp::os::Time::now()-time_started>20)
+
210  {
+
211  sprintf(buff,"Timeout while reaching zero position, joint %d, curr_enc %f, home %f", (int)jointsList[i],pos,home[i]);
+
212  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
213  }
+
214  }
+
215  }
+
216 
+
217  sprintf(buff,"Homing succesfully completed");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
218 }
+
219 
+
220 void MotorStiction::saveToFile(std::string filename, yarp::os::Bottle &b)
+
221 {
+
222  std::fstream fs;
+
223  fs.open (filename.c_str(), std::fstream::out);
+
224 
+
225  for (int i=0; i<b.size(); i++)
+
226  {
+
227  std::string s = b.get(i).toString();
+
228  std::replace(s.begin(), s.end(), '(', ' ');
+
229  std::replace(s.begin(), s.end(), ')', ' ');
+
230  fs << s << std::endl;
+
231  }
+
232 
+
233  fs.close();
+
234 }
+
235 
+
236 void MotorStiction::OplExecute(int i, std::vector<yarp::os::Bottle>& dataToPlotList, stiction_data& current_test, bool positive_sign)
+
237 {
+
238  char buff[500];
+
239  double time = yarp::os::Time::now();
+
240  double time_old = yarp::os::Time::now();
+
241  double enc=0;
+
242  double start_enc=0;
+
243  ienc->getEncoder((int)jointsList[i],&enc);
+
244  ienc->getEncoder((int)jointsList[i],&start_enc);
+
245  bool not_moving = true;
+
246  double opl=0;
+
247  setMode(VOCAB_CM_PWM, VOCAB_IM_STIFF);
+
248  ipwm->setRefDutyCycle((int)jointsList[i], opl);
+
249  double last_opl_cmd=yarp::os::Time::now();
+
250  Bottle dataToPlot;
+
251 
+
252  while (not_moving)
+
253  {
+
254  Bottle& row = dataToPlot.addList();
+
255  Bottle& v1 = row.addList();
+
256  Bottle& v2 = row.addList();
+
257 
+
258  ipwm->setRefDutyCycle((int)jointsList[i],opl);
+
259  ienc->getEncoder((int)jointsList[i],&enc);
+
260 
+
261  //sprintf(buff,"%f %f %f %f",enc,start_enc,fabs(enc-start_enc),movement_threshold[i]);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
262 
+
263  if (fabs(enc-start_enc)>movement_threshold[i])
+
264  {
+
265  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
266  not_moving=false;
+
267  if (positive_sign) {current_test.pos_opl=opl; current_test.pos_test_passed=true;}
+
268  else {current_test.neg_opl=opl; current_test.neg_test_passed=true;}
+
269  dataToPlotList.push_back(dataToPlot);
+
270  sprintf(buff,"Test success (output=%f)",opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
271  }
+
272  else if (opl>=opl_max[i])
+
273  {
+
274  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
275  not_moving=false;
+
276  if (positive_sign) {current_test.pos_opl=opl; current_test.pos_test_passed=false;}
+
277  else {current_test.neg_opl=opl; current_test.neg_test_passed=false;}
+
278  dataToPlotList.push_back(dataToPlot);
+
279  sprintf(buff,"Test failed failed because max output was reached(output=%f)",opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
280  }
+
281  else if (fabs(enc-max_lims[i]) < 1.0 ||
+
282  fabs(enc-min_lims[i]) < 1.0 )
+
283  {
+
284  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
285  not_moving=false;
+
286  if (positive_sign) {current_test.pos_opl=opl; current_test.pos_test_passed=false;}
+
287  else {current_test.neg_opl=opl; current_test.neg_test_passed=false;}
+
288  dataToPlotList.push_back(dataToPlot);
+
289  sprintf(buff,"Test failed because hw limit was touched (enc=%f)",enc);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
290  }
+
291 
+
292  if (yarp::os::Time::now()-last_opl_cmd>opl_delay[i])
+
293  {
+
294  if (positive_sign)
+
295  {opl+=opl_step[i];}
+
296  else
+
297  {opl-=opl_step[i];}
+
298  last_opl_cmd=yarp::os::Time::now();
+
299  }
+
300 
+
301  time = yarp::os::Time::now();
+
302  v1.addFloat64(time);
+
303  v2.addFloat64(enc);
+
304  v2.addFloat64(opl);
+
305  yarp::os::Time::delay(0.010);
+
306 
+
307  if (time-time_old>5.0 && not_moving==true)
+
308  {
+
309  sprintf(buff,"test in progress on joint %d, current output value = %f",(int)jointsList[i],opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
310  time_old=time;
+
311  }
+
312  }
+
313 }
+
314 
+
315 void MotorStiction::OplExecute2(int i, std::vector<yarp::os::Bottle>& dataToPlotList, stiction_data& current_test, bool positive_sign)
+
316 {
+
317  char buff[500];
+
318  double time = yarp::os::Time::now();
+
319  double time_old = yarp::os::Time::now();
+
320  double enc=0;
+
321  double start_enc=0;
+
322  ienc->getEncoder((int)jointsList[i],&enc);
+
323  ienc->getEncoder((int)jointsList[i],&start_enc);
+
324  bool not_moving = true;
+
325  double opl=0;
+
326  setMode(VOCAB_CM_PWM,VOCAB_IM_STIFF);
+
327  ipwm->setRefDutyCycle((int)jointsList[i], opl);
+
328  double last_opl_cmd=yarp::os::Time::now();
+
329  Bottle dataToPlot;
+
330 
+
331  while (not_moving)
+
332  {
+
333  Bottle& row = dataToPlot.addList();
+
334  Bottle& v1 = row.addList();
+
335  Bottle& v2 = row.addList();
+
336 
+
337  ipwm->setRefDutyCycle((int)jointsList[i], opl);
+
338  ienc->getEncoder((int)jointsList[i],&enc);
+
339 
+
340  //sprintf(buff,"%f %f %f %f",enc,start_enc,fabs(enc-start_enc),movement_threshold[i]);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
341 
+
342  if (opl>=opl_max[i])
+
343  {
+
344  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
345  not_moving=false;
+
346  if (positive_sign) {current_test.pos_opl=opl; current_test.pos_test_passed=false;}
+
347  else {current_test.neg_opl=opl; current_test.neg_test_passed=false;}
+
348  dataToPlotList.push_back(dataToPlot);
+
349  sprintf(buff,"Test failed failed because max output was reached(output=%f)",opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
350  }
+
351  else if (fabs(enc-max_lims[i]) < 1.0 ||
+
352  fabs(enc-min_lims[i]) < 1.0 )
+
353  {
+
354  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
355  not_moving=false;
+
356  if (positive_sign) {current_test.pos_opl=opl; current_test.pos_test_passed=true;}
+
357  else {current_test.neg_opl=opl; current_test.neg_test_passed=true;}
+
358  dataToPlotList.push_back(dataToPlot);
+
359  sprintf(buff,"Test success (output=%f)",opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
360  }
+
361 
+
362  if (yarp::os::Time::now()-last_opl_cmd>opl_delay[i])
+
363  {
+
364  if (positive_sign)
+
365  {opl+=opl_step[i];}
+
366  else
+
367  {opl-=opl_step[i];}
+
368  last_opl_cmd=yarp::os::Time::now();
+
369  }
+
370 
+
371  time = yarp::os::Time::now();
+
372  v1.addFloat64(time);
+
373  v2.addFloat64(enc);
+
374  v2.addFloat64(opl);
+
375  yarp::os::Time::delay(0.010);
+
376 
+
377  if (time-time_old>5.0 && not_moving==true)
+
378  {
+
379  sprintf(buff,"test in progress on joint %d, current output value = %f",(int)jointsList[i],opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
380  time_old=time;
+
381  }
+
382  }
+
383 }
+
384 
+
385 void MotorStiction::run()
+
386 {
+
387  //yarp::os::Time::delay(10);
+
388 
+
389  char buff[500];
+
390  std::vector<Bottle> dataToPlotList;
+
391 
+
392  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
393  goHome();
+
394 
+
395  for (unsigned int i=0 ; i<jointsList.size(); i++)
+
396  {
+
397  for (int repeat_count=0; repeat_count<repeat; repeat_count++)
+
398  {
+
399  stiction_data current_test;
+
400  current_test.jnt=(int)jointsList[i];
+
401  current_test.cycle= repeat_count;
+
402 
+
403  setModeSingle(i,VOCAB_CM_PWM,VOCAB_IM_STIFF);
+
404  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
405 
+
406  sprintf(buff,"Testing joint %d, cycle %d, positive output",(int)jointsList[i],repeat_count);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
407  OplExecute(i,dataToPlotList,current_test, true);
+
408 
+
409  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
410  goHome();
+
411 
+
412  setModeSingle(i, VOCAB_CM_PWM,VOCAB_IM_STIFF);
+
413  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
+
414 
+
415  sprintf(buff,"Testing joint %d, cycle %d, negative output",(int)jointsList[i],repeat_count);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
416  OplExecute(i,dataToPlotList,current_test, false);
+
417 
+
418  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
419  goHome();
+
420 
+
421  //test cycle complete, save data
+
422  stiction_data_list.push_back(current_test);
+
423 
+
424  char filename[500];
+
425  sprintf (filename, "plot_stiction_%s_j%d_n_c%d.txt",partName.c_str(),(int)jointsList[i],repeat_count);
+
426  saveToFile(filename,dataToPlotList.rbegin()[0]); //last element
+
427  sprintf (filename, "plot_stiction_%s_j%d_p_c%d.txt",partName.c_str(),(int)jointsList[i],repeat_count);
+
428  saveToFile(filename,dataToPlotList.rbegin()[1]); //second last element
+
429  }
+
430  }
+
431 
+
432  goHome();
+
433 
+
434  for (unsigned int i=0 ; i<jointsList.size(); i++)
+
435  {
+
436  char filename[500];
+
437  char plotstring[1000];
+
438  sprintf (filename, "plot_stiction_j%d.txt",(int)jointsList[i]);
+
439  //gnuplot -e "unset key; plot for [col=1:6] 'C:\software\icub-tests\build\plugins\Debug\plot.txt' using col with lines" -persist
+
440  sprintf (plotstring, "gnuplot -e \" unset key; plot for [col=1:%d] '%s' using col with lines \" -persist", n_part_joints,filename);
+
441  //system (plotstring);
+
442  }
+
443 
+
444  //stiction_data_list.size() include tests for all joints, multiple cycles
+
445  for (unsigned int i=0; i <stiction_data_list.size(); i++)
+
446  {
+
447  if (stiction_data_list[i].neg_test_passed==false)
+
448  {
+
449  char buff [500];
+
450  sprintf(buff, "test failed on joint %d, cycle %d, negative output value: %f",stiction_data_list[i].jnt,stiction_data_list[i].cycle,stiction_data_list[i].neg_opl);
+
451  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
452  }
+
453  else if (stiction_data_list[i].pos_test_passed==false)
+
454  {
+
455  char buff [500];
+
456  sprintf(buff, "test failed on joint %d, cycle %d, positive output value: %f",stiction_data_list[i].jnt,stiction_data_list[i].cycle,stiction_data_list[i].pos_opl);
+
457  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
458  }
+
459  }
+
460 
+
461 }
+
+ + + + diff --git a/doxygen/doc/html/MotorStiction_8h_source.html b/doxygen/doc/html/MotorStiction_8h_source.html new file mode 100644 index 00000000..7aed7125 --- /dev/null +++ b/doxygen/doc/html/MotorStiction_8h_source.html @@ -0,0 +1,175 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-stiction/MotorStiction.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
MotorStiction.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _MOTORSTICTION_H_
+
22 #define _MOTORSTICTION_H_
+
23 
+
24 #include <string>
+
25 #include <vector>
+
26 #include <yarp/robottestingframework/TestCase.h>
+
27 #include <yarp/dev/ControlBoardInterfaces.h>
+
28 #include <yarp/dev/PolyDriver.h>
+
29 #include <yarp/sig/Vector.h>
+
30 #include <yarp/os/Bottle.h>
+
31 #include <yarp/sig/Matrix.h>
+
32 
+
33 class stiction_data
+
34 {
+
35  public:
+
36  int jnt;
+
37  int cycle;
+
38  bool pos_test_passed;
+
39  bool neg_test_passed;
+
40  double pos_opl;
+
41  double neg_opl;
+
42 
+
43  public:
+
44  stiction_data() {jnt=0; cycle=0; pos_test_passed=false; neg_test_passed=false; pos_opl=0; neg_opl=0;}
+
45 };
+
46 
+
47 class MotorStiction : public yarp::robottestingframework::TestCase
+
48 {
+
49 public:
+
50  MotorStiction();
+
51  virtual ~MotorStiction();
+
52 
+
53  virtual bool setup(yarp::os::Property& property);
+
54 
+
55  virtual void tearDown();
+
56 
+
57  virtual void run();
+
58 
+
59  void goHome();
+
60  void setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
61  void setModeSingle(int i, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
62  void verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
63  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
64 
+
65  //ok if the joints moves of 5 degrees
+
66  void OplExecute(int i, std::vector<yarp::os::Bottle>& dataToPlotList, stiction_data& current_test, bool positive_sign);
+
67 
+
68  //ok if the joint reaches the hardware limit
+
69  void OplExecute2(int i, std::vector<yarp::os::Bottle>& dataToPlotList, stiction_data& current_test, bool positive_sign);
+
70 
+
71 private:
+
72  std::string robotName;
+
73  std::string partName;
+
74  int repeat;
+
75  std::vector<stiction_data> stiction_data_list;
+
76  yarp::sig::Vector jointsList;
+
77  yarp::sig::Vector home;
+
78  yarp::sig::Vector opl_step;
+
79  yarp::sig::Vector opl_max;
+
80  yarp::sig::Vector opl_delay;
+
81  yarp::sig::Vector movement_threshold;
+
82  yarp::sig::Vector max_lims;
+
83  yarp::sig::Vector min_lims;
+
84 
+
85  int n_part_joints;
+
86 
+
87  yarp::dev::PolyDriver *dd;
+
88  yarp::dev::IPositionControl *ipos;
+
89  yarp::dev::IAmplifierControl *iamp;
+
90  yarp::dev::IControlMode *icmd;
+
91  yarp::dev::IInteractionMode *iimd;
+
92  yarp::dev::IEncoders *ienc;
+
93  yarp::dev::IPWMControl *ipwm;
+
94  yarp::dev::IControlLimits *ilim;
+
95 };
+
96 
+
97 #endif //_MOTORSTICTION_H_
+
+ + + + diff --git a/doxygen/doc/html/MotorTest_8cpp_source.html b/doxygen/doc/html/MotorTest_8cpp_source.html new file mode 100644 index 00000000..f5cd2d04 --- /dev/null +++ b/doxygen/doc/html/MotorTest_8cpp_source.html @@ -0,0 +1,412 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-tests/MotorTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
MotorTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <cmath>
+
22 
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <robottestingframework/TestAssert.h>
+
25 #include <yarp/robottestingframework/TestAsserter.h>
+
26 
+
27 #include "MotorTest.h"
+
28 
+
29 using namespace std;
+
30 using namespace robottestingframework;
+
31 
+
32 using namespace yarp::os;
+
33 
+
34 // prepare the plugin
+
35 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(MotorTest)
+
36 
+
37 MotorTest::MotorTest() : yarp::robottestingframework::TestCase("MotorTest") {
+
38 }
+
39 
+
40 MotorTest::~MotorTest() {
+
41 }
+
42 
+
43 bool MotorTest::setup(yarp::os::Property &configuration) {
+
44 
+
45  // initialization goes here ...
+
46  m_aTargetVal=NULL;
+
47  m_aMaxErr=NULL;
+
48  m_aMinErr=NULL;
+
49  m_aRefVel=NULL;
+
50  m_aRefAcc=NULL;
+
51  m_aTimeout=NULL;
+
52  m_aHome=NULL;
+
53  iEncoders=NULL;
+
54  iPosition=NULL;
+
55  m_initialized=false;
+
56 
+
57  if(configuration.check("name"))
+
58  setName(configuration.find("name").asString());
+
59 
+
60  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("portname"),
+
61  "Missing 'portname' parameter, cannot open device");
+
62  m_portname = configuration.find("portname").asString();
+
63 
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("joints"),
+
65  "Missing 'joints' parameter, cannot open device");
+
66  m_NumJoints=configuration.find("joints").asInt32();
+
67 
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("target"),
+
69  "Missing 'target' parameter, cannot open device");
+
70  yarp::os::Bottle bot=configuration.findGroup("target").tail();
+
71  int n = m_NumJoints<bot.size()? m_NumJoints:bot.size();
+
72  m_aTargetVal=new double[m_NumJoints];
+
73  m_aHome=new double [m_NumJoints];
+
74  for (int i=0; i<n; ++i) {
+
75  m_aTargetVal[i]=bot.get(i).asFloat64();
+
76  m_aHome[i]=0.0;
+
77  }
+
78 
+
79  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("min"),
+
80  "Missing 'min' parameter, cannot open device");
+
81  bot = configuration.findGroup("min").tail();
+
82  n = m_NumJoints<bot.size()?m_NumJoints:bot.size();
+
83  m_aMinErr=new double[m_NumJoints];
+
84  for (int i=0; i<n; ++i)
+
85  m_aMinErr[i]=bot.get(i).asFloat64();
+
86 
+
87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("max"),
+
88  "Missing 'max' parameter, cannot open device");
+
89  bot=configuration.findGroup("max").tail();
+
90  n = m_NumJoints<bot.size()? m_NumJoints:bot.size();
+
91  m_aMaxErr=new double[m_NumJoints];
+
92  for (int i=0; i<n; ++i)
+
93  m_aMaxErr[i]=bot.get(i).asFloat64();
+
94 
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("refvel"),
+
96  "Missing 'max' parameter, cannot open device");
+
97  bot = configuration.findGroup("refvel").tail();
+
98  n = m_NumJoints<bot.size()?m_NumJoints:bot.size();
+
99  m_aRefVel=new double[m_NumJoints];
+
100  for (int i=0; i<n; ++i)
+
101  m_aRefVel[i]=bot.get(i).asFloat64();
+
102 
+
103  if(configuration.check("refacc")) {
+
104  bot = configuration.findGroup("refacc").tail();
+
105  n = m_NumJoints<bot.size()?m_NumJoints:bot.size();
+
106  m_aRefAcc=new double[m_NumJoints];
+
107  for (int i=0; i<n; ++i)
+
108  m_aRefAcc[i]=bot.get(i).asFloat64();
+
109  }
+
110 
+
111  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(configuration.check("timeout"),
+
112  "Missing 'timeout' parameter, cannot open device");
+
113  bot = configuration.findGroup("timeout").tail();
+
114  n = m_NumJoints<bot.size()?m_NumJoints:bot.size();
+
115  m_aTimeout = new double[m_NumJoints];
+
116  for (int i=0; i<n; ++i)
+
117  m_aTimeout[i]=bot.get(i).asFloat64();
+
118 
+
119  // opening interfaces
+
120  yarp::os::Property options;
+
121  options.put("device","remote_controlboard");
+
122  options.put("local",m_portname+"/client");
+
123  options.put("remote",m_portname);
+
124 
+
125  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_driver.open(options),
+
126  "cannot open driver");
+
127 
+
128  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_driver.view(iEncoders), "cannot view iEncoder");
+
129  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_driver.view(iPosition), "cannot view iPosition");
+
130 
+
131  return true;
+
132 }
+
133 
+
134 void MotorTest::tearDown() {
+
135  // finalization goes her ...
+
136  if(iPosition) {
+
137  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Homing robot");
+
138  iPosition->positionMove(m_aHome);
+
139 
+
140  bool reached=false;
+
141  double timeStart=yarp::os::Time::now();
+
142  double timeNow=timeStart;
+
143  while(timeNow<timeStart+m_aTimeout[0] && !reached) {
+
144  iPosition->checkMotionDone(&reached);
+
145  timeNow=yarp::os::Time::now();
+
146  yarp::os::Time::delay(0.1);
+
147  }
+
148  }
+
149 
+
150  if (m_aTargetVal) delete [] m_aTargetVal;
+
151  if (m_aMaxErr) delete [] m_aMaxErr;
+
152  if (m_aMinErr) delete [] m_aMinErr;
+
153  if (m_aRefVel) delete [] m_aRefVel;
+
154  if (m_aRefAcc) delete [] m_aRefAcc;
+
155  if (m_aTimeout) delete [] m_aTimeout;
+
156  if (m_aHome) delete [] m_aHome;
+
157 }
+
158 
+
159 void MotorTest::run() {
+
160 
+
161  int nJoints=0;
+
162  bool doneAll=false;
+
163  bool ret=false;
+
164 
+
165  ROBOTTESTINGFRAMEWORK_TEST_REPORT("checking joints number");
+
166  iEncoders->getAxes(&nJoints);
+
167  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(m_NumJoints==nJoints, "expected number of joints is inconsistent");
+
168 
+
169  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking individual joints...");
+
170  for (int joint=0; joint<m_NumJoints; ++joint) {
+
171  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking joint %d", joint));
+
172  if (m_aRefAcc!=NULL) {
+
173  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefAcceleration(joint, m_aRefAcc[joint]),
+
174  Asserter::format("setting reference acceleration on joint %d", joint));
+
175  }
+
176 
+
177  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefSpeed(joint, m_aRefVel[joint]),
+
178  Asserter::format("setting reference speed on joint %d", joint));
+
179 
+
180  // wait some time
+
181  double timeStart=yarp::os::Time::now();
+
182  double timeNow=timeStart;
+
183  bool read=false;
+
184 
+
185  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking encoders");
+
186  while(timeNow<timeStart+m_aTimeout[joint] && !read) {
+
187  // read encoders
+
188  read=iEncoders->getEncoder(joint,m_aHome+joint);
+
189  yarp::os::Time::delay(0.1);
+
190  }
+
191  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(read, "getEncoder() returned true");
+
192 
+
193  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->positionMove(joint, m_aTargetVal[joint]),
+
194  Asserter::format("moving joint %d to %.2lf", joint, m_aTargetVal[joint]));
+
195 
+
196  doneAll=false;
+
197  ret=iPosition->checkMotionDone(joint, &doneAll);
+
198  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(!doneAll&&ret, "checking checkMotionDone returns false after position move");
+
199 
+
200  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Waiting timeout %.2lf", m_aTimeout[joint]));
+
201  bool reached=false;
+
202  while(timeNow<timeStart+m_aTimeout[joint] && !reached) {
+
203  double pos;
+
204  iEncoders->getEncoder(joint,&pos);
+
205  reached = yarp::robottestingframework::TestAsserter::isApproxEqual(pos, m_aTargetVal[joint], m_aMinErr[joint], m_aMaxErr[joint]);
+
206  timeNow=yarp::os::Time::now();
+
207  yarp::os::Time::delay(0.1);
+
208  }
+
209  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(reached, "reached position");
+
210  }
+
211 
+
213  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking multiple joints...");
+
214  if (m_aRefAcc!=NULL) {
+
215  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefAccelerations(m_aRefAcc),
+
216  "setting reference acceleration on all joints");
+
217  }
+
218  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefSpeeds(m_aRefVel),
+
219  "setting reference speed on all joints");
+
220 
+
221  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->positionMove(m_aHome),
+
222  "moving all joints to home");
+
223 
+
224  doneAll=false;
+
225  // make sure that checkMotionDone return false right after a movement
+
226  ret=iPosition->checkMotionDone(&doneAll);
+
227  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(!doneAll&&ret, "checking checkMotionDone returns false after position move");
+
228 
+
229  // wait some time
+
230  double timeStart=yarp::os::Time::now();
+
231  double timeNow=timeStart;
+
232 
+
233  double timeout=m_aTimeout[0];
+
234  for(int j=0; j<m_NumJoints; j++)
+
235  {
+
236  if (timeout<m_aTimeout[j])
+
237  timeout=m_aTimeout[j];
+
238  }
+
239 
+
240  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Waiting timeout %.2lf", timeout));
+
241  bool reached=false;
+
242  double *encoders;
+
243  encoders=new double [m_NumJoints];
+
244  while(timeNow<timeStart+timeout && !reached) {
+
245  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iEncoders->getEncoders(encoders), "getEncoders()");
+
246  reached = yarp::robottestingframework::TestAsserter::isApproxEqual(encoders, m_aHome, m_aMinErr, m_aMaxErr, m_NumJoints);
+
247  timeNow=yarp::os::Time::now();
+
248  yarp::os::Time::delay(0.1);
+
249  }
+
250 
+
251  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(reached, "reached position");
+
252 
+
253  if(reached) {
+
254  // check checkMotionDone.
+
255  // because the previous movement was approximate, the robot
+
256  // could still be moving so we need to iterate a few times
+
257 
+
258  int times=10;
+
259  bool doneAll=false;
+
260  bool ret=false;
+
261 
+
262  while(times>0 && !doneAll) {
+
263  ret=iPosition->checkMotionDone(&doneAll);
+
264  if (!doneAll)
+
265  yarp::os::Time::delay(0.1);
+
266  times--;
+
267  }
+
268 
+
269  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(doneAll&&ret, "checking checkMotionDone returns true");
+
270  }
+
271 
+
272 
+
273  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Now checking group interface");
+
274 
+
275  //shuffle encoders
+
276  int *jmap=new int [m_NumJoints];
+
277  double *swapped_refvel=new double [m_NumJoints];
+
278  double *swapped_target=new double [m_NumJoints];
+
279 
+
280  for(int kk=0;kk<m_NumJoints;kk++)
+
281  {
+
282  swapped_refvel[kk]=m_aRefVel[m_NumJoints-kk-1];
+
283  swapped_target[kk]=m_aTargetVal[m_NumJoints-kk-1];
+
284  jmap[kk]=m_NumJoints-kk-1;
+
285  }
+
286 
+
287  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefSpeeds(m_NumJoints, jmap, swapped_refvel),
+
288  "setting reference speed on all joints using group interface");
+
289 
+
290  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->positionMove(m_NumJoints, jmap, swapped_target),
+
291  "moving all joints to home using group interface");
+
292 
+
293  ret=iPosition->checkMotionDone(m_NumJoints, jmap, &doneAll);
+
294  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(!doneAll&&ret, "checking checkMotionDone returns false after position move");
+
295 
+
296  timeStart=yarp::os::Time::now();
+
297  timeNow=timeStart;
+
298 
+
299  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Waiting timeout %.2lf", timeout));
+
300  reached=false;
+
301  while(timeNow<timeStart+timeout && !reached) {
+
302  iEncoders->getEncoders(encoders);
+
303  reached = yarp::robottestingframework::TestAsserter::isApproxEqual(encoders, m_aTargetVal, m_aMinErr, m_aMaxErr, m_NumJoints);
+
304  timeNow=yarp::os::Time::now();
+
305  yarp::os::Time::delay(0.1);
+
306  }
+
307  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(reached, "reached position");
+
308 
+
309  if (reached) {
+
310  bool *done_vector=new bool [m_NumJoints];
+
311  // check checkMotionDone.
+
312  // because the previous movement was approximate, the robot
+
313  // could still be moving so we need to iterate a few times
+
314  int times=10;
+
315  bool doneAll=false;
+
316  bool ret=false;
+
317 
+
318  while(times>0 && !doneAll) {
+
319  ret=iPosition->checkMotionDone(m_NumJoints, jmap, &doneAll);
+
320  if (!doneAll)
+
321  yarp::os::Time::delay(0.1);
+
322  times--;
+
323  }
+
324 
+
325  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(doneAll&&ret, "checking checkMotionDone");
+
326  delete [] done_vector;
+
327  }
+
328 
+
329  //cleanup
+
330  delete [] jmap;
+
331  delete [] swapped_refvel;
+
332  delete [] swapped_target;
+
333  delete [] encoders;
+
334 }
+
Check IPositionControl and IEncoders.
Definition: MotorTest.h:59
+
+ + + + diff --git a/doxygen/doc/html/MotorTest_8h_source.html b/doxygen/doc/html/MotorTest_8h_source.html new file mode 100644 index 00000000..3cfdb4d3 --- /dev/null +++ b/doxygen/doc/html/MotorTest_8h_source.html @@ -0,0 +1,138 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-tests/MotorTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
MotorTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _MOTORTEST_H_
+
22 #define _MOTORTEST_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 
+
26 #include <yarp/os/Value.h>
+
27 #include <yarp/sig/Vector.h>
+
28 #include <yarp/os/Time.h>
+
29 #include <yarp/dev/PolyDriver.h>
+
30 #include <yarp/dev/ControlBoardInterfaces.h>
+
31 
+
59 class MotorTest : public yarp::robottestingframework::TestCase {
+
60 public:
+
61  MotorTest();
+
62  virtual ~MotorTest();
+
63 
+
64  virtual bool setup(yarp::os::Property& configuration);
+
65 
+
66  virtual void tearDown();
+
67 
+
68  virtual void run();
+
69 
+
70 private:
+
71  yarp::dev::PolyDriver m_driver;
+
72  yarp::dev::IEncoders *iEncoders;
+
73  yarp::dev::IPositionControl *iPosition;
+
74  bool m_initialized;
+
75  std::string m_portname;
+
76  int m_NumJoints;
+
77  double *m_aTargetVal;
+
78  double *m_aHome;
+
79  double *m_aMaxErr;
+
80  double *m_aMinErr;
+
81  double *m_aRefVel;
+
82  double *m_aRefAcc;
+
83  double *m_aTimeout;
+
84 };
+
85 
+
86 #endif //_MOTORTEST_H_
+
Check IPositionControl and IEncoders.
Definition: MotorTest.h:59
+
+ + + + diff --git a/doxygen/doc/html/OpenloopConsistency_8cpp_source.html b/doxygen/doc/html/OpenloopConsistency_8cpp_source.html new file mode 100644 index 00000000..71d9e286 --- /dev/null +++ b/doxygen/doc/html/OpenloopConsistency_8cpp_source.html @@ -0,0 +1,545 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/openloop-consistency/OpenloopConsistency.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
OpenloopConsistency.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 
+
22 #include <math.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 #include <robottestingframework/dll/Plugin.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Property.h>
+
27 
+
28 #include "OpenloopConsistency.h"
+
29 
+
30 //example1 -v -t OpenLoopConsistency.dll -p "--robot icub --part head --joints ""(0)"" --home ""(0)"" "
+
31 //example2 -v -t OpenLoopConsistency.dll -p "--robot icub --part head --joints ""(0 1 2)"" --home ""(0 0 0)"" "
+
32 //example3 -v -t OpenLoopConsistency.dll -p "--robot icub --part head --joints ""(0 1 2 3 4 5)"" --home ""(0 0 0 0 0 10)"" "
+
33 
+
34 using namespace robottestingframework;
+
35 using namespace yarp::os;
+
36 using namespace yarp::dev;
+
37 
+
38 // prepare the plugin
+
39 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(OpenLoopConsistency)
+
40 
+
41 OpenLoopConsistency::OpenLoopConsistency() : yarp::robottestingframework::TestCase("OpenLoopConsistency") {
+
42  jointsList=0;
+
43  pos_tot=0;
+
44  dd=0;
+
45  ipos=0;
+
46  iamp=0;
+
47  icmd=0;
+
48  iimd=0;
+
49  ienc=0;
+
50  ipwm = 0;
+
51  cmd_some=0;
+
52  cmd_tot=0;
+
53  prevcurr_some=0;
+
54  prevcurr_tot=0;
+
55 }
+
56 
+
57 OpenLoopConsistency::~OpenLoopConsistency() { }
+
58 
+
59 bool OpenLoopConsistency::setup(yarp::os::Property& property) {
+
60 
+
61  if(property.check("name"))
+
62  setName(property.find("name").asString());
+
63 
+
64  // updating parameters
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home positions must be given as the test parameter!");
+
69 
+
70  robotName = property.find("robot").asString();
+
71  partName = property.find("part").asString();
+
72 
+
73  Bottle* homeBottle = property.find("home").asList();
+
74  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse home parameter");
+
75 
+
76  Bottle* jointsBottle = property.find("joints").asList();
+
77  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
78  n_cmd_joints = jointsBottle->size();
+
79  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0,"invalid number of joints, it must be >0");
+
80 
+
81  Property options;
+
82  options.put("device", "remote_controlboard");
+
83  options.put("remote", "/"+robotName+"/"+partName);
+
84  options.put("local", "/OpenLoopConsistencyTest/"+robotName+"/"+partName);
+
85 
+
86  dd = new PolyDriver(options);
+
87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipwm), "Unable to open pwm control interface");
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iamp),"Unable to open ampliefier interface");
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
93  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
94 
+
95  if (!ienc->getAxes(&n_part_joints))
+
96  {
+
97  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
98  }
+
99 
+
100  if (n_part_joints<=0)
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Error this part has in invalid (<=0) number of jonits");
+
102  else if (jointsBottle->size() == 1)
+
103  cmd_mode=single_joint;
+
104  else if (jointsBottle->size() < n_part_joints)
+
105  cmd_mode=some_joints;
+
106  else if (jointsBottle->size() == n_part_joints)
+
107  cmd_mode=all_joints;
+
108  else
+
109  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("invalid joint selection?");
+
110 
+
111  cmd_tot = new double[n_part_joints];
+
112  pos_tot=new double[n_part_joints];
+
113  jointsList=new int[n_cmd_joints];
+
114  cmd_some=new double[n_cmd_joints];
+
115  prevcurr_tot=new double[n_part_joints];
+
116  prevcurr_some=new double[n_cmd_joints];
+
117  home=new double[n_cmd_joints];
+
118  for (int i=0; i <n_cmd_joints; i++) jointsList[i]=jointsBottle->get(i).asInt32();
+
119  for (int i=0; i <n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
+
120  return true;
+
121 }
+
122 
+
123 void OpenLoopConsistency::tearDown()
+
124 {
+
125 
+
126  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
127  goHome();
+
128 
+
129 
+
130  if (jointsList) {delete jointsList; jointsList =0;}
+
131  if(home){delete [] home; home=0;}
+
132  if (dd) {delete dd; dd =0;}
+
133 }
+
134 
+
135 void OpenLoopConsistency::setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
136 {
+
137  for (int i=0; i<n_cmd_joints; i++)
+
138  {
+
139  icmd->setControlMode(jointsList[i],desired_control_mode);
+
140  iimd->setInteractionMode(jointsList[i],desired_interaction_mode);
+
141  yarp::os::Time::delay(0.010);
+
142  }
+
143 }
+
144 
+
145 void OpenLoopConsistency::verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
146 {
+
147  int cmode;
+
148  yarp::dev::InteractionModeEnum imode;
+
149  int timeout = 0;
+
150 
+
151  while (1)
+
152  {
+
153  int ok=0;
+
154  for (int i=0; i<n_cmd_joints; i++)
+
155  {
+
156  icmd->getControlMode (jointsList[i],&cmode);
+
157  iimd->getInteractionMode(jointsList[i],&imode);
+
158  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok++;
+
159  }
+
160  if (ok==n_cmd_joints) break;
+
161  if (timeout>100)
+
162  {
+
163  char sbuf[500];
+
164  sprintf(sbuf,"Test (%s) failed: current mode is (%s,%s), it should be (%s,%s)",title.c_str(), Vocab32::decode((NetInt32)desired_control_mode).c_str(),Vocab32::decode((NetInt32)desired_interaction_mode).c_str(), Vocab32::decode((NetInt32)cmode).c_str(),Vocab32::decode((NetInt32)imode).c_str());
+
165  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
166  }
+
167  yarp::os::Time::delay(0.2);
+
168  timeout++;
+
169  }
+
170  char sbuf[500];
+
171  sprintf(sbuf,"Test (%s) passed: current mode is (%s,%s)",title.c_str(), Vocab32::decode((NetInt32)desired_control_mode).c_str(),Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
172  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
173 }
+
174 
+
175 void OpenLoopConsistency::goHome()
+
176 {
+
177  for (int i=0; i<n_cmd_joints; i++)
+
178  {
+
179  ipos->setRefSpeed(jointsList[i],20.0);
+
180  ipos->positionMove(jointsList[i],home[i]);
+
181  }
+
182 
+
183  int timeout = 0;
+
184  while (1)
+
185  {
+
186  int in_position=0;
+
187  for (int i=0; i<n_cmd_joints; i++)
+
188  {
+
189  ienc->getEncoder(jointsList[i],&pos_tot[jointsList[i]]);
+
190  if (fabs(pos_tot[jointsList[i]]-home[i])<0.5) in_position++;
+
191  }
+
192  if (in_position==n_cmd_joints) break;
+
193  if (timeout>100)
+
194  {
+
195  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching home position");
+
196  }
+
197  yarp::os::Time::delay(0.2);
+
198  timeout++;
+
199  }
+
200 }
+
201 
+
202 void OpenLoopConsistency::setRefOpenloop(double value)
+
203 {
+
204  cmd_single=value;
+
205  if (cmd_mode==single_joint)
+
206  {
+
207  for (int i=0; i<n_cmd_joints; i++)
+
208  {
+
209  ipwm->setRefDutyCycle(jointsList[i], cmd_single);
+
210  }
+
211  }
+
212  else if (cmd_mode==some_joints)
+
213  {
+
214  //same of single_joint, since multiple joint is not currently supported
+
215  for (int i=0; i<n_cmd_joints; i++)
+
216  {
+
217  ipwm->setRefDutyCycle(jointsList[i], cmd_single);
+
218  }
+
219  }
+
220  else if (cmd_mode==all_joints)
+
221  {
+
222  for (int i=0; i<n_part_joints; i++)
+
223  {
+
224  cmd_tot[i]=cmd_single;
+
225  }
+
226  ipwm->setRefDutyCycles(cmd_tot);
+
227  }
+
228  else
+
229  {
+
230  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
231  }
+
232  yarp::os::Time::delay(0.010);
+
233 }
+
234 
+
235 void OpenLoopConsistency::verifyRefOpenloop(double verify_val, std::string title)
+
236 {
+
237  double value;
+
238  char sbuf[500];
+
239  if (cmd_mode==single_joint)
+
240  {
+
241  for (int i=0; i<n_cmd_joints; i++)
+
242  {
+
243  ipwm->getRefDutyCycle(jointsList[i], &value);
+
244  if (value==verify_val)
+
245  {
+
246  sprintf(sbuf,"Test (%s) passed, j%d current reference is (%f)",title.c_str(),i, verify_val);
+
247  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
248  }
+
249  else
+
250  {
+
251  sprintf(sbuf,"Test (%s) failed: current reference is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
252  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
253  }
+
254  }
+
255  }
+
256  else if (cmd_mode==some_joints)
+
257  {
+
258  //same of single_joint, since multiple joint is not currently supported
+
259  for (int i=0; i<n_cmd_joints; i++)
+
260  {
+
261  ipwm->getRefDutyCycle(jointsList[i], &value);
+
262  if (value==verify_val)
+
263  {
+
264  sprintf(sbuf,"Test (%s) passed j%d current reference is (%f)",title.c_str(),i, verify_val);
+
265  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
266  }
+
267  else
+
268  {
+
269  sprintf(sbuf,"Test (%s) failed: current reference is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
270  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
271  }
+
272  }
+
273  }
+
274  else if (cmd_mode==all_joints)
+
275  {
+
276  int ok=0;
+
277  ipwm->getRefDutyCycles(cmd_tot);
+
278  for (int i=0; i<n_part_joints; i++)
+
279  {
+
280  if (verify_val==cmd_tot[i]) ok++;
+
281  }
+
282  if (ok==n_part_joints)
+
283  {
+
284  sprintf(sbuf,"Test (%s) passed, current reference is (%f)",title.c_str(), verify_val);
+
285  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
286  }
+
287  else
+
288  {
+
289  sprintf(sbuf,"Test (%s) failed: only %d joints (of %d) are ok",title.c_str(),ok,n_part_joints);
+
290  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
291  }
+
292  }
+
293  else
+
294  {
+
295  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
296  }
+
297  yarp::os::Time::delay(0.010);
+
298 }
+
299 
+
300 void OpenLoopConsistency::verifyOutputEqual(double verify_val, std::string title)
+
301 {
+
302  double value;
+
303  char sbuf[500];
+
304  if (cmd_mode==single_joint)
+
305  {
+
306  for (int i=0; i<n_cmd_joints; i++)
+
307  {
+
308  ipwm->getDutyCycle(jointsList[i], &value);
+
309  if (value==verify_val)
+
310  {
+
311  sprintf(sbuf,"Test (%s) passed, j%d current output is (%f)",title.c_str(),i, verify_val);
+
312  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
313  }
+
314  else
+
315  {
+
316  sprintf(sbuf,"Test (%s) failed: current output is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
317  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
318  }
+
319  }
+
320  }
+
321  else if (cmd_mode==some_joints)
+
322  {
+
323  //same of single_joint, since multiple joint is not currently supported
+
324  for (int i=0; i<n_cmd_joints; i++)
+
325  {
+
326  ipwm->getDutyCycle(jointsList[i], &value);
+
327  if (value==verify_val)
+
328  {
+
329  sprintf(sbuf,"Test (%s) passed j%d current output is (%f)",title.c_str(),i,verify_val);
+
330  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
331  }
+
332  else
+
333  {
+
334  sprintf(sbuf,"Test (%s) failed: current output is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
335  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
336  }
+
337  }
+
338  }
+
339  else if (cmd_mode==all_joints)
+
340  {
+
341  int ok=0;
+
342  ipwm->getDutyCycles(cmd_tot);
+
343  for (int i=0; i<n_part_joints; i++)
+
344  {
+
345  if (verify_val==cmd_tot[i]) ok++;
+
346  else
+
347  {
+
348  ROBOTTESTINGFRAMEWORK_TEST_REPORT(robottestingframework::Asserter::format("verify_val=%.2f, read_val=%.2f j=%d",verify_val, cmd_tot[i], i ));
+
349  }
+
350  }
+
351  if (ok==n_part_joints)
+
352  {
+
353  sprintf(sbuf,"Test (%s) passed current output is (%f)",title.c_str(), verify_val);
+
354  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
355  }
+
356  else
+
357  {
+
358  sprintf(sbuf,"Test (%s) failed: only %d joints (of %d) are ok",title.c_str(),ok,n_part_joints);
+
359  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
360  }
+
361  }
+
362  else
+
363  {
+
364  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
365  }
+
366  yarp::os::Time::delay(0.010);
+
367 }
+
368 
+
369 void OpenLoopConsistency::verifyOutputDiff(double verify_val, std::string title)
+
370 {
+
371  double value;
+
372  char sbuf[500];
+
373  if (cmd_mode==single_joint)
+
374  {
+
375  for (int i=0; i<n_cmd_joints; i++)
+
376  {
+
377  ipwm->getDutyCycle(jointsList[i], &value);
+
378  if (value!=verify_val)
+
379  {
+
380  sprintf(sbuf,"Test (%s) passed j%d, current output is (%f!=%f)",title.c_str(),i,value,verify_val);
+
381  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
382  }
+
383  else
+
384  {
+
385  sprintf(sbuf,"Test (%s) failed: current output is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
386  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
387  }
+
388  }
+
389  }
+
390  else if (cmd_mode==some_joints)
+
391  {
+
392  //same of single_joint, since multiple joint is not currently supported
+
393  for (int i=0; i<n_cmd_joints; i++)
+
394  {
+
395  ipwm->getDutyCycle(jointsList[i], &value);
+
396  if (value!=verify_val)
+
397  {
+
398  sprintf(sbuf,"Test (%s) passed j%d current output is (%f!=%f)",title.c_str(), i,value,verify_val);
+
399  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
400  }
+
401  else
+
402  {
+
403  sprintf(sbuf,"Test (%s) failed: current output is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
404  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
405  }
+
406  }
+
407  }
+
408  else if (cmd_mode==all_joints)
+
409  {
+
410  int ok=0;
+
411  ipwm->getDutyCycles(cmd_tot);
+
412  for (int i=0; i<n_part_joints; i++)
+
413  {
+
414  if (verify_val!=cmd_tot[i]) ok++;
+
415  }
+
416  if (ok==n_part_joints)
+
417  {
+
418  sprintf(sbuf,"Test (%s) passed current output is (%f!=%f)",title.c_str(),value,verify_val);
+
419  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
420  }
+
421  else
+
422  {
+
423  sprintf(sbuf,"Test (%s) failed: only %d joints (of %d) are ok",title.c_str(),ok,n_part_joints);
+
424  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
425  }
+
426  }
+
427  else
+
428  {
+
429  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
430  }
+
431  yarp::os::Time::delay(0.010);
+
432 }
+
433 
+
434 void OpenLoopConsistency::run()
+
435 {
+
436  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
437  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test0");
+
438  goHome();
+
439  //verifyRefOpenloop(0,"test0a"); if I get openLoop reference I get last given refrence
+
440  //verifyOutputDiff(0,"test0b"); //TO BE CHECKED
+
441 
+
442  setMode(VOCAB_CM_PWM,VOCAB_IM_STIFF);
+
443  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test1");
+
444  verifyRefOpenloop(0,"test0a"); //When joint swap in pwm control mode, the reference should be 0.
+
445  verifyOutputEqual(0,"test1a");// here i can check that iPwm reference = 0.
+
446  setRefOpenloop(1);
+
447  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test2");
+
448  verifyRefOpenloop(1,"test2a");
+
449  verifyOutputEqual(1,"test2b");
+
450  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test3");
+
451  setRefOpenloop(0);
+
452  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test4");
+
453  verifyRefOpenloop(0,"test3a");
+
454  verifyOutputEqual(0,"test3b");
+
455  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test5");
+
456  setRefOpenloop(-1);
+
457  verifyMode(VOCAB_CM_PWM, VOCAB_IM_STIFF, "test6");
+
458  verifyRefOpenloop(-1,"test6a");
+
459  verifyOutputEqual(-1,"test6b");
+
460 
+
461  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
462  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test7");
+
463  goHome();
+
464  verifyRefOpenloop(-1,"test7a");
+
465  //verifyOutputDiff(0,"test7b"); //TO BE CHECKED
+
466 
+
467 }
+
+ + + + diff --git a/doxygen/doc/html/OpenloopConsistency_8h_source.html b/doxygen/doc/html/OpenloopConsistency_8h_source.html new file mode 100644 index 00000000..401f3b52 --- /dev/null +++ b/doxygen/doc/html/OpenloopConsistency_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/openloop-consistency/OpenloopConsistency.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
OpenloopConsistency.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _OPENLOOPCONSISTENCY_H_
+
22 #define _OPENLOOPCONSISTENCY_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
29 class OpenLoopConsistency : public yarp::robottestingframework::TestCase {
+
30 public:
+
31  OpenLoopConsistency();
+
32  virtual ~OpenLoopConsistency();
+
33 
+
34  virtual bool setup(yarp::os::Property& property);
+
35 
+
36  virtual void tearDown();
+
37 
+
38  virtual void run();
+
39 
+
40  void goHome();
+
41  void executeCmd();
+
42  void setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
43  void verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
44 
+
45  void setRefOpenloop(double value);
+
46  void verifyRefOpenloop(double value, std::string title);
+
47  void verifyOutputEqual(double value, std::string title);
+
48  void verifyOutputDiff(double value, std::string title);
+
49 
+
50 private:
+
51  std::string robotName;
+
52  std::string partName;
+
53  int* jointsList;
+
54 
+
55  double *home;
+
56  int n_part_joints;
+
57  int n_cmd_joints;
+
58  enum cmd_mode_t
+
59  {
+
60  single_joint = 0,
+
61  all_joints = 1,
+
62  some_joints =2
+
63  } cmd_mode;
+
64 
+
65  yarp::dev::PolyDriver *dd;
+
66  yarp::dev::IPositionControl *ipos;
+
67  yarp::dev::IAmplifierControl *iamp;
+
68  yarp::dev::IControlMode *icmd;
+
69  yarp::dev::IInteractionMode *iimd;
+
70  yarp::dev::IEncoders *ienc;
+
71  yarp::dev::IPWMControl *ipwm;
+
72 
+
73  double cmd_single;
+
74  double* cmd_tot;
+
75  double* cmd_some;
+
76 
+
77  double prevcurr_single;
+
78  double* prevcurr_tot;
+
79  double* prevcurr_some;
+
80 
+
81  double* pos_tot;
+
82 };
+
83 
+
84 #endif //_OPENLOOPCONSISTENCY_H_
+
+ + + + diff --git a/doxygen/doc/html/PortsFrequency_8cpp_source.html b/doxygen/doc/html/PortsFrequency_8cpp_source.html new file mode 100644 index 00000000..114bdadc --- /dev/null +++ b/doxygen/doc/html/PortsFrequency_8cpp_source.html @@ -0,0 +1,238 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ports-frequency/PortsFrequency.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PortsFrequency.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/dll/Plugin.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 #include "PortsFrequency.h"
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Stamp.h>
+
27 #include <yarp/os/QosStyle.h>
+
28 #include <yarp/os/Network.h>
+
29 
+
30 using namespace std;
+
31 using namespace robottestingframework;
+
32 using namespace yarp::os;
+
33 
+
34 // prepare the plugin
+
35 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(PortsFrequency)
+
36 
+
37 PortsFrequency::PortsFrequency() : yarp::robottestingframework::TestCase("PortsFrequency") {
+
38 }
+
39 
+
40 PortsFrequency::~PortsFrequency() { }
+
41 
+
42 bool PortsFrequency::setup(yarp::os::Property &property) {
+
43 
+
44  //updating the test name
+
45  if(property.check("name"))
+
46  setName(property.find("name").asString());
+
47 
+
48  // updating parameters
+
49  testTime = (property.check("time")) ? property.find("time").asFloat64() : 2;
+
50 
+
51  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("PORTS"),
+
52  "A list of the ports must be given");
+
53 
+
54  yarp::os::Bottle portsSet = property.findGroup("PORTS").tail();
+
55  for(unsigned int i=0; i<portsSet.size(); i++) {
+
56  yarp::os::Bottle* btport = portsSet.get(i).asList();
+
57  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(btport && btport->size()>=3, "The ports must be given as lists of <portname> <grequency> <tolerance>");
+
58  MyPortInfo info;
+
59  info.name = btport->get(0).asString();
+
60  info.frequency = btport->get(1).asInt32();
+
61  info.tolerance = btport->get(2).asInt32();
+
62  ports.push_back(info);
+
63  }
+
64 
+
65  // opening port
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(port.open("..."),
+
67  "opening port, is YARP network available?");
+
68  return true;
+
69 }
+
70 
+
71 void PortsFrequency::tearDown() {
+
72  // finalization goes her ...
+
73  port.close();
+
74 }
+
75 
+
76 void PortsFrequency::run() {
+
77  for(unsigned int i=0; i<ports.size(); i++) {
+
78  ROBOTTESTINGFRAMEWORK_TEST_REPORT("");
+
79  port.reset();
+
80  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking port %s ...", ports[i].name.c_str()));
+
81  bool connected = Network::connect(ports[i].name.c_str(), port.getName());
+
82  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(connected,
+
83  Asserter::format("could not connect to remote port %s.", ports[i].name.c_str()));
+
84  if(connected) {
+
85  // setting QOS
+
86  QosStyle qos;
+
87  qos.setPacketPriorityByLevel(QosStyle::PacketPriorityHigh);
+
88  qos.setThreadPriority(30);
+
89  qos.setThreadPolicy(1);
+
90  Network::setConnectionQos(ports[i].name.c_str(), port.getName(), qos);
+
91  port.useCallback();
+
92  Time::delay(testTime);
+
93  port.disableCallback();
+
94  if(port.getSAvg() <= 0) {
+
95  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Sender frequency is not available");
+
96  }
+
97  else {
+
98  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Time delay between sender/receiver is %.4f s. (min: %.4f, max: %.f4)",
+
99  port.getDAvg(), port.getDMax(), port.getDMin()));
+
100  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Sender frequency %d hrz. (min: %d, max: %d)",
+
101  (int)(1.0/port.getSAvg()), (int)(1.0/port.getSMax()), (int)(1.0/port.getSMin())));
+
102  }
+
103  double freq = 1.0/port.getAvg();
+
104  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Receiver frequency %d hrz. (min: %d, max: %d)",
+
105  (int)freq, (int)(1.0/port.getMax()), (int)(1.0/port.getMin())));
+
106  double diff = fabs(freq - ports[i].frequency);
+
107  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(diff < ports[i].tolerance,
+
108  Asserter::format("Receiver frequency is outside the desired range [%d .. %d]",
+
109  ports[i].frequency-ports[i].tolerance,
+
110  ports[i].frequency+ports[i].tolerance));
+
111  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Lost %ld packets. received (%ld)",
+
112  port.getPacketLostCount(), port.getCount()));
+
113  Network::disconnect(ports[i].name.c_str(), port.getName());
+
114  }
+
115  }
+
116 }
+
117 
+
118 void DataPort::onRead(yarp::os::Bottle& bot) {
+
119  double tcurrent = Time::now();
+
120  Stamp stm;
+
121  bool hasTimeStamp = getEnvelope(stm);
+
122 
+
123  if(count == 0) {
+
124  if(hasTimeStamp) {
+
125  double tdiff = fabs(tcurrent - stm.getTime());
+
126  dsum = dmax = dmin = tdiff;
+
127  prevPacketCount = stm.getCount();
+
128  }
+
129  }
+
130  else {
+
131  // calculating statistics
+
132  double tdiff = fabs(tcurrent - tprev);
+
133  sum += tdiff;
+
134  max = (tdiff > max) ? tdiff : max;
+
135  min = (min<0 || min > tdiff) ? tdiff : min;
+
136 
+
137  // calculating statistics using time stamp
+
138  if(hasTimeStamp) {
+
139  tdiff = fabs(stm.getTime() - stprev);
+
140  ssum += tdiff;
+
141  smax = (tdiff > smax) ? tdiff : smax;
+
142  smin = (smin<0 || smin > tdiff) ? tdiff : smin;
+
143 
+
144  // calculating time delay
+
145  double tdiff = fabs(tcurrent - stm.getTime());
+
146  dsum += tdiff;
+
147  dmax = (tdiff > dmax) ? tdiff : dmax;
+
148  dmin = (dmin<0 || dmin > tdiff) ? tdiff : dmin;
+
149  // calculating packet losts
+
150  if(stm.getCount() > prevPacketCount)
+
151  packetLostCount += stm.getCount() - prevPacketCount - 1;
+
152  prevPacketCount = stm.getCount();
+
153  }
+
154  }
+
155 
+
156  count++;
+
157  tprev = tcurrent;
+
158  if(hasTimeStamp)
+
159  stprev = stm.getTime();
+
160 }
+
+ + + + diff --git a/doxygen/doc/html/PortsFrequency_8h_source.html b/doxygen/doc/html/PortsFrequency_8h_source.html new file mode 100644 index 00000000..b7ab2d56 --- /dev/null +++ b/doxygen/doc/html/PortsFrequency_8h_source.html @@ -0,0 +1,166 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ports-frequency/PortsFrequency.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PortsFrequency.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _PORTSFREQUENCY_H_
+
22 #define _PORTSFREQUENCY_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/BufferedPort.h>
+
26 #include <yarp/os/Bottle.h>
+
27 #include <vector>
+
28 
+
29 class MyPortInfo {
+
30 public:
+
31  std::string name;
+
32  unsigned int frequency;
+
33  unsigned int tolerance;
+
34 };
+
35 
+
36 
+
37 class DataPort : public yarp::os::BufferedPort<yarp::os::Bottle> {
+
38 public:
+
39  void reset() {
+
40  max = smax = sum = ssum = dmax = dsum = 0.0;
+
41  min = smin = dmin = -1.0;
+
42  tprev = stprev = 0.0;
+
43  count = 0;
+
44  prevPacketCount = 0;
+
45  packetLostCount = 0;
+
46  }
+
47 
+
48  double getMax() { return max; }
+
49  double getMin() { return min; }
+
50  double getAvg() { return sum/count; }
+
51  double getSMax() { return smax; }
+
52  double getSMin() { return smin; }
+
53  double getSAvg() { return ssum/count; }
+
54  double getDMax() { return dmax; }
+
55  double getDMin() { return dmin; }
+
56  double getDAvg() { return dsum/count; }
+
57  unsigned long getPacketLostCount() { return packetLostCount; }
+
58  unsigned long getCount() { return count; }
+
59 
+
60  virtual void onRead(yarp::os::Bottle& bot);
+
61 
+
62 private:
+
63  unsigned long count, packetLostCount;
+
64  unsigned long prevPacketCount;
+
65  double tprev, stprev;
+
66  double max, min, sum; // receiver time
+
67  double smax, smin, ssum; // sender time
+
68  double dmax, dmin, dsum; // time delay
+
69 };
+
70 
+
71 class PortsFrequency : public yarp::robottestingframework::TestCase {
+
72 public:
+
73  PortsFrequency();
+
74  virtual ~PortsFrequency();
+
75 
+
76  virtual bool setup(yarp::os::Property& property);
+
77 
+
78  virtual void tearDown();
+
79 
+
80  virtual void run();
+
81 
+
82 private:
+
83  DataPort port;
+
84  std::vector<MyPortInfo> ports;
+
85  double testTime;
+
86 };
+
87 
+
88 #endif //_PORTSFREQUENCY_H
+
+ + + + diff --git a/doxygen/doc/html/PositionControlAccuracyExternalPid_8cpp_source.html b/doxygen/doc/html/PositionControlAccuracyExternalPid_8cpp_source.html new file mode 100644 index 00000000..323e24dd --- /dev/null +++ b/doxygen/doc/html/PositionControlAccuracyExternalPid_8cpp_source.html @@ -0,0 +1,469 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy-ExternalPid/PositionControlAccuracyExternalPid.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionControlAccuracyExternalPid.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/LogStream.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <fstream>
+
28 #include <algorithm>
+
29 #include <cstdlib>
+
30 
+
31 #include "PositionControlAccuracyExternalPid.h"
+
32 
+
33 using namespace robottestingframework;
+
34 using namespace yarp::os;
+
35 using namespace yarp::dev;
+
36 
+
37 // prepare the plugin
+
38 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(PositionControlAccuracyExernalPid)
+
39 
+
40 PositionControlAccuracyExernalPid::PositionControlAccuracyExernalPid() : yarp::robottestingframework::TestCase("PositionControlAccuracyExernalPid") {
+
41  m_jointsList = 0;
+
42  m_encoders = 0;
+
43  m_zeros = 0;
+
44  dd=0;
+
45  ipos=0;
+
46  icmd=0;
+
47  iimd=0;
+
48  ienc=0;
+
49  idir=0;
+
50  ipwm=0;
+
51  m_home_tolerance=0.5;
+
52  m_step_duration=4;
+
53  m_pospid_vup=0;
+
54  m_pospid_vdown=0;
+
55 }
+
56 
+
57 PositionControlAccuracyExernalPid::~PositionControlAccuracyExernalPid() { }
+
58 
+
59 bool PositionControlAccuracyExernalPid::setup(yarp::os::Property& property) {
+
60 
+
61  //updating the test name
+
62  if(property.check("name"))
+
63  setName(property.find("name").asString());
+
64 
+
65  // updating parameters
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
69  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("zeros"), "The zero position list must be given as the test parameter!");
+
70  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("cycles"), "The number of cycles of the control signal must be given as the test parameter!");
+
71  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("step"), "The amplitude of the step reference signal expressed in degrees!");
+
72  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("sampleTime"), "The sampleTime of the control signal must be given as the test parameter!");
+
73 
+
74  if(property.check("filename"))
+
75  {m_requested_filename = property.find("filename").asString();}
+
76  if(property.check("home_tolerance"))
+
77  {m_home_tolerance = property.find("home_tolerance").asFloat64();}
+
78  if(property.check("step_duration"))
+
79  {m_step_duration = property.find("step_duration").asFloat64();}
+
80  if(property.check("pid_vup"))
+
81  {m_pospid_vup = property.find("pid_vup").asFloat64();}
+
82  if(property.check("pid_vdown"))
+
83  {m_pospid_vdown = property.find("pid_vdown").asFloat64();}
+
84 
+
85  m_robotName = property.find("robot").asString();
+
86  m_partName = property.find("part").asString();
+
87 
+
88  Bottle* jointsBottle = property.find("joints").asList();
+
89  Bottle* zerosBottle = property.find("zeros").asList();
+
90 
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
92  m_n_cmd_joints = jointsBottle->size();
+
93  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_n_cmd_joints>0, "invalid number of joints, it must be >0");
+
94 
+
95  m_step = property.find("step").asFloat64();
+
96 
+
97  m_cycles = property.find("cycles").asInt32();
+
98  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_cycles>0, "invalid cycles");
+
99 
+
100  m_sampleTime = property.find("sampleTime").asFloat64();
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_sampleTime>0, "invalid sampleTime");
+
102 
+
103  Property options;
+
104  options.put("device", "remote_controlboard");
+
105  options.put("remote", "/" + m_robotName + "/" + m_partName);
+
106  options.put("local", "/positionControlAccuracyTest/" + m_robotName + "/" + m_partName);
+
107 
+
108  dd = new PolyDriver(options);
+
109  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
110  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(idir),"Unable to open position direct interface");
+
111  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
112  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
113  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
114  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
115  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipwm),"Unable to open pwm mode interface");
+
116 
+
117  if (!ienc->getAxes(&m_n_part_joints))
+
118  {
+
119  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
120  }
+
121 
+
122  m_zeros = new double[m_n_part_joints];
+
123  m_encoders = new double[m_n_part_joints];
+
124  m_jointsList = new int[m_n_cmd_joints];
+
125  for (int i = 0; i <m_n_cmd_joints; i++) m_jointsList[i] = jointsBottle->get(i).asInt32();
+
126  for (int i = 0; i <m_n_cmd_joints; i++) m_zeros[i] = zerosBottle->get(i).asFloat64();
+
127 
+
128  double p_Ts = m_sampleTime;
+
129  yarp::sig::Vector p_Kp(1,0.0);
+
130  yarp::sig::Vector p_Ki(1,0.0);
+
131  yarp::sig::Vector p_Kd(1,0.0);
+
132  if(property.check("Kp"))
+
133  {p_Kp = property.find("Kp").asFloat64();}
+
134  if(property.check("Ki"))
+
135  {p_Ki = property.find("Ki").asFloat64();}
+
136  if(property.check("Kd"))
+
137  {p_Kd = property.find("Kd").asFloat64();}
+
138  double p_Max=100;
+
139  if(property.check("MaxValue"))
+
140  {p_Max = property.find("MaxValue").asFloat64();}
+
141  yarp::sig::Vector p_Wp(1,1);
+
142  yarp::sig::Vector p_Wi(1,1);
+
143  yarp::sig::Vector p_Wd(1,1);
+
144  yarp::sig::Vector p_N (1,10);
+
145  yarp::sig::Vector p_Tt (1,1);
+
146  yarp::sig::Matrix p_Lim (1,2);
+
147  yInfo() << "Using gains Kp:" << p_Kp[0] << " Ki:"<<p_Ki[0] << " Kd:"<<p_Kd[0] << " Max:" << p_Max;
+
148  p_Lim[0][0]=-p_Max;
+
149  p_Lim[0][1]=+p_Max;
+
150  ppid = new iCub::ctrl::parallelPID(p_Ts, p_Kp, p_Ki, p_Kd, p_Wp, p_Wi, p_Wd, p_N, p_Tt, p_Lim);
+
151 
+
152  if (m_requested_filename=="auto")
+
153  {
+
154  char buff[50];
+
155  m_requested_filename="ext_";
+
156  m_requested_filename+=(m_robotName+"_");
+
157  m_requested_filename+=(m_partName+"_");
+
158  sprintf(buff,"%.3f",p_Kp[0]);
+
159  m_requested_filename+=("Kp_"+std::string(buff)+"_");
+
160  sprintf(buff,"%.3f",p_Ki[0]);
+
161  m_requested_filename+=("Ki_"+std::string(buff)+"_");
+
162  sprintf(buff,"%.3f",p_Kd[0]);
+
163  m_requested_filename+=("Kdi_"+std::string(buff)+"_");
+
164  sprintf(buff,"%.3f",m_pospid_vup);
+
165  m_requested_filename+=("Vup_"+std::string(buff)+"_");
+
166  sprintf(buff,"%.3f",m_pospid_vdown);
+
167  m_requested_filename+=("Vdown_"+std::string(buff)+"_");
+
168  sprintf(buff,"%.1f",m_step);
+
169  m_requested_filename+=("step_"+std::string(buff)+".txt");
+
170  }
+
171  yDebug() << "File: " << m_requested_filename << " will be used";
+
172 
+
173  return true;
+
174 }
+
175 
+
176 void PositionControlAccuracyExernalPid::tearDown()
+
177 {
+
178  if (m_jointsList) { delete [] m_jointsList; m_jointsList = 0; }
+
179  if (m_zeros) { delete [] m_zeros; m_zeros = 0; }
+
180  if (m_encoders) { delete [] m_encoders; m_encoders = 0; }
+
181  if (dd) {delete dd; dd =0;}
+
182 }
+
183 
+
184 void PositionControlAccuracyExernalPid::setMode(int desired_mode)
+
185 {
+
186  for (int i = 0; i<m_n_cmd_joints; i++)
+
187  {
+
188  icmd->setControlMode(m_jointsList[i], desired_mode);
+
189  iimd->setInteractionMode(m_jointsList[i], VOCAB_IM_STIFF);
+
190  yarp::os::Time::delay(0.010);
+
191  }
+
192 
+
193  int cmode;
+
194  yarp::dev::InteractionModeEnum imode;
+
195  int timeout = 0;
+
196 
+
197  while (1)
+
198  {
+
199  int ok=0;
+
200  for (int i = 0; i<m_n_cmd_joints; i++)
+
201  {
+
202  icmd->getControlMode(m_jointsList[i], &cmode);
+
203  iimd->getInteractionMode(m_jointsList[i], &imode);
+
204  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
+
205  }
+
206  if (ok == m_n_cmd_joints) break;
+
207  if (timeout>100)
+
208  {
+
209  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
+
210  }
+
211  yarp::os::Time::delay(0.2);
+
212  timeout++;
+
213  }
+
214 }
+
215 
+
216 bool PositionControlAccuracyExernalPid::goHome()
+
217 {
+
218  for (int i = 0; i<m_n_cmd_joints; i++)
+
219  {
+
220  ipos->setRefSpeed(m_jointsList[i], 20.0);
+
221  ipos->positionMove(m_jointsList[i], m_zeros[i]);
+
222  }
+
223 
+
224  int timeout = 0;
+
225  while (1)
+
226  {
+
227  int in_position=0;
+
228  for (int i = 0; i<m_n_cmd_joints; i++)
+
229  {
+
230  ienc->getEncoder(m_jointsList[i], &m_encoders[m_jointsList[i]]);
+
231  if (fabs(m_encoders[m_jointsList[i]] - m_zeros[i])<m_home_tolerance) in_position++;
+
232  }
+
233  if (in_position == m_n_cmd_joints) break;
+
234  if (timeout>100)
+
235  {
+
236  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
237  return false;
+
238  }
+
239  yarp::os::Time::delay(0.2);
+
240  timeout++;
+
241  }
+
242  //sleep some additional time to complete movement from m_home_tolerance to 0
+
243  yarp::os::Time::delay(0.5);
+
244  return true;
+
245 }
+
246 
+
247 void PositionControlAccuracyExernalPid::run()
+
248 {
+
249  for (int i = 0; i < m_n_cmd_joints; i++)
+
250  {
+
251  for (int cycle = 0; cycle < m_cycles; cycle++)
+
252  {
+
253  setMode(VOCAB_CM_POSITION);
+
254  if (goHome() == false)
+
255  {
+
256  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL("Test stopped");
+
257  };
+
258 
+
259  ppid->reset(yarp::sig::Vector(1,0.0));
+
260 
+
261  setMode(VOCAB_CM_PWM);
+
262  double start_time = yarp::os::Time::now();
+
263 
+
264  char cbuff[64];
+
265  sprintf(cbuff, "Testing Joint: %d cycle: %d", i, cycle);
+
266 
+
267  std::string buff(cbuff);
+
268  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
269 
+
270  double time_zero = 0;
+
271  yarp::os::Bottle dataToPlotRaw;
+
272  yarp::os::Bottle dataToPlotSync;
+
273  ienc->getEncoders(m_encoders);
+
274 
+
275  while (1)
+
276  {
+
277  double curr_time = yarp::os::Time::now();
+
278  double elapsed = curr_time - start_time;
+
279  double ref=0;
+
280  if (elapsed <= 1.0)
+
281  {
+
282  ref=m_zeros[i];
+
283  }
+
284  else if (elapsed > 1.0 && elapsed <= m_step_duration)
+
285  {
+
286  ref=m_zeros[i]+m_step;
+
287  if (time_zero == 0) time_zero = elapsed;
+
288  }
+
289  else
+
290  {
+
291  break;
+
292  }
+
293 
+
294  //pid computation
+
295  ienc->getEncoders(m_encoders);
+
296  m_cmd_single = ppid->compute(yarp::sig::Vector(1,ref),yarp::sig::Vector(1,m_encoders[m_jointsList[i]]))[0];
+
297 
+
298  //stiction compensation
+
299  if (ref>m_encoders[m_jointsList[i]])
+
300  {
+
301  m_cmd_single+=m_pospid_vup;
+
302  }
+
303  else
+
304  {
+
305  m_cmd_single+=m_pospid_vdown;
+
306  }
+
307 
+
308  //control
+
309  ipwm->setRefDutyCycle(m_jointsList[i], m_cmd_single);
+
310 
+
311  Bottle& b1 = dataToPlotRaw.addList();
+
312  b1.addInt32(cycle);
+
313  b1.addFloat64(elapsed);
+
314  b1.addFloat64(m_encoders[m_jointsList[i]]);
+
315  b1.addFloat64(ref);
+
316  b1.addFloat64(m_cmd_single);
+
317  yarp::os::Time::delay(m_sampleTime);
+
318  }
+
319 
+
320  //reorder data
+
321  for (int t = 0; t < dataToPlotRaw.size(); t++)
+
322  {
+
323  int cycle = dataToPlotRaw.get(t).asList()->get(0).asInt32();
+
324  double time = dataToPlotRaw.get(t).asList()->get(1).asFloat64();
+
325  double val = dataToPlotRaw.get(t).asList()->get(2).asFloat64();
+
326  double cmd = dataToPlotRaw.get(t).asList()->get(3).asFloat64();
+
327  double duty = dataToPlotRaw.get(t).asList()->get(4).asFloat64();
+
328  Bottle& b1 = dataToPlotSync.addList();
+
329  b1.addInt32(cycle);
+
330  b1.addFloat64(time - time_zero);
+
331  b1.addFloat64(val);
+
332  b1.addFloat64(cmd);
+
333  b1.addFloat64(duty);
+
334  }
+
335 
+
336  m_dataToSave.append(dataToPlotSync);
+
337  } //cycle loop
+
338 
+
339  //save data
+
340  std::string filename;
+
341  if (m_requested_filename=="")
+
342  {
+
343  char cfilename[128];
+
344  sprintf(cfilename, "positionControlAccuracyExternalPid_plot_%s%d.txt", m_partName.c_str(), i);
+
345  filename = cfilename;
+
346  //filename += m_partName;
+
347  //filename += std::to_string(i);
+
348  //filename += ".txt";
+
349  }
+
350  else
+
351  {
+
352  filename=m_requested_filename;
+
353  }
+
354  yInfo() << "Saving file to: "<< filename;
+
355  saveToFile(filename, m_dataToSave);
+
356  } //joint loop
+
357 
+
358  //data acquisition ends here
+
359  setMode(VOCAB_CM_POSITION);
+
360  goHome();
+
361  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Data acquisition complete");
+
362 
+
363  //plot data
+
364  /*for (int i = 0; i < m_n_cmd_joints; i++)
+
365  {
+
366  std::string filename = "positionControlAccuracy_plot_";
+
367  filename += m_partName;
+
368  filename += std::to_string(i);
+
369  filename += ".txt";
+
370  char plotstring[1000];
+
371  sprintf(plotstring, "gnuplot -e \" unset key; plot for [col=1:%d] '%s' using col with lines \" -persist", m_n_cmd_joints, filename.c_str());
+
372  system(plotstring);
+
373  }*/
+
374 }
+
375 
+
376 void PositionControlAccuracyExernalPid::saveToFile(std::string filename, yarp::os::Bottle &b)
+
377 {
+
378  std::fstream fs;
+
379  fs.open(filename.c_str(), std::fstream::out);
+
380 
+
381  for (int i = 0; i<b.size(); i++)
+
382  {
+
383  std::string s = b.get(i).toString();
+
384  std::replace(s.begin(), s.end(), '(', ' ');
+
385  std::replace(s.begin(), s.end(), ')', ' ');
+
386  fs << s << std::endl;
+
387  }
+
388 
+
389  fs.close();
+
390 }
+
This tests checks the response of the system to a position step, sending directly PWM commands to a j...
+
+ + + + diff --git a/doxygen/doc/html/PositionControlAccuracyExternalPid_8h_source.html b/doxygen/doc/html/PositionControlAccuracyExternalPid_8h_source.html new file mode 100644 index 00000000..6d8af140 --- /dev/null +++ b/doxygen/doc/html/PositionControlAccuracyExternalPid_8h_source.html @@ -0,0 +1,159 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy-ExternalPid/PositionControlAccuracyExternalPid.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionControlAccuracyExternalPid.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _POSITIONACCURACYEXTERNALPID_H_
+
22 #define _POSITIONACCURACYEXTERNALPID_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 //#include <iCub/ctrl/math.h>
+
29 #include <iCub/ctrl/pids.h>
+
30 
+
62 class PositionControlAccuracyExernalPid : public yarp::robottestingframework::TestCase {
+
63 public:
+ + +
66 
+
67  virtual bool setup(yarp::os::Property& property);
+
68 
+
69  virtual void tearDown();
+
70 
+
71  virtual void run();
+
72 
+
73  bool goHome();
+
74  void executeCmd();
+
75  void setMode(int desired_mode);
+
76  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
77 
+
78 private:
+
79  std::string m_robotName;
+
80  std::string m_partName;
+
81  int* m_jointsList;
+
82  int m_cycles;
+
83  double m_sampleTime;
+
84  double* m_zeros;
+
85  double m_step;
+
86  int m_n_part_joints;
+
87  int m_n_cmd_joints;
+
88  yarp::os::Bottle m_dataToSave;
+
89 
+
90  yarp::dev::PolyDriver *dd;
+
91  yarp::dev::IPositionControl *ipos;
+
92  yarp::dev::IControlMode *icmd;
+
93  yarp::dev::IInteractionMode *iimd;
+
94  yarp::dev::IEncoders *ienc;
+
95  yarp::dev::IPositionDirect *idir;
+
96  yarp::dev::IPWMControl *ipwm;
+
97 
+
98  iCub::ctrl::parallelPID *ppid;
+
99 
+
100  double m_pospid_vup;
+
101  double m_pospid_vdown;
+
102 
+
103 
+
104  double m_cmd_single;
+
105  double* m_encoders;
+
106  std::string m_requested_filename;
+
107  double m_home_tolerance;
+
108  double m_step_duration;
+
109 };
+
110 
+
111 #endif
+
This tests checks the response of the system to a position step, sending directly PWM commands to a j...
+
+ + + + diff --git a/doxygen/doc/html/PositionControlAccuracy_8cpp_source.html b/doxygen/doc/html/PositionControlAccuracy_8cpp_source.html new file mode 100644 index 00000000..da6a788c --- /dev/null +++ b/doxygen/doc/html/PositionControlAccuracy_8cpp_source.html @@ -0,0 +1,428 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy/PositionControlAccuracy.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionControlAccuracy.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/LogStream.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <fstream>
+
28 #include <algorithm>
+
29 #include <cstdlib>
+
30 #include <cmath>
+
31 
+
32 #include "PositionControlAccuracy.h"
+
33 
+
34 using namespace robottestingframework;
+
35 using namespace yarp::os;
+
36 using namespace yarp::dev;
+
37 
+
38 // prepare the plugin
+
39 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(PositionControlAccuracy)
+
40 
+
41 PositionControlAccuracy::PositionControlAccuracy() : yarp::robottestingframework::TestCase("PositionControlAccuracy") {
+
42  m_jointsList = 0;
+
43  m_encoders = 0;
+
44  m_zeros = 0;
+
45  dd=0;
+
46  ipos=0;
+
47  icmd=0;
+
48  iimd=0;
+
49  ienc=0;
+
50  idir=0;
+
51  m_home_tolerance=0.5;
+
52  m_step_duration=4;
+
53 }
+
54 
+
55 PositionControlAccuracy::~PositionControlAccuracy() { }
+
56 
+
57 bool PositionControlAccuracy::setup(yarp::os::Property& property) {
+
58 
+
59  //updating the test name
+
60  if(property.check("name"))
+
61  setName(property.find("name").asString());
+
62 
+
63  // updating parameters
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("zeros"), "The zero position list must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("cycles"), "The number of cycles of the control signal must be given as the test parameter!");
+
69  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("step"), "The amplitude of the step reference signal expressed in degrees!");
+
70  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("sampleTime"), "The sampleTime of the control signal must be given as the test parameter!");
+
71  if(property.check("filename"))
+
72  {m_requested_filename = property.find("filename").asString();}
+
73  if(property.check("home_tolerance"))
+
74  {m_home_tolerance = property.find("home_tolerance").asFloat64();}
+
75  if(property.check("step_duration"))
+
76  {m_step_duration = property.find("step_duration").asFloat64();}
+
77 
+
78  m_robotName = property.find("robot").asString();
+
79  m_partName = property.find("part").asString();
+
80 
+
81  Bottle* jointsBottle = property.find("joints").asList();
+
82  Bottle* zerosBottle = property.find("zeros").asList();
+
83 
+
84  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
85  m_n_cmd_joints = jointsBottle->size();
+
86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_n_cmd_joints>0, "invalid number of joints, it must be >0");
+
87 
+
88  m_step = property.find("step").asFloat64();
+
89 
+
90  m_cycles = property.find("cycles").asInt32();
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_cycles>0, "invalid cycles");
+
92 
+
93  m_sampleTime = property.find("sampleTime").asFloat64();
+
94  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(m_sampleTime>0, "invalid sampleTime");
+
95 
+
96  Property options;
+
97  options.put("device", "remote_controlboard");
+
98  options.put("remote", "/" + m_robotName + "/" + m_partName);
+
99  options.put("local", "/positionControlAccuracyTest/" + m_robotName + "/" + m_partName);
+
100 
+
101  dd = new PolyDriver(options);
+
102  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(idir),"Unable to open position direct interface");
+
104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
107  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
108  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipid),"Unable to open pid interface");
+
109 
+
110  if (!ienc->getAxes(&m_n_part_joints))
+
111  {
+
112  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
113  }
+
114 
+
115  m_zeros = new double[m_n_part_joints];
+
116  m_encoders = new double[m_n_part_joints];
+
117  m_jointsList = new int[m_n_cmd_joints];
+
118  for (int i = 0; i <m_n_cmd_joints; i++) m_jointsList[i] = jointsBottle->get(i).asInt32();
+
119  for (int i = 0; i <m_n_cmd_joints; i++) m_zeros[i] = zerosBottle->get(i).asFloat64();
+
120 
+
121  double p_Kp=std::nanf("");
+
122  double p_Ki=std::nanf("");
+
123  double p_Kd=std::nanf("");
+
124  double p_Max=std::nanf("");
+
125 
+
126  int cj=m_jointsList[0];
+
127  ipid->getPid(VOCAB_PIDTYPE_POSITION,cj,&m_orig_pid);
+
128  m_new_pid=m_orig_pid;
+
129 
+
130  if(property.check("Kp"))
+
131  {p_Kp = property.find("Kp").asFloat64();}
+
132  if(property.check("Ki"))
+
133  {p_Ki = property.find("Ki").asFloat64();}
+
134  if(property.check("Kd"))
+
135  {p_Kd = property.find("Kd").asFloat64();}
+
136  //if(property.check("MaxValue"))
+
137  // {p_Max = property.find("MaxValue").asFloat64();}
+
138  if (std::isnan(p_Kp)==false) {m_new_pid.kp=p_Kp;}
+
139  if (std::isnan(p_Kd)==false) {m_new_pid.kd=p_Kd;}
+
140  if (std::isnan(p_Ki)==false) {m_new_pid.ki=p_Ki;}
+
141 
+
142  /*if (std::isnan(p_Kp)==false ||
+
143  std::isnan(p_Ki)==false ||
+
144  std::isnan(p_Kd)==false)
+
145  {
+
146  ipid->setPid(cj,m_new_pid);
+
147  }*/
+
148 
+
149  return true;
+
150 }
+
151 
+
152 void PositionControlAccuracy::tearDown()
+
153 {
+
154  if (m_jointsList) { delete [] m_jointsList; m_jointsList = 0; }
+
155  if (m_zeros) { delete [] m_zeros; m_zeros = 0; }
+
156  if (m_encoders) { delete [] m_encoders; m_encoders = 0; }
+
157  if (dd) {delete dd; dd =0;}
+
158 }
+
159 
+
160 void PositionControlAccuracy::setMode(int desired_mode)
+
161 {
+
162  for (int i = 0; i<m_n_cmd_joints; i++)
+
163  {
+
164  icmd->setControlMode(m_jointsList[i], desired_mode);
+
165  iimd->setInteractionMode(m_jointsList[i], VOCAB_IM_STIFF);
+
166  yarp::os::Time::delay(0.010);
+
167  }
+
168 
+
169  int cmode;
+
170  yarp::dev::InteractionModeEnum imode;
+
171  int timeout = 0;
+
172 
+
173  while (1)
+
174  {
+
175  int ok=0;
+
176  for (int i = 0; i<m_n_cmd_joints; i++)
+
177  {
+
178  icmd->getControlMode(m_jointsList[i], &cmode);
+
179  iimd->getInteractionMode(m_jointsList[i], &imode);
+
180  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
+
181  }
+
182  if (ok == m_n_cmd_joints) break;
+
183  if (timeout>100)
+
184  {
+
185  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
+
186  }
+
187  yarp::os::Time::delay(0.2);
+
188  timeout++;
+
189  }
+
190 }
+
191 
+
192 bool PositionControlAccuracy::goHome()
+
193 {
+
194  for (int i = 0; i<m_n_cmd_joints; i++)
+
195  {
+
196  ipos->setRefSpeed(m_jointsList[i], 20.0);
+
197  ipos->positionMove(m_jointsList[i], m_zeros[i]);
+
198  }
+
199 
+
200  int timeout = 0;
+
201  while (1)
+
202  {
+
203  int in_position=0;
+
204  for (int i = 0; i<m_n_cmd_joints; i++)
+
205  {
+
206  ienc->getEncoder(m_jointsList[i], &m_encoders[m_jointsList[i]]);
+
207  if (fabs(m_encoders[m_jointsList[i]] - m_zeros[i])<m_home_tolerance) in_position++;
+
208  }
+
209  if (in_position == m_n_cmd_joints) break;
+
210  if (timeout>100)
+
211  {
+
212  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
213  return false;
+
214  }
+
215  yarp::os::Time::delay(0.2);
+
216  timeout++;
+
217  }
+
218  //sleep some additional time to complete movement from m_home_tolerance to 0
+
219  yarp::os::Time::delay(0.5);
+
220  return true;
+
221 }
+
222 
+
223 void PositionControlAccuracy::run()
+
224 {
+
225  for (int i = 0; i < m_n_cmd_joints; i++)
+
226  {
+
227  for (int cycle = 0; cycle < m_cycles; cycle++)
+
228  {
+
229  ipid->setPid(VOCAB_PIDTYPE_POSITION,m_jointsList[i],m_orig_pid);
+
230  setMode(VOCAB_CM_POSITION);
+
231  if (goHome() == false)
+
232  {
+
233  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL("Test stopped");
+
234  };
+
235 
+
236  ipid->setPid(VOCAB_PIDTYPE_POSITION,m_jointsList[i],m_new_pid);
+
237  setMode(VOCAB_CM_POSITION_DIRECT);
+
238  double start_time = yarp::os::Time::now();
+
239 
+
240  char cbuff[64];
+
241  sprintf(cbuff, "Testing Joint: %d cycle: %d", i, cycle);
+
242 
+
243  std::string buff(cbuff);
+
244  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
245 
+
246  double time_zero = 0;
+
247  yarp::os::Bottle dataToPlotRaw;
+
248  yarp::os::Bottle dataToPlotSync;
+
249 
+
250  while (1)
+
251  {
+
252  double curr_time = yarp::os::Time::now();
+
253  double elapsed = curr_time - start_time;
+
254 
+
255  if (elapsed <= 1.0)
+
256  {
+
257  m_cmd_single = m_zeros[i]; //0.0;
+
258  }
+
259  else if (elapsed > 1.0 && elapsed <= m_step_duration)
+
260  {
+
261  m_cmd_single = m_zeros[i] + m_step;
+
262  if (time_zero == 0) time_zero = elapsed;
+
263  }
+
264  else
+
265  {
+
266  break;
+
267  }
+
268 
+
269  ienc->getEncoders(m_encoders);
+
270  idir->setPosition(m_jointsList[i], m_cmd_single);
+
271 
+
272  Bottle& b1 = dataToPlotRaw.addList();
+
273  b1.addInt32(cycle);
+
274  b1.addFloat64(elapsed);
+
275  b1.addFloat64(m_encoders[m_jointsList[i]]);
+
276  b1.addFloat64(m_cmd_single);
+
277  yarp::os::Time::delay(m_sampleTime);
+
278  }
+
279 
+
280  //reorder data
+
281  for (int t = 0; t < dataToPlotRaw.size(); t++)
+
282  {
+
283  int cycle = dataToPlotRaw.get(t).asList()->get(0).asInt32();
+
284  double time = dataToPlotRaw.get(t).asList()->get(1).asFloat64();
+
285  double val = dataToPlotRaw.get(t).asList()->get(2).asFloat64();
+
286  double cmd = dataToPlotRaw.get(t).asList()->get(3).asFloat64();
+
287  Bottle& b1 = dataToPlotSync.addList();
+
288  b1.addInt32(cycle);
+
289  b1.addFloat64(time - time_zero);
+
290  b1.addFloat64(val);
+
291  b1.addFloat64(cmd);
+
292  }
+
293 
+
294  m_dataToSave.append(dataToPlotSync);
+
295  } //cycle loop
+
296 
+
297  //save data
+
298  std::string filename;
+
299  if (m_requested_filename=="")
+
300  {
+
301  char cfilename[128];
+
302  sprintf(cfilename, "positionControlAccuracy_plot_%s%d.txt", m_partName.c_str(), i);
+
303  filename = cfilename;
+
304  //filename += m_partName;
+
305  //filename += std::to_string(i);
+
306  //filename += ".txt";
+
307  }
+
308  else
+
309  {
+
310  filename=m_requested_filename;
+
311  }
+
312  yInfo() << "Saving file to: "<< filename;
+
313  saveToFile(filename, m_dataToSave);
+
314  ipid->setPid(VOCAB_PIDTYPE_POSITION,m_jointsList[i],m_orig_pid);
+
315  } //joint loop
+
316 
+
317  //data acquisition ends here
+
318  setMode(VOCAB_CM_POSITION);
+
319  goHome();
+
320  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Data acquisition complete");
+
321 
+
322  //plot data
+
323  /*for (int i = 0; i < m_n_cmd_joints; i++)
+
324  {
+
325  std::string filename = "positionControlAccuracy_plot_";
+
326  filename += m_partName;
+
327  filename += std::to_string(i);
+
328  filename += ".txt";
+
329  char plotstring[1000];
+
330  sprintf(plotstring, "gnuplot -e \" unset key; plot for [col=1:%d] '%s' using col with lines \" -persist", m_n_cmd_joints, filename.c_str());
+
331  system(plotstring);
+
332  }*/
+
333 }
+
334 
+
335 void PositionControlAccuracy::saveToFile(std::string filename, yarp::os::Bottle &b)
+
336 {
+
337  std::fstream fs;
+
338  fs.open(filename.c_str(), std::fstream::out);
+
339 
+
340  for (int i = 0; i<b.size(); i++)
+
341  {
+
342  std::string s = b.get(i).toString();
+
343  std::replace(s.begin(), s.end(), '(', ' ');
+
344  std::replace(s.begin(), s.end(), ')', ' ');
+
345  fs << s << std::endl;
+
346  }
+
347 
+
348  fs.close();
+
349 }
+
This tests checks the a position PID response, sending a step reference signal with a positionDirect ...
+
+ + + + diff --git a/doxygen/doc/html/PositionControlAccuracy_8h_source.html b/doxygen/doc/html/PositionControlAccuracy_8h_source.html new file mode 100644 index 00000000..4360232c --- /dev/null +++ b/doxygen/doc/html/PositionControlAccuracy_8h_source.html @@ -0,0 +1,153 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy/PositionControlAccuracy.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionControlAccuracy.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _POSITIONACCURACY_H_
+
22 #define _POSITIONACCURACY_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
55 class PositionControlAccuracy : public yarp::robottestingframework::TestCase {
+
56 public:
+ +
58  virtual ~PositionControlAccuracy();
+
59 
+
60  virtual bool setup(yarp::os::Property& property);
+
61 
+
62  virtual void tearDown();
+
63 
+
64  virtual void run();
+
65 
+
66  bool goHome();
+
67  void executeCmd();
+
68  void setMode(int desired_mode);
+
69  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
70 
+
71 private:
+
72  std::string m_robotName;
+
73  std::string m_partName;
+
74  int* m_jointsList;
+
75  int m_cycles;
+
76  double m_sampleTime;
+
77  double* m_zeros;
+
78  double m_step;
+
79  int m_n_part_joints;
+
80  int m_n_cmd_joints;
+
81  yarp::os::Bottle m_dataToSave;
+
82 
+
83  yarp::dev::PolyDriver *dd;
+
84  yarp::dev::IPositionControl *ipos;
+
85  yarp::dev::IControlMode *icmd;
+
86  yarp::dev::IInteractionMode *iimd;
+
87  yarp::dev::IEncoders *ienc;
+
88  yarp::dev::IPositionDirect *idir;
+
89  yarp::dev::IPidControl *ipid;
+
90 
+
91  double m_cmd_single;
+
92  double* m_encoders;
+
93  std::string m_requested_filename;
+
94  double m_home_tolerance;
+
95  double m_step_duration;
+
96  yarp::dev::Pid m_orig_pid;
+
97  yarp::dev::Pid m_new_pid;
+
98 };
+
99 
+
100 #endif
+
This tests checks the a position PID response, sending a step reference signal with a positionDirect ...
+
+ + + + diff --git a/doxygen/doc/html/PositionDirect_8cpp_source.html b/doxygen/doc/html/PositionDirect_8cpp_source.html new file mode 100644 index 00000000..75fe23a0 --- /dev/null +++ b/doxygen/doc/html/PositionDirect_8cpp_source.html @@ -0,0 +1,338 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionDirect/PositionDirect.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionDirect.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/os/Property.h>
+
26 
+
27 #include "PositionDirect.h"
+
28 
+
29 using namespace robottestingframework;
+
30 using namespace yarp::os;
+
31 using namespace yarp::dev;
+
32 
+
33 // prepare the plugin
+
34 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(PositionDirect)
+
35 
+
36 PositionDirect::PositionDirect() : yarp::robottestingframework::TestCase("PositionDirect") {
+
37  jointsList=0;
+
38  pos_tot=0;
+
39  dd=0;
+
40  ipos=0;
+
41  icmd=0;
+
42  iimd=0;
+
43  ienc=0;
+
44  idir=0;
+
45  cmd_some=0;
+
46  cmd_tot=0;
+
47 }
+
48 
+
49 PositionDirect::~PositionDirect() { }
+
50 
+
51 bool PositionDirect::setup(yarp::os::Property& property) {
+
52 
+
53  //updating the test name
+
54  if(property.check("name"))
+
55  setName(property.find("name").asString());
+
56 
+
57  // updating parameters
+
58  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
59  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
60  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
61  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("zero"), "The zero position must be given as the test parameter!");
+
62  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("frequency"), "The frequency of the control signal must be given as the test parameter!");
+
63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("amplitude"), "The amplitude of the control signal must be given as the test parameter!");
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("cycles"), "The number of cycles of the control signal must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("tolerance"), "The tolerance of the control signal must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("sampleTime"), "The sampleTime of the control signal must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("cmdMode"), "the cmdType must be given as the test parameter! 0=single_joint, 1=all_joints, 2=some_joints");
+
68 
+
69  robotName = property.find("robot").asString();
+
70  partName = property.find("part").asString();
+
71 
+
72  Bottle* jointsBottle = property.find("joints").asList();
+
73  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
74  n_cmd_joints = jointsBottle->size();
+
75  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0,"invalid number of joints, it must be >0");
+
76 
+
77  frequency = property.find("frequency").asFloat64();
+
78  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(frequency>0,"invalid frequency");
+
79 
+
80  amplitude = property.find("amplitude").asFloat64();
+
81  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(amplitude>0,"invalid amplitude");
+
82 
+
83  zero = property.find("zero").asFloat64();
+
84 
+
85  cycles = property.find("cycles").asFloat64();
+
86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(cycles>0,"invalid cycles");
+
87 
+
88  tolerance = property.find("tolerance").asFloat64();
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(tolerance>0,"invalid tolerance");
+
90 
+
91  sampleTime = property.find("sampleTime").asFloat64();
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(sampleTime>0,"invalid sampleTime");
+
93 
+
94  cmd_mode = (cmd_mode_t) property.find("cmdMode").asInt32();
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(cmd_mode>=0 && cmd_mode<=2,"invalid cmdMode: can be 0=single_joint, 1=all_joints ,2=some_joints");
+
96 
+
97  Property options;
+
98  options.put("device", "remote_controlboard");
+
99  options.put("remote", "/"+robotName+"/"+partName);
+
100  options.put("local", "/positionDirectTest/"+robotName+"/"+partName);
+
101 
+
102  dd = new PolyDriver(options);
+
103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(idir),"Unable to open position direct interface");
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
107  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
108  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
109 
+
110  if (!ienc->getAxes(&n_part_joints))
+
111  {
+
112  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
113  }
+
114 
+
115  if (cmd_mode==all_joints && n_part_joints!=n_cmd_joints)
+
116  {
+
117  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("if all_joints=2 mode is selected, joints parameter must include the full list of joints");
+
118  }
+
119 
+
120  if (cmd_mode==single_joint && n_cmd_joints!=1)
+
121  {
+
122  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("if single_joint=1 mode is selected, joints parameter must include one single joint");
+
123  }
+
124 
+
125  cmd_tot = new double[n_part_joints];
+
126  pos_tot=new double[n_part_joints];
+
127  jointsList=new int[n_cmd_joints];
+
128  cmd_some=new double[n_cmd_joints];
+
129  for (int i=0; i <n_cmd_joints; i++) jointsList[i]=jointsBottle->get(i).asInt32();
+
130 
+
131  return true;
+
132 }
+
133 
+
134 void PositionDirect::tearDown()
+
135 {
+
136  if (jointsList) {delete jointsList; jointsList =0;}
+
137  if (dd) {delete dd; dd =0;}
+
138 }
+
139 
+
140 void PositionDirect::setMode(int desired_mode)
+
141 {
+
142  for (int i=0; i<n_cmd_joints; i++)
+
143  {
+
144  icmd->setControlMode(jointsList[i],desired_mode);
+
145  iimd->setInteractionMode(jointsList[i],VOCAB_IM_STIFF);
+
146  yarp::os::Time::delay(0.010);
+
147  }
+
148 
+
149  int cmode;
+
150  yarp::dev::InteractionModeEnum imode;
+
151  int timeout = 0;
+
152 
+
153  while (1)
+
154  {
+
155  int ok=0;
+
156  for (int i=0; i<n_cmd_joints; i++)
+
157  {
+
158  icmd->getControlMode (jointsList[i],&cmode);
+
159  iimd->getInteractionMode(jointsList[i],&imode);
+
160  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
+
161  }
+
162  if (ok==n_cmd_joints) break;
+
163  if (timeout>100)
+
164  {
+
165  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
+
166  }
+
167  yarp::os::Time::delay(0.2);
+
168  timeout++;
+
169  }
+
170 }
+
171 
+
172 void PositionDirect::executeCmd()
+
173 {
+
174  if (cmd_mode==single_joint)
+
175  {
+
176  for (int i=0; i<n_cmd_joints; i++)
+
177  {
+
178  idir->setPosition(jointsList[i],cmd_single);
+
179  }
+
180  }
+
181  else if (cmd_mode==some_joints)
+
182  {
+
183  for (int i=0; i<n_cmd_joints; i++)
+
184  {
+
185  cmd_some[i]=cmd_single;
+
186  }
+
187  idir->setPositions(n_cmd_joints,jointsList, cmd_some);
+
188  }
+
189  else if (cmd_mode==all_joints)
+
190  {
+
191  for (int i=0; i<n_part_joints; i++)
+
192  {
+
193  cmd_tot[i]=cmd_single;
+
194  }
+
195  idir->setPositions(cmd_tot);
+
196  }
+
197  else
+
198  {
+
199  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
200  }
+
201 
+
202  prev_cmd=cmd_single;
+
203 }
+
204 
+
205 void PositionDirect::goHome()
+
206 {
+
207  for (int i=0; i<n_cmd_joints; i++)
+
208  {
+
209  ipos->setRefSpeed(jointsList[i],20.0);
+
210  ipos->positionMove(jointsList[i],zero);
+
211  }
+
212 
+
213  int timeout = 0;
+
214  while (1)
+
215  {
+
216  int in_position=0;
+
217  for (int i=0; i<n_cmd_joints; i++)
+
218  {
+
219  ienc->getEncoder(jointsList[i],&pos_tot[jointsList[i]]);
+
220  if (fabs(pos_tot[jointsList[i]]-zero)<0.5) in_position++;
+
221  }
+
222  if (in_position==n_cmd_joints) break;
+
223  if (timeout>100)
+
224  {
+
225  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
226  }
+
227  yarp::os::Time::delay(0.2);
+
228  timeout++;
+
229  }
+
230 }
+
231 
+
232 void PositionDirect::run()
+
233 {
+
234  setMode(VOCAB_CM_POSITION);
+
235  goHome();
+
236  setMode(VOCAB_CM_POSITION_DIRECT);
+
237 
+
238  double start_time = yarp::os::Time::now();
+
239  const double max_step = 2.0;
+
240  prev_cmd=cmd_single = amplitude*sin(0.0)+zero;
+
241  while(1)
+
242  {
+
243  double curr_time = yarp::os::Time::now();
+
244  double elapsed = curr_time-start_time;
+
245  cmd_single = amplitude*(2*3.14159265359*frequency*elapsed)+zero;
+
246 
+
247  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(fabs(prev_cmd-cmd_single)<max_step,
+
248  Asserter::format("error in signal generation: previous: %+6.3f current: %+6.3f max step: %+6.3f",
+
249  prev_cmd,cmd_single,max_step));
+
250  ienc->getEncoders(pos_tot);
+
251  executeCmd();
+
252  //printf("%+6.3f %f\n",elapsed, cmd);
+
253  yarp::os::Time::delay(sampleTime);
+
254  if (elapsed*frequency>cycles) break;
+
255  }
+
256 
+
257  setMode(VOCAB_CM_POSITION);
+
258  goHome();
+
259 }
+
This tests checks the positionDirect control, sending a sinusoidal reference signal,...
+
+ + + + diff --git a/doxygen/doc/html/PositionDirect_8h_source.html b/doxygen/doc/html/PositionDirect_8h_source.html new file mode 100644 index 00000000..7f540e32 --- /dev/null +++ b/doxygen/doc/html/PositionDirect_8h_source.html @@ -0,0 +1,158 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionDirect/PositionDirect.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
PositionDirect.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _POSITIONDIRECT_H_
+
22 #define _POSITIONDIRECT_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
60 class PositionDirect : public yarp::robottestingframework::TestCase {
+
61 public:
+ +
63  virtual ~PositionDirect();
+
64 
+
65  virtual bool setup(yarp::os::Property& property);
+
66 
+
67  virtual void tearDown();
+
68 
+
69  virtual void run();
+
70 
+
71  void goHome();
+
72  void executeCmd();
+
73  void setMode(int desired_mode);
+
74 
+
75 private:
+
76  std::string robotName;
+
77  std::string partName;
+
78  int* jointsList;
+
79  double frequency;
+
80  double amplitude;
+
81  double cycles;
+
82  double tolerance;
+
83  double sampleTime;
+
84  double zero;
+
85  int n_part_joints;
+
86  int n_cmd_joints;
+
87  enum cmd_mode_t
+
88  {
+
89  single_joint = 0,
+
90  all_joints = 1,
+
91  some_joints =2
+
92  } cmd_mode;
+
93 
+
94  yarp::dev::PolyDriver *dd;
+
95  yarp::dev::IPositionControl *ipos;
+
96  yarp::dev::IControlMode *icmd;
+
97  yarp::dev::IInteractionMode *iimd;
+
98  yarp::dev::IEncoders *ienc;
+
99  yarp::dev::IPositionDirect *idir;
+
100 
+
101  double cmd_single;
+
102  double* cmd_tot;
+
103  double* cmd_some;
+
104 
+
105  double* pos_tot;
+
106 
+
107  double prev_cmd;
+
108 };
+
109 
+
110 #endif //_PositionDirect_H
+
This tests checks the positionDirect control, sending a sinusoidal reference signal,...
+
+ + + + diff --git a/doxygen/doc/html/README_8md_source.html b/doxygen/doc/html/README_8md_source.html new file mode 100644 index 00000000..d93ba995 --- /dev/null +++ b/doxygen/doc/html/README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/README.md Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
/home/runner/work/icub-tests/icub-tests/gh-pages/README.md
+
+
+
1 icub-tests
2 ==========
3 
4 
5 ![ci](https://github.com/robotology/icub-tests/workflows/Continuous%20Integration/badge.svg)
6 ![gh-pages](https://github.com/robotology/icub-tests/workflows/GitHub%20Pages/badge.svg)
7 
8 ## Maintainers
9 This repository is maintained by:
10 
11 | | |
12 |:---:|:---:|
13 | [<img src="https://github.com/Nicogene.png" width="40">](https://github.com/niNicogenecogene) | [@Nicogene](https://github.com/Nicogene) |
14 
15 
16 The `icub-tests` repository contains tests for the iCub robot.
17 Tests are written using the [Robot Testing Framework](https://github.com/robotology/robot-testing-framework).
18 
19 ## Installation, tutorial and available tests
20 
21 See the [icub-test documentation](https://robotology.github.io/icub-tests/).
22 
23 ## Contributors
24 
25 - [**Ali Paikan**](https://github.com/apaikan)
26 - [**Lorenzo Natale**](https://github.com/lornat75)
27 - [**Silvio Traversaro**](https://github.com/traversaro)
28 - [**Alessandro Scalzo**](https://github.com/ale-git)
29 - [**Marco Randazzo**](https://github.com/randaz81)
30 - [**Valentina Gaggero**](https://github.com/valegagge)
31 - [**Ugo Pattacini**](https://github.com/pattacini)
32 - [**Nicolo' Genesio**](https://github.com/Nicogene)
33 - [**Giulia Vezzani**](https://github.com/giuliavezzani)
+ + + + diff --git a/doxygen/doc/html/SensorsDuplicateReadings_8cpp_source.html b/doxygen/doc/html/SensorsDuplicateReadings_8cpp_source.html new file mode 100644 index 00000000..1f285808 --- /dev/null +++ b/doxygen/doc/html/SensorsDuplicateReadings_8cpp_source.html @@ -0,0 +1,220 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/sensors-duplicate-readings/SensorsDuplicateReadings.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SensorsDuplicateReadings.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <Plugin.h>
+
23 #include "SensorsDuplicateReadings.h"
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/os/Stamp.h>
+
26 #include <yarp/math/Math.h>
+
27 
+
28 using namespace std;
+
29 using namespace robottestingframework;
+
30 using namespace yarp::os;
+
31 using namespace yarp::math;
+
32 
+
33 // prepare the plugin
+
34 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(SensorsDuplicateReadings)
+
35 
+
36 SensorsDuplicateReadings::SensorsDuplicateReadings() : yarp::robottestingframework::TestCase("SensorsDuplicateReadings") {
+
37 }
+
38 
+
39 SensorsDuplicateReadings::~SensorsDuplicateReadings() { }
+
40 
+
41 bool SensorsDuplicateReadings::setup(yarp::os::Property &property) {
+
42 
+
43  //updating the test name
+
44  if(property.check("name"))
+
45  setName(property.find("name").asString());
+
46 
+
47  // updating parameters
+
48  testTime = (property.check("time")) ? property.find("time").asFloat64() : 2;
+
49 
+
50  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("PORTS"),
+
51  "A list of the ports must be given");
+
52 
+
53  yarp::os::Bottle portsSet = property.findGroup("PORTS").tail();
+
54  for(unsigned int i=0; i<portsSet.size(); i++) {
+
55  yarp::os::Bottle* btport = portsSet.get(i).asList();
+
56  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(btport && btport->size()>=3, "The ports must be given as lists of <portname> <toleratedDuplicates>");
+
57  DuplicateReadingsPortInfo info;
+
58  info.name = btport->get(0).asString();
+
59  info.toleratedDuplicates = btport->get(1).asInt32();
+
60  ports.push_back(info);
+
61  }
+
62 
+
63  // opening port
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(port.open("..."),
+
65  "opening port, is YARP network available?");
+
66  return true;
+
67 }
+
68 
+
69 void SensorsDuplicateReadings::tearDown() {
+
70  // finalization goes her ...
+
71  port.close();
+
72 }
+
73 
+
74 void SensorsDuplicateReadings::run() {
+
75  for(unsigned int i=0; i<ports.size(); i++) {
+
76  port.reset();
+
77  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking port %s ...", ports[i].name.c_str()));
+
78  bool connected = Network::connect(ports[i].name.c_str(), port.getName());
+
79  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(connected,
+
80  Asserter::format("could not connect to remote port %s.", ports[i].name.c_str()));
+
81  if(connected) {
+
82  port.useCallback();
+
83  Time::delay(testTime);
+
84  port.disableCallback();
+
85 
+
86  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Computed a total of %lu duplicates out of %lu samples.",
+
87  port.getTotalNrOfDuplicates(),port.getCount()));
+
88  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Maximum number of consecutive duplicates: %lu Maximum jitter: %lf ",
+
89  port.getMaxNrOfDuplicates(), port.getMaxJitter()));
+
90 
+
91  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(port.getTotalNrOfDuplicates() > ports[i].toleratedDuplicates,
+
92  Asserter::format("Number of duplicates (%lu) is higher than the tolerated (%d)",
+
93  port.getTotalNrOfDuplicates(),
+
94  ports[i].toleratedDuplicates));
+
95 
+
96  Network::disconnect(ports[i].name.c_str(), port.getName());
+
97  }
+
98  }
+
99 }
+
100 
+
101 void DuplicateDetector::onRead(yarp::sig::Vector& vec) {
+
102  double tcurrent = Time::now();
+
103 
+
104  if(count == 0)
+
105  {
+
106  lastReading = vec;
+
107  currentJitter = 0.0;
+
108  currentNrOfDuplicates = 0;
+
109  totalNrOfDuplicates = 0;
+
110  lastNewValueTime = tcurrent;
+
111  maxJitter = currentJitter;
+
112  maxNrOfDuplicates = currentNrOfDuplicates;
+
113  }
+
114  else
+
115  {
+
116  // Check for duplicate data
+
117  double diff = yarp::math::norm(vec-lastReading);
+
118  if( diff < this->tolerance )
+
119  {
+
120  // duplicate ! report a duplicate
+
121  currentNrOfDuplicates++;
+
122  currentJitter = tcurrent - lastNewValueTime;
+
123 
+
124  totalNrOfDuplicates++;
+
125 
+
126  maxJitter = std::max(currentJitter,maxJitter);
+
127  maxNrOfDuplicates = std::max(currentJitter,maxJitter);
+
128 
+
129  }
+
130  else
+
131  {
+
132  // not duplicate! update last read value
+
133  lastReading = vec;
+
134  currentNrOfDuplicates = 0;
+
135  currentJitter = 0.0;
+
136  lastNewValueTime = tcurrent;
+
137  }
+
138  }
+
139 
+
140  count++;
+
141 }
+
Check if a yarp port is correctly publishing unique values at each update .
+
+ + + + diff --git a/doxygen/doc/html/SensorsDuplicateReadings_8h_source.html b/doxygen/doc/html/SensorsDuplicateReadings_8h_source.html new file mode 100644 index 00000000..0e1631c1 --- /dev/null +++ b/doxygen/doc/html/SensorsDuplicateReadings_8h_source.html @@ -0,0 +1,160 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/sensors-duplicate-readings/SensorsDuplicateReadings.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SensorsDuplicateReadings.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _SENSORSDUPLICATEREADINGS_H_
+
22 #define _SENSORSDUPLICATEREADINGS_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/BufferedPort.h>
+
26 #include <yarp/sig/Vector.h>
+
27 #include <vector>
+
28 
+
29 class DuplicateReadingsPortInfo {
+
30 public:
+
31  std::string name;
+
32  int toleratedDuplicates;
+
33 };
+
34 
+
35 
+
36 class DuplicateDetector : public yarp::os::BufferedPort<yarp::sig::Vector> {
+
37 public:
+
38 
+
39  void reset() {
+
40  count = 0;
+
41  tolerance = 1e-12;
+
42  }
+
43 
+
44  unsigned long getCount() { return count; }
+
45  unsigned long getMaxNrOfDuplicates() { return maxNrOfDuplicates; }
+
46  double getMaxJitter() { return maxJitter; }
+
47  unsigned long getTotalNrOfDuplicates() { return totalNrOfDuplicates; }
+
48 
+
49  virtual void onRead(yarp::sig::Vector& vec);
+
50 
+
51 private:
+
52  unsigned long count;
+
53  double tolerance;
+
54  unsigned long currentNrOfDuplicates;
+
55  unsigned long totalNrOfDuplicates;
+
56  unsigned long maxNrOfDuplicates;
+
57  double lastNewValueTime;
+
58  double currentJitter;
+
59  double maxJitter;
+
60  yarp::sig::Vector lastReading;
+
61 };
+
62 
+
63 
+
88 class SensorsDuplicateReadings : public yarp::robottestingframework::TestCase {
+
89 public:
+ +
91  virtual ~SensorsDuplicateReadings();
+
92 
+
93  virtual bool setup(yarp::os::Property& property);
+
94 
+
95  virtual void tearDown();
+
96 
+
97  virtual void run();
+
98 
+
99 private:
+
100  DuplicateDetector port;
+
101  std::vector<DuplicateReadingsPortInfo> ports;
+
102  double testTime;
+
103 };
+
104 
+
105 #endif //_PORTSFREQUENCY_H
+
Check if a yarp port is correctly publishing unique values at each update .
+
+ + + + diff --git a/doxygen/doc/html/SkinWrapperTest_8cpp_source.html b/doxygen/doc/html/SkinWrapperTest_8cpp_source.html new file mode 100644 index 00000000..d4495f92 --- /dev/null +++ b/doxygen/doc/html/SkinWrapperTest_8cpp_source.html @@ -0,0 +1,203 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/SkinWrapperTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SkinWrapperTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <string>
+
22 #include <robottestingframework/dll/Plugin.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 
+
25 #include "SkinWrapperTest.h"
+
26 
+
27 using namespace std;
+
28 using namespace robottestingframework;
+
29 using namespace yarp::os;
+
30 using namespace yarp::dev;
+
31 
+
32 // prepare the plugin
+
33 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(SkinWrapperTest)
+
34 
+
35 
+
36 /***********************************************************************************/
+
37 SkinWrapperTest::SkinWrapperTest() :
+
38  yarp::robottestingframework::TestCase("SkinWrapperTest")
+
39 {
+
40 }
+
41 
+
42 
+
43 /***********************************************************************************/
+
44 SkinWrapperTest::~SkinWrapperTest()
+
45 {
+
46 }
+
47 
+
48 
+
49 /***********************************************************************************/
+
50 bool SkinWrapperTest::setup(Property &property)
+
51 {
+
52  //test #1
+
53  Property p;
+
54  p.put("device","skinWrapper");
+
55  p.put("robotName","fakeiCub");
+
56  p.put("name","/testSkinWrapper");
+
57  p.put("period",20);
+
58  p.put("total_taxels",10);
+
59  p.put("subdevice","fakeAnalogSensor");
+
60  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening the skinWrapper with one port");
+
61  ROBOTTESTINGFRAMEWORK_TEST_CHECK(dd1.open(p),"Unable to open the device!");
+
62  //test #2
+
63  BufferedPort<Bottle> port,portrpc;
+
64  portrpc.open("/fakeiCub2/skin/rpc:i");
+
65  port.open("/fakeiCub2/skin");
+
66  p.unput("robotName");
+
67  p.put("robotName","fakeiCub2");
+
68  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening the skinWrapper with one port (address conflict case)");
+
69  ROBOTTESTINGFRAMEWORK_TEST_CHECK(!dd2.open(p),"Unable to open the device as expected");
+
70  portrpc.close();
+
71  port.close();
+
72  //test #3
+
73  Property p2;
+
74  p2.put("device","skinWrapper");
+
75  p2.put("robotName","fakeiCub3");
+
76  p2.put("name","/testSkinWrapperMultip");
+
77  p2.put("period",20);
+
78  p2.put("total_taxels",3);
+
79  p2.put("subdevice","fakeAnalogSensor");
+
80  p2.fromString("(ports (left_hand left_forearm left_arm)) (left_hand 0 0 0 0) (left_forearm 0 0 0 0) (left_arm 0 0 0 0)", false);
+
81  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening the skinWrapper with multiple ports");
+
82  ROBOTTESTINGFRAMEWORK_TEST_CHECK(dd3.open(p2),"Unable to open the device!");
+
83  //test #4
+
84  port.open("/fakeiCub4/skin/left_hand");
+
85  portrpc.open("/fakeiCub4/skin/left_forearm/rpc:i");
+
86  p2.unput("robotName");
+
87  p2.put("robotName","fakeiCub4");
+
88  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening the skinWrapper with multiple ports (address conflict case)");
+
89  ROBOTTESTINGFRAMEWORK_TEST_CHECK(!dd4.open(p2),"Unable to open the device as expected");
+
90 
+
91  port.close();
+
92  portrpc.close();
+
93  return true;
+
94 }
+
95 
+
96 
+
97 /***********************************************************************************/
+
98 void SkinWrapperTest::tearDown()
+
99 {
+
100  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Closing the skinWrapper");
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(dd1.close() && dd2.close() && dd3.close() && dd4.close(),"Unable to close the device!");
+
102 }
+
103 
+
104 
+
105 /***********************************************************************************/
+
106 void SkinWrapperTest::run()
+
107 {
+
108  bool result;
+
109  result = Network::exists("/fakeiCub/skin/rpc:i");
+
110  result &= Network::exists("/fakeiCub/skin");
+
111  result &= Network::exists("/fakeiCub3/skin/left_hand");
+
112  result &= Network::exists("/fakeiCub3/skin/left_hand/rpc:i");
+
113  result &= Network::exists("/fakeiCub3/skin/left_forearm");
+
114  result &= Network::exists("/fakeiCub3/skin/left_forearm/rpc:i");
+
115  result &= Network::exists("/fakeiCub3/skin/left_arm");
+
116  result &= Network::exists("/fakeiCub3/skin/left_arm/rpc:i");
+
117  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking if all ports has been opened successfully");
+
118  ROBOTTESTINGFRAMEWORK_TEST_CHECK(result,"ports opened succefully");
+
119  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking the validity of devices");
+
120  ROBOTTESTINGFRAMEWORK_TEST_CHECK(dd1.isValid() && !dd2.isValid() && dd3.isValid() && !dd4.isValid(),"dd1 and dd3 valid, dd2 and dd4 not valid as expected");
+
121 
+
122 
+
123 }
+
124 
+
This test verifies the functionalities of skinWrapper after the removal of analogServer from icub-mai...
+
+ + + + diff --git a/doxygen/doc/html/SkinWrapperTest_8h_source.html b/doxygen/doc/html/SkinWrapperTest_8h_source.html new file mode 100644 index 00000000..9b43e793 --- /dev/null +++ b/doxygen/doc/html/SkinWrapperTest_8h_source.html @@ -0,0 +1,122 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/SkinWrapperTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SkinWrapperTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _SKINWRAPPERTEST_H_
+
22 #define _SKINWRAPPERTEST_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <yarp/dev/PolyDriver.h>
+
27 
+
34 class SkinWrapperTest : public yarp::robottestingframework::TestCase
+
35 {
+
36  yarp::dev::PolyDriver dd1;
+
37  yarp::dev::PolyDriver dd2;
+
38  yarp::dev::PolyDriver dd3;
+
39  yarp::dev::PolyDriver dd4;
+
40 
+
41 public:
+ +
43  virtual ~SkinWrapperTest();
+
44  virtual bool setup(yarp::os::Property& property);
+
45  virtual void tearDown();
+
46  virtual void run();
+
47 };
+
48 
+
49 #endif
+
This test verifies the functionalities of skinWrapper after the removal of analogServer from icub-mai...
+
+ + + + diff --git a/doxygen/doc/html/SystemStatus_8cpp_source.html b/doxygen/doc/html/SystemStatus_8cpp_source.html new file mode 100644 index 00000000..d6bb0880 --- /dev/null +++ b/doxygen/doc/html/SystemStatus_8cpp_source.html @@ -0,0 +1,202 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/system-status/SystemStatus.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SystemStatus.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <robottestingframework/dll/Plugin.h>
+
22 #include <yarp/os/Port.h>
+
23 #include <yarp/os/SystemInfoSerializer.h>
+
24 #include "SystemStatus.h"
+
25 
+
26 using namespace std;
+
27 using namespace robottestingframework;
+
28 using namespace yarp::os;
+
29 
+
30 #define CONNECTION_TIMEOUT 5.0 //seconds
+
31 
+
32 // prepare the plugin
+
33 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(SystemStatus)
+
34 
+
35 
+
36 SystemStatus::SystemStatus() : yarp::robottestingframework::TestCase("SystemStatus") {
+
37 }
+
38 
+
39 SystemStatus::~SystemStatus() { }
+
40 
+
41 bool SystemStatus::setup(yarp::os::Property &property) {
+
42 
+
43  //updating the test name
+
44  if(property.check("name"))
+
45  setName(property.find("name").asString());
+
46 
+
47  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("hosts"),
+
48  "A list of hosts name must be given using 'hosts' param");
+
49  yarp::os::Bottle portsSet = property.findGroup("hosts").tail();
+
50  for(unsigned int i=0; i<portsSet.size(); i++) {
+
51  yarp::os::Bottle* btport = portsSet.get(i).asList();
+
52  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(btport && btport->size()>=2, "Hosts must be given as lists of <host name> <max cpu load>");
+
53  HostInfo info;
+
54  info.name = btport->get(0).asString();
+
55  info.maxCpuLoad = btport->get(1).asInt32();
+
56  hosts.push_back(info);
+
57  }
+
58 
+
59  return true;
+
60 }
+
61 
+
62 void SystemStatus::tearDown() {
+
63  // finalization goes her ...
+
64 }
+
65 
+
66 void SystemStatus::run() {
+
67  for(unsigned int i=0; i<hosts.size(); i++) {
+
68  SystemInfoSerializer info;
+
69  ROBOTTESTINGFRAMEWORK_TEST_REPORT("");
+
70  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking host %s ...", hosts[i].name.c_str()));
+
71  bool ret = getSystemInfo(hosts[i].name, info);
+
72  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(ret, Asserter::format("Failed to get the system status of host %s. Is the yarprun running on %s?",
+
73  hosts[i].name.c_str(), hosts[i].name.c_str()));
+
74  if(ret) {
+
75  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Total memory %d MB, free memory %d MB.",
+
76  info.memory.totalSpace, info.memory.freeSpace));
+
77  unsigned int cpuLoad1 = (int)(info.load.cpuLoad1*100);
+
78  unsigned int cpuLoad5 = (int)(info.load.cpuLoad5*100);
+
79  unsigned int cpuLoad15 = (int)(info.load.cpuLoad15*100);
+
80  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Cpu load during last minute %d\%, last 5 minutes %d\%, last 15 minutes %d\%",
+
81  cpuLoad1, cpuLoad5, cpuLoad15));
+
82  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(cpuLoad1 < hosts[i].maxCpuLoad,
+
83  Asserter::format("Cpu load (last minute) is higher than desired [%d\%]", hosts[i].maxCpuLoad));
+
84  }
+
85  }
+
86 }
+
87 
+
88 bool SystemStatus::getSystemInfo(std::string remote,
+
89  SystemInfoSerializer& info) {
+
90 
+
91  yarp::os::Port port;
+
92 
+
93  // opening the port
+
94  port.setTimeout(CONNECTION_TIMEOUT);
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(port.open("..."), "Cannot open the yarp port");
+
96 
+
97  yarp::os::Bottle msg, grp;
+
98  grp.clear();
+
99  grp.addString("sysinfo");
+
100  msg.addList() = grp;
+
101 
+
102  ContactStyle style;
+
103  style.quiet = true;
+
104  style.timeout = CONNECTION_TIMEOUT;
+
105 
+
106  bool connected = yarp::os::NetworkBase::connect(port.getName(), remote.c_str(), style);
+
107  if(!connected) {
+
108  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(connected, string("Cannot connect to ") + remote);
+
109  port.close();
+
110  return false;
+
111  }
+
112 
+
113  bool ret = port.write(msg, info);
+
114  NetworkBase::disconnect(port.getName().c_str(), remote.c_str());
+
115  if(!ret) {
+
116  port.close();
+
117  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF(ret, remote + string(" does not respond"));
+
118  return false;
+
119  }
+
120 
+
121  port.close();
+
122  return true;
+
123 }
+
124 
+
+ + + + diff --git a/doxygen/doc/html/SystemStatus_8h_source.html b/doxygen/doc/html/SystemStatus_8h_source.html new file mode 100644 index 00000000..3afac26d --- /dev/null +++ b/doxygen/doc/html/SystemStatus_8h_source.html @@ -0,0 +1,133 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/system-status/SystemStatus.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
SystemStatus.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 
+
22 #ifndef _SYSTEM_STATUS_H_
+
23 #define _SYSTEM_STATUS_H_
+
24 
+
25 #include <vector>
+
26 #include <yarp/robottestingframework/TestCase.h>
+
27 #include <yarp/os/SystemInfoSerializer.h>
+
28 
+
29 class HostInfo {
+
30 public:
+
31  std::string name;
+
32  int maxCpuLoad;
+
33 };
+
34 
+
35 
+
36 class SystemStatus : public yarp::robottestingframework::TestCase {
+
37 public:
+
38  SystemStatus();
+
39  virtual ~SystemStatus();
+
40 
+
41  virtual bool setup(yarp::os::Property& property);
+
42 
+
43  virtual void tearDown();
+
44 
+
45  virtual void run();
+
46 
+
47 private:
+
48  bool getSystemInfo(std::string remote,
+
49  yarp::os::SystemInfoSerializer& info);
+
50 private:
+
51  std::vector<HostInfo> hosts;
+
52 };
+
53 
+
54 #endif //_SYSTEM_STATUS
+
55 
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlAccuracy_8cpp_source.html b/doxygen/doc/html/TorqueControlAccuracy_8cpp_source.html new file mode 100644 index 00000000..c62df252 --- /dev/null +++ b/doxygen/doc/html/TorqueControlAccuracy_8cpp_source.html @@ -0,0 +1,375 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-accuracy/TorqueControlAccuracy.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlAccuracy.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/os/Property.h>
+
26 #include <fstream>
+
27 #include <algorithm>
+
28 #include <cstdlib>
+
29 
+
30 #include "TorqueControlAccuracy.h"
+
31 
+
32 using namespace robottestingframework;
+
33 using namespace yarp::os;
+
34 using namespace yarp::dev;
+
35 
+
36 // prepare the plugin
+
37 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(TorqueControlAccuracy)
+
38 
+
39 TorqueControlAccuracy::TorqueControlAccuracy() : yarp::robottestingframework::TestCase("TorqueControlAccuracy") {
+
40  m_jointsList = 0;
+
41  m_encoders = 0;
+
42  m_torques = 0;
+
43  m_zeros = 0;
+
44  dd=0;
+
45  ipos=0;
+
46  icmd=0;
+
47  iimd=0;
+
48  ienc=0;
+
49  itrq=0;
+
50 }
+
51 
+
52 TorqueControlAccuracy::~TorqueControlAccuracy() { }
+
53 
+
54 bool TorqueControlAccuracy::setup(yarp::os::Property& property) {
+
55 
+
56  //updating the test name
+
57  if(property.check("name"))
+
58  setName(property.find("name").asString());
+
59 
+
60  // updating parameters
+
61  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("robot"), "The robot name must be given as the test parameter!");
+
62  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("part"), "The part name must be given as the test parameter!");
+
63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("joints"), "The joints list must be given as the test parameter!");
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("zeros"), "The zero position list must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("cycles"), "The number of cycles of the control signal must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("step"), "The amplitude of the step reference signal expressed in Nm!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(property.check("sampleTime"), "The sampleTime of the control signal must be given as the test parameter!");
+
68 
+
69  m_robotName = property.find("robot").asString();
+
70  m_partName = property.find("part").asString();
+
71 
+
72  Bottle* jointsBottle = property.find("joints").asList();
+
73  Bottle* zerosBottle = property.find("zeros").asList();
+
74 
+
75  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(jointsBottle!=0,"unable to parse joints parameter");
+
76  m_n_cmd_joints = jointsBottle->size();
+
77  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(m_n_cmd_joints>0, "invalid number of joints, it must be >0");
+
78 
+
79  m_step = property.find("step").asFloat64();
+
80 
+
81  m_cycles = property.find("cycles").asInt32();
+
82  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(m_cycles>0, "invalid cycles");
+
83 
+
84  m_sampleTime = property.find("sampleTime").asFloat64();
+
85  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(m_sampleTime>0, "invalid sampleTime");
+
86 
+
87  Property options;
+
88  options.put("device", "remote_controlboard");
+
89  options.put("remote", "/" + m_robotName + "/" + m_partName);
+
90  options.put("local", "/TorqueControlAccuracyTest/" + m_robotName + "/" + m_partName);
+
91 
+
92  dd = new PolyDriver(options);
+
93  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->isValid(),"Unable to open device driver");
+
94  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->view(itrq),"Unable to open torque control interface");
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->view(ienc),"Unable to open encoders interface");
+
96  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->view(ipos),"Unable to open position interface");
+
97  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->view(icmd),"Unable to open control mode interface");
+
98  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF(dd->view(iimd),"Unable to open interaction mode interface");
+
99 
+
100  if (!ienc->getAxes(&m_n_part_joints))
+
101  {
+
102  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
103  }
+
104 
+
105  m_zeros = new double[m_n_part_joints];
+
106  m_encoders = new double[m_n_part_joints];
+
107  m_jointsList = new int[m_n_cmd_joints];
+
108  m_torques = new double[m_n_part_joints];
+
109  for (int i = 0; i <m_n_cmd_joints; i++) m_jointsList[i] = jointsBottle->get(i).asInt32();
+
110  for (int i = 0; i <m_n_cmd_joints; i++) m_zeros[i] = zerosBottle->get(i).asFloat64();
+
111 
+
112  return true;
+
113 }
+
114 
+
115 void TorqueControlAccuracy::tearDown()
+
116 {
+
117  if (m_jointsList) { delete [] m_jointsList; m_jointsList = 0; }
+
118  if (m_zeros) { delete [] m_zeros; m_zeros = 0; }
+
119  if (m_torques) { delete [] m_torques; m_torques = 0; }
+
120  if (m_encoders) { delete [] m_encoders; m_encoders = 0; }
+
121  if (dd) {delete dd; dd =0;}
+
122 }
+
123 
+
124 void TorqueControlAccuracy::setMode(int desired_mode)
+
125 {
+
126  for (int i = 0; i<m_n_cmd_joints; i++)
+
127  {
+
128  icmd->setControlMode(m_jointsList[i], desired_mode);
+
129  iimd->setInteractionMode(m_jointsList[i], VOCAB_IM_STIFF);
+
130  yarp::os::Time::delay(0.010);
+
131  }
+
132 
+
133  int cmode;
+
134  yarp::dev::InteractionModeEnum imode;
+
135  int timeout = 0;
+
136 
+
137  while (1)
+
138  {
+
139  int ok=0;
+
140  for (int i = 0; i<m_n_cmd_joints; i++)
+
141  {
+
142  icmd->getControlMode(m_jointsList[i], &cmode);
+
143  iimd->getInteractionMode(m_jointsList[i], &imode);
+
144  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
+
145  }
+
146  if (ok == m_n_cmd_joints) break;
+
147  if (timeout>100)
+
148  {
+
149  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
+
150  }
+
151  yarp::os::Time::delay(0.2);
+
152  timeout++;
+
153  }
+
154 }
+
155 
+
156 bool TorqueControlAccuracy::goHome()
+
157 {
+
158  for (int i = 0; i<m_n_cmd_joints; i++)
+
159  {
+
160  ipos->setRefSpeed(m_jointsList[i], 20.0);
+
161  ipos->positionMove(m_jointsList[i], m_zeros[i]);
+
162  }
+
163 
+
164  int timeout = 0;
+
165  while (1)
+
166  {
+
167  int in_position=0;
+
168  for (int i = 0; i<m_n_cmd_joints; i++)
+
169  {
+
170  ienc->getEncoder(m_jointsList[i], &m_encoders[m_jointsList[i]]);
+
171  if (fabs(m_encoders[m_jointsList[i]] - m_zeros[i])<0.5) in_position++;
+
172  }
+
173  if (in_position == m_n_cmd_joints) break;
+
174  if (timeout>100)
+
175  {
+
176  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
177  return false;
+
178  }
+
179  yarp::os::Time::delay(0.2);
+
180  timeout++;
+
181  }
+
182  //sleep some additional time to complete movement from 0.5 to 0
+
183  yarp::os::Time::delay(0.5);
+
184  return true;
+
185 }
+
186 
+
187 void TorqueControlAccuracy::run()
+
188 {
+
189  for (int i = 0; i < m_n_cmd_joints; i++)
+
190  {
+
191  for (int cycle = 0; cycle < m_cycles; cycle++)
+
192  {
+
193  setMode(VOCAB_CM_POSITION);
+
194  if (goHome() == false)
+
195  {
+
196  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL("Test stopped");
+
197  };
+
198  setMode(VOCAB_CM_TORQUE);
+
199  double start_time = yarp::os::Time::now();
+
200 
+
201  std::string buff = "Testing Joint: " + std::to_string(i) + " cycle: " + std::to_string(cycle);
+
202  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
203 
+
204  double time_zero = 0;
+
205  yarp::os::Bottle dataToPlotRaw;
+
206  yarp::os::Bottle dataToPlotSync;
+
207 
+
208  while (1)
+
209  {
+
210  double curr_time = yarp::os::Time::now();
+
211  double elapsed = curr_time - start_time;
+
212 
+
213  if (elapsed <= 1.0)
+
214  {
+
215  m_cmd_single = 0.0;
+
216  }
+
217  else if (elapsed > 1.0 && elapsed <= 4.0)
+
218  {
+
219  m_cmd_single = m_zeros[i] + m_step;
+
220  if (time_zero == 0) time_zero = elapsed;
+
221  }
+
222  else
+
223  {
+
224  break;
+
225  }
+
226 
+
227  ienc->getEncoders(m_encoders);
+
228  itrq->getTorques(m_torques);
+
229  itrq->setRefTorque(m_jointsList[i], m_cmd_single);
+
230 
+
231  Bottle& b1 = dataToPlotRaw.addList();
+
232  b1.addInt32(cycle);
+
233  b1.addFloat64(elapsed);
+
234  b1.addFloat64(m_torques[m_jointsList[i]]);
+
235  b1.addFloat64(m_cmd_single);
+
236  yarp::os::Time::delay(m_sampleTime);
+
237  }
+
238 
+
239  //reorder data
+
240  for (int t = 0; t < dataToPlotRaw.size(); t++)
+
241  {
+
242  int cycle = dataToPlotRaw.get(t).asList()->get(0).asInt32();
+
243  double time = dataToPlotRaw.get(t).asList()->get(1).asFloat64();
+
244  double val = dataToPlotRaw.get(t).asList()->get(2).asFloat64();
+
245  double cmd = dataToPlotRaw.get(t).asList()->get(3).asFloat64();
+
246  Bottle& b1 = dataToPlotSync.addList();
+
247  b1.addInt32(cycle);
+
248  b1.addFloat64(time - time_zero);
+
249  b1.addFloat64(val);
+
250  b1.addFloat64(cmd);
+
251  }
+
252 
+
253  m_dataToSave.append(dataToPlotSync);
+
254  } //cycle loop
+
255 
+
256  //save data
+
257  std::string filename = "torqueControlAccuracy_plot_";
+
258  filename += m_partName;
+
259  filename += std::to_string(i);
+
260  filename += ".txt";
+
261  saveToFile(filename, m_dataToSave);
+
262  } //joint loop
+
263 
+
264  //data acquisition ends here
+
265  setMode(VOCAB_CM_POSITION);
+
266  goHome();
+
267  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Data acquisition complete");
+
268 
+
269  //plot data
+
270  /*for (int i = 0; i < m_n_cmd_joints; i++)
+
271  {
+
272  std::string filename = "torqueControlAccuracy_plot_";
+
273  filename += m_partName;
+
274  filename += std::to_string(i);
+
275  filename += ".txt";
+
276  char plotstring[1000];
+
277  sprintf(plotstring, "gnuplot -e \" unset key; plot for [col=1:%d] '%s' using col with lines \" -persist", m_n_cmd_joints, filename.c_str());
+
278  system(plotstring);
+
279  }*/
+
280 }
+
281 
+
282 void TorqueControlAccuracy::saveToFile(std::string filename, yarp::os::Bottle &b)
+
283 {
+
284  std::fstream fs;
+
285  fs.open(filename.c_str(), std::fstream::out);
+
286 
+
287  for (int i = 0; i<b.size(); i++)
+
288  {
+
289  std::string s = b.get(i).toString();
+
290  std::replace(s.begin(), s.end(), '(', ' ');
+
291  std::replace(s.begin(), s.end(), ')', ' ');
+
292  fs << s << std::endl;
+
293  }
+
294 
+
295  fs.close();
+
296 }
+
This tests checks the a torque PID response, sending a step reference signal with a setRefTorque comm...
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlAccuracy_8h_source.html b/doxygen/doc/html/TorqueControlAccuracy_8h_source.html new file mode 100644 index 00000000..244b26a2 --- /dev/null +++ b/doxygen/doc/html/TorqueControlAccuracy_8h_source.html @@ -0,0 +1,148 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-accuracy/TorqueControlAccuracy.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlAccuracy.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _TORQUEACCURACY_H_
+
22 #define _TORQUEACCURACY_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
52 class TorqueControlAccuracy : public yarp::robottestingframework::TestCase {
+
53 public:
+ +
55  virtual ~TorqueControlAccuracy();
+
56 
+
57  virtual bool setup(yarp::os::Property& property);
+
58 
+
59  virtual void tearDown();
+
60 
+
61  virtual void run();
+
62 
+
63  bool goHome();
+
64  void executeCmd();
+
65  void setMode(int desired_mode);
+
66  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
67 
+
68 private:
+
69  std::string m_robotName;
+
70  std::string m_partName;
+
71  int* m_jointsList;
+
72  int m_cycles;
+
73  double m_sampleTime;
+
74  double* m_zeros;
+
75  double m_step;
+
76  int m_n_part_joints;
+
77  int m_n_cmd_joints;
+
78  yarp::os::Bottle m_dataToSave;
+
79 
+
80  yarp::dev::PolyDriver *dd;
+
81  yarp::dev::IPositionControl *ipos;
+
82  yarp::dev::IControlMode *icmd;
+
83  yarp::dev::IInteractionMode *iimd;
+
84  yarp::dev::IEncoders *ienc;
+
85  yarp::dev::ITorqueControl *itrq;
+
86 
+
87  double m_cmd_single;
+
88  double* m_encoders;
+
89  double* m_torques;
+
90 };
+
91 
+
92 #endif
+
This tests checks the a torque PID response, sending a step reference signal with a setRefTorque comm...
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlConsistency_8cpp_source.html b/doxygen/doc/html/TorqueControlConsistency_8cpp_source.html new file mode 100644 index 00000000..36ee142b --- /dev/null +++ b/doxygen/doc/html/TorqueControlConsistency_8cpp_source.html @@ -0,0 +1,396 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-consistency/TorqueControlConsistency.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlConsistency.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/os/Property.h>
+
26 
+
27 #include "TorqueControlConsistency.h"
+
28 
+
29 //example1 -v -t TorqueControlConsistency.dll -p "--robot icub --part head --joints ""(0)"" --zero 0"
+
30 //example2 -v -t TorqueControlConsistency.dll -p "--robot icub --part head --joints ""(0 1 2)"" --zero 0 "
+
31 //example3 -v -t TorqueControlConsistency.dll -p "--robot icub --part head --joints ""(0 1 2 3 4 5)"" --zero 0"
+
32 
+
33 using namespace robottestingframework;
+
34 using namespace yarp::os;
+
35 using namespace yarp::dev;
+
36 
+
37 // prepare the plugin
+
38 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(TorqueControlConsistency)
+
39 
+
40 TorqueControlConsistency::TorqueControlConsistency() : yarp::robottestingframework::TestCase("TorqueControlConsistency") {
+
41  jointsList=0;
+
42  pos_tot=0;
+
43  dd=0;
+
44  ipos=0;
+
45  iamp=0;
+
46  icmd=0;
+
47  iimd=0;
+
48  ienc=0;
+
49  itrq=0;
+
50  cmd_some=0;
+
51  cmd_tot=0;
+
52  prevcurr_some=0;
+
53  prevcurr_tot=0;
+
54 }
+
55 
+
56 TorqueControlConsistency::~TorqueControlConsistency() { }
+
57 
+
58 bool TorqueControlConsistency::setup(yarp::os::Property& property) {
+
59 
+
60  //updating the test name
+
61  if(property.check("name"))
+
62  setName(property.find("name").asString());
+
63 
+
64  // updating parameters
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("zero"), "The zero position must be given as the test parameter!");
+
69 
+
70  robotName = property.find("robot").asString();
+
71  partName = property.find("part").asString();
+
72 
+
73  zero = property.find("zero").asFloat64();
+
74 
+
75  Bottle* jointsBottle = property.find("joints").asList();
+
76  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
77  n_cmd_joints = jointsBottle->size();
+
78  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0,"invalid number of joints, it must be >0");
+
79 
+
80  Property options;
+
81  options.put("device", "remote_controlboard");
+
82  options.put("remote", "/"+robotName+"/"+partName);
+
83  options.put("local", "/TorqueControlConsistencyTest/"+robotName+"/"+partName);
+
84 
+
85  dd = new PolyDriver(options);
+
86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(itrq),"Unable to open torque control interface");
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iamp),"Unable to open ampliefier interface");
+
90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
93 
+
94  if (!ienc->getAxes(&n_part_joints))
+
95  {
+
96  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
97  }
+
98 
+
99  if (n_part_joints<=0)
+
100  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Error this part has in invalid (<=0) number of jonits");
+
101  else if (jointsBottle->size() == 1)
+
102  cmd_mode=single_joint;
+
103  else if (jointsBottle->size() < n_part_joints)
+
104  cmd_mode=some_joints;
+
105  else if (jointsBottle->size() == n_part_joints)
+
106  cmd_mode=all_joints;
+
107  else
+
108  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("invalid joint selection?");
+
109 
+
110  cmd_tot = new double[n_part_joints];
+
111  pos_tot=new double[n_part_joints];
+
112  jointsList=new int[n_cmd_joints];
+
113  cmd_some=new double[n_cmd_joints];
+
114  prevcurr_tot=new double[n_part_joints];
+
115  prevcurr_some=new double[n_cmd_joints];
+
116  for (int i=0; i <n_cmd_joints; i++) jointsList[i]=jointsBottle->get(i).asInt32();
+
117 
+
118  return true;
+
119 }
+
120 
+
121 void TorqueControlConsistency::tearDown()
+
122 {
+
123  if (jointsList) {delete jointsList; jointsList =0;}
+
124  if (dd) {delete dd; dd =0;}
+
125 }
+
126 
+
127 void TorqueControlConsistency::setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
128 {
+
129  for (int i=0; i<n_cmd_joints; i++)
+
130  {
+
131  icmd->setControlMode(jointsList[i],desired_control_mode);
+
132  iimd->setInteractionMode(jointsList[i],desired_interaction_mode);
+
133  yarp::os::Time::delay(0.010);
+
134  }
+
135 }
+
136 
+
137 void TorqueControlConsistency::verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
138 {
+
139  int cmode;
+
140  yarp::dev::InteractionModeEnum imode;
+
141  int timeout = 0;
+
142 
+
143  while (1)
+
144  {
+
145  int ok=0;
+
146  for (int i=0; i<n_cmd_joints; i++)
+
147  {
+
148  icmd->getControlMode (jointsList[i],&cmode);
+
149  iimd->getInteractionMode(jointsList[i],&imode);
+
150  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok++;
+
151  }
+
152  if (ok==n_cmd_joints) break;
+
153  if (timeout>100)
+
154  {
+
155  char sbuf[500];
+
156  sprintf(sbuf,"Test (%s) failed: current mode is (%d,%d), it should be (%d,%d)",title.c_str(), desired_control_mode,desired_interaction_mode,cmode,imode);
+
157  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
158  }
+
159  yarp::os::Time::delay(0.2);
+
160  timeout++;
+
161  }
+
162  char sbuf[500];
+
163  sprintf(sbuf,"Test (%s) passed: current mode is (%d,%d)",title.c_str(), desired_control_mode,desired_interaction_mode);
+
164  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
165 }
+
166 
+
167 void TorqueControlConsistency::goHome()
+
168 {
+
169  for (int i=0; i<n_cmd_joints; i++)
+
170  {
+
171  ipos->setRefSpeed(jointsList[i],20.0);
+
172  ipos->positionMove(jointsList[i],zero);
+
173  }
+
174 
+
175  int timeout = 0;
+
176  while (1)
+
177  {
+
178  int in_position=0;
+
179  for (int i=0; i<n_cmd_joints; i++)
+
180  {
+
181  ienc->getEncoder(jointsList[i],&pos_tot[jointsList[i]]);
+
182  if (fabs(pos_tot[jointsList[i]]-zero)<0.5) in_position++;
+
183  }
+
184  if (in_position==n_cmd_joints) break;
+
185  if (timeout>100)
+
186  {
+
187  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching zero position");
+
188  }
+
189  yarp::os::Time::delay(0.2);
+
190  timeout++;
+
191  }
+
192 }
+
193 
+
194 void TorqueControlConsistency::setRefTorque(double value)
+
195 {
+
196  cmd_single=value;
+
197  if (cmd_mode==single_joint)
+
198  {
+
199  for (int i=0; i<n_cmd_joints; i++)
+
200  {
+
201  itrq->setRefTorque(jointsList[i],cmd_single);
+
202  }
+
203  }
+
204  else if (cmd_mode==some_joints)
+
205  {
+
206  //same of single_joint, since multiple joint is not currently supported
+
207  for (int i=0; i<n_cmd_joints; i++)
+
208  {
+
209  itrq->setRefTorque(jointsList[i],cmd_single);
+
210  }
+
211  }
+
212  else if (cmd_mode==all_joints)
+
213  {
+
214  for (int i=0; i<n_part_joints; i++)
+
215  {
+
216  cmd_tot[i]=cmd_single;
+
217  }
+
218  itrq->setRefTorques(cmd_tot);
+
219  }
+
220  else
+
221  {
+
222  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
223  }
+
224  yarp::os::Time::delay(0.010);
+
225 }
+
226 
+
227 void TorqueControlConsistency::verifyRefTorque(double verify_val, std::string title)
+
228 {
+
229  double value;
+
230  char sbuf[500];
+
231  if (cmd_mode==single_joint)
+
232  {
+
233  for (int i=0; i<n_cmd_joints; i++)
+
234  {
+
235  itrq->getRefTorque(jointsList[i],&value);
+
236  if (value==verify_val)
+
237  {
+
238  sprintf(sbuf,"Test (%s) passed, j%d current reference is (%f)",title.c_str(),i, verify_val);
+
239  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
240  }
+
241  else
+
242  {
+
243  sprintf(sbuf,"Test (%s) failed: current reference is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
244  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
245  }
+
246  }
+
247  }
+
248  else if (cmd_mode==some_joints)
+
249  {
+
250  //same of single_joint, since multiple joint is not currently supported
+
251  for (int i=0; i<n_cmd_joints; i++)
+
252  {
+
253  itrq->getRefTorque(jointsList[i],&value);
+
254  if (value==verify_val)
+
255  {
+
256  sprintf(sbuf,"Test (%s) passed j%d current reference is (%f)",title.c_str(),i, verify_val);
+
257  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
258  }
+
259  else
+
260  {
+
261  sprintf(sbuf,"Test (%s) failed: current reference is (%f), it should be (%f)",title.c_str(), value, verify_val);
+
262  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
263  }
+
264  }
+
265  }
+
266  else if (cmd_mode==all_joints)
+
267  {
+
268  int ok=0;
+
269  itrq->getRefTorques(cmd_tot);
+
270  for (int i=0; i<n_part_joints; i++)
+
271  {
+
272  if (verify_val==cmd_tot[i]) ok++;
+
273  }
+
274  if (ok==n_part_joints)
+
275  {
+
276  sprintf(sbuf,"Test (%s) passed, current reference is (%f)",title.c_str(), verify_val);
+
277  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
278  }
+
279  else
+
280  {
+
281  sprintf(sbuf,"Test (%s) failed: only %d joints (of %d) are ok",title.c_str(),ok,n_part_joints);
+
282  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
283  }
+
284  }
+
285  else
+
286  {
+
287  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid cmd_mode");
+
288  }
+
289  yarp::os::Time::delay(0.010);
+
290 }
+
291 
+
292 void TorqueControlConsistency::run()
+
293 {
+
294  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
295  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test0");
+
296  goHome();
+
297 
+
298  setMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF);
+
299  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test1");
+
300  setRefTorque(0.1);
+
301  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test2");
+
302  verifyRefTorque(0.1,"test2a");
+
303  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test2b");
+
304 
+
305  setRefTorque(0);
+
306  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test3");
+
307  verifyRefTorque(0,"test3a");
+
308  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test3b");
+
309  setRefTorque(-0.1);
+
310  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test4");
+
311  verifyRefTorque(-0.1,"test4a");
+
312  verifyMode(VOCAB_CM_TORQUE,VOCAB_IM_STIFF,"test4b");
+
313 
+
314  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
315  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test5");
+
316  goHome();
+
317 
+
318 }
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlConsistency_8h_source.html b/doxygen/doc/html/TorqueControlConsistency_8h_source.html new file mode 100644 index 00000000..ff8f4f83 --- /dev/null +++ b/doxygen/doc/html/TorqueControlConsistency_8h_source.html @@ -0,0 +1,163 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-consistency/TorqueControlConsistency.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlConsistency.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _TORQUECONTORLCONSISTENCY_H_
+
22 #define _TORQUECONTORLCONSISTENCY_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
29 class TorqueControlConsistency : public yarp::robottestingframework::TestCase {
+
30 public:
+
31  TorqueControlConsistency();
+
32  virtual ~TorqueControlConsistency();
+
33 
+
34  virtual bool setup(yarp::os::Property& property);
+
35 
+
36  virtual void tearDown();
+
37 
+
38  virtual void run();
+
39 
+
40  void goHome();
+
41  void executeCmd();
+
42  void setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
43  void verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
44  void setRefTorque(double value);
+
45  void verifyRefTorque(double value, std::string title);
+
46 
+
47  void zeroCurrentLimits();
+
48  void getOriginalCurrentLimits();
+
49  void resetOriginalCurrentLimits();
+
50 
+
51 private:
+
52  std::string robotName;
+
53  std::string partName;
+
54  int* jointsList;
+
55 
+
56  double zero;
+
57  int n_part_joints;
+
58  int n_cmd_joints;
+
59  enum cmd_mode_t
+
60  {
+
61  single_joint = 0,
+
62  all_joints = 1,
+
63  some_joints =2
+
64  } cmd_mode;
+
65 
+
66  yarp::dev::PolyDriver *dd;
+
67  yarp::dev::IPositionControl *ipos;
+
68  yarp::dev::IAmplifierControl *iamp;
+
69  yarp::dev::IControlMode *icmd;
+
70  yarp::dev::IInteractionMode *iimd;
+
71  yarp::dev::IEncoders *ienc;
+
72  yarp::dev::ITorqueControl *itrq;
+
73 
+
74  double cmd_single;
+
75  double* cmd_tot;
+
76  double* cmd_some;
+
77 
+
78  double prevcurr_single;
+
79  double* prevcurr_tot;
+
80  double* prevcurr_some;
+
81 
+
82  double* pos_tot;
+
83 };
+
84 
+
85 #endif //_TORQUECONTORLCONSISTENCY_H
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlGravityConsistency_8cpp_source.html b/doxygen/doc/html/TorqueControlGravityConsistency_8cpp_source.html new file mode 100644 index 00000000..bd211f4f --- /dev/null +++ b/doxygen/doc/html/TorqueControlGravityConsistency_8cpp_source.html @@ -0,0 +1,227 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-gravityConsistency/TorqueControlGravityConsistency.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlGravityConsistency.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 
+
22 #include <math.h>
+
23 #include <robottestingframework/TestAssert.h>
+
24 #include <robottestingframework/dll/Plugin.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <yarp/sig/Vector.h>
+
28 
+
29 #include "TorqueControlGravityConsistency.h"
+
30 
+
31 using namespace robottestingframework;
+
32 using namespace yarp::os;
+
33 using namespace yarp::dev;
+
34 using namespace yarp::sig;
+
35 
+
36 // prepare the plugin
+
37 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(TorqueControlGravityConsistency)
+
38 
+
39 TorqueControlGravityConsistency::TorqueControlGravityConsistency() : yarp::robottestingframework::TestCase("TorqueControlGravityConsistency"),
+
40  yarpRobot(0)
+
41 {
+
42 
+
43 }
+
44 
+
45 TorqueControlGravityConsistency::~TorqueControlGravityConsistency()
+
46 {
+
47 }
+
48 
+
49 bool TorqueControlGravityConsistency::setup(yarp::os::Property& property)
+
50 {
+
51  yarp::os::ResourceFinder & rf = yarp::os::ResourceFinder::getResourceFinderSingleton();
+
52 
+
53  yarp::os::Property yarpWbiConfiguration;
+
54  std::string yarpWbiConfigurationFile;
+
55  if(property.check("wbi_conf_file") && property.find("wbi_conf_file").isString())
+
56  {
+
57  yarpWbiConfigurationFile = rf.findFileByName(property.find("wbi_conf_file").asString());
+
58  }
+
59  else
+
60  {
+
61  yarpWbiConfigurationFile = rf.findFileByName("yarpWholeBodyInterface.ini");
+
62  }
+
63 
+
64  //It may be convenient to overload some option of the configuration file,
+
65  // so we load in the yarpWbiConfiguration also the option passed in the command line
+
66  yarpWbiConfiguration.fromConfigFile(yarpWbiConfigurationFile);
+
67 
+
68  yarpWbiConfiguration.fromString(property.toString().c_str(),false);
+
69 
+
70  // Create yarpWholeBodyInterface
+
71  std::string localName = "wbiTest";
+
72  if( property.check("local") )
+
73  {
+
74  localName = property.find("local").asString();
+
75  }
+
76 
+
77  wbi::wholeBodyInterface *yarpRobot = new yarpWbi::yarpWholeBodyInterface (localName.c_str(), yarpWbiConfiguration);
+
78 
+
79  wbi::IDList RobotMainJoints;
+
80  std::string RobotMainJointsListName = "ROBOT_TORQUE_CONTROL_JOINTS";
+
81  if( !yarpWbi::loadIdListFromConfig(RobotMainJointsListName,yarpWbiConfiguration,RobotMainJoints) )
+
82  {
+
83  fprintf(stderr, "[ERR] yarpWholeBodyInterface: impossible to load wbiId joint list with name %s\n",RobotMainJointsListName.c_str());
+
84  return false;
+
85  }
+
86 
+
87  yarpRobot->addJoints(RobotMainJoints);
+
88 
+
89  std::cout << "Joints added, calling init method" << std::endl;
+
90 
+
91  if(!yarpRobot->init())
+
92  {
+
93  std::cout << "Error: init() method failed" << std::endl;
+
94  return false;
+
95  }
+
96 
+
97  Time::delay(0.5);
+
98 
+
99  return true;
+
100 }
+
101 
+
102 void TorqueControlGravityConsistency::tearDown()
+
103 {
+
104  yarpRobot->close();
+
105  delete yarpRobot;
+
106  yarpRobot = 0;
+
107 }
+
108 
+
109 void TorqueControlGravityConsistency::run()
+
110 {
+
111  //Get the number of controlled degrees of freedom of the robot
+
112  int dof = yarpRobot->getDoFs();
+
113  printf("Number of (internal) controlled DoFs: %d\n", dof);
+
114 
+
115  //Allocate yarp vector of the right dimensions
+
116  Vector q(dof), trqMeasured(dof), trqGravity(dof), generalizedBiasForces(dof+6), dq(dof);
+
117 
+
118  //Read position and torque estimates
+
119  yarpRobot->getEstimates(wbi::ESTIMATE_JOINT_POS, q.data());
+
120  yarpRobot->getEstimates(wbi::ESTIMATE_JOINT_VEL, dq.data());
+
121  yarpRobot->getEstimates(wbi::ESTIMATE_JOINT_TORQUE, trqMeasured.data());
+
122 
+
123  // Compute gravity compensation torques
+
124  wbi::Frame world2base;
+
125  world2base.identity();
+
126  Vector baseTwist(6);
+
127  baseTwist.zero();
+
128 
+
129  double m_gravity[3];
+
130  m_gravity[0] = 0;
+
131  m_gravity[1] = 0;
+
132  m_gravity[2] = -9.81;
+
133 
+
134  yarpRobot->computeGeneralizedBiasForces(q.data(),world2base,dq.data(),baseTwist.data(),m_gravity,generalizedBiasForces.data());
+
135 
+
136  // We extract the joint torques from the generalized bias forces
+
137  trqGravity = generalizedBiasForces.subVector(6,6+dof-1);
+
138 
+
139  for(size_t i=0; i < dof; i++)
+
140  {
+
141  wbi::ID wbiID;
+
142  yarpRobot->getJointList().indexToID(i,wbiID);
+
143  std::cerr << "Joint " << wbiID.toString() << " : " << std::endl;
+
144  std::cerr << "\t Measured torque: " << trqMeasured[i] << "Nm" << std::endl;
+
145  std::cerr << "\t Gravity torque: " << trqGravity[i] << "Nm" << std::endl;
+
146  std::cerr << "\t Difference : " << trqMeasured[i]-trqGravity[i] << "Nm" << std::endl;
+
147  }
+
148 }
+
The test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to...
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlGravityConsistency_8h_source.html b/doxygen/doc/html/TorqueControlGravityConsistency_8h_source.html new file mode 100644 index 00000000..19efe8f7 --- /dev/null +++ b/doxygen/doc/html/TorqueControlGravityConsistency_8h_source.html @@ -0,0 +1,127 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-gravityConsistency/TorqueControlGravityConsistency.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlGravityConsistency.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef TORQUECONTROLGRAVITYCONSISTENCY_H_
+
22 #define TORQUECONTROLGRAVITYCONSISTENCY_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
29 #include <yarpWholeBodyInterface/yarpWholeBodyInterface.h>
+
30 
+
45 class TorqueControlGravityConsistency : public yarp::robottestingframework::TestCase
+
46 {
+
47 public:
+ +
49 
+ +
51 
+
52  virtual bool setup(yarp::os::Property& property);
+
53 
+
54  virtual void tearDown();
+
55 
+
56  virtual void run();
+
57 
+
58 private:
+
59  yarpWbi::yarpWholeBodyInterface * yarpRobot;
+
60 };
+
61 
+
62 #endif
+
The test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to...
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlStiffDampCheck_8cpp_source.html b/doxygen/doc/html/TorqueControlStiffDampCheck_8cpp_source.html new file mode 100644 index 00000000..b072b735 --- /dev/null +++ b/doxygen/doc/html/TorqueControlStiffDampCheck_8cpp_source.html @@ -0,0 +1,634 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-stiffDampCheck/TorqueControlStiffDampCheck.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlStiffDampCheck.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/robottestingframework/TestAsserter.h>
+
25 #include <yarp/os/Time.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <yarp/os/LogStream.h>
+
28 #include <yarp/os/ResourceFinder.h>
+
29 //#include <iostream>
+
30 //#include <yarp/manager/localbroker.h>
+
31 //#include <cstdlib>
+
32 
+
33 
+
34 
+
35 #include <fstream>
+
36 #include <algorithm> // std::replace
+
37 
+
38 
+
39 #include "TorqueControlStiffDampCheck.h"
+
40 
+
41 
+
42 using namespace robottestingframework;
+
43 
+
44 using namespace yarp::dev;
+
45 using namespace std;
+
46 
+
47 // prepare the plugin
+
48 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(TorqueControlStiffDampCheck)
+
49 
+
50 TorqueControlStiffDampCheck::TorqueControlStiffDampCheck() : yarp::robottestingframework::TestCase("TorqueControlStiffDampCheck") {
+
51  jointsList=0;
+
52  dd=0;
+
53  ipos=0;
+
54  iamp=0;
+
55  icmd=0;
+
56  iimd=0;
+
57  ienc=0;
+
58  itrq=0;
+
59  damping=0;
+
60  stiffness=0;
+
61  home=0;
+
62  n_part_joints=0;
+
63  n_cmd_joints=0;
+
64  plot_enabled = false;
+
65 }
+
66 
+
67 TorqueControlStiffDampCheck::~TorqueControlStiffDampCheck() { }
+
68 
+
69 bool TorqueControlStiffDampCheck::setup(yarp::os::Property& property) {
+
70 
+
71  //updating the test name
+
72  if(property.check("name"))
+
73  setName(property.find("name").asString());
+
74 
+
75  // updating parameters
+
76  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
77  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
78  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
79  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position list must be given as the test parameter!");
+
80  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("stiffness"),"The stiffness list must be given as the test parameter!");
+
81  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("damping"), "The damping listmust be given as the test parameter!");
+
82  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("duration"), "The duration must be given as the test parameter!");
+
83 
+
84  robotName = property.find("robot").asString();
+
85  partName = property.find("part").asString();
+
86 
+
87 
+
88 
+
89  Bottle* jointsBottle = property.find("joints").asList();
+
90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
91  n_cmd_joints = jointsBottle->size();
+
92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0,"invalid number of joints, it must be >0");
+
93 
+
94  Bottle *b_stiff = property.find("stiffness").asList();
+
95  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(b_stiff!=0,"unable to parse stiffness parameter");
+
96  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE((b_stiff->size()==n_cmd_joints), Asserter::format("invalid number of stiffness values %d %d", b_stiff->size(), n_cmd_joints));
+
97 
+
98  Bottle *b_dump = property.find("damping").asList();
+
99  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(b_dump!=0,"unable to parse damping parameter");
+
100  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(b_dump->size()==n_cmd_joints,"invalid number of damping values");
+
101 
+
102  Bottle *b_home = property.find("home").asList();
+
103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(b_home!=0,"unable to parse home parameter");
+
104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(b_home->size()==n_cmd_joints,"invalid number of home values");
+
105 
+
106  testLen_sec = property.find("duration").asFloat64();
+
107  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(testLen_sec>0, "duretion should be bigger than 0");
+
108 
+
109  if(property.check("plot_enabled"))
+
110  {
+
111  plot_enabled = property.find("plot_enabled").asBool();
+
112  }
+
113  if(plot_enabled)
+
114  yInfo() << "Plot is enabled: the test will run octave and plot test result ";
+
115  else
+
116  yInfo() << "Plot is not enabled. The test collects only data. The user need to plot data to theck if test has successed.";
+
117 
+
118  Property options;
+
119  options.put("device", "remote_controlboard");
+
120  options.put("remote", "/"+robotName+"/"+partName);
+
121  options.put("local", "/TorqueControlStiffDampCheckTest/"+robotName+"/"+partName);
+
122 
+
123  dd = new PolyDriver(options);
+
124  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
125  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(itrq),"Unable to open torque control interface");
+
126  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
127  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iamp),"Unable to open ampliefier interface");
+
128  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
129  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
130  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
131  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimp),"Unable to open impedence control interface");
+
132 
+
133 
+
134  if (!ienc->getAxes(&n_part_joints))
+
135  {
+
136  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
137  }
+
138 
+
139  if(n_part_joints<=0)
+
140  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Error this part has in invalid (<=0) number of jonits");
+
141 
+
142 
+
143 
+
144  jointsList=new int[n_cmd_joints];
+
145  stiffness=new double[n_cmd_joints];
+
146  damping=new double[n_cmd_joints];
+
147  pos_tot=new double[n_cmd_joints];
+
148  home=new double[n_cmd_joints];
+
149 
+
150  for (int i=0; i <n_cmd_joints; i++) jointsList[i]=jointsBottle->get(i).asInt32();
+
151  for (int i=0; i <n_cmd_joints; i++) stiffness[i]=b_stiff->get(i).asFloat64();
+
152  for (int i=0; i <n_cmd_joints; i++) damping[i]=b_dump->get(i).asFloat64();
+
153  for (int i=0; i <n_cmd_joints; i++) home[i]=b_home->get(i).asFloat64();
+
154  return true;
+
155 }
+
156 
+
157 void TorqueControlStiffDampCheck::tearDown()
+
158 {
+
159  if (jointsList) {delete jointsList; jointsList =0;}
+
160  if (stiffness) {delete stiffness; stiffness =0;}
+
161  if (damping) {delete damping; damping =0;}
+
162  if (dd) {delete dd; dd =0;}
+
163 }
+
164 
+
165 void TorqueControlStiffDampCheck::setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
+
166 {
+
167  for (int i=0; i<n_cmd_joints; i++)
+
168  {
+
169  icmd->setControlMode(jointsList[i],desired_control_mode);
+
170  iimd->setInteractionMode(jointsList[i],desired_interaction_mode);
+
171  yarp::os::Time::delay(0.010);
+
172  }
+
173 }
+
174 
+
175 void TorqueControlStiffDampCheck::verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
+
176 {
+
177  int cmode;
+
178  yarp::dev::InteractionModeEnum imode;
+
179  int timeout = 0;
+
180 
+
181  while (1)
+
182  {
+
183  int ok=0;
+
184  for (int i=0; i<n_cmd_joints; i++)
+
185  {
+
186  icmd->getControlMode (jointsList[i],&cmode);
+
187  iimd->getInteractionMode(jointsList[i],&imode);
+
188  if (cmode==desired_control_mode && imode==desired_interaction_mode) ok++;
+
189  }
+
190  if (ok==n_cmd_joints) break;
+
191  if (timeout>100)
+
192  {
+
193  char sbuf[800];
+
194  sprintf(sbuf,"Test (%s) failed: current mode is (%s,%s), it should be (%s,%s)",title.c_str(),
+
195  Vocab32::decode((NetInt32)desired_control_mode).c_str(),
+
196  Vocab32::decode((NetInt32)desired_interaction_mode).c_str(),
+
197  Vocab32::decode((NetInt32)cmode).c_str(),
+
198  Vocab32::decode((NetInt32)imode).c_str());
+
199  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(sbuf);
+
200  }
+
201  yarp::os::Time::delay(0.2);
+
202  timeout++;
+
203  }
+
204  char sbuf[500];
+
205  sprintf(sbuf,"Test (%s) passed: current mode is (%s,%s)",title.c_str(), Vocab32::decode((NetInt32)desired_control_mode).c_str(),
+
206  Vocab32::decode((NetInt32)desired_interaction_mode).c_str());
+
207  ROBOTTESTINGFRAMEWORK_TEST_REPORT(sbuf);
+
208 }
+
209 
+
210 void TorqueControlStiffDampCheck::goHome()
+
211 {
+
212  for (int i=0; i<n_cmd_joints; i++)
+
213  {
+
214  ipos->setRefSpeed(jointsList[i],20.0);
+
215  ipos->positionMove(jointsList[i],home[i]);
+
216  }
+
217 
+
218  int timeout = 0;
+
219  while (1)
+
220  {
+
221  int in_position=0;
+
222  for (int i=0; i<n_cmd_joints; i++)
+
223  {
+
224  ienc->getEncoder(jointsList[i],&pos_tot[i]);
+
225  if (fabs(pos_tot[i]-home[i])<0.8) in_position++;
+
226  }
+
227  if (in_position==n_cmd_joints) break;
+
228  if (timeout>100)
+
229  {
+
230  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching home[i] position");
+
231  }
+
232  yarp::os::Time::delay(0.2);
+
233  timeout++;
+
234  }
+
235 }
+
236 
+
237 bool TorqueControlStiffDampCheck::setAndCheckImpedance(int joint, double stiffness, double damping)
+
238 {
+
239  iimp->setImpedance(joint, stiffness, damping);
+
240  yarp::os::Time::delay(0.01);
+
241  double readStiff, readDump;
+
242  iimp->getImpedance(joint, &readStiff, &readDump);
+
243 
+
244  double th = stiffness/100;
+
245  bool r1 = yarp::robottestingframework::TestAsserter::isApproxEqual(readStiff, stiffness, th, th);
+
246  th = damping/100;
+
247  bool r2 = yarp::robottestingframework::TestAsserter::isApproxEqual(readDump, damping, th, th);
+
248 
+
249  if(!r1 || !r2)
+
250  {
+
251  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("J %d: set stiff=%f dump=%f. Read stiff=%f dump=%f ",joint, stiffness, damping, readStiff, readDump));
+
252  return false;
+
253  }
+
254 
+
255  return true;
+
256 }
+
257 
+
258 void TorqueControlStiffDampCheck::saveToFile(std::string filename, yarp::os::Bottle &b)
+
259 {
+
260  std::fstream fs;
+
261  fs.open (filename.c_str(), std::fstream::out);
+
262 
+
263  for (int i=0; i<b.size(); i++)
+
264  {
+
265  std::string s = b.get(i).toString();
+
266  std::replace(s.begin(), s.end(), '(', ' ');
+
267  std::replace(s.begin(), s.end(), ')', ' ');
+
268  fs << s << endl;
+
269  }
+
270 
+
271  fs.close();
+
272 }
+
273 
+
274 
+
275 std::string TorqueControlStiffDampCheck::getPath(const std::string& str)
+
276 {
+
277  size_t found;
+
278  found=str.find_last_of("/\\");
+
279  return(str.substr(0,found));
+
280 }
+
281 
+
282 
+
283 void TorqueControlStiffDampCheck::run()
+
284 {
+
285  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
286  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test0");
+
287 
+
288  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("try to move joints in home positions"));
+
289  goHome();
+
290 
+
291  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("try to set compliant mode"));
+
292  setMode(VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT);
+
293  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_COMPLIANT,"test1");
+
294 
+
295  for (int i=0; i<n_cmd_joints; i++)
+
296  {
+
297 
+
298  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("***** Start first part of test on joint %d......", jointsList[i]));
+
299  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(setAndCheckImpedance(jointsList[i], stiffness[i], 0) , Asserter::format("Error setting impedance on j %d", jointsList[i]));
+
300 
+
301 
+
302 
+
303  //get initila torque
+
304  double init_torque;
+
305  itrq->getTorque(jointsList[i], &init_torque);
+
306  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Now the user should move the joint....the test will collect values of position and torque. Press a char to continue....");
+
307  char c;
+
308  int unused = scanf("%c", &c);
+
309  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("startingto collact data of joint %d......", jointsList[i]));
+
310 
+
311  double start_time = yarp::os::Time::now();
+
312  double curr_time = start_time;
+
313  while(curr_time < start_time+testLen_sec)
+
314  {
+
315  double curr_pos, torque, reftrq;
+
316  ienc->getEncoder(jointsList[i], &curr_pos);
+
317  itrq->getTorque(jointsList[i], &torque);
+
318  itrq->getRefTorque(jointsList[i], &reftrq);
+
319 
+
320  Bottle& row = b_pos_trq.addList();
+
321  row.addFloat64(curr_pos-home[i]);
+
322  row.addFloat64(torque- init_torque);
+
323  row.addFloat64(reftrq);
+
324  yarp::os::Time::delay(0.01);
+
325  curr_time = yarp::os::Time::now();
+
326  }
+
327 
+
328  string testfilename = "posVStrq_";
+
329  Bottle b;
+
330  b.addInt32(jointsList[i]);
+
331  string filename1 = testfilename + partName + "_j" + b.toString().c_str() + ".txt";
+
332  saveToFile(filename1,b_pos_trq);
+
333  b_pos_trq.clear();
+
334 
+
335 
+
336  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("....DONE on joint %d", jointsList[i]));
+
337  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("***** Start second part of test on joint %d......", jointsList[i]));
+
338  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(setAndCheckImpedance(jointsList[i], 0, damping[i]) , Asserter::format("Error setting impedance on j %d", jointsList[i]));
+
339 
+
340  itrq->getTorque(jointsList[i], &init_torque);
+
341  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Now the user should move the joint....the test will collect values of position and torque. Press a char to continue....");
+
342 
+
343  unused = scanf("%c", &c);
+
344 
+
345  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("startingto collact data of joint %d......", jointsList[i]));
+
346 
+
347  start_time = yarp::os::Time::now();
+
348  curr_time = start_time;
+
349  while(curr_time < start_time+testLen_sec)
+
350  {
+
351  double curr_vel, torque, reftrq;
+
352  ienc->getEncoderSpeed(jointsList[i], &curr_vel);
+
353  itrq->getTorque(jointsList[i], &torque);
+
354  itrq->getRefTorque(jointsList[i], &reftrq);
+
355 
+
356  Bottle& row = b_vel_trq.addList();
+
357  row.addFloat64(curr_vel);
+
358  row.addFloat64(torque- init_torque);
+
359  row.addFloat64(reftrq);
+
360  yarp::os::Time::delay(0.01);
+
361  curr_time = yarp::os::Time::now();
+
362  }
+
363 
+
364  testfilename = "velVStrq_";
+
365  Bottle b1;
+
366  b1.addInt32(jointsList[i]);
+
367  filename1 = testfilename + partName + "_j" + b1.toString().c_str() + ".txt";
+
368  saveToFile(filename1,b_vel_trq);
+
369  b_vel_trq.clear();
+
370  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("....DONE on joint %d", jointsList[i]));
+
371 
+
372  }//end for
+
373 
+
374  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Test ended. Puts joints in pos stiff and moves them to home pos");
+
375  setMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF);
+
376  verifyMode(VOCAB_CM_POSITION,VOCAB_IM_STIFF,"test2");
+
377 
+
378  goHome();
+
379 
+
380  yarp::os::ResourceFinder rf;
+
381  rf.setDefaultContext("scripts");
+
382 
+
383  //find octave scripts
+
384  std::string octaveFile = rf.findFile("torqueStiffDamp_plotAll.m");
+
385  if(octaveFile.size() == 0)
+
386  {
+
387  yError()<<"Cannot find file encoderConsistencyPlotAll.m";
+
388  return;
+
389  }
+
390 
+
391  //prepare octave command
+
392  std::string octaveCommand= "octave --path "+ getPath(octaveFile);
+
393 
+
394  //transform stiffness, damping and jointslist in a vector string for octave
+
395  stringstream ss_stifness, ss_damping, ss_joints;
+
396  ss_stifness << "[";
+
397  ss_damping << "[";
+
398  ss_joints << "[";
+
399  for(int j=0; j<n_cmd_joints-1; j++)
+
400  {
+
401  ss_stifness << stiffness[j] <<", ";
+
402  ss_damping << damping[j] <<", ";
+
403  ss_joints << jointsList[j] <<", ";
+
404 
+
405  }
+
406  ss_stifness << stiffness[n_cmd_joints-1] << "]";
+
407  ss_damping << damping[n_cmd_joints-1] << "]";
+
408  ss_joints << jointsList[n_cmd_joints-1] << "]";
+
409 
+
410  stringstream ss;
+
411  ss << n_cmd_joints << ", "<< ss_stifness.str() << ", " << ss_damping.str() << ", " << ss_joints.str();
+
412  string str = ss.str();
+
413  octaveCommand+= " -q --eval \"torqueStiffDamp_plotAll('" +partName +"'," + str +")\" --persist";
+
414 
+
415  yInfo() << "octave cmd= " << octaveCommand;
+
416  if(plot_enabled)
+
417  {
+
418  int ret = system (octaveCommand.c_str());
+
419  }
+
420  else
+
421  {
+
422  yInfo() << "Test has collected all data. You need to plot data to check is test is passed";
+
423  yInfo() << "Please run following command to plot data.";
+
424  yInfo() << octaveCommand;
+
425  yInfo() << "To exit from Octave application please type 'exit' command.";
+
426  }
+
427 }
+
428 
+
429 
+
430 //void TorqueControlStiffDampCheck::run()
+
431 //{
+
434 
+
436 
+
439 
+
440 // for (int i=0; i<n_cmd_joints; i++)
+
441 // {
+
442 
+
443 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("***** Start first part of test on joint %d......", jointsList[i]));
+
444 // //ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(setAndCheckImpedance(jointsList[i], stiffness[i], 0) , Asserter::format("Error setting impedance on j %d", jointsList[i]));
+
445 
+
446 // ROBOTTESTINGFRAMEWORK_TEST_REPORT("Now the user should move the joint....the test will collect values of position and torque. Press a char to continue....");
+
447 // char c;
+
448 // scanf("%c", &c);
+
449 
+
450 // double start_time = yarp::os::Time::now();
+
451 // double curr_time = start_time;
+
452 // int x=0;
+
453 // while(curr_time < start_time+testLen_sec)
+
454 // {
+
455 // double curr_pos, torque;
+
456 // //ienc->getEncoder(jointsList[i], curr_pos);
+
457 // //itrq->getTorque(jointsList[i], torque);
+
458 
+
459 // Bottle& row = b_pos_trq.addList();
+
460 // //row.addFloat64(curr_pos-home[i], torque);
+
461 // row.addFloat64(x);
+
462 // row.addFloat64(10+x);
+
463 // yarp::os::Time::delay(0.01);
+
464 // curr_time = yarp::os::Time::now();
+
465 // x++;
+
466 // }
+
467 
+
468 // string testfilename = "posVStrq_";
+
469 // Bottle b;
+
470 // b.addInt32(jointsList[i]);
+
471 // string filename1 = testfilename + partName + "_j" + b.toString().c_str() + ".txt";
+
472 // saveToFile(filename1,b_pos_trq);
+
473 // b_pos_trq.clear();
+
474 
+
475 
+
476 
+
477 
+
478 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("***** Start second part of test on joint %d......", jointsList[i]));
+
479 // ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(setAndCheckImpedance(jointsList[i], 0, damping[i]) , Asserter::format("Error setting impedance on j %d", jointsList[i]));
+
480 
+
481 // ROBOTTESTINGFRAMEWORK_TEST_REPORT("Now the user should move the joint....the test will collect values of position and torque. Press a char to continue....");
+
482 
+
483 // scanf("%c", &c);
+
484 // x=1000;
+
485 // start_time = yarp::os::Time::now();
+
486 // curr_time = start_time;
+
487 // while(curr_time < start_time+testLen_sec)
+
488 // {
+
489 // double curr_vel, torque;
+
490 // //ienc->getEncoderSpeed(jointsList[i], curr_vel);
+
491 // //itrq->getTorque(jointsList[i], torque);
+
492 
+
493 // Bottle& row = b_vel_trq.addList();
+
494 // row.addFloat64(x);
+
495 // row.addFloat64(x+20);
+
496 // yarp::os::Time::delay(0.01);
+
497 // curr_time = yarp::os::Time::now();
+
498 // x++;
+
499 // }
+
500 
+
501 // testfilename = "velVStrq_";
+
502 // Bottle b1;
+
503 // b1.addInt32(jointsList[i]);
+
504 // filename1 = testfilename + partName + "_j" + b1.toString().c_str() + ".txt";
+
505 // saveToFile(filename1,b_vel_trq);
+
506 // b_vel_trq.clear();
+
507 
+
508 
+
509 // }//end for
+
510 
+
513 
+
515 
+
516 // yarp::os::ResourceFinder rf;
+
517 // rf.setDefaultContext("scripts");
+
518 
+
519 // //find octave scripts
+
520 // std::string octaveFile = rf.findFile("torqueStiffDamp_plotAll.m");
+
521 // if(octaveFile.size() == 0)
+
522 // {
+
523 // yError()<<"Cannot find file encoderConsistencyPlotAll.m";
+
524 // return;
+
525 // }
+
526 
+
527 // //prepare octave command
+
528 // std::string octaveCommand= "octave --path "+ getPath(octaveFile);
+
529 
+
530 // //transform stiffness, damping and jointslist in a vector string for octave
+
531 // stringstream ss_stifness, ss_damping, ss_joints;
+
532 // ss_stifness << "[";
+
533 // ss_damping << "[";
+
534 // ss_joints << "[";
+
535 // for(int j=0; j<n_cmd_joints-1; j++)
+
536 // {
+
537 // ss_stifness << stiffness[j] <<", ";
+
538 // ss_damping << damping[j] <<", ";
+
539 // ss_joints << jointsList[j] <<", ";
+
540 
+
541 // }
+
542 // ss_stifness << stiffness[n_cmd_joints-1] << "]";
+
543 // ss_damping << damping[n_cmd_joints-1] << "]";
+
544 // ss_joints << jointsList[n_cmd_joints-1] << "]";
+
545 
+
546 // stringstream ss;
+
547 // ss << n_cmd_joints << ", "<< ss_stifness.str() << ", " << ss_damping.str() << ", " << ss_joints.str();
+
548 // string str = ss.str();
+
549 // octaveCommand+= " -q --eval \"torqueStiffDamp_plotAll('" +partName +"'," + str +")\" --persist";
+
550 
+
551 // yInfo() << "octave cmd= " << octaveCommand;
+
552 // if(plot_enabled)
+
553 // {
+
554 // int ret = system (octaveCommand.c_str());
+
555 // }
+
556 // else
+
557 // {
+
558 // yInfo() << "Test has collected all data. You need to plot data to check is test is passed";
+
559 // yInfo() << "Please run following command to plot data.";
+
560 // yInfo() << octaveCommand;
+
561 // yInfo() << "To exit from Octave application please type 'exit' command.";
+
562 // }
+
563 
+
564 //}
+
+ + + + diff --git a/doxygen/doc/html/TorqueControlStiffDampCheck_8h_source.html b/doxygen/doc/html/TorqueControlStiffDampCheck_8h_source.html new file mode 100644 index 00000000..9cc84a90 --- /dev/null +++ b/doxygen/doc/html/TorqueControlStiffDampCheck_8h_source.html @@ -0,0 +1,155 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-stiffDampCheck/TorqueControlStiffDampCheck.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
TorqueControlStiffDampCheck.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _TORQUECONTORLSTIFFDAMPCHECK_H_
+
22 #define _TORQUECONTORLSTIFFDAMPCHECK_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 
+
29 
+
30 using namespace yarp::os;
+
31 
+
32 class TorqueControlStiffDampCheck : public yarp::robottestingframework::TestCase {
+
33 public:
+
34  TorqueControlStiffDampCheck();
+
35  virtual ~TorqueControlStiffDampCheck();
+
36 
+
37  virtual bool setup(yarp::os::Property& property);
+
38 
+
39  virtual void tearDown();
+
40 
+
41  virtual void run();
+
42 
+
43  void goHome();
+
44  void setMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
+
45  void verifyMode(int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title);
+
46  bool setAndCheckImpedance(int joint, double stiffness, double damping);
+
47  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
48  std::string getPath(const std::string& str);
+
49 
+
50 private:
+
51  std::string robotName;
+
52  std::string partName;
+
53  int* jointsList;
+
54  int n_part_joints;
+
55  int n_cmd_joints;
+
56  double *stiffness;
+
57  double *damping;
+
58  double *home;
+
59  double *pos_tot;
+
60  double testLen_sec;
+
61  Bottle b_pos_trq;
+
62  Bottle b_vel_trq;
+
63  bool plot_enabled;
+
64 
+
65 
+
66  yarp::dev::PolyDriver *dd;
+
67  yarp::dev::IPositionControl *ipos;
+
68  yarp::dev::IAmplifierControl *iamp;
+
69  yarp::dev::IControlMode *icmd;
+
70  yarp::dev::IInteractionMode *iimd;
+
71  yarp::dev::IEncoders *ienc;
+
72  yarp::dev::ITorqueControl *itrq;
+
73  yarp::dev::IImpedanceControl *iimp;
+
74 
+
75 };
+
76 
+
77 #endif //_TORQUECONTORLSTIFFDAMPCHECK_H
+
+ + + + diff --git a/doxygen/doc/html/annotated.html b/doxygen/doc/html/annotated.html new file mode 100644 index 00000000..be1d2407 --- /dev/null +++ b/doxygen/doc/html/annotated.html @@ -0,0 +1,100 @@ + + + + + + + +icub-test: Data Structures + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + + + + + + + + + + + + + + + + + + + + + + +
 CCameraTestCheck if a camera is publishing images at desired framerate
 CCartesianControlReachingToleranceTestThis test verifies the point-to-point cartesian movement
 CCartesianControlSimpleP2pMovementTestThis test verifies the point-to-point cartesian movement
 CControlModesThe test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct
 CDemoRedBallTestThis test verifies the point-to-point cartesian movement
 CExampleTestThis is just an example test, use it as a reference to implement new tests
 CFtSensorTestCheck if a FT sensor port is correctly publishing a vector with 6 values
 CGazeControlSimpleLookTestThis test verifies the simple gaze movements
 CImuThe purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements
 CJointLimitsCheck if the software joint limits are properly set
 CMotorEncodersSignCheckThis tests checks if the motor encoder readings increase when positive pwm is applayed to motor
 CMotorTestCheck IPositionControl and IEncoders
 CMovementReferencesTestCheck IPositionControl, IVelocityControl, IPWMControl, IPositionDirect
 COpticalEncodersConsistencyThis tests checks if the motor encoder reading are consistent with the joint encoder readings
 COpticalEncodersDriftThis tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max)
 CPositionControlAccuracyThis tests checks the a position PID response, sending a step reference signal with a positionDirect command
 CPositionControlAccuracyExernalPidThis tests checks the response of the system to a position step, sending directly PWM commands to a joint
 CPositionDirectThis tests checks the positionDirect control, sending a sinusoidal reference signal, with parametric frequency and amplitude
 CSensorsDuplicateReadingsCheck if a yarp port is correctly publishing unique values at each update
 CSkinWrapperTestThis test verifies the functionalities of skinWrapper after the removal of analogServer from icub-main
 CTorqueControlAccuracyThis tests checks the a torque PID response, sending a step reference signal with a setRefTorque command
 CTorqueControlGravityConsistencyThe test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the wholeBodyDynamics(Tree) running
+
+
+ + + + diff --git a/doxygen/doc/html/bc_s.png b/doxygen/doc/html/bc_s.png new file mode 100644 index 0000000000000000000000000000000000000000..224b29aa9847d5a4b3902efd602b7ddf7d33e6c2 GIT binary patch literal 676 zcmV;V0$crwP)y__>=_9%My z{n931IS})GlGUF8K#6VIbs%684A^L3@%PlP2>_sk`UWPq@f;rU*V%rPy_ekbhXT&s z(GN{DxFv}*vZp`F>S!r||M`I*nOwwKX+BC~3P5N3-)Y{65c;ywYiAh-1*hZcToLHK ztpl1xomJ+Yb}K(cfbJr2=GNOnT!UFA7Vy~fBz8?J>XHsbZoDad^8PxfSa0GDgENZS zuLCEqzb*xWX2CG*b&5IiO#NzrW*;`VC9455M`o1NBh+(k8~`XCEEoC1Ybwf;vr4K3 zg|EB<07?SOqHp9DhLpS&bzgo70I+ghB_#)K7H%AMU3v}xuyQq9&Bm~++VYhF09a+U zl7>n7Jjm$K#b*FONz~fj;I->Bf;ule1prFN9FovcDGBkpg>)O*-}eLnC{6oZHZ$o% zXKW$;0_{8hxHQ>l;_*HATI(`7t#^{$(zLe}h*mqwOc*nRY9=?Sx4OOeVIfI|0V(V2 zBrW#G7Ss9wvzr@>H*`r>zE z+e8bOBgqIgldUJlG(YUDviMB`9+DH8n-s9SXRLyJHO1!=wY^79WYZMTa(wiZ!zP66 zA~!21vmF3H2{ngD;+`6j#~6j;$*f*G_2ZD1E;9(yaw7d-QnSCpK(cR1zU3qU0000< KMNUMnLSTYoA~SLT literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/bdwn.png b/doxygen/doc/html/bdwn.png new file mode 100644 index 0000000000000000000000000000000000000000..940a0b950443a0bb1b216ac03c45b8a16c955452 GIT binary patch literal 147 zcmeAS@N?(olHy`uVBq!ia0vp^>_E)H!3HEvS)PKZC{Gv1kP61Pb5HX&C2wk~_T + + + + + + +icub-test: CameraTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
CameraTest Class Reference
+
+
+ +

Check if a camera is publishing images at desired framerate. + More...

+ +

#include <CameraTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

Check if a camera is publishing images at desired framerate.

+

Accepts the following parameters:

+ + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "CameraTest" No The name of the test. -
portname string - - Yes The yarp port name of the camera to test. -
measure_time int s 1 No The duration of the test.
expected_frequency int Hz 30 No The expected framerate of the camera.
tolerance int Number of frames 5 No The tolerance on the total number of frames read during the period (expected_frequency*measure_time) to consider the test sucessful.
+ +

Definition at line 44 of file CameraTest.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/camera/CameraTest.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/camera/CameraTest.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classCartesianControlReachingToleranceTest.html b/doxygen/doc/html/classCartesianControlReachingToleranceTest.html new file mode 100644 index 00000000..6cdab642 --- /dev/null +++ b/doxygen/doc/html/classCartesianControlReachingToleranceTest.html @@ -0,0 +1,112 @@ + + + + + + + +icub-test: CartesianControlReachingToleranceTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
CartesianControlReachingToleranceTest Class Reference
+
+
+ +

This test verifies the point-to-point cartesian movement. + More...

+ +

#include <CartesianControlReachingToleranceTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This test verifies the point-to-point cartesian movement.

+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - icubSim No robot name -
arm-type string - left No left or right -
+ +

Definition at line 40 of file CartesianControlReachingToleranceTest.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classCartesianControlSimpleP2pMovementTest.html b/doxygen/doc/html/classCartesianControlSimpleP2pMovementTest.html new file mode 100644 index 00000000..805700ca --- /dev/null +++ b/doxygen/doc/html/classCartesianControlSimpleP2pMovementTest.html @@ -0,0 +1,112 @@ + + + + + + + +icub-test: CartesianControlSimpleP2pMovementTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
CartesianControlSimpleP2pMovementTest Class Reference
+
+
+ +

This test verifies the point-to-point cartesian movement. + More...

+ +

#include <CartesianControlSimpleP2pMovementTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This test verifies the point-to-point cartesian movement.

+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - icubSim No robot name -
arm-type string - left No left or right -
+ +

Definition at line 39 of file CartesianControlSimpleP2pMovementTest.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classControlModes.html b/doxygen/doc/html/classControlModes.html new file mode 100644 index 00000000..a23d0df8 --- /dev/null +++ b/doxygen/doc/html/classControlModes.html @@ -0,0 +1,155 @@ + + + + + + + +icub-test: ControlModes Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
ControlModes Class Reference
+
+
+ +

The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. + More...

+ +

#include <ControlModes.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+void goHome ()
 
+void executeCmd ()
 
+void setMode (int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
 
+void verifyMode (int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
 
+void verifyAmplifier (int desired_amplifier_mode, std::string title)
 
+void zeroCurrentLimits ()
 
+void getOriginalCurrentLimits ()
 
+void resetOriginalCurrentLimits ()
 
+void verifyModeSingle (int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode, std::string title)
 
+void setModeSingle (int joint, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
 
+void checkJointWithTorqueMode ()
 
+void checkControlModeWithImCompliant (int desired_control_mode, std::string title)
 
+

Detailed Description

+

The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct.

+

The following control modes are test: VOCAB_CM_POSITION, VOCAB_CM_POSITION_DIRECT, VOCAB_CM_VELOCITY, VOCAB_CM_MIXED, VOCAB_CM_PWM, VOCAB_CM_IDLE, VOCAB_CM_FORCE_IDLE, VOCAB_HW_FAULT. The following interaction modes are tested: VOCAB_IM_STIFF, VOCAB_IM_COMPLIANT. For some modes (VOCAB_CM_TORQUE, VOCAB_IM_COMPLIANT) the test asks to robotInterface if the joint capabilities, skipping the test if those modes are not implemented. The test intentionally generates an hardware fault to test the transition between VOCAB_CM_HW_FAULT to VOCAB_CM_IDLE. The fault is generated by zeroing the max current limit. Check of the amplifier internal status (iAmplifier->getAmpStatus) has to be implemented yet.

+

Example: testRunner -v -t ControlModes.dll -p "--robot icub --part head --joints ""(0 1 2 3 4 5)"" --zero 0"

+

Check the following functions:

    +
  • IControlMode::getControlMode()/setControlMode()
  • +
  • IInteractionMode::getInteractionMode()/setInteractionMode()
  • +
+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm
+

| joints | vector of ints | - | Yes | List of joints to be tested. | | | zero | double | deg | - | Yes | The home position for the tested joints. | |

+ +

Definition at line 53 of file ControlModes.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/controlModes/ControlModes.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/controlModes/ControlModes.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classDemoRedBallTest.html b/doxygen/doc/html/classDemoRedBallTest.html new file mode 100644 index 00000000..ce258910 --- /dev/null +++ b/doxygen/doc/html/classDemoRedBallTest.html @@ -0,0 +1,113 @@ + + + + + + + +icub-test: DemoRedBallTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
DemoRedBallTest Class Reference
+
+
+ +

This test verifies the point-to-point cartesian movement. + More...

+ +

#include <DemoRedBallTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This test verifies the point-to-point cartesian movement.

+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
context string - demoRedBall No context containing the demoRedBall conf file -
from string - config-test.ini No demoRedBall configuration file -
+

You can watch a video of how this test will be performing.

+ +

Definition at line 50 of file DemoRedBallTest.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classExampleTest.html b/doxygen/doc/html/classExampleTest.html new file mode 100644 index 00000000..d2d94b2e --- /dev/null +++ b/doxygen/doc/html/classExampleTest.html @@ -0,0 +1,115 @@ + + + + + + + +icub-test: ExampleTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
ExampleTest Class Reference
+
+
+ +

This is just an example test, use it as a reference to implement new tests. + More...

+ +

#include <ExampleTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This is just an example test, use it as a reference to implement new tests.

+

Check the following functions:

    +
  • NA
  • +
+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "ExampleTest" No The name of the test. -
example string - default value No An example value. -
+ +

Definition at line 41 of file ExampleTest.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleTest/ExampleTest.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleTest/ExampleTest.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classFtSensorTest.html b/doxygen/doc/html/classFtSensorTest.html new file mode 100644 index 00000000..27102d88 --- /dev/null +++ b/doxygen/doc/html/classFtSensorTest.html @@ -0,0 +1,113 @@ + + + + + + + +icub-test: FtSensorTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
FtSensorTest Class Reference
+
+
+ +

Check if a FT sensor port is correctly publishing a vector with 6 values. + More...

+ +

#include <FtSensorTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &configuration)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

Check if a FT sensor port is correctly publishing a vector with 6 values.

+

No further check on the content of the vector is done.

+

Accepts the following parameters:

+ + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "FtSensorTest" No The name of the test. -
portname string - - Yes The yarp port name of the FT sensor to test. -
+ +

Definition at line 41 of file FtSensorTest.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/ftsensor-tests/FtSensorTest.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/ftsensor-tests/FtSensorTest.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classGazeControlSimpleLookTest.html b/doxygen/doc/html/classGazeControlSimpleLookTest.html new file mode 100644 index 00000000..acb36f01 --- /dev/null +++ b/doxygen/doc/html/classGazeControlSimpleLookTest.html @@ -0,0 +1,110 @@ + + + + + + + +icub-test: GazeControlSimpleLookTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
GazeControlSimpleLookTest Class Reference
+
+
+ +

This test verifies the simple gaze movements. + More...

+ +

#include <GazeControlSimpleLookTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This test verifies the simple gaze movements.

+

Accepts the following parameters:

+ + + + +
Parameter name Type Units Default Value Required Description Notes
- - - - - - -
+ +

Definition at line 38 of file GazeControlSimpleLookTest.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classImu.html b/doxygen/doc/html/classImu.html new file mode 100644 index 00000000..64d46ce6 --- /dev/null +++ b/doxygen/doc/html/classImu.html @@ -0,0 +1,129 @@ + + + + + + + +icub-test: Imu Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+ +
+ +

The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements. + More...

+ +

#include <imu.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements.

+

It takes as input the urdf of the robot and make a comparison between the expected values retrieved from the forward kinematics and the ones read from the IMU itself. The test involves the movements of the joints belonging to the part on which the sensor is mounted. The movements are executed sequentially, traversing from the home position to the lower limit, upper limit and back to the home position for each joint.

+

Example: robottestingframework-testrunner –test plugins/imu.so –param "--robot icub --model model.urdf --port /icub/head/inertials --part head --controlboards ("torso", "head") --sensor head_imu_0 --frame head_imu_0 --mean_error 0.1"

+

Moreover, you can manually modify the suites/contexts/icub/test_imu.ini file depending on the parameters of the test. In this case, after compiling, you can run:

+

robottestingframework-testrunner –suite ../suites/imu.xml

+

This will launch the test and open a yarpscope with the plots of the IMU traces.

+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
model string - - Yes The name of the robot model. e.g. model.urdf
port string - - Yes The name of the port streaming IMU data. e.g. /icub/head/inertials
part string - - Yes The name of the robot part on which the sensor is mounted. e.g. head
controlboards vector of string - - Yes The list of the controlboards to open. e.g. ("torso", "head")
sensor string - - Yes The name of the sensor to be tested. e.g. head_imu_0
frame string - - Yes The name of the frame on which the sensor is attached. e.g. head_imu_0
mean_error double - - Yes The tolerance on the mean of the error.
+ +

Definition at line 44 of file imu.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/imu/imu.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/imu/imu.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classJointLimits.html b/doxygen/doc/html/classJointLimits.html new file mode 100644 index 00000000..ce015f1b --- /dev/null +++ b/doxygen/doc/html/classJointLimits.html @@ -0,0 +1,154 @@ + + + + + + + +icub-test: JointLimits Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
JointLimits Class Reference
+
+
+ +

Check if the software joint limits are properly set. + More...

+ +

#include <jointLimits.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+void goTo (yarp::sig::Vector position)
 
+bool goToSingle (int i, double pos, double *reached_pos)
 
+bool goToSingleExceed (int i, double position_to_reach, double limit, double reachedLimit, double *reached_pos)
 
+void setMode (int desired_mode)
 
+void saveToFile (std::string filename, yarp::os::Bottle &b)
 
+

Detailed Description

+

Check if the software joint limits are properly set.

+

The limits are set in the robot configuration files. The test asks the limits to robotInterface using the IControlLimits interface. The test moves each joint first to the max lim, then to the min lim, then to home. If the joint is unable to reach the software limits within a certain tolerance, the test fails and the joint is put back in home position. The timeout for each joint to reach the limit position is fixed to 20 seconds. The test uses an limited output to avoid to damage the joint if, for example, an hardware limit is reached before the software limit. If this limit is too small, the the joint may be unable to reach the limit (e.g. because of friction), so the value must be chosen accurately. The test assumes the the position control is properly working and the position pid is properly tuned. After testing the limits, this test also tries to move the joint out of the limits on puropose (adding to the joint limits the value of outOfBoundPosition). The test is successfull if the position move command is correctly stopped at the limit.

+

Example: testRunner -v -t JointLimits.dll -p "--robot icub --part head --joints ""(0 1 2)"" --home ""(0 0 0)"" --speed ""(20 20 20)"" --outputLimitPercent ""(30 30 30)"" --outOfBoundPosition ""(2 2 2)"" --tolerance 0.2"

+

Check the following functions:

    +
  • IControlLimits::getLimits()
  • +
+

Support functions:

    +
  • IPositionControl::getAxes()
  • +
  • IPositionControl::positionMove()
  • +
  • IPositionContol::setRefSpeeds()
  • +
  • IEncoders::getEncoder()
  • +
  • IEncoders::getEncoders()
  • +
  • IPid::getPid()/IPid::setPid()
  • +
  • IControlMode::getControlMode()/setControlMode()
  • +
  • IInteractionMode::getInteractionMode()/setInteractionMode()
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
home vector of doubles of size joints deg - Yes The home position for each joint
speed vector of doubles of size joints deg/s - Yes The reference speed used furing the movement
tolerance vector of doubles of size joints deg - Yes The position tolerance used to check if the limit has been properly reached. Typical value = 0.2 deg.
outputLimitPercent vector of doubles of size joints % - Yes The maximum motor output (expressed as percentage). Safe values can be, for example, 30%.
outOfBoundPosition vector of doubles of size joints % - Yes This value is added the joint limit to test that a position command is not able to move out of the joint limits Typical value 2 deg.
+ +

Definition at line 74 of file jointLimits.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/jointLimits/jointLimits.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/jointLimits/jointLimits.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classMotorEncodersSignCheck.html b/doxygen/doc/html/classMotorEncodersSignCheck.html new file mode 100644 index 00000000..e2f80d5f --- /dev/null +++ b/doxygen/doc/html/classMotorEncodersSignCheck.html @@ -0,0 +1,138 @@ + + + + + + + +icub-test: MotorEncodersSignCheck Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
MotorEncodersSignCheck Class Reference
+
+
+ +

This tests checks if the motor encoder readings increase when positive pwm is applayed to motor. + More...

+ +

#include <motorEncodersSignCheck.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+void setModeSingle (int i, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
 
+void OplExecute (int i)
 
+

Detailed Description

+

This tests checks if the motor encoder readings increase when positive pwm is applayed to motor.

+

This test helps you to check if RotorEncoderResolution parameter in robot's configuration files has correct sign. The test sets one joint per time in Open Loop control mode; then applies positive pwm starting with value defined in parameter "pwmStart" and increments pwm with step defined in parameter "pwmStep" until motor doesn't move of Posthreshold degree at least.

+

Note: This test uses yarp::robottestingframework::jointsPosMotion class, a class for reduce time in developing test.

+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
name string - - No The name of test. e.g. motEncSignCheck_Head
part string - - Yes The name of trhe robot part. e.g. head
joints vector of ints - - Yes List of joints to be tested
home vector of doubles of size joints deg - Yes The home position for each joint. It should be distant from joint's limits
speed vector of doubles of size joints deg/s - Yes The reference speed used during the movement
pwmStart vector of doubles of size joints - - Yes The starting pwm applied to joint
pwmStep vector of doubles of size joints - - Yes The increment of pwm per time
pwmMax vector of doubles of size joints - - Yes The max pwm applicable
Posthreshold vector of doubles of size joints deg 5 No The minumum movement to check if motor position increases
commandDelay vector of doubles of size joints deg 0.1 No The delay between two SetRefOpenLooop commands consecutive
+ +

Definition at line 61 of file motorEncodersSignCheck.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classMotorTest.html b/doxygen/doc/html/classMotorTest.html new file mode 100644 index 00000000..b0306a51 --- /dev/null +++ b/doxygen/doc/html/classMotorTest.html @@ -0,0 +1,135 @@ + + + + + + + +icub-test: MotorTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
MotorTest Class Reference
+
+
+ +

Check IPositionControl and IEncoders. + More...

+ +

#include <MotorTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &configuration)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

Check IPositionControl and IEncoders.

+

Check the following functions:

    +
  • IPositionControl::getAxes()
  • +
  • IPositionControl::positionMove()
  • +
  • IPositionControl::checkMotionDone()
  • +
  • IPositionContol::setRefSpeeds()
  • +
  • IPositionControl::setRefAccelerations()
  • +
  • IEncoders::getEncoder()
  • +
  • IEncoders::getEncoders()
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "MotorTest" No The name of the test. -
portname string - - Yes The yarp port name of the controlboard to test. -
joints int - - Yes Number of axes in the controlboard. Must be consistent with the value returned by getAxes method.
target vector of doubles of size joints deg - Yes For each joint the position to reach for passing the test.
min vector of doubles of size joints deg - Yes For each joint the maximum lower error with respect to the target to consider the test as successful.
max vector of doubles of size joints deg - Yes For each joint the maximum upper error with respect to the target to consider the test as successful.
refvel vector of doubles of size joints deg/s - Yes For each joint the reference velocity value to set in the low level trajectory generator.
refacc vector of doubles of size joints deg/s^2 - No For each joint the reference acceleration value to set in the low level trajectory generator.
timeout vector of doubles of size joints s - Yes For each joint the maximum time to wait for the joint to reach the target.
+ +

Definition at line 59 of file MotorTest.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-tests/MotorTest.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-tests/MotorTest.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classMovementReferencesTest.html b/doxygen/doc/html/classMovementReferencesTest.html new file mode 100644 index 00000000..e05ef6bb --- /dev/null +++ b/doxygen/doc/html/classMovementReferencesTest.html @@ -0,0 +1,128 @@ + + + + + + + +icub-test: MovementReferencesTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
MovementReferencesTest Class Reference
+
+
+ +

Check IPositionControl, IVelocityControl, IPWMControl, IPositionDirect. + More...

+ +

#include <movementReferencesTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &configuration)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

Check IPositionControl, IVelocityControl, IPWMControl, IPositionDirect.

+

Check the following functions:

    +
  • IPositionControl::getPositionTarget()
  • +
  • IVelocityControl::getRefVelocity()
  • +
  • IPositionDirect::getRefPosition()
  • +
  • IPWMControl::getRefDutyCycle()
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "MovementReferencesTest" No The name of the test. -
portname string - - Yes The yarp port name of the controlboard to test. -
joints int - - Yes Number of axes in the controlboard. Must be consistent with the value returned by getAxes method.
home vector of doubles of size joints deg - Yes For each joint the position to reach for passing the test.
target vector of doubles of size joints deg - Yes For each joint the position to reach for passing the test.
refvel vector of doubles of size joints deg/s - Yes For each joint the reference velocity value to set in the low level trajectory generator.
refacc vector of doubles of size joints deg/s^2 - No For each joint the reference acceleration value to set in the low level trajectory generator.
+ +

Definition at line 56 of file movementReferencesTest.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classOpticalEncodersConsistency.html b/doxygen/doc/html/classOpticalEncodersConsistency.html new file mode 100644 index 00000000..6e34e8a9 --- /dev/null +++ b/doxygen/doc/html/classOpticalEncodersConsistency.html @@ -0,0 +1,162 @@ + + + + + + + +icub-test: OpticalEncodersConsistency Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
OpticalEncodersConsistency Class Reference
+
+
+ +

This tests checks if the motor encoder reading are consistent with the joint encoder readings. + More...

+ +

#include <motorEncodersConsistency.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+void goHome ()
 
+void setMode (int desired_mode)
 
+void saveToFile (std::string filename, yarp::os::Bottle &b)
 
+

Detailed Description

+

This tests checks if the motor encoder reading are consistent with the joint encoder readings.

+

Since the two sensors may be placed in different places, with gearboxes or tendon transmissions in between, a (signed) factor is needed to convert the two measurements. The test performes a cyclic movement between two reference positions (min and max) and collects data from both the encoders during the movement. The test generates four text data files, which are subsequently opened to generate plots. In all figures the joint and motor plots need to be reasonably aligned. The four plots are:

    +
  • joint positions vs motor positions
  • +
  • joint velocities vs motor velocities
  • +
  • joint positions (numerically derived by the test) vs joint velocities (measured by the control board)
  • +
  • motor positions (numerically derived by the test) vs motor velocities (measured by the control board) The conversion formula from motor measurments (M) to joint encoder measurements (J) is the following: J = kinematic_mj * gearbox * M with kinematic_mj the joints coupling matrix and gearbox the gearbox reduction factor (e.g. 1:100)
  • +
+

Example: testRunner v -t motorEncodersConsistency.dll -p "--robot icub --part left_arm --joints ""(0 1 2)"" --home ""(-30 30 10)"" --speed ""(20 20 20)"" --max ""(-20 40 20)"" --min ""(-40 20 0)"" --cycles 10 --tolerance 1.0 " Example: testRunner v -s "..\icub-tests\suites\encoders-icubSim.xml"

+

Check the following functions:

    +
  • IEncoders::getEncoders()
  • +
  • IEncoders::getEncoderSpeeds()
  • +
  • IEncoders::getEncoderAccelerations()
  • +
  • IMotorEncoder::getMotorEncoders()
  • +
  • IMotorEncoder::getMotorEncoderSpeeds()
  • +
  • IMotorEncoder::getMotorEncoderAccelerations() Note: Acceleration is not currently tested.
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
home vector of doubles of size joints deg - Yes The home position for each joint
cycles int - 10 No The number of test cycles (going from max to min position and viceversa
max vector of doubles of size joints deg - Yes The max position using during the joint movement
min vector of doubles of size joints deg - Yes The min position using during the joint movement
tolerance vector of doubles of size joints deg - Yes The tolerance used when moving from min to max reference position and viceversa
speed vector of doubles of size joints deg/s - Yes The reference speed used during the movement
matrix_size int - - Yes The number of rows of the coupling matrix Typical value = 4.
matrix vector of doubles of size matrix_size - - Yes The kinematic_mj coupling matrix matrix is identity if joints are not coupled
plotstring1 string - Yes The string which generates plot 1
plotstring2 string - Yes The string which generates plot 2
plotstring3 string - Yes The string which generates plot 3
plotstring4 string - Yes The string which generates plot 4
+ +

Definition at line 80 of file motorEncodersConsistency.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classOpticalEncodersDrift.html b/doxygen/doc/html/classOpticalEncodersDrift.html new file mode 100644 index 00000000..b246a4ff --- /dev/null +++ b/doxygen/doc/html/classOpticalEncodersDrift.html @@ -0,0 +1,141 @@ + + + + + + + +icub-test: OpticalEncodersDrift Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
OpticalEncodersDrift Class Reference
+
+
+ +

This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max). + More...

+ +

#include <opticalEncodersDrift.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+bool goHome ()
 
+void setMode (int desired_mode)
 
+bool saveToFile (const std::string &filename, const yarp::os::Bottle &b)
 
+

Detailed Description

+

This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max).

+

The test collects data during the joint motion, saves data to a text file a plots the result. If the relative encoder is working correctly, the plot should have no drift. Otherwise, a drift in the plot may be caused by a damaged reflective encoder/ optical disk. For best reliability an high number of cycles (e.g. >100) is suggested.

+

example: testRunner -v -t OpticalEncodersDrift.dll -p "--robot icub --part head --joints ""(0 1 2)"" --home ""(0 0 0)" –speed "(20 20 20)" –max "(10 10 10)" –min "(-10 -10 -10)" –cycles 100 –tolerance 1.0 " +example: testRunner -v -t OpticalEncodersDrift.dll -p "–robot icub –part head –joints ""(2)"" –home ""(0)"" –speed "(20 )" –max "(10 )" –min "(-10)" –cycles 100 –tolerance 1.0 "

+

Check the following functions:

    +
  • IMotorEncoder::getMotorEncoders()
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
home vector of doubles of size joints deg - Yes The home position for each joint
cycles int - - Yes The number of test cycles (going from max to min position and viceversa) Use values > 100
max vector of doubles of size joints deg - Yes The max position using during the joint movement
min vector of doubles of size joints deg - Yes The min position using during the joint movement
tolerance vector of doubles of size joints deg - Yes The tolerance used when moving from min to max reference position and viceversa
speed vector of doubles of size joints deg/s - Yes The reference speed used during the movement
+ +

Definition at line 62 of file opticalEncodersDrift.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classPositionControlAccuracy.html b/doxygen/doc/html/classPositionControlAccuracy.html new file mode 100644 index 00000000..d27b5f5e --- /dev/null +++ b/doxygen/doc/html/classPositionControlAccuracy.html @@ -0,0 +1,142 @@ + + + + + + + +icub-test: PositionControlAccuracy Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
PositionControlAccuracy Class Reference
+
+
+ +

This tests checks the a position PID response, sending a step reference signal with a positionDirect command. + More...

+ +

#include <PositionControlAccuracy.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+bool goHome ()
 
+void executeCmd ()
 
+void setMode (int desired_mode)
 
+void saveToFile (std::string filename, yarp::os::Bottle &b)
 
+

Detailed Description

+

This tests checks the a position PID response, sending a step reference signal with a positionDirect command.

+

This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analyzed with a Matlab script to evaluate the position PID properties. Be aware that a step greater than 5 degrees at the maximum speed can be dangerous for both the robot and the human operator!

+

example: testRunner -v -t PositionControlAccuracy.dll -p "--robot icubSim --part head --joints ""(0 1 2)"" --zeros ""(0 0 0)"" --step 5 --cycles 10 --sampleTime 0.010" example: testRunner -v -t PositionControlAccuracy.dll -p "--robot icubSim --part head --joints ""(2)"" --zeros ""(0)"" --step 5 --cycles 10 --sampleTime 0.010"

+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of the robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
zeros double deg - Yes The home position for each joint
cycles int - - Yes Each joint will be tested multiple times
step double deg - Yes The amplitude of the step reference signal Recommended max: 5 deg!
sampleTime double s - Yes The sample time of the control thread
home_tolerance double deg 0.5 No The max acceptable position error during the homing phase.
filename string No The output filename. If not specified, the name will be generated using 'part' parameter and joint number
step_duration double s No The duration of the step. After this time, a new test cycle starts.
+ +

Definition at line 55 of file PositionControlAccuracy.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classPositionControlAccuracyExernalPid.html b/doxygen/doc/html/classPositionControlAccuracyExernalPid.html new file mode 100644 index 00000000..79edc16d --- /dev/null +++ b/doxygen/doc/html/classPositionControlAccuracyExernalPid.html @@ -0,0 +1,150 @@ + + + + + + + +icub-test: PositionControlAccuracyExernalPid Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
PositionControlAccuracyExernalPid Class Reference
+
+
+ +

This tests checks the response of the system to a position step, sending directly PWM commands to a joint. + More...

+ +

#include <PositionControlAccuracyExternalPid.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+bool goHome ()
 
+void executeCmd ()
 
+void setMode (int desired_mode)
 
+void saveToFile (std::string filename, yarp::os::Bottle &b)
 
+

Detailed Description

+

This tests checks the response of the system to a position step, sending directly PWM commands to a joint.

+

The PWM commands are computed using iCub::ctrl::parallelPID class. This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analyzed with a Matlab script to evaluate the position PID properties. Be aware that a step greater than 5 degrees at the maximum speed can be dangerous for both the robot and the human operator!

+

example: testRunner -v -t PositionControlAccuracyExternalPid.dll -p "--robot icubSim --part head --joints ""(0 1 2)"" --zeros ""(0 0 0)"" --step 5 --cycles 10 --sampleTime 0.010 --Kp 1.0" example: testRunner -v -t PositionControlAccuracyExternalPid.dll -p "--robot icubSim --part head --joints ""(2)"" --zeros ""(0)"" --step 5 --cycles 10 --sampleTime 0.010 --homeTolerance 1.0 --step_duration 8 --Kp 2.2 --Kd 0.01 --Ki 100 --MaxValue 80"

+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of the robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
zeros double deg - Yes The home position for each joint
cycles int - - Yes Each joint will be tested multiple times
step double deg - Yes The amplitude of the step reference signal Recommended max: 5 deg!
sampleTime double s - Yes The sample time of the control thread
home_tolerance double deg 0.5 No The max acceptable position error during the homing phase.
filename string No The output filename. If not specified, the name will be generated using 'part' parameter and joint number
step_duration double s 4 No The duration of the step. After this time, a new test cycle starts.
Kp double 0 No The Proportional gain
Ki double 0 No The Integral gain
Kd double 0 No The Derivative gain
MaxValue double % 100 No max value for PID output (saturator).
+ +

Definition at line 62 of file PositionControlAccuracyExternalPid.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classPositionDirect.html b/doxygen/doc/html/classPositionDirect.html new file mode 100644 index 00000000..768c3af4 --- /dev/null +++ b/doxygen/doc/html/classPositionDirect.html @@ -0,0 +1,143 @@ + + + + + + + +icub-test: PositionDirect Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
PositionDirect Class Reference
+
+
+ +

This tests checks the positionDirect control, sending a sinusoidal reference signal, with parametric frequency and amplitude. + More...

+ +

#include <PositionDirect.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+void goHome ()
 
+void executeCmd ()
 
+void setMode (int desired_mode)
 
+

Detailed Description

+

This tests checks the positionDirect control, sending a sinusoidal reference signal, with parametric frequency and amplitude.

+

The sample time, typical in the range of 10 ms, can be also be adjusted by the user. This test currently does not return any error report. It simply moves a joint, and the user visually evaluates the smoothness of the performed trajectory. In the future automatic checks/plots may be added to the test. Be aware theat may exists set of parameters (e.g. high values of sample time / ampiltude /frequency) that may lead to PID instability and damage the joint. The test is able to check all the three types of yarp methods (single joint, multi joint, all joints), depending on the value of cmdMode Parameter.

+

example: testRunner -v -t PositionDirect.dll - p "--robot icub --part head --joints ""(0 1 2)"" --zero 0 --frequency 0.8 --amplitude 10.0 --cycles 10 --tolerance 1.0 --sampleTime 0.010 --cmdMode 0" example: testRunner -v -t PositionDirect.dll - p "--robot icub --part head --joints ""(2)"" --zero 0 --frequency 0.4 --amplitude 10.0 --cycles 10 --tolerance 1.0 --sampleTime 0.010 --cmdMode 0"

+

Check the following functions:

    +
  • IPositionDirect::setPositions()
  • +
  • IControlMode::setControlMode()
  • +
+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of trhe robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
zero double deg - Yes The home position for each joint
cycles int - - Yes The number of test cycles (going from max to min position and viceversa)
frequency double deg - Yes The frequency of the sine reference signal
amplitude double deg - Yes The ampiltude of the sine reference signal
tolerance double deg - Yes The tolerance used when moving from min to max reference position and viceversa
sampleTime double s - Yes The sample time of the control thread
cmdMode int deg - Yes = 0 to test single joint method, = 1 to test all joints, = 2 to test multi joint method
+ +

Definition at line 60 of file PositionDirect.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionDirect/PositionDirect.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionDirect/PositionDirect.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classSensorsDuplicateReadings.html b/doxygen/doc/html/classSensorsDuplicateReadings.html new file mode 100644 index 00000000..8cd00b0c --- /dev/null +++ b/doxygen/doc/html/classSensorsDuplicateReadings.html @@ -0,0 +1,118 @@ + + + + + + + +icub-test: SensorsDuplicateReadings Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
SensorsDuplicateReadings Class Reference
+
+
+ +

Check if a yarp port is correctly publishing unique values at each update . + More...

+ +

#include <SensorsDuplicateReadings.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

Check if a yarp port is correctly publishing unique values at each update .

+

For some sensors, such as strain gauge based force sensors, errors on the measurement ensure that two different readings of the sensors are always different. If on a port that is publishing a sensor reading you get two times exactly the same value, this could mean that the same sensor reading was sent multiple times. This could happen for several reasons:

    +
  • The wrapper is running faster than the sensor frequency (depending on the configuration this could make sense or not)
  • +
  • The sensor readings are not properly read, for example because packets are lost or dropped (this usually indicate some problem in your system).
  • +
+

Accepts the following parameters:

+ + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
name string - "SensorsDuplicateReadings" No The name of the test. -
time double s - Yes Duration of the test for each port. -
PORTS (group ) Bottle - - Yes List of couples of port/toleratedDuplicates with this format: (portname1, toleratedDuplicates1) (portname1, toleratedDuplicates1)
+ +

Definition at line 88 of file SensorsDuplicateReadings.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classSkinWrapperTest.html b/doxygen/doc/html/classSkinWrapperTest.html new file mode 100644 index 00000000..0520d805 --- /dev/null +++ b/doxygen/doc/html/classSkinWrapperTest.html @@ -0,0 +1,104 @@ + + + + + + + +icub-test: SkinWrapperTest Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
SkinWrapperTest Class Reference
+
+
+ +

This test verifies the functionalities of skinWrapper after the removal of analogServer from icub-main. + More...

+ +

#include <SkinWrapperTest.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

This test verifies the functionalities of skinWrapper after the removal of analogServer from icub-main.

+ +

Definition at line 34 of file SkinWrapperTest.h.

+

The documentation for this class was generated from the following files:
    +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/SkinWrapperTest.h
  • +
  • /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/SkinWrapperTest.cpp
  • +
+
+ + + + diff --git a/doxygen/doc/html/classTorqueControlAccuracy.html b/doxygen/doc/html/classTorqueControlAccuracy.html new file mode 100644 index 00000000..453b4859 --- /dev/null +++ b/doxygen/doc/html/classTorqueControlAccuracy.html @@ -0,0 +1,136 @@ + + + + + + + +icub-test: TorqueControlAccuracy Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
TorqueControlAccuracy Class Reference
+
+
+ +

This tests checks the a torque PID response, sending a step reference signal with a setRefTorque command. + More...

+ +

#include <TorqueControlAccuracy.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + + + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+bool goHome ()
 
+void executeCmd ()
 
+void setMode (int desired_mode)
 
+void saveToFile (std::string filename, yarp::os::Bottle &b)
 
+

Detailed Description

+

This tests checks the a torque PID response, sending a step reference signal with a setRefTorque command.

+

This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analized with a matalab script to evaluate the torque PID properties. Be aware that a step greater than 1 Nm may be dangerous for both the robot and the human operator!

+

example: testRunner -v -t TorqueControlAccuracy.dll -p "--robot icubSim --part head --joints ""(0 1 2)"" --zeros ""(0 0 0)"" --step 5 --cycles 10 --sampleTime 0.010" example: testRunner -v -t TorqueControlAccuracy.dll -p "--robot icubSim --part head --joints ""(2)"" --zeros ""(0)"" --step 5 --cycles 10 --sampleTime 0.010"

+

Accepts the following parameters:

+ + + + + + + + + + + + + + + + +
Parameter name Type Units Default Value Required Description Notes
robot string - - Yes The name of the robot. e.g. icub
part string - - Yes The name of the robot part. e.g. left_arm
joints vector of ints - - Yes List of joints to be tested
zeros double deg - Yes The home position for each joint
cycles int - - Yes Each joint will be tested multiple times
step double Nm - Yes The amplitude of the step reference signal Recommended max: 1 Nm!
sampleTime double s - Yes The sample time of the control thread
+ +

Definition at line 52 of file TorqueControlAccuracy.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classTorqueControlGravityConsistency.html b/doxygen/doc/html/classTorqueControlGravityConsistency.html new file mode 100644 index 00000000..5555097b --- /dev/null +++ b/doxygen/doc/html/classTorqueControlGravityConsistency.html @@ -0,0 +1,106 @@ + + + + + + + +icub-test: TorqueControlGravityConsistency Class Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
TorqueControlGravityConsistency Class Reference
+
+
+ +

The test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the wholeBodyDynamics(Tree) running. + More...

+ +

#include <TorqueControlGravityConsistency.h>

+ +

Inherits yarp::robottestingframework::TestCase.

+ + + + + + + + +

+Public Member Functions

+virtual bool setup (yarp::os::Property &property)
 
+virtual void tearDown ()
 
+virtual void run ()
 
+

Detailed Description

+

The test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the wholeBodyDynamics(Tree) running.

+

The tests opens the wholeBodyInterface (to be migrated to use material available on YARP and iDynTree) and compares the gravity compensation torque coming from the model and assuming that the gravity is fixed in the based with the joint torques measured by iCub (that actually come from the wholeBodyDynamics(Tree) ).

+

Example: testRunner -v -t TorqueControlGravityConsistency.dll -p ""

+ +

Definition at line 45 of file TorqueControlGravityConsistency.h.

+

The documentation for this class was generated from the following files: +
+ + + + diff --git a/doxygen/doc/html/classes.html b/doxygen/doc/html/classes.html new file mode 100644 index 00000000..39c8994e --- /dev/null +++ b/doxygen/doc/html/classes.html @@ -0,0 +1,113 @@ + + + + + + + +icub-test: Data Structure Index + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+ + + + + diff --git a/doxygen/doc/html/closed.png b/doxygen/doc/html/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..98cc2c909da37a6df914fbf67780eebd99c597f5 GIT binary patch literal 132 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{V-kvUwAr*{o@8{^CZMh(5KoB^r_<4^zF@3)Cp&&t3hdujKf f*?bjBoY!V+E))@{xMcbjXe@)LtDnm{r-UW|*e5JT literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/dir_0c804fff733e48d30e1bfca9c425d2ef.html b/doxygen/doc/html/dir_0c804fff733e48d30e1bfca9c425d2ef.html new file mode 100644 index 00000000..fc28a16a --- /dev/null +++ b/doxygen/doc/html/dir_0c804fff733e48d30e1bfca9c425d2ef.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-stiffDampCheck Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
torqueControl-stiffDampCheck Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_1ff6e3a7912c7481e100b734d4f6c773.html b/doxygen/doc/html/dir_1ff6e3a7912c7481e100b734d4f6c773.html new file mode 100644 index 00000000..0bc4d766 --- /dev/null +++ b/doxygen/doc/html/dir_1ff6e3a7912c7481e100b734d4f6c773.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/movementReferencesTest Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
movementReferencesTest Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_22920df90588b6b2fe85332a8ebd338b.html b/doxygen/doc/html/dir_22920df90588b6b2fe85332a8ebd338b.html new file mode 100644 index 00000000..ca6c74ef --- /dev/null +++ b/doxygen/doc/html/dir_22920df90588b6b2fe85332a8ebd338b.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/system-status Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
system-status Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_2cd82cc5f0bc63ecdc472ec984cf3931.html b/doxygen/doc/html/dir_2cd82cc5f0bc63ecdc472ec984cf3931.html new file mode 100644 index 00000000..fe848b31 --- /dev/null +++ b/doxygen/doc/html/dir_2cd82cc5f0bc63ecdc472ec984cf3931.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-accuracy Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
torqueControl-accuracy Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_2e031885cc4d3ad1ede3959cab4922b2.html b/doxygen/doc/html/dir_2e031885cc4d3ad1ede3959cab4922b2.html new file mode 100644 index 00000000..4d019e6d --- /dev/null +++ b/doxygen/doc/html/dir_2e031885cc4d3ad1ede3959cab4922b2.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts/scripts Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scripts Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_34519bff5ae72130fe71a8620cbf1fc0.html b/doxygen/doc/html/dir_34519bff5ae72130fe71a8620cbf1fc0.html new file mode 100644 index 00000000..5f716ca5 --- /dev/null +++ b/doxygen/doc/html/dir_34519bff5ae72130fe71a8620cbf1fc0.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/camera Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
camera Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_3931dff736a77fff33906f875a0db8d7.html b/doxygen/doc/html/dir_3931dff736a77fff33906f875a0db8d7.html new file mode 100644 index 00000000..83b996ff --- /dev/null +++ b/doxygen/doc/html/dir_3931dff736a77fff33906f875a0db8d7.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
positionControl-accuracy Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_3b1318bac6af3327e49b6f2c90562c86.html b/doxygen/doc/html/dir_3b1318bac6af3327e49b6f2c90562c86.html new file mode 100644 index 00000000..60239596 --- /dev/null +++ b/doxygen/doc/html/dir_3b1318bac6af3327e49b6f2c90562c86.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-stiction Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
motor-stiction Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_52bb83cdfa78eea1d57abbea3c8e3d28.html b/doxygen/doc/html/dir_52bb83cdfa78eea1d57abbea3c8e3d28.html new file mode 100644 index 00000000..25a50819 --- /dev/null +++ b/doxygen/doc/html/dir_52bb83cdfa78eea1d57abbea3c8e3d28.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/jointLimits Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
jointLimits Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_558c7ef467b8503bdadaa3baf0d6d956.html b/doxygen/doc/html/dir_558c7ef467b8503bdadaa3baf0d6d956.html new file mode 100644 index 00000000..896a4557 --- /dev/null +++ b/doxygen/doc/html/dir_558c7ef467b8503bdadaa3baf0d6d956.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/imu Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
imu Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_588ff9359adf1870eba017afede6f94d.html b/doxygen/doc/html/dir_588ff9359adf1870eba017afede6f94d.html new file mode 100644 index 00000000..93ee5466 --- /dev/null +++ b/doxygen/doc/html/dir_588ff9359adf1870eba017afede6f94d.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
skinWrapperTest Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_58c9f48d72e7737305eca65c820f5d4c.html b/doxygen/doc/html/dir_58c9f48d72e7737305eca65c820f5d4c.html new file mode 100644 index 00000000..44acfae9 --- /dev/null +++ b/doxygen/doc/html/dir_58c9f48d72e7737305eca65c820f5d4c.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ftsensor-tests Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ftsensor-tests Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html b/doxygen/doc/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html new file mode 100644 index 00000000..0b15e751 --- /dev/null +++ b/doxygen/doc/html/dir_59425e443f801f1f2fd8bbe4959a3ccf.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/tests Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
tests Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_5eba7e4699fbf6bf477756242c12a311.html b/doxygen/doc/html/dir_5eba7e4699fbf6bf477756242c12a311.html new file mode 100644 index 00000000..be6119d0 --- /dev/null +++ b/doxygen/doc/html/dir_5eba7e4699fbf6bf477756242c12a311.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motor-tests Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
motor-tests Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_6355ee7e8e7fccbf90712e6e68524328.html b/doxygen/doc/html/dir_6355ee7e8e7fccbf90712e6e68524328.html new file mode 100644 index 00000000..8efd1784 --- /dev/null +++ b/doxygen/doc/html/dir_6355ee7e8e7fccbf90712e6e68524328.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/models-consistency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
models-consistency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_67a6d6fd93427d49c4a56e9e89568513.html b/doxygen/doc/html/dir_67a6d6fd93427d49c4a56e9e89568513.html new file mode 100644 index 00000000..446e2d26 --- /dev/null +++ b/doxygen/doc/html/dir_67a6d6fd93427d49c4a56e9e89568513.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/controlModes Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
controlModes Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html b/doxygen/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html new file mode 100644 index 00000000..8b50ba26 --- /dev/null +++ b/doxygen/doc/html/dir_68267d1309a1af8e8297ef4c3efbcdba.html @@ -0,0 +1,86 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+ + + + + + +

+Directories

directory  cartesian-control
 
directory  gaze-control
 
+
+ + + + diff --git a/doxygen/doc/html/dir_684cb237cc589112c257fb2b82bbd35f.html b/doxygen/doc/html/dir_684cb237cc589112c257fb2b82bbd35f.html new file mode 100644 index 00000000..3fb8b1e1 --- /dev/null +++ b/doxygen/doc/html/dir_684cb237cc589112c257fb2b82bbd35f.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cartesian-control Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.html b/doxygen/doc/html/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.html new file mode 100644 index 00000000..8ad3ac91 --- /dev/null +++ b/doxygen/doc/html/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/sensors-duplicate-readings Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
sensors-duplicate-readings Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_77ddb71cb6ac5d6664d62b97f5abbc63.html b/doxygen/doc/html/dir_77ddb71cb6ac5d6664d62b97f5abbc63.html new file mode 100644 index 00000000..0327cf15 --- /dev/null +++ b/doxygen/doc/html/dir_77ddb71cb6ac5d6664d62b97f5abbc63.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/simple-p2p-movement Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
simple-p2p-movement Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_7afe760acf634ae748bef9bf87f73d01.html b/doxygen/doc/html/dir_7afe760acf634ae748bef9bf87f73d01.html new file mode 100644 index 00000000..7a2fa3b1 --- /dev/null +++ b/doxygen/doc/html/dir_7afe760acf634ae748bef9bf87f73d01.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncodersSignCheck Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
motorEncodersSignCheck Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_7f61241abd7fbdf9954805296c6d0bed.html b/doxygen/doc/html/dir_7f61241abd7fbdf9954805296c6d0bed.html new file mode 100644 index 00000000..f1f14c79 --- /dev/null +++ b/doxygen/doc/html/dir_7f61241abd7fbdf9954805296c6d0bed.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/opticalEncoders-drift Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
opticalEncoders-drift Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_977d3371830c4bec444f000fc75dc817.html b/doxygen/doc/html/dir_977d3371830c4bec444f000fc75dc817.html new file mode 100644 index 00000000..466193ac --- /dev/null +++ b/doxygen/doc/html/dir_977d3371830c4bec444f000fc75dc817.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/tests/misc Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
misc Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.html b/doxygen/doc/html/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.html new file mode 100644 index 00000000..dee419bb --- /dev/null +++ b/doxygen/doc/html/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleFixture Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleFixture Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_9e7e413093116f0711b4468be0f53b25.html b/doxygen/doc/html/dir_9e7e413093116f0711b4468be0f53b25.html new file mode 100644 index 00000000..e4ae4239 --- /dev/null +++ b/doxygen/doc/html/dir_9e7e413093116f0711b4468be0f53b25.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp/ExampleTest Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ExampleTest Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.html b/doxygen/doc/html/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.html new file mode 100644 index 00000000..a1e87628 --- /dev/null +++ b/doxygen/doc/html/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control/simple-look Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
simple-look Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_a74cd033cebccd01e109eef31bc43830.html b/doxygen/doc/html/dir_a74cd033cebccd01e109eef31bc43830.html new file mode 100644 index 00000000..fef949db --- /dev/null +++ b/doxygen/doc/html/dir_a74cd033cebccd01e109eef31bc43830.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy-ExternalPid Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
positionControl-accuracy-ExternalPid Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_bb6085b5660958491f908beff56f4e11.html b/doxygen/doc/html/dir_bb6085b5660958491f908beff56f4e11.html new file mode 100644 index 00000000..f8a10dad --- /dev/null +++ b/doxygen/doc/html/dir_bb6085b5660958491f908beff56f4e11.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gaze-control Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_c4278cdbadca2a5e8f60a98cd2517319.html b/doxygen/doc/html/dir_c4278cdbadca2a5e8f60a98cd2517319.html new file mode 100644 index 00000000..893fbd8f --- /dev/null +++ b/doxygen/doc/html/dir_c4278cdbadca2a5e8f60a98cd2517319.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example/cpp Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cpp Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html b/doxygen/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html new file mode 100644 index 00000000..4741bda1 --- /dev/null +++ b/doxygen/doc/html/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/example Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
example Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_d0781ab5bdb71555a7f6c72636ba8088.html b/doxygen/doc/html/dir_d0781ab5bdb71555a7f6c72636ba8088.html new file mode 100644 index 00000000..cfe23890 --- /dev/null +++ b/doxygen/doc/html/dir_d0781ab5bdb71555a7f6c72636ba8088.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/reaching-tolerance Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
reaching-tolerance Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_d6cc1804077fb7a0bee471bebe09c948.html b/doxygen/doc/html/dir_d6cc1804077fb7a0bee471bebe09c948.html new file mode 100644 index 00000000..83cf18c5 --- /dev/null +++ b/doxygen/doc/html/dir_d6cc1804077fb7a0bee471bebe09c948.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/ports-frequency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ports-frequency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_de7c96bd180ef87bf5425ed419472c36.html b/doxygen/doc/html/dir_de7c96bd180ef87bf5425ed419472c36.html new file mode 100644 index 00000000..94049914 --- /dev/null +++ b/doxygen/doc/html/dir_de7c96bd180ef87bf5425ed419472c36.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionDirect Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
positionDirect Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_e570188f87838128b6c12995b595ee3e.html b/doxygen/doc/html/dir_e570188f87838128b6c12995b595ee3e.html new file mode 100644 index 00000000..79414248 --- /dev/null +++ b/doxygen/doc/html/dir_e570188f87838128b6c12995b595ee3e.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
contexts Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_ea8250e1e424defa140420a75e35c564.html b/doxygen/doc/html/dir_ea8250e1e424defa140420a75e35c564.html new file mode 100644 index 00000000..8cb2cc4b --- /dev/null +++ b/doxygen/doc/html/dir_ea8250e1e424defa140420a75e35c564.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-consistency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
torqueControl-consistency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_ec9ed375a115a2645126306c0ce5bc8a.html b/doxygen/doc/html/dir_ec9ed375a115a2645126306c0ce5bc8a.html new file mode 100644 index 00000000..01025d33 --- /dev/null +++ b/doxygen/doc/html/dir_ec9ed375a115a2645126306c0ce5bc8a.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
suites Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_f0b080432f22d2b191784a0df690e6ac.html b/doxygen/doc/html/dir_f0b080432f22d2b191784a0df690e6ac.html new file mode 100644 index 00000000..ffb7f815 --- /dev/null +++ b/doxygen/doc/html/dir_f0b080432f22d2b191784a0df690e6ac.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-gravityConsistency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
torqueControl-gravityConsistency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.html b/doxygen/doc/html/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.html new file mode 100644 index 00000000..e4c92b0f --- /dev/null +++ b/doxygen/doc/html/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/demoRedBall Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
demoRedBall Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_f9de59b413a1f1ae04ea264c82cc2719.html b/doxygen/doc/html/dir_f9de59b413a1f1ae04ea264c82cc2719.html new file mode 100644 index 00000000..2b0df5a4 --- /dev/null +++ b/doxygen/doc/html/dir_f9de59b413a1f1ae04ea264c82cc2719.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/openloop-consistency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
openloop-consistency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_ff120bfd69174aceba0b7c2c1b4a03e3.html b/doxygen/doc/html/dir_ff120bfd69174aceba0b7c2c1b4a03e3.html new file mode 100644 index 00000000..972a7f4c --- /dev/null +++ b/doxygen/doc/html/dir_ff120bfd69174aceba0b7c2c1b4a03e3.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncoders-consistency Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
motorEncoders-consistency Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/doc.png b/doxygen/doc/html/doc.png new file mode 100644 index 0000000000000000000000000000000000000000..17edabff95f7b8da13c9516a04efe05493c29501 GIT binary patch literal 746 zcmV7=@pnbNXRFEm&G8P!&WHG=d)>K?YZ1bzou)2{$)) zumDct!>4SyxL;zgaG>wy`^Hv*+}0kUfCrz~BCOViSb$_*&;{TGGn2^x9K*!Sf0=lV zpP=7O;GA0*Jm*tTYj$IoXvimpnV4S1Z5f$p*f$Db2iq2zrVGQUz~yq`ahn7ck(|CE z7Gz;%OP~J6)tEZWDzjhL9h2hdfoU2)Nd%T<5Kt;Y0XLt&<@6pQx!nw*5`@bq#?l*?3z{Hlzoc=Pr>oB5(9i6~_&-}A(4{Q$>c>%rV&E|a(r&;?i5cQB=} zYSDU5nXG)NS4HEs0it2AHe2>shCyr7`6@4*6{r@8fXRbTA?=IFVWAQJL&H5H{)DpM#{W(GL+Idzf^)uRV@oB8u$ z8v{MfJbTiiRg4bza<41NAzrl{=3fl_D+$t+^!xlQ8S}{UtY`e z;;&9UhyZqQRN%2pot{*Ei0*4~hSF_3AH2@fKU!$NSflS>{@tZpDT4`M2WRTTVH+D? z)GFlEGGHe?koB}i|1w45!BF}N_q&^HJ&-tyR{(afC6H7|aml|tBBbv}55C5DNP8p3 z)~jLEO4Z&2hZmP^i-e%(@d!(E|KRafiU8Q5u(wU((j8un3OR*Hvj+t literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/doxygen.css b/doxygen/doc/html/doxygen.css new file mode 100644 index 00000000..ffbff022 --- /dev/null +++ b/doxygen/doc/html/doxygen.css @@ -0,0 +1,1793 @@ +/* The standard CSS for doxygen 1.9.1 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +ul.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; + column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +th p.starttd, th p.intertd, th p.endtd { + font-size: 100%; + font-weight: 700; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +p.interli { +} + +p.interdd { +} + +p.intertd { +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; +} + +div.qindex{ + text-align: center; + width: 100%; + line-height: 140%; + font-size: 130%; + color: #A0A0A0; +} + +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; +} + +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +.contents a.qindexHL:visited { + color: #FFFFFF; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +ul { + overflow: hidden; /*Fixed: list item bullets overlap floating elements*/ +} + +#side-nav ul { + overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */ +} + +#main-nav ul { + overflow: visible; /* reset ul rule for the navigation bar drop down lists */ +} + +.fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0 0 1px 0; /*Fixed: last line underline overlap border*/ + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #FFFFFF; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl, img.inline { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +blockquote.DocNodeRTL { + border-left: 0; + border-right: 2px solid #9CAFD4; + margin: 0 4px 0 24px; + padding: 0 16px 0 12px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight, .memTemplItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype, .tparams .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir, .tparams .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +.PageDocRTL-title div.headertitle { + text-align: right; + direction: rtl; +} + +dl { + padding: 0 0 0 0; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug, dl.examples */ +dl.section { + margin-left: 0px; + padding-left: 0px; +} + +dl.section.DocNodeRTL { + margin-right: 0px; + padding-right: 0px; +} + +dl.note { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #D0C000; +} + +dl.note.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #FF0000; +} + +dl.warning.DocNodeRTL, dl.attention.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00D000; +} + +dl.pre.DocNodeRTL, dl.post.DocNodeRTL, dl.invariant.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00D000; +} + +dl.deprecated { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #505050; +} + +dl.deprecated.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #505050; +} + +dl.todo { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #00C0E0; +} + +dl.todo.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #00C0E0; +} + +dl.test { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #3030E0; +} + +dl.test.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #3030E0; +} + +dl.bug { + margin-left: -7px; + padding-left: 3px; + border-left: 4px solid; + border-color: #C08050; +} + +dl.bug.DocNodeRTL { + margin-left: 0; + padding-left: 0; + border-left: 0; + margin-right: -7px; + padding-right: 3px; + border-right: 4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; + text-align:right; + width:52px; +} + +dl.citelist dd { + margin:2px 0 2px 72px; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +.PageDocRTL-title div.toc { + float: left !important; + text-align: right; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +.PageDocRTL-title div.toc li { + background-position-x: right !important; + padding-left: 0 !important; + padding-right: 10px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + +.PageDocRTL-title div.toc li.level1 { + margin-left: 0 !important; + margin-right: 0; +} + +.PageDocRTL-title div.toc li.level2 { + margin-left: 0 !important; + margin-right: 15px; +} + +.PageDocRTL-title div.toc li.level3 { + margin-left: 0 !important; + margin-right: 30px; +} + +.PageDocRTL-title div.toc li.level4 { + margin-left: 0 !important; + margin-right: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #FFFFFF; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #FFFFFF; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + +.DocNodeRTL { + text-align: right; + direction: rtl; +} + +.DocNodeLTR { + text-align: left; + direction: ltr; +} + +table.DocNodeRTL { + width: auto; + margin-right: 0; + margin-left: auto; +} + +table.DocNodeLTR { + width: auto; + margin-right: auto; + margin-left: 0; +} + +tt, code, kbd, samp +{ + display: inline-block; + direction:ltr; +} +/* @end */ + +u { + text-decoration: underline; +} + diff --git a/doxygen/doc/html/doxygen.png b/doxygen/doc/html/doxygen.png new file mode 100644 index 0000000000000000000000000000000000000000..3ff17d807fd8aa003bed8bb2a69e8f0909592fd1 GIT binary patch literal 3779 zcmV;!4m|ORP)tMIv#Q0*~7*`IBSO7_x;@a8#Zk6_PeKR_s92J&)(m+);m9Iz3blw)z#Gi zP!9lj4$%+*>Hz@HCmM9L9|8c+0u=!H$O3?R0Kgx|#WP<6fKfC8fM-CQZT|_r@`>VO zX^Hgb|9cJqpdJA5$MCEK`F_2@2Y@s>^+;pF`~jdI0Pvr|vl4`=C)EH@1IFe7pdJ8F zH(qGi004~QnF)Ggga~8v08kGAs2hKTATxr7pwfNk|4#_AaT>w8P6TV+R2kbS$v==} zAjf`s0g#V8lB+b3)5oEI*q+{Yt$MZDruD2^;$+(_%Qn+%v0X-bJO=;@kiJ^ygLBnC z?1OVv_%aex1M@jKU|Z~$eI?PoF4Vj>fDzyo zAiLfpXY*a^Sj-S5D0S3@#V$sRW)g)_1e#$%8xdM>Jm7?!h zu0P2X=xoN>^!4DoPRgph2(2va07yfpXF+WH7EOg1GY%Zn z7~1A<(z7Q$ktEXhW_?GMpHp9l_UL18F3KOsxu81pqoBiNbFSGsof-W z6~eloMoz=4?OOnl2J268x5rOY`dCk0us(uS#Ud4yqOr@?=Q57a}tit|BhY>}~frH1sP`ScHS_d)oqH^lYy zZ%VP`#10MlE~P?cE(%(#(AUSv_T{+;t@$U}El}(1ig`vZo`Rm;+5&(AYzJ^Ae=h2X z@Re%vHwZU>|f0NI&%$*4eJweC5OROQrpPMA@*w|o z()A==l}(@bv^&>H1Ob3C=<^|hob?0+xJ?QQ3-ueQC}zy&JQNib!OqSO@-=>XzxlSF zAZ^U*1l6EEmg3r};_HY>&Jo_{dOPEFTWPmt=U&F#+0(O59^UIlHbNX+eF8UzyDR*T z(=5X$VF3!gm@RooS-&iiUYGG^`hMR(07zr_xP`d!^BH?uD>Phl8Rdifx3Af^Zr`Ku ztL+~HkVeL#bJ)7;`=>;{KNRvjmc}1}c58Sr#Treq=4{xo!ATy|c>iRSp4`dzMMVd@ zL8?uwXDY}Wqgh4mH`|$BTXpUIu6A1-cSq%hJw;@^Zr8TP=GMh*p(m(tN7@!^D~sl$ zz^tf4II4|};+irE$Fnm4NTc5%p{PRA`%}Zk`CE5?#h3|xcyQsS#iONZ z6H(@^i9td!$z~bZiJLTax$o>r(p}3o@< zyD7%(>ZYvy=6$U3e!F{Z`uSaYy`xQyl?b{}eg|G3&fz*`QH@mDUn)1%#5u`0m$%D} z?;tZ0u(mWeMV0QtzjgN!lT*pNRj;6510Wwx?Yi_=tYw|J#7@(Xe7ifDzXuK;JB;QO z#bg~K$cgm$@{QiL_3yr}y&~wuv=P=#O&Tj=Sr)aCUlYmZMcw?)T?c%0rUe1cS+o!qs_ zQ6Gp)-{)V!;=q}llyK3|^WeLKyjf%y;xHku;9(vM!j|~<7w1c*Mk-;P{T&yG) z@C-8E?QPynNQ<8f01D`2qexcVEIOU?y}MG)TAE6&VT5`rK8s(4PE;uQ92LTXUQ<>^ ztyQ@=@kRdh@ebUG^Z6NWWIL;_IGJ2ST>$t!$m$qvtj0Qmw8moN6GUV^!QKNK zHBXCtUH8)RY9++gH_TUV4^=-j$t}dD3qsN7GclJ^Zc&(j6&a_!$jCf}%c5ey`pm~1)@{yI3 zTdWyB+*X{JFw#z;PwRr5evb2!ueWF;v`B0HoUu4-(~aL=z;OXUUEtG`_$)Oxw6FKg zEzY`CyKaSBK3xt#8gA|r_|Kehn_HYVBMpEwbn9-fI*!u*eTA1ef8Mkl1=!jV4oYwWYM}i`A>_F4nhmlCIC6WLa zY%;4&@AlnaG11ejl61Jev21|r*m+?Kru3;1tFDl}#!OzUp6c>go4{C|^erwpG*&h6bspUPJag}oOkN2912Y3I?(eRc@U9>z#HPBHC?nps7H5!zP``90!Q1n80jo+B3TWXp!8Pe zwuKuLLI6l3Gv@+QH*Y}2wPLPQ1^EZhT#+Ed8q8Wo z1pTmIBxv14-{l&QVKxAyQF#8Q@NeJwWdKk>?cpiJLkJr+aZ!Me+Cfp!?FWSRf^j2k z73BRR{WSKaMkJ>1Nbx5dan5hg^_}O{Tj6u%iV%#QGz0Q@j{R^Ik)Z*+(YvY2ziBG)?AmJa|JV%4UT$k`hcOg5r9R?5>?o~JzK zJCrj&{i#hG>N7!B4kNX(%igb%kDj0fOQThC-8mtfap82PNRXr1D>lbgg)dYTQ(kbx z`Ee5kXG~Bh+BHQBf|kJEy6(ga%WfhvdQNDuOfQoe377l#ht&DrMGeIsI5C<&ai zWG$|hop2@@q5YDa)_-A?B02W;#fH!%k`daQLEItaJJ8Yf1L%8x;kg?)k)00P-lH+w z)5$QNV6r2$YtnV(4o=0^3{kmaXn*Dm0F*fU(@o)yVVjk|ln8ea6BMy%vZAhW9|wvA z8RoDkVoMEz1d>|5(k0Nw>22ZT){V<3$^C-cN+|~hKt2)){+l-?3m@-$c?-dlzQ)q- zZ)j%n^gerV{|+t}9m1_&&Ly!9$rtG4XX|WQ8`xYzGC~U@nYh~g(z9)bdAl#xH)xd5a=@|qql z|FzEil{P5(@gy!4ek05i$>`E^G~{;pnf6ftpLh$h#W?^#4UkPfa;;?bsIe&kz!+40 zI|6`F2n020)-r`pFaZ38F!S-lJM-o&inOw|66=GMeP@xQU5ghQH{~5Uh~TMTd;I9` z>YhVB`e^EVj*S7JF39ZgNf}A-0DwOcTT63ydN$I3b?yBQtUI*_fae~kPvzoD$zjX3 zoqBe#>12im4WzZ=f^4+u=!lA|#r%1`WB0-6*3BL#at`47#ebPpR|D1b)3BjT34nYY z%Ds%d?5$|{LgOIaRO{{oC&RK`O91$fqwM0(C_TALcozu*fWHb%%q&p-q{_8*2Zsi^ zh1ZCnr^UYa;4vQEtHk{~zi>wwMC5o{S=$P0X681y`SXwFH?Ewn{x-MOZynmc)JT5v zuHLwh;tLfxRrr%|k370}GofLl7thg>ACWWY&msqaVu&ry+`7+Ss>NL^%T1|z{IGMA zW-SKl=V-^{(f!Kf^#3(|T2W47d(%JVCI4JgRrT1pNz>+ietmFToNv^`gzC@&O-)+i zPQ~RwK8%C_vf%;%e>NyTp~dM5;!C|N0Q^6|CEb7Bw=Vz~$1#FA;Z*?mKSC)Hl-20s t8QyHj(g6VK0RYbl8UjE)0O0w=e*@m04r>stuEhWV002ovPDHLkV1hl;dM*F} literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/doxygen.svg b/doxygen/doc/html/doxygen.svg new file mode 100644 index 00000000..d42dad52 --- /dev/null +++ b/doxygen/doc/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doxygen/doc/html/dynsections.js b/doxygen/doc/html/dynsections.js new file mode 100644 index 00000000..88f2c27e --- /dev/null +++ b/doxygen/doc/html/dynsections.js @@ -0,0 +1,128 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function toggleVisibility(linkObj) +{ + var base = $(linkObj).attr('id'); + var summary = $('#'+base+'-summary'); + var content = $('#'+base+'-content'); + var trigger = $('#'+base+'-trigger'); + var src=$(trigger).attr('src'); + if (content.is(':visible')===true) { + content.hide(); + summary.show(); + $(linkObj).addClass('closed').removeClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-8)+'closed.png'); + } else { + content.show(); + summary.hide(); + $(linkObj).removeClass('closed').addClass('opened'); + $(trigger).attr('src',src.substring(0,src.length-10)+'open.png'); + } + return false; +} + +function updateStripes() +{ + $('table.directory tr'). + removeClass('even').filter(':visible:even').addClass('even'); +} + +function toggleLevel(level) +{ + $('table.directory tr').each(function() { + var l = this.id.split('_').length-1; + var i = $('#img'+this.id.substring(3)); + var a = $('#arr'+this.id.substring(3)); + if (l + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts/scripts/encoderConsistencyPlotAll.m Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
encoderConsistencyPlotAll.m
+
+
+
1 % iCub Robot Unit Tests (Robot Testing Framework)
+
2 %
+
3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
4 %
+
5 % This library is free software; you can redistribute it and/or
+
6 % modify it under the terms of the GNU Lesser General Public
+
7 % License as published by the Free Software Foundation; either
+
8 % version 2.1 of the License, or (at your option) any later version.
+
9 %
+
10 % This library is distributed in the hope that it will be useful,
+
11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
+
12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
13 % Lesser General Public License for more details.
+
14 %
+
15 % You should have received a copy of the GNU Lesser General Public
+
16 % License along with this library; if not, write to the Free Software
+
17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
18 
+
19 function encoderConsistencyPlotAll(partname, numofjoint)
+
20 
+
21 
+
22 figure(1);
+
23 filename = strcat("encConsis_jointPos_MotorPos_", partname, ".txt");
+
24 oneFile_plot(filename, "jointPos vs MotorPos", numofjoint);
+
25 
+
26 figure(2);
+
27 filename = strcat("encConsis_jointVel_motorVel_", partname, ".txt");
+
28 oneFile_plot(filename, "jointVel vs MotorVel", numofjoint);
+
29 
+
30 figure(3);
+
31 filename = strcat("encConsis_joint_derivedVel_vel_", partname, ".txt");
+
32 oneFile_plot(filename, "joint: derivedVel vs misuredVel", numofjoint);
+
33 
+
34 figure(4);
+
35 filename = strcat("encConsis_motor_derivedVel_vel_", partname, ".txt");
+
36 oneFile_plot(filename, "motor: derivedVel vs misuredVel", numofjoint);
+
37 
+
38 figure(5);
+
39 filename = strcat("encConsis_jointPos_MotorPos_reversed_", partname, ".txt");
+
40 oneFile_plot(filename, "jointPos vs MotorPos (REVERSED)", numofjoint);
+
41 
+
42 endfunction
+
43 
+
+ + + + diff --git a/doxygen/doc/html/files.html b/doxygen/doc/html/files.html new file mode 100644 index 00000000..c65395e8 --- /dev/null +++ b/doxygen/doc/html/files.html @@ -0,0 +1,183 @@ + + + + + + + +icub-test: File List + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 1234]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  example
  cpp
  ExampleFixture
  ExampleTest
  src
  camera
 CameraTest.cpp
 CameraTest.h
  cartesian-control
  reaching-tolerance
  simple-p2p-movement
  controlModes
 ControlModes.cpp
 ControlModes.h
  demoRedBall
 DemoRedBallTest.cpp
 DemoRedBallTest.h
  ftsensor-tests
 FtSensorTest.cpp
 FtSensorTest.h
  gaze-control
  simple-look
  imu
 imu.cpp
 imu.h
  jointLimits
 jointLimits.cpp
 jointLimits.h
  models-consistency
 iKiniDynConsistencyTest.cpp
 iKiniDynConsistencyTest.h
  motor-stiction
 MotorStiction.cpp
 MotorStiction.h
  motor-tests
 MotorTest.cpp
 MotorTest.h
  motorEncoders-consistency
 motorEncodersConsistency.cpp
 motorEncodersConsistency.h
  motorEncodersSignCheck
 motorEncodersSignCheck.cpp
 motorEncodersSignCheck.h
  movementReferencesTest
 movementReferencesTest.cpp
 movementReferencesTest.h
  openloop-consistency
 OpenloopConsistency.cpp
 OpenloopConsistency.h
  opticalEncoders-drift
 opticalEncodersDrift.cpp
 opticalEncodersDrift.h
  ports-frequency
 PortsFrequency.cpp
 PortsFrequency.h
  positionControl-accuracy
 plotDataPosition.m
 PositionControlAccuracy.cpp
 PositionControlAccuracy.h
  positionControl-accuracy-ExternalPid
 plotDataPosition.m
 PositionControlAccuracyExternalPid.cpp
 PositionControlAccuracyExternalPid.h
  positionDirect
 PositionDirect.cpp
 PositionDirect.h
  sensors-duplicate-readings
 SensorsDuplicateReadings.cpp
 SensorsDuplicateReadings.h
  skinWrapperTest
 SkinWrapperTest.cpp
 SkinWrapperTest.h
  system-status
 SystemStatus.cpp
 SystemStatus.h
  torqueControl-accuracy
 plotDataTorque.m
 TorqueControlAccuracy.cpp
 TorqueControlAccuracy.h
  torqueControl-consistency
 TorqueControlConsistency.cpp
 TorqueControlConsistency.h
  torqueControl-gravityConsistency
 TorqueControlGravityConsistency.cpp
 TorqueControlGravityConsistency.h
  torqueControl-stiffDampCheck
 TorqueControlStiffDampCheck.cpp
 TorqueControlStiffDampCheck.h
  suites
  contexts
  scripts
+
+
+ + + + diff --git a/doxygen/doc/html/folderclosed.png b/doxygen/doc/html/folderclosed.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8ab35edce8e97554e360005ee9fc5bffb36e66 GIT binary patch literal 616 zcmV-u0+;=XP)a9#ETzayK)T~Jw&MMH>OIr#&;dC}is*2Mqdf&akCc=O@`qC+4i z5Iu3w#1M@KqXCz8TIZd1wli&kkl2HVcAiZ8PUn5z_kG@-y;?yK06=cA0U%H0PH+kU zl6dp}OR(|r8-RG+YLu`zbI}5TlOU6ToR41{9=uz^?dGTNL;wIMf|V3`d1Wj3y!#6` zBLZ?xpKR~^2x}?~zA(_NUu3IaDB$tKma*XUdOZN~c=dLt_h_k!dbxm_*ibDM zlFX`g{k$X}yIe%$N)cn1LNu=q9_CS)*>A zsX_mM4L@`(cSNQKMFc$RtYbx{79#j-J7hk*>*+ZZhM4Hw?I?rsXCi#mRWJ=-0LGV5a-WR0Qgt<|Nqf)C-@80`5gIz45^_20000IqP)X=#(TiCT&PiIIVc55T}TU}EUh*{q$|`3@{d>{Tc9Bo>e= zfmF3!f>fbI9#GoEHh0f`i5)wkLpva0ztf%HpZneK?w-7AK@b4Itw{y|Zd3k!fH?q2 zlhckHd_V2M_X7+)U&_Xcfvtw60l;--DgZmLSw-Y?S>)zIqMyJ1#FwLU*%bl38ok+! zh78H87n`ZTS;uhzAR$M`zZ`bVhq=+%u9^$5jDplgxd44}9;IRqUH1YHH|@6oFe%z( zo4)_>E$F&^P-f(#)>(TrnbE>Pefs9~@iN=|)Rz|V`sGfHNrJ)0gJb8xx+SBmRf@1l zvuzt=vGfI)<-F9!o&3l?>9~0QbUDT(wFdnQPv%xdD)m*g%!20>Bc9iYmGAp<9YAa( z0QgYgTWqf1qN++Gqp z8@AYPTB3E|6s=WLG?xw0tm|U!o=&zd+H0oRYE;Dbx+Na9s^STqX|Gnq%H8s(nGDGJ j8vwW|`Ts`)fSK|Kx=IK@RG@g200000NkvXXu0mjfauFEA literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/group__icub-tests.html b/doxygen/doc/html/group__icub-tests.html new file mode 100644 index 00000000..573f3d96 --- /dev/null +++ b/doxygen/doc/html/group__icub-tests.html @@ -0,0 +1,154 @@ + + + + + + + +icub-test: A list of available tests + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
A list of available tests
+
+
+ +

This page contains the list of all the tests tht are currently available and documented. +More...

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Data Structures

class  ExampleTest
 This is just an example test, use it as a reference to implement new tests. More...
 
class  CameraTest
 Check if a camera is publishing images at desired framerate. More...
 
class  CartesianControlReachingToleranceTest
 This test verifies the point-to-point cartesian movement. More...
 
class  CartesianControlSimpleP2pMovementTest
 This test verifies the point-to-point cartesian movement. More...
 
class  ControlModes
 The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. More...
 
class  DemoRedBallTest
 This test verifies the point-to-point cartesian movement. More...
 
class  FtSensorTest
 Check if a FT sensor port is correctly publishing a vector with 6 values. More...
 
class  GazeControlSimpleLookTest
 This test verifies the simple gaze movements. More...
 
class  Imu
 The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements. More...
 
class  JointLimits
 Check if the software joint limits are properly set. More...
 
class  MotorTest
 Check IPositionControl and IEncoders. More...
 
class  OpticalEncodersConsistency
 This tests checks if the motor encoder reading are consistent with the joint encoder readings. More...
 
class  MotorEncodersSignCheck
 This tests checks if the motor encoder readings increase when positive pwm is applayed to motor. More...
 
class  MovementReferencesTest
 Check IPositionControl, IVelocityControl, IPWMControl, IPositionDirect. More...
 
class  OpticalEncodersDrift
 This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max). More...
 
class  PositionControlAccuracy
 This tests checks the a position PID response, sending a step reference signal with a positionDirect command. More...
 
class  PositionControlAccuracyExernalPid
 This tests checks the response of the system to a position step, sending directly PWM commands to a joint. More...
 
class  PositionDirect
 This tests checks the positionDirect control, sending a sinusoidal reference signal, with parametric frequency and amplitude. More...
 
class  SensorsDuplicateReadings
 Check if a yarp port is correctly publishing unique values at each update . More...
 
class  SkinWrapperTest
 This test verifies the functionalities of skinWrapper after the removal of analogServer from icub-main. More...
 
class  TorqueControlAccuracy
 This tests checks the a torque PID response, sending a step reference signal with a setRefTorque command. More...
 
class  TorqueControlGravityConsistency
 The test is supposed to be run with the iCub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the wholeBodyDynamics(Tree) running. More...
 
+

Detailed Description

+

This page contains the list of all the tests tht are currently available and documented.

+

Each class is a test that can be ran and configured independently.

+

To add a test to this list it is enough that you add the following line to the class that implements the test:

+
\ingroup icub-tests

Do not forget to generate the documentation either locally or online following the instructions here.

+
+ + + + diff --git a/doxygen/doc/html/iKiniDynConsistencyTest_8cpp_source.html b/doxygen/doc/html/iKiniDynConsistencyTest_8cpp_source.html new file mode 100644 index 00000000..bf75887b --- /dev/null +++ b/doxygen/doc/html/iKiniDynConsistencyTest_8cpp_source.html @@ -0,0 +1,343 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/models-consistency/iKiniDynConsistencyTest.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
iKiniDynConsistencyTest.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <cmath>
+
22 
+
23 #include <robottestingframework/TestAssert.h>
+
24 #include <robottestingframework/dll/Plugin.h>
+
25 #include "iKiniDynConsistencyTest.h"
+
26 
+
27 // Yarp includes
+
28 #include <yarp/math/api.h>
+
29 #include <yarp/math/Math.h>
+
30 #include <yarp/os/Random.h>
+
31 #include <yarp/os/Time.h>
+
32 
+
33 // iKin includes
+
34 #include <iCub/iKin/iKinFwd.h>
+
35 
+
36 // iDyn includes
+
37 #include <iCub/iDyn/iDyn.h>
+
38 #include <iCub/iDyn/iDynBody.h>
+
39 
+
40 using namespace std;
+
41 using namespace robottestingframework;
+
42 using namespace yarp::os;
+
43 using namespace yarp::sig;
+
44 using namespace yarp::math;
+
45 using namespace iCub::iKin;
+
46 using namespace iCub::iDyn;
+
47 
+
48 
+
49 // some utils
+
50 void set_random_vector(yarp::sig::Vector & vec, yarp::os::Random & rng, double coeff=0.0)
+
51 {
+
52  for( int i=0; i < (int)vec.size(); i++ ) {
+
53  vec[i] = coeff*M_PI*rng.uniform();
+
54  }
+
55 }
+
56 
+
57 
+
58 // prepare the plugin
+
59 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(iKiniDynConsistencyTest)
+
60 
+
61 iKiniDynConsistencyTest::iKiniDynConsistencyTest() : TestCase("iKiniDynConsistencyTest") {
+
62 }
+
63 
+
64 void iKiniDynConsistencyTest::check_matrix_are_equal(const yarp::sig::Matrix & mat1,
+
65  const yarp::sig::Matrix & mat2,
+
66  double tol)
+
67 {
+
68  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Comparing mat1: \n %s \n",mat1.toString().c_str()));
+
69  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("with mat2: \n %s \n",mat2.toString().c_str()));
+
70  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(mat1.rows()==mat2.rows(),"matrix rows do not match");
+
71  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(mat1.cols()==mat2.cols(),"matrix cols do not match");
+
72  for(int row=0; row < mat1.rows(); row++ )
+
73  {
+
74  for(int col=0; col < mat1.cols(); col++ )
+
75  {
+
76  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(std::fabs(mat1(row,col)-mat2(row,col)) < tol,
+
77  Asserter::format("Element %d %d don't match",row,col));
+
78  }
+
79  }
+
80 
+
81 }
+
82 
+
83 
+
84 iKiniDynConsistencyTest::~iKiniDynConsistencyTest() { }
+
85 
+
86 bool iKiniDynConsistencyTest::setup(int argc, char** argv) {
+
87 
+
88  return true;
+
89 }
+
90 
+
91 void iKiniDynConsistencyTest::tearDown() {
+
92  // finalization goes her ...
+
93 }
+
94 
+
95 
+
96 Matrix iKiniDynConsistencyTest::getiKinTransform(const string part, int index)
+
97 {
+
98  if( part == "left_leg" )
+
99  {
+
100  return ikin_lleg.getH(index);
+
101  }
+
102  if( part == "right_leg" )
+
103  {
+
104  return ikin_rleg.getH(index);
+
105  }
+
106  if( part == "left_arm" )
+
107  {
+
108  return ikin_larm.getH(index);
+
109  }
+
110  if( part == "right_arm" )
+
111  {
+
112  return ikin_rarm.getH(index);
+
113  }
+
114  return Matrix();
+
115 }
+
116 
+
117 Matrix iKiniDynConsistencyTest::getiDynTransform(const string part, int index)
+
118 {
+
119  if( part == "left_leg" )
+
120  {
+
121  return icub->lowerTorso->HLeft*
+
122  icub->lowerTorso->left->getH();
+
123  }
+
124  if( part == "right_leg" )
+
125  {
+
126  return icub->lowerTorso->HRight*
+
127  icub->lowerTorso->right->getH();
+
128  }
+
129  if( part == "left_arm" )
+
130  {
+
131  //return ikin_larm.getH(index);
+
132  }
+
133  if( part == "right_arm" )
+
134  {
+
135  //return ikin_rarm.getH(index);
+
136  }
+
137  return Matrix();
+
138 }
+
139 
+
140 void iKiniDynConsistencyTest::run() {
+
141 
+
142  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Creating iCubWholeBody object");
+
143  version_tag ver;
+
144  ver.head_version = 1;
+
145  ver.legs_version = 1;
+
146  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Creating iCubWholeBody object with head version %d and legs version %d", ver.head_version, ver.legs_version));
+
147  icub = new iCubWholeBody(ver);
+
148 
+
149  // now we set the joint angles for all the limbs
+
150  // if connected to the real robot, we can take this values from the encoders
+
151  q_head.resize(icub->upperTorso->getNLinks("head"));
+
152  q_larm.resize(icub->upperTorso->getNLinks("left_arm"));
+
153  q_rarm.resize(icub->upperTorso->getNLinks("right_arm"));
+
154  q_torso.resize(icub->lowerTorso->getNLinks("torso"));
+
155  q_lleg.resize(icub->lowerTorso->getNLinks("left_leg"));
+
156  q_rleg.resize(icub->lowerTorso->getNLinks("right_leg"));
+
157 
+
158  //We can initialize the joint position to random values
+
159 
+
160  yarp::os::Random rng;
+
161  rng.seed(147);
+
162  double coeff = 1.0;
+
163  set_random_vector(q_head,rng,coeff);
+
164  set_random_vector(q_larm,rng,coeff);
+
165  set_random_vector(q_rarm,rng,coeff);
+
166  set_random_vector(q_torso,rng,coeff);
+
167  set_random_vector(q_lleg,rng,coeff);
+
168  set_random_vector(q_rleg,rng,coeff);
+
169 
+
170 
+
171 
+
172  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Setting positions in iCubWholeBody");
+
173  q_head = icub->upperTorso->setAng("head",q_head);
+
174  q_rarm = icub->upperTorso->setAng("right_arm",q_rarm);
+
175  q_larm = icub->upperTorso->setAng("left_arm",q_larm);
+
176  q_torso = icub->lowerTorso->setAng("torso",q_torso);
+
177  q_rleg = icub->lowerTorso->setAng("right_leg",q_rleg);
+
178  q_lleg = icub->lowerTorso->setAng("left_leg",q_lleg);
+
179 
+
180  yarp::sig::Matrix transform_ikin(4,4), transform_idyn(4,4);
+
181 
+
183  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking left hand position");
+
184  new(&ikin_larm) iCubArm("left");
+
185 
+
186  Vector q_torso_larm = cat(q_torso,q_larm);
+
187  ikin_larm.setAllConstraints(false);
+
188  ikin_larm.releaseLink(0);
+
189  ikin_larm.releaseLink(1);
+
190  ikin_larm.releaseLink(2);
+
191  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("q_torso_larm : %d ikin_larm : %d",q_torso_larm.size(),ikin_larm.getDOF()));
+
192  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(q_torso_larm.size() == ikin_larm.getDOF(),"unexpected chain size");
+
193  ikin_larm.setAng(q_torso_larm);
+
194 
+
195  transform_ikin = ikin_larm.getH();
+
196  transform_idyn = icub->lowerTorso->HUp*
+
197  icub->lowerTorso->up->getH(2,true)*
+
198  icub->upperTorso->HLeft*
+
199  icub->upperTorso->left->getH();
+
200 
+
201  check_matrix_are_equal(transform_ikin,transform_idyn);
+
202 
+
203 
+
205  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking right hand position");
+
206  new(&ikin_rarm) iCubArm("right");
+
207  Vector q_torso_rarm = cat(q_torso,q_rarm);
+
208  ikin_rarm.setAllConstraints(false);
+
209  ikin_rarm.releaseLink(0);
+
210  ikin_rarm.releaseLink(1);
+
211  ikin_rarm.releaseLink(2);
+
212  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(q_torso_rarm.size() == ikin_rarm.getDOF(),"unexpected chain size");
+
213  ikin_rarm.setAng(q_torso_rarm);
+
214 
+
215  transform_ikin = ikin_rarm.getH();
+
216  transform_idyn = icub->lowerTorso->HUp*
+
217  icub->lowerTorso->up->getH(2,true)*
+
218  icub->upperTorso->HRight*
+
219  icub->upperTorso->right->getH();
+
220 
+
221  check_matrix_are_equal(transform_ikin,transform_idyn);
+
222 
+
223 
+
225  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking left leg end effector positions");
+
226  new(&ikin_lleg) iCubLeg("left");
+
227  ikin_lleg.setAllConstraints(false);
+
228  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("q_lleg : %d ikin_lleg : %d",q_lleg.size(),ikin_lleg.getDOF()));
+
229  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(q_lleg.size() == ikin_lleg.getDOF(),"unexpected chain size");
+
230  ikin_lleg.setAng(q_lleg);
+
231 
+
232  transform_ikin = ikin_lleg.getH();
+
233  transform_idyn = icub->lowerTorso->HLeft*
+
234  icub->lowerTorso->left->getH();
+
235 
+
236  check_matrix_are_equal(transform_ikin,transform_idyn);
+
237 
+
238  /*
+
239  for(int link=0; link < ikin_lleg.getDOF(); link++ )
+
240  {
+
241  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking %d DH frame of left_leg",link));
+
242  check_matrix_are_equal(this->getiKinTransform("left_leg",link),
+
243  this->getiDynTransform("left_leg",link));
+
244  }*/
+
245 
+
247  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking right leg end effector positions");
+
248  new(&ikin_rleg) iCubLeg("right");
+
249  ikin_rleg.setAllConstraints(false);
+
250  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(q_rleg.size() == ikin_rleg.getDOF(),"unexpected chain size");
+
251  ikin_rleg.setAng(q_rleg);
+
252 
+
253  transform_ikin = ikin_rleg.getH();
+
254  transform_idyn = icub->lowerTorso->HRight*
+
255  icub->lowerTorso->right->getH();
+
256 
+
257  check_matrix_are_equal(transform_ikin,transform_idyn);
+
258 
+
259  /*
+
260  for(int link=0; link < ikin_rleg.getDOF(); link++ )
+
261  {
+
262  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking %d DH frame of right_leg",link));
+
263  check_matrix_are_equal(this->getiKinTransform("right_leg",link),
+
264  this->getiDynTransform("right_leg",link));
+
265  }*/
+
266 
+
267  delete icub;
+
268 }
+
269 
+
+ + + + diff --git a/doxygen/doc/html/iKiniDynConsistencyTest_8h_source.html b/doxygen/doc/html/iKiniDynConsistencyTest_8h_source.html new file mode 100644 index 00000000..c423b664 --- /dev/null +++ b/doxygen/doc/html/iKiniDynConsistencyTest_8h_source.html @@ -0,0 +1,144 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/models-consistency/iKiniDynConsistencyTest.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
iKiniDynConsistencyTest.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _IKINIDYNCONSISTENCYTEST_H_
+
22 #define _IKINIDYNCONSISTENCYTEST_H_
+
23 
+
24 #include <yarp/robottestingframework/TestCase.h>
+
25 
+
26 #include <yarp/sig/Matrix.h>
+
27 
+
28 #include <iCub/iKin/iKinFwd.h>
+
29 
+
30 namespace iCub
+
31 {
+
32 namespace iDyn
+
33 {
+
34  class iCubWholeBody;
+
35 }
+
36 }
+
37 
+
38 class iKiniDynConsistencyTest : public robottestingframework::TestCase {
+
39 private:
+
40  yarp::sig::Vector q_head, q_torso, q_larm, q_rarm, q_lleg, q_rleg;
+
41  iCub::iKin::iCubArm ikin_larm, ikin_rarm;
+
42  iCub::iKin::iCubLeg ikin_lleg, ikin_rleg;
+
43  iCub::iDyn::iCubWholeBody * icub;
+
44 
+
45 public:
+
46  iKiniDynConsistencyTest();
+
47  virtual ~iKiniDynConsistencyTest();
+
48 
+
49  virtual bool setup(int argc, char** argv);
+
50 
+
51  virtual void tearDown();
+
52 
+
53  virtual void run();
+
54 
+
55  virtual yarp::sig::Matrix getiKinTransform(const std::string part,
+
56  int index);
+
57 
+
58  virtual yarp::sig::Matrix getiDynTransform(const std::string part,
+
59  int index);
+
60 
+
61  virtual void check_matrix_are_equal(const yarp::sig::Matrix & mat1,
+
62  const yarp::sig::Matrix & mat2,
+
63  double tol=1e-3);
+
64 };
+
65 
+
66 #endif //_CAMERATEST_H
+
+ + + + diff --git a/doxygen/doc/html/imu_8cpp_source.html b/doxygen/doc/html/imu_8cpp_source.html new file mode 100644 index 00000000..be1ecd6b --- /dev/null +++ b/doxygen/doc/html/imu_8cpp_source.html @@ -0,0 +1,321 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/imu/imu.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
imu.cpp
+
+
+
1 #include <iostream>
+
2 #include <cmath>
+
3 #include <numeric>
+
4 
+
5 #include <robottestingframework/TestAssert.h>
+
6 #include <robottestingframework/dll/Plugin.h>
+
7 
+
8 #include <yarp/os/Property.h>
+
9 #include <yarp/os/Stamp.h>
+
10 #include <yarp/os/ResourceFinder.h>
+
11 
+
12 #include "imu.h"
+
13 
+
14 using namespace robottestingframework;
+
15 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(Imu)
+
16 
+
17 Imu::Imu() : TestCase("Imu") { }
+
18 
+
19 Imu::~Imu() { }
+
20 
+
21 bool Imu::setup(yarp::os::Property& property)
+
22 {
+
23  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
24  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("port"), "The port name must be given as the test parameter!");
+
25  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
26  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("controlboards"), "Please, provide the controlboards name.");
+
27  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("controlled_joints"), "Please, provide the controlled joints name.");
+
28  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("model"), "Please, provide the urdf model path.");
+
29  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("frame"), "Please, provide the frame name.");
+
30  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("sensor"), "Please, provide the sensor name.");
+
31  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("mean_error"), "Please, provide the threshold error.");
+
32 
+
33  robotName = property.find("robot").asString(); // robot name
+
34  portName = property.find("port").asString(); // name of the port from which the data are streamed
+
35  partName = property.find("part").asString(); // name of the part of the robot on which the sensor is mounted
+
36  frameName = property.find("frame").asString(); // frame on which the sensor is attached
+
37  sensorName = property.find("sensor").asString(); // sensor name within urdf
+
38  errorMean = property.find("mean_error").asFloat64(); //error mean
+
39  modelName = property.find("model").asString(); // urdf model path
+
40  yarp::os::ResourceFinder &rf = yarp::os::ResourceFinder::getResourceFinderSingleton();
+
41  std::string modelAbsolutePath = rf.findFileByName(modelName);
+
42 
+
43  yarp::os::Bottle *inputMoveJoints;
+
44  inputMoveJoints = property.find("move_joints").asList();
+
45  for (int i = 0; i < inputMoveJoints->size(); i++)
+
46  {
+
47  movJointsList.addString(inputMoveJoints->get(i).asString());
+
48  }
+
49 
+
50  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Running IMU test on "+robotName+"...");
+
51 
+
52  yarp::os::Property MASclientOptions;
+
53  MASclientOptions.put("device", "multipleanalogsensorsclient");
+
54  MASclientOptions.put("remote", portName);
+
55  MASclientOptions.put("local", "/imuTest/"+portName);
+
56 
+
57  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(MASclientDriver.open(MASclientOptions), "Unable to open the MAS client driver");
+
58 
+
59  yarp::os::Property controlBoardOptions;
+
60  controlBoardOptions.put("device", "remotecontrolboardremapper");
+
61 
+
62  yarp::os::Bottle remoteControlBoards;
+
63  yarp::os::Bottle & remoteControlBoardsList = remoteControlBoards.addList();
+
64  yarp::os::Bottle *inputControlBoards;
+
65  inputControlBoards = property.find("controlboards").asList();
+
66  for (int i = 0; i < inputControlBoards->size(); i++)
+
67  {
+
68  remoteControlBoardsList.addString("/"+robotName+"/"+inputControlBoards->get(i).asString());
+
69  }
+
70 
+
71  yarp::os::Bottle axesNames;
+
72  yarp::os::Bottle & axesList = axesNames.addList();
+
73  yarp::os::Bottle *inputJoints;
+
74  inputJoints = property.find("controlled_joints").asList();
+
75  for(int i = 0; i < inputJoints->size(); i++)
+
76  {
+
77  axesList.addString(inputJoints->get(i).asString());
+
78  }
+
79 
+
80  controlBoardOptions.put("remoteControlBoards", remoteControlBoards.get(0));
+
81  controlBoardOptions.put("localPortPrefix", "/test");
+
82  controlBoardOptions.put("axesNames", axesNames.get(0));
+
83  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.open(controlBoardOptions), "Unable to open the controlBoard driver");
+
84 
+
85  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(MASclientDriver.isValid(), "Device driver cannot be opened");
+
86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(MASclientDriver.view(iorientation), "Unable to open orientation interface");
+
87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.isValid(), "Device driver cannot be opened");
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.view(ipos), "Unable to open position control interface");
+
89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.view(ienc), "Unable to open encoder interface");
+
90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.view(iaxes), "Unable to open axes interface");
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(controlBoardDriver.view(ilim), "Unable to open limits interface");
+
92 
+
93  outputPort.open("/test-imu/out");
+
94  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Opening port "+outputPort.getName()+"...");
+
95 
+
96  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ienc->getAxes(&axes), "Cannot get number of controlled axes");
+
97  std::string axisName;
+
98 
+
99  for (int i = 0; i < axes; i++)
+
100  {
+
101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(iaxes->getAxisName(i, axisName), "Cannot get the name of controlled axes");
+
102  axesVec.push_back(axisName);
+
103  }
+
104 
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(model.loadReducedModelFromFile(modelAbsolutePath.c_str(), axesVec), Asserter::format("Cannot load model from %s", modelAbsolutePath.c_str()));
+
106  kinDynComp.loadRobotModel(model.model());
+
107 
+
108  iDynTree::Vector3 baseLinkOrientationRad;
+
109  baseLinkOrientationRad.zero();
+
110 
+
111  baseLinkOrientation = iDynTree::Rotation::RPY(baseLinkOrientationRad[0], baseLinkOrientationRad[1], baseLinkOrientationRad[2]);
+
112  I_T_base = iDynTree::Transform(baseLinkOrientation, iDynTree::Position::Zero());
+
113  iDynTree::Twist baseVelocity = iDynTree::Twist::Zero();
+
114 
+
115  unsigned int dofs = kinDynComp.model().getNrOfDOFs();
+
116  s.resize(dofs);
+
117  ds.resize(dofs);
+
118 
+
119  positions.resize(axes);
+
120  velocities.resize(axes);
+
121  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ienc->getEncoders(positions.data()), "Cannot get joint positions");
+
122  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ienc->getEncoderSpeeds(velocities.data()), "Cannot get joint velocities");
+
123 
+
124  for(auto i = 0; i < axes; i++)
+
125  {
+
126  s.setVal(i, iDynTree::deg2rad(positions[i]));
+
127  ds.setVal(i, iDynTree::deg2rad(velocities[i]));
+
128  }
+
129 
+
130  gravity.zero();
+
131  gravity(2) = -9.81;
+
132 
+
133  kinDynComp.setRobotState(
+
134  I_T_base,
+
135  s,
+
136  baseVelocity,
+
137  ds,
+
138  gravity
+
139  );
+
140 
+
141  return true;
+
142 }
+
143 
+
144 void Imu::tearDown()
+
145 {
+
146  outputPort.interrupt();
+
147  outputPort.close();
+
148 
+
149  controlBoardDriver.close();
+
150  MASclientDriver.close();
+
151 }
+
152 
+
153 void Imu::run()
+
154 {
+
155  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Starting reading IMU orientation values...");
+
156  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(iorientation->getOrientationSensorMeasureAsRollPitchYaw(0, rpyValues, timestamp), "Unable to obtain rpy measurements.");
+
157 
+
158  iDynTree::Rotation I_R_FK = kinDynComp.getWorldTransform(frameName).getRotation();
+
159  I_R_I_IMU = (I_R_FK * ((iDynTree::Rotation::RPY(iDynTree::deg2rad(rpyValues[0]), iDynTree::deg2rad(rpyValues[1]), iDynTree::deg2rad(rpyValues[2]))).inverse()));
+
160 
+
161  double minLim;
+
162  double maxLim;
+
163 
+
164  for (int i = 0; i < movJointsList.size(); i++)
+
165  {
+
166  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ilim->getLimits(model.model().getJointIndex(movJointsList.get(i).toString()), &minLim, &maxLim), Asserter::format("Unable to get limits for joint %s", movJointsList.get(i).toString()));
+
167  moveJoint(model.model().getJointIndex(movJointsList.get(i).toString()), minLim + 5);
+
168  yarp::os::Time::delay(1.);
+
169  moveJoint(model.model().getJointIndex(movJointsList.get(i).toString()), maxLim - 5);
+
170  yarp::os::Time::delay(1.);
+
171  }
+
172 }
+
173 
+
174 bool Imu::sendData(iDynTree::Vector3 expectedValues, iDynTree::Vector3 imuSignal)
+
175 {
+
176  yarp::os::Bottle& out = outputPort.prepare();
+
177  static yarp::os::Stamp stamp;
+
178 
+
179  stamp.update();
+
180  outputPort.setEnvelope(stamp);
+
181  out.clear();
+
182 
+
183  out.addFloat64(iDynTree::rad2deg(expectedValues[0]));
+
184  out.addFloat64(iDynTree::rad2deg(expectedValues[1]));
+
185  out.addFloat64(iDynTree::rad2deg(expectedValues[2]));
+
186 
+
187  out.addFloat64(iDynTree::rad2deg(imuSignal[0]));
+
188  out.addFloat64(iDynTree::rad2deg(imuSignal[1]));
+
189  out.addFloat64(iDynTree::rad2deg(imuSignal[2]));
+
190 
+
191  out.addFloat64(stamp.getTime());
+
192 
+
193  outputPort.writeStrict();
+
194 
+
195  return true;
+
196 }
+
197 
+
198 bool Imu::moveJoint(int ax, double pos)
+
199 {
+
200  bool done = false;
+
201  int count = 0;
+
202  iDynTree::GeomVector3 error;
+
203  yarp::os::Time::delay(.1);
+
204 
+
205  ipos->positionMove(ax, pos);
+
206 
+
207  while(!done)
+
208  {
+
209  iorientation->getOrientationSensorMeasureAsRollPitchYaw(0, rpyValues, timestamp);
+
210 
+
211  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ienc->getEncoders(positions.data()), "Cannot get joint positions");
+
212  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ienc->getEncoderSpeeds(velocities.data()), "Cannot get joint velocities");
+
213 
+
214  for (auto i = 0; i < axes; i++)
+
215  {
+
216  s.setVal(i, iDynTree::deg2rad(positions[i]));
+
217  ds.setVal(i, iDynTree::deg2rad(velocities[i]));
+
218  }
+
219 
+
220  kinDynComp.setRobotState(
+
221  I_T_base,
+
222  s,
+
223  baseVelocity,
+
224  ds,
+
225  gravity);
+
226 
+
227  iDynTree::Rotation expectedImuSignal = kinDynComp.getWorldTransform(frameName).getRotation();
+
228  iDynTree::Rotation imuSignal = (I_R_I_IMU * iDynTree::Rotation::RPY(iDynTree::deg2rad(rpyValues[0]), iDynTree::deg2rad(rpyValues[1]), iDynTree::deg2rad(rpyValues[2])));
+
229 
+
230  error = error + (expectedImuSignal * imuSignal.inverse()).log();
+
231  count++;
+
232 
+
233  sendData(expectedImuSignal.asRPY(), imuSignal.asRPY());
+
234  ipos->checkMotionDone(&done);
+
235  }
+
236 
+
237  double err_mean = fabs((std::accumulate(error.begin(), error.end(), 0.0)) / count);
+
238  ROBOTTESTINGFRAMEWORK_TEST_CHECK(err_mean < errorMean, Asserter::format("The error mean on axis %s is %f rad!", axesVec[ax].c_str(), err_mean));
+
239  ipos->positionMove(ax, 0.0);
+
240 
+
241  return true;
+
242 }
+
The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements.
Definition: imu.h:44
+
+ + + + diff --git a/doxygen/doc/html/imu_8h_source.html b/doxygen/doc/html/imu_8h_source.html new file mode 100644 index 00000000..e4aba3c9 --- /dev/null +++ b/doxygen/doc/html/imu_8h_source.html @@ -0,0 +1,144 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/imu/imu.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
imu.h
+
+
+
1 #ifndef IMU_H
+
2 #define IMU_H
+
3 
+
4 #include <yarp/dev/PolyDriver.h>
+
5 #include <yarp/dev/MultipleAnalogSensorsInterfaces.h>
+
6 #include <yarp/dev/IPositionControl.h>
+
7 #include <yarp/dev/IEncoders.h>
+
8 #include <yarp/dev/IAxisInfo.h>
+
9 #include <yarp/dev/IControlLimits.h>
+
10 #include <yarp/robottestingframework/TestCase.h>
+
11 
+
12 #include <iDynTree/KinDynComputations.h>
+
13 #include <iDynTree/ModelLoader.h>
+
14 #include <iDynTree/Model.h>
+
15 
+
44 class Imu : public yarp::robottestingframework::TestCase {
+
45  public:
+
46  Imu();
+
47  virtual ~Imu();
+
48  virtual bool setup(yarp::os::Property& property);
+
49  virtual void tearDown();
+
50  virtual void run();
+
51 
+
52  private:
+
53  std::string robotName;
+
54  std::string portName;
+
55  std::string partName;
+
56  std::string modelName;
+
57  std::string frameName;
+
58  std::string sensorName;
+
59  double errorMean;
+
60  yarp::os::Bottle movJointsList;
+
61 
+
62  yarp::dev::PolyDriver MASclientDriver;
+
63  yarp::dev::PolyDriver controlBoardDriver;
+
64  yarp::dev::IOrientationSensors* iorientation;
+
65  yarp::dev::IPositionControl* ipos;
+
66  yarp::dev::IEncoders* ienc;
+
67  yarp::dev::IAxisInfo* iaxes;
+
68  yarp::dev::IControlLimits* ilim;
+
69 
+
70  yarp::os::BufferedPort <yarp::os::Bottle> outputPort;
+
71  yarp::sig::Vector rpyValues;
+
72  yarp::sig::Vector positions;
+
73  yarp::sig::Vector velocities;
+
74 
+
75  int axes;
+
76  double timestamp;
+
77  std::vector<std::string> axesVec;
+
78 
+
79  iDynTree::ModelLoader model;
+
80  iDynTree::KinDynComputations kinDynComp;
+
81  iDynTree::VectorDynSize s;
+
82  iDynTree::VectorDynSize ds;
+
83  iDynTree::Vector3 gravity;
+
84  iDynTree::Rotation baseLinkOrientation;
+
85  iDynTree::Twist baseVelocity;
+
86  iDynTree::Transform I_T_base;
+
87  iDynTree::Rotation I_R_I_IMU;
+
88 
+
89  bool sendData(iDynTree::Vector3 expectedValues, iDynTree::Vector3 imuSignal);
+
90  bool moveJoint(int ax, double pos);
+
91  };
+
92 
+
93 #endif //IMU_H
+
The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements.
Definition: imu.h:44
+
+ + + + diff --git a/doxygen/doc/html/index.html b/doxygen/doc/html/index.html new file mode 100644 index 00000000..706cf5c3 --- /dev/null +++ b/doxygen/doc/html/index.html @@ -0,0 +1,94 @@ + + + + + + + +icub-test: iCub-tests main page + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
iCub-tests main page
+
+
+

The icub-tests repository contains tests for the iCub robot.Tests are written using the Robot Testing Framework. See https://github.com/robotology/robot-testing-framework for how to use Robot Testing Framework.

+ +

+Contributors

+
    +
  • Ali Paikan
  • +
  • Lorenzo Natale
  • +
  • Silvio Traversaro
  • +
  • Alessandro Scalzo
  • +
  • Marco Randazzo
  • +
  • Valentina Gaggero
  • +
  • Ugo Pattacini
  • +
  • Nicolò Genesio
  • +
  • Daniele E. Domenichelli
  • +
+
+
+ + + + diff --git a/doxygen/doc/html/installation.html b/doxygen/doc/html/installation.html new file mode 100644 index 00000000..6155efb4 --- /dev/null +++ b/doxygen/doc/html/installation.html @@ -0,0 +1,122 @@ + + + + + + + +icub-test: Installation Instructions + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
Installation Instructions
+
+
+ +

+Installing Robot Testing Framework

+

If you have not installed Robot Testing Framework, Please see http://robotology.github.io/robot-testing-framework/index.html.
+Make sure that the yarpmanager robottestingframework-plugin generated by YARP can be found by the robottestingframework-testrunner.
+

+

+Building tests

+

+Linux/macOS

+

On Linux/macOS machines, open a terminal and type:

$ git clone https://github.com/robotology/icub-tests.git
+
$ cd icub-tests
+
$ mkdir build
+
$ cd build
+
$ cmake ..
+
$ make
+

+Windows

+

On Windows machines use the CMake program to create Visual Studio project and build it.

+

+Configuration

+

+Plugins

+

Test cases are built as Robot Testing Framework plug-ins (shared libraries) and can be found in icub-tests/build/plugins folder.
+We need to add the plug-ins path to the OS-specific dynamic linker environment variable

+
    +
  • Linux LD_LIBRARY_PATH
  • +
  • macOS DYLD_LIBRARY_PATH
  • +
  • Windows PATH
  • +
+

As an example, under Linux:

$ echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path to icub_tests>/build/plugins' >> ~/.bashrc
+

+Context

+

Tests configuration (.ini files) can be found in icub-tests/suite/contexts.
+We need to configure the OS-independent YARP_DATA_DIRS environment variable so that the test cases can load the configuration files.

+
$ echo 'export YARP_DATA_DIRS=$YARP_DATA_DIRS:<path to icub-tests>/suites' >> ~/.bashrc
+
+
+ + + + diff --git a/doxygen/doc/html/jointLimits_8cpp_source.html b/doxygen/doc/html/jointLimits_8cpp_source.html new file mode 100644 index 00000000..f2880cf3 --- /dev/null +++ b/doxygen/doc/html/jointLimits_8cpp_source.html @@ -0,0 +1,502 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/jointLimits/jointLimits.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
jointLimits.cpp
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #include <math.h>
+
22 #include <robottestingframework/TestAssert.h>
+
23 #include <robottestingframework/dll/Plugin.h>
+
24 #include <yarp/os/Time.h>
+
25 #include <yarp/math/Math.h>
+
26 #include <yarp/os/Property.h>
+
27 #include <fstream>
+
28 #include <algorithm>
+
29 #include <cstdlib>
+
30 #include "jointLimits.h"
+
31 
+
32 #include <stdio.h>
+
33 
+
34 using namespace robottestingframework;
+
35 using namespace yarp::os;
+
36 using namespace yarp::dev;
+
37 using namespace yarp::math;
+
38 
+
39 // prepare the plugin
+
40 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(JointLimits)
+
41 
+
42 JointLimits::JointLimits() : yarp::robottestingframework::TestCase("JointLimits") {
+
43  jointsList=0;
+
44  dd=0;
+
45  ipos=0;
+
46  icmd=0;
+
47  iimd=0;
+
48  ienc=0;
+
49  ilim=0;
+
50  enc_jnt=0;
+
51  original_pids=0;
+
52  pids_saved=false;
+
53 }
+
54 
+
55 JointLimits::~JointLimits() { }
+
56 
+
57 bool JointLimits::setup(yarp::os::Property& property) {
+
58  if(property.check("name"))
+
59  setName(property.find("name").asString());
+
60 
+
61  // updating parameters
+
62  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
+
63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
+
64  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
+
65  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position must be given as the test parameter!");
+
66  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("speed"), "The positionMove reference speed must be given as the test parameter!");
+
67  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("outOfBoundPosition"), "The outOfBoundPosition parameter must be given as the test parameter!");
+
68  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("outputLimitPercent"), "The outputLimitPercent must be given as the test parameter!");
+
69  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("tolerance"), " The max error tolerance must be given as the test parameter!");
+
70 
+
71  robotName = property.find("robot").asString();
+
72  partName = property.find("part").asString();
+
73 
+
74  char buff[500];
+
75  sprintf(buff, "setting up test for %s", partName.c_str());
+
76  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
77 
+
78  Bottle* jointsBottle = property.find("joints").asList();
+
79  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
+
80 
+
81  Bottle* homeBottle = property.find("home").asList();
+
82  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse zero parameter");
+
83 
+
84  Bottle* speedBottle = property.find("speed").asList();
+
85  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(speedBottle!=0,"unable to parse speed parameter");
+
86 
+
87  Bottle* outOfBoundPosition = property.find("outOfBoundPosition").asList();
+
88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(outOfBoundPosition != 0, "unable to parse outOfBoundPosition parameter");
+
89 
+
90  Bottle* outputLimitBottle = property.find("outputLimitPercent").asList();
+
91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(outputLimitBottle!=0,"unable to parse speed parameter");
+
92 
+
93  tolerance = property.find("tolerance").asFloat64();
+
94  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(tolerance>=0,"invalid tolerance");
+
95 
+
96  Bottle* toleranceListBottle = property.find("toleranceList").asList(); //optional param
+
97 
+
98  Property options;
+
99  options.put("device", "remote_controlboard");
+
100  options.put("remote", "/"+robotName+"/"+partName);
+
101  options.put("local", "/jointsLimitsTest/"+robotName+"/"+partName);
+
102 
+
103  dd = new PolyDriver(options);
+
104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
+
105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
+
106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
+
107  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
+
108  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
+
109  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ilim),"Unable to open limits interface");
+
110  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipid),"Unable to open pid interface");
+
111 
+
112  if (!ienc->getAxes(&n_part_joints))
+
113  {
+
114  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
+
115  }
+
116 
+
117  int n_cmd_joints = jointsBottle->size();
+
118  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0 && n_cmd_joints<=n_part_joints,"invalid number of joints, it must be >0 & <= number of part joints");
+
119  for (int i=0; i <n_cmd_joints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
+
120 
+
121  enc_jnt.resize(n_part_joints);
+
122  max_lims.resize(n_cmd_joints);
+
123  min_lims.resize(n_cmd_joints);
+
124 
+
125  home.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
+
126  speed.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) speed[i]=speedBottle->get(i).asFloat64();
+
127  outputLimit.resize(n_cmd_joints);for (int i=0; i< n_cmd_joints; i++) outputLimit[i]=outputLimitBottle->get(i).asFloat64();
+
128  outOfBoundPos.resize(n_cmd_joints); for (int i = 0; i < n_cmd_joints; i++) { outOfBoundPos[i] = outOfBoundPosition->get(i).asFloat64(); ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(outOfBoundPos[i] > 0 , "outOfBoundPosition must be > 0"); }
+
129  toleranceList.resize(n_cmd_joints);
+
130  for (int i = 0; i < n_cmd_joints; i++)
+
131  {
+
132  if(toleranceListBottle)
+
133  {
+
134  toleranceList[i] = toleranceListBottle->get(i).asFloat64();
+
135  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(toleranceList[i] >= 0 , "toleranceList must be > 0");
+
136  }
+
137  else
+
138  toleranceList[i] = tolerance;
+
139  }
+
140 
+
141  original_pids = new yarp::dev::Pid[n_cmd_joints];
+
142  for (unsigned int i=0; i<jointsList.size(); i++)
+
143  {
+
144  ipid->getPid(yarp::dev::PidControlTypeEnum::VOCAB_PIDTYPE_POSITION, (int)jointsList[i],&original_pids[i]);
+
145  }
+
146  pids_saved=true;
+
147 
+
148  for (unsigned int i=0; i<jointsList.size(); i++)
+
149  {
+
150  yarp::dev::Pid p = original_pids[i];
+
151  p.max_output = p.max_output/100*outputLimit[i];
+
152  p.max_int = p.max_int/100*outputLimit[i];
+
153  ipid->setPid(yarp::dev::PidControlTypeEnum::VOCAB_PIDTYPE_POSITION, (int)jointsList[i],p);
+
154  yarp::os::Time::delay(0.010);
+
155  yarp::dev::Pid t;
+
156  ipid->getPid(yarp::dev::PidControlTypeEnum::VOCAB_PIDTYPE_POSITION, (int)jointsList[i],&t);
+
157 
+
158  //since pid values are double, the returned values may differ from those sent due to conversion.
+
159  if (fabs(t.max_output-p.max_output) > 1.0 ||
+
160  fabs(t.max_int-p.max_int) > 1.0 ||
+
161  fabs(t.kp-p.kp) > 1.0 ||
+
162  fabs(t.kd-p.kd) > 1.0 ||
+
163  fabs(t.ki-p.ki) > 1.0)
+
164  {
+
165  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set output limits");
+
166  }
+
167 
+
168  }
+
169  return true;
+
170 }
+
171 
+
172 void JointLimits::tearDown()
+
173 {
+
174  if (original_pids)
+
175  {
+
176  if (pids_saved)
+
177  {
+
178  for (unsigned int i=0; i<jointsList.size(); i++)
+
179  {
+
180  ipid->setPid(yarp::dev::PidControlTypeEnum::VOCAB_PIDTYPE_POSITION, (int)jointsList[i],original_pids[i]);
+
181  }
+
182  }
+
183  delete[] original_pids; original_pids=0;
+
184  }
+
185  if (dd) {delete dd; dd =0;}
+
186 }
+
187 
+
188 void JointLimits::setMode(int desired_mode)
+
189 {
+
190  for (unsigned int i=0; i<jointsList.size(); i++)
+
191  {
+
192  icmd->setControlMode((int)jointsList[i],desired_mode);
+
193  iimd->setInteractionMode((int)jointsList[i],VOCAB_IM_STIFF);
+
194  yarp::os::Time::delay(0.010);
+
195  }
+
196 
+
197  int cmode;
+
198  yarp::dev::InteractionModeEnum imode;
+
199  int timeout = 0;
+
200 
+
201  while (1)
+
202  {
+
203  int ok=0;
+
204  for (unsigned int i=0; i<jointsList.size(); i++)
+
205  {
+
206  icmd->getControlMode ((int)jointsList[i],&cmode);
+
207  iimd->getInteractionMode((int)jointsList[i],&imode);
+
208  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
+
209  }
+
210  if (ok==jointsList.size()) break;
+
211  if (timeout>100)
+
212  {
+
213  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
+
214  }
+
215  yarp::os::Time::delay(0.2);
+
216  timeout++;
+
217  }
+
218 }
+
219 
+
220 void JointLimits::goTo(yarp::sig::Vector position)
+
221 {
+
222  for (unsigned int i=0; i<jointsList.size(); i++)
+
223  {
+
224  ipos->setRefSpeed((int)jointsList[i],speed[i]);
+
225  ipos->positionMove((int)jointsList[i],position[i]);
+
226  }
+
227 
+
228  int timeout = 0;
+
229  while (1)
+
230  {
+
231  int in_position=0;
+
232  for (unsigned int i=0; i<jointsList.size(); i++)
+
233  {
+
234  double tmp=0;
+
235  ienc->getEncoder((int)jointsList[i],&tmp);
+
236  if (fabs(tmp-position[i])<toleranceList[i]) in_position++;
+
237  }
+
238  if (in_position==jointsList.size()) break;
+
239  if (timeout>100)
+
240  {
+
241  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching desired position");
+
242  }
+
243  yarp::os::Time::delay(0.2);
+
244  timeout++;
+
245  }
+
246 }
+
247 
+
248 bool JointLimits::goToSingle(int i, double pos, double *reached_pos)
+
249 {
+
250  ipos->setRefSpeed((int)jointsList[i],speed[i]);
+
251  ipos->positionMove((int)jointsList[i],pos);
+
252  double tmp=0;
+
253 
+
254  int timeout = 0;
+
255  while (1)
+
256  {
+
257  ienc->getEncoder((int)jointsList[i],&tmp);
+
258  if (fabs(tmp-pos)<toleranceList[i]) break;
+
259 
+
260  if (timeout>100)
+
261  {
+
262  if(reached_pos != NULL)
+
263  {
+
264  *reached_pos = tmp;
+
265  }
+
266  return(false);
+
267  }
+
268 
+
269  yarp::os::Time::delay(0.2);
+
270  timeout++;
+
271  }
+
272  if(reached_pos != NULL)
+
273  {
+
274  *reached_pos = tmp;
+
275  }
+
276  return(true);
+
277 }
+
278 
+
279 bool JointLimits::goToSingleExceed(int i, double position_to_reach, double limit, double reachedLimit, double *reached_pos)
+
280 {
+
281  ipos->setRefSpeed((int)jointsList[i], speed[i]);
+
282  ipos->positionMove((int)jointsList[i], position_to_reach);
+
283  double tmp = 0;
+
284  bool excededLimit = false;
+
285  int timeout = 0;
+
286  double limitToCheck;
+
287  if(fabs(reachedLimit-limit)>toleranceList[i])
+
288  {
+
289  //if i'm here joint did NOT reached the limit and I would check joint doesn't exced reached limit
+
290  limitToCheck = reachedLimit;
+
291  }
+
292  else
+
293  {
+
294  limitToCheck = limit;
+
295  }
+
296  while (1)
+
297  {
+
298  ienc->getEncoder((int)jointsList[i], &tmp);
+
299  if(fabs(tmp - limitToCheck)>toleranceList[i])
+
300  {
+
301  excededLimit = true;
+
302  //ROBOTTESTINGFRAMEWORK_TEST_REPORT (Asserter::format("j %d exced limitTocheck %f: reached %f",(int)jointsList[i], limitToCheck, tmp));
+
303  break;
+
304  }
+
305  if (fabs(tmp - position_to_reach)<toleranceList[i])
+
306  {
+
307  excededLimit = true;
+
308  //ROBOTTESTINGFRAMEWORK_TEST_REPORT (Asserter::format("j %d is near position_to_reach %f: reached %f",(int)jointsList[i], position_to_reach, tmp));
+
309  break;
+
310  }
+
311 
+
312  if (timeout>50) break;
+
313  yarp::os::Time::delay(0.2);
+
314  timeout++;
+
315  }
+
316 
+
317  *reached_pos = tmp;
+
318 
+
319 /* if (fabs(tmp - position_to_reach)<toleranceList[i])
+
320  {
+
321  //I reached the out of bound target. That's bad!
+
322  return (true);
+
323  }
+
324  if (fabs(tmp - limit)<toleranceList[i])
+
325  {
+
326  //I'm still near the joint limit. That's fine.
+
327  return (false);
+
328  }
+
329  //I dont know where I am, that's bad!
+
330  return(true);
+
331 */
+
332 
+
333  if( excededLimit)
+
334  return (true);
+
335  else
+
336  return(false);
+
337 }
+
338 
+
339 
+
340 void JointLimits::run()
+
341 {
+
342  char buff[500];
+
343  setMode(VOCAB_CM_POSITION);
+
344  ROBOTTESTINGFRAMEWORK_TEST_REPORT("all joints are going to home....");
+
345  goTo(home);
+
346 
+
347  for (unsigned int i=0; i<jointsList.size(); i++)
+
348  {
+
349  ilim->getLimits((int)jointsList[i],&min_lims[i],&max_lims[i]);
+
350  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(max_lims[i]!=min_lims[i],"Invalid limit: max==min?");
+
351  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(max_lims[i]>min_lims[i],"Invalid limit: max<min?");
+
352  if (max_lims[i] == 0 && min_lims[i] == 0) ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid limit: max==min==0");
+
353  }
+
354 
+
355  for (unsigned int i=0; i<jointsList.size(); i++)
+
356  {
+
357  bool res;
+
358  double reached_pos=0;
+
359  double excededpos_reached = 0;
+
360 
+
361  //1) Check max limit
+
362  sprintf(buff,"Testing if max limit is reachable, joint %d, max limit: %f",(int)jointsList[i],max_lims[i]);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
363  //check that max_limit is reachable
+
364  res = goToSingle(i, max_lims[i], &reached_pos);
+
365  ROBOTTESTINGFRAMEWORK_TEST_CHECK (res, Asserter::format("joint %d moved to max limit: %f reached: %f", (int)jointsList[i], max_lims[i], reached_pos));
+
366  //if(!res)
+
367  //{
+
368  // goToSingle(i,home[i], NULL); //I need to go to home in order to leave joint in safe position for further tests (other body parts)
+
369  // sprintf(buff, "Timeout while reaching desired position(%.2f). Reached pos=%.2f", max_lims[i], reached_pos);ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
370  //}
+
371  //else { sprintf(buff, "Test successfull, joint %d, max limit: %f reached: %f", (int)jointsList[i], max_lims[i], reached_pos); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff); }
+
372 
+
373  //2) check that max_limit + outOfBoundPos is NOT reachable
+
374  sprintf(buff, "Testing that max limit cannot be exceeded, joint %d, max limit: %f", (int)jointsList[i], max_lims[i]); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
375  res = goToSingleExceed(i, max_lims[i] + outOfBoundPos[i], max_lims[i], reached_pos, &excededpos_reached);
+
376  ROBOTTESTINGFRAMEWORK_TEST_CHECK (!res, Asserter::format("check if joint %d desn't exced max limit. target was: %f reached: %f, limit %f ", (int)jointsList[i], max_lims[i] + outOfBoundPos[i], excededpos_reached, max_lims[i]));
+
377  //if (res)
+
378  //{
+
379  // goToSingle(i, home[i], NULL); //I need to go to home in order to leave joint in safe position for further tests (other body parts)
+
380  // sprintf(buff, "Limit execeeded! Limit was (%.2f). Reached pos=%.2f", max_lims[i], reached_pos); ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
381  //}
+
382  //else { sprintf(buff, "Test successfull, joint %d, target was: %f reached: %f, limit %f ", (int)jointsList[i], max_lims[i] + outOfBoundPos[i], reached_pos, max_lims[i]); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff); }
+
383 
+
384  //3) Check min limit
+
385  //check that min_limit is reachable
+
386  sprintf(buff,"Testing if min limit is reachable, joint %d, min limit: %f",(int)jointsList[i],min_lims[i]);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
387  res = goToSingle(i, min_lims[i], &reached_pos);
+
388  ROBOTTESTINGFRAMEWORK_TEST_CHECK (res, Asserter::format("joint %d moved to min limit: %f reached: %f", (int)jointsList[i], min_lims[i], reached_pos));
+
389 
+
390  /*if(!res)
+
391  {
+
392  goToSingle(i,home[i], NULL);
+
393  sprintf(buff, "Timeout while reaching desired position(%.2f). Reached pos=%.2f", min_lims[i], reached_pos);ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
394  }
+
395  else { sprintf(buff, "Test successfull, joint %d, min limit: %f reached: %f", (int)jointsList[i], min_lims[i], reached_pos); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff); }*/
+
396 
+
397  //4) check that min_limit - outOfBoundPos is NOT reachable
+
398  sprintf(buff, "Testing that min limit cannot be exceeded, joint %d, min limit: %f", (int)jointsList[i], min_lims[i]); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
399  res = goToSingleExceed(i, min_lims[i] - outOfBoundPos[i], min_lims[i], reached_pos, & excededpos_reached);
+
400  ROBOTTESTINGFRAMEWORK_TEST_CHECK (!res, Asserter::format("check if joint %d desn't exced min limit. target was: %f reached: %f, limit %f ", (int)jointsList[i], min_lims[i] - outOfBoundPos[i], excededpos_reached, min_lims[i]));
+
401 
+
402  //if (res)
+
403  //{
+
404  // goToSingle(i, home[i], NULL); //I need to go to home in order to leave joint in safe position for further tests (other body parts)
+
405  // sprintf(buff, "Limit execeeded! Limit was (%.2f). Reached pos=%.2f", min_lims[i], reached_pos); ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
406  //}
+
407  //else { sprintf(buff, "Test successfull, joint %d, target was: %f reached: %f, limit %f ", (int)jointsList[i], min_lims[i] - outOfBoundPos[i], reached_pos, min_lims[i]); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff); }
+
408 
+
409  //5) Check home position
+
410  sprintf(buff,"Testing joint %d, homing to: %f",(int)jointsList[i],home[i]);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
+
411  res = goToSingle(i, home[i], &reached_pos);
+
412  if(!res)
+
413  {
+
414  sprintf(buff, "Timeout while reaching desired position(%.2f). Reached pos=%.2f", home[i], reached_pos);ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
+
415  }
+
416  else{ sprintf(buff, "Homing joint %d complete", (int)jointsList[i]); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff); }
+
417 
+
418  }
+
419  ienc->getEncoders(enc_jnt.data());
+
420  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Test ends. All joints are going to home....");
+
421  goTo(home);
+
422  yarp::os::Time::delay(2.0);
+
423 }
+
Check if the software joint limits are properly set.
Definition: jointLimits.h:74
+
+ + + + diff --git a/doxygen/doc/html/jointLimits_8h_source.html b/doxygen/doc/html/jointLimits_8h_source.html new file mode 100644 index 00000000..1085a5e4 --- /dev/null +++ b/doxygen/doc/html/jointLimits_8h_source.html @@ -0,0 +1,159 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/jointLimits/jointLimits.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
jointLimits.h
+
+
+
1 /*
+
2  * iCub Robot Unit Tests (Robot Testing Framework)
+
3  *
+
4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
+
5  *
+
6  * This library is free software; you can redistribute it and/or
+
7  * modify it under the terms of the GNU Lesser General Public
+
8  * License as published by the Free Software Foundation; either
+
9  * version 2.1 of the License, or (at your option) any later version.
+
10  *
+
11  * This library is distributed in the hope that it will be useful,
+
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+
14  * Lesser General Public License for more details.
+
15  *
+
16  * You should have received a copy of the GNU Lesser General Public
+
17  * License along with this library; if not, write to the Free Software
+
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
19  */
+
20 
+
21 #ifndef _JOINTLIMITS_H_
+
22 #define _JOINTLIMITS_H_
+
23 
+
24 #include <string>
+
25 #include <yarp/robottestingframework/TestCase.h>
+
26 #include <yarp/dev/ControlBoardInterfaces.h>
+
27 #include <yarp/dev/PolyDriver.h>
+
28 #include <yarp/sig/Vector.h>
+
29 #include <yarp/os/Bottle.h>
+
30 #include <yarp/sig/Matrix.h>
+
31 
+
74 class JointLimits : public yarp::robottestingframework::TestCase {
+
75 public:
+
76  JointLimits();
+
77  virtual ~JointLimits();
+
78 
+
79  virtual bool setup(yarp::os::Property& property);
+
80 
+
81  virtual void tearDown();
+
82 
+
83  virtual void run();
+
84 
+
85  void goTo(yarp::sig::Vector position);
+
86  bool goToSingle(int i, double pos, double *reached_pos);
+
87  bool goToSingleExceed(int i, double position_to_reach, double limit, double reachedLimit, double *reached_pos);
+
88 
+
89  void setMode(int desired_mode);
+
90  void saveToFile(std::string filename, yarp::os::Bottle &b);
+
91 
+
92 private:
+
93  std::string robotName;
+
94  std::string partName;
+
95  yarp::sig::Vector jointsList;
+
96 
+
97  double tolerance;
+
98 
+
99  int n_part_joints;
+
100 
+
101  yarp::dev::PolyDriver *dd;
+
102  yarp::dev::IPositionControl *ipos;
+
103  yarp::dev::IControlMode *icmd;
+
104  yarp::dev::IInteractionMode *iimd;
+
105  yarp::dev::IEncoders *ienc;
+
106  yarp::dev::IControlLimits *ilim;
+
107  yarp::dev::IPidControl *ipid;
+
108 
+
109  yarp::sig::Vector enc_jnt;
+
110  yarp::sig::Vector max_lims;
+
111  yarp::sig::Vector min_lims;
+
112  yarp::sig::Vector outputLimit;
+
113  yarp::sig::Vector outOfBoundPos;
+
114  yarp::sig::Vector toleranceList;
+
115  yarp::sig::Vector home;
+
116  yarp::sig::Vector speed;
+
117 
+
118  bool pids_saved;
+
119  yarp::dev::Pid* original_pids;
+
120 };
+
121 
+
122 #endif //_JOINTLIMITS_H
+
Check if the software joint limits are properly set.
Definition: jointLimits.h:74
+
+ + + + diff --git a/doxygen/doc/html/jquery.js b/doxygen/doc/html/jquery.js new file mode 100644 index 00000000..103c32d7 --- /dev/null +++ b/doxygen/doc/html/jquery.js @@ -0,0 +1,35 @@ +/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0a;a++)for(i in o[a])n=o[a][i],o[a].hasOwnProperty(i)&&void 0!==n&&(e[i]=t.isPlainObject(n)?t.isPlainObject(e[i])?t.widget.extend({},e[i],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,i){var n=i.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=s.call(arguments,1),h=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(h=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):h=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new i(o,this))})),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+o.eventNamespace,c=h[2];c?n.on(l,c,r):i.on(l,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,h=/top|center|bottom/,l=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};l>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),h.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-r-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-r-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,(i>0||u>a(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.extend(t.expr[":"],{data:t.expr.createPseudo?t.expr.createPseudo(function(e){return function(i){return!!t.data(i,e)}}):function(e,i,s){return!!t.data(e,s[3])}}),t.fn.extend({disableSelection:function(){var t="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(t+".ui-disableSelection",function(t){t.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}),t.ui.focusable=function(i,s){var n,o,a,r,h,l=i.nodeName.toLowerCase();return"area"===l?(n=i.parentNode,o=n.name,i.href&&o&&"map"===n.nodeName.toLowerCase()?(a=t("img[usemap='#"+o+"']"),a.length>0&&a.is(":visible")):!1):(/^(input|select|textarea|button|object)$/.test(l)?(r=!i.disabled,r&&(h=t(i).closest("fieldset")[0],h&&(r=!h.disabled))):r="a"===l?i.href||s:s,r&&t(i).is(":visible")&&e(t(i)))},t.extend(t.expr[":"],{focusable:function(e){return t.ui.focusable(e,null!=t.attr(e,"tabindex"))}}),t.ui.focusable,t.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):t(this[0].form)},t.ui.formResetMixin={_formResetHandler:function(){var e=t(this);setTimeout(function(){var i=e.data("ui-form-reset-instances");t.each(i,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(t.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}},"1.7"===t.fn.jquery.substring(0,3)&&(t.each(["Width","Height"],function(e,i){function s(e,i,s,o){return t.each(n,function(){i-=parseFloat(t.css(e,"padding"+this))||0,s&&(i-=parseFloat(t.css(e,"border"+this+"Width"))||0),o&&(i-=parseFloat(t.css(e,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],o=i.toLowerCase(),a={innerWidth:t.fn.innerWidth,innerHeight:t.fn.innerHeight,outerWidth:t.fn.outerWidth,outerHeight:t.fn.outerHeight};t.fn["inner"+i]=function(e){return void 0===e?a["inner"+i].call(this):this.each(function(){t(this).css(o,s(this,e)+"px")})},t.fn["outer"+i]=function(e,n){return"number"!=typeof e?a["outer"+i].call(this,e):this.each(function(){t(this).css(o,s(this,e,!0,n)+"px")})}}),t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.ui.escapeSelector=function(){var t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;return function(e){return e.replace(t,"\\$1")}}(),t.fn.labels=function(){var e,i,s,n,o;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(n=this.eq(0).parents("label"),s=this.attr("id"),s&&(e=this.eq(0).parents().last(),o=e.add(e.length?e.siblings():this.siblings()),i="label[for='"+t.ui.escapeSelector(s)+"']",n=n.add(o.find(i).addBack(i))),this.pushStack(n))},t.fn.scrollParent=function(e){var i=this.css("position"),s="absolute"===i,n=e?/(auto|scroll|hidden)/:/(auto|scroll)/,o=this.parents().filter(function(){var e=t(this);return s&&"static"===e.css("position")?!1:n.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==i&&o.length?o:t(this[0].ownerDocument||document)},t.extend(t.expr[":"],{tabbable:function(e){var i=t.attr(e,"tabindex"),s=null!=i;return(!s||i>=0)&&t.ui.focusable(e,s)}}),t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var n=!1;t(document).on("mouseup",function(){n=!1}),t.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(i){return!0===t.data(i.target,e.widgetName+".preventClickEvent")?(t.removeData(i.target,e.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!n){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var i=this,s=1===e.which,o="string"==typeof this.options.cancel&&e.target.nodeName?t(e.target).closest(this.options.cancel).length:!1;return s&&!o&&this._mouseCapture(e)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(e)!==!1,!this._mouseStarted)?(e.preventDefault(),!0):(!0===t.data(e.target,this.widgetName+".preventClickEvent")&&t.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),n=!0,!0)):!0}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||9>document.documentMode)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,e)!==!1,this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&t.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,n=!1,e.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),t.ui.plugin={add:function(e,i,s){var n,o=t.ui[e].prototype;for(n in s)o.plugins[n]=o.plugins[n]||[],o.plugins[n].push([i,s[n]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;o.length>n;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}},t.widget("ui.resizable",t.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(e,i){if("hidden"===t(e).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return e[s]>0?!0:(e[s]=1,n=e[s]>0,e[s]=0,n)},_create:function(){var e,i=this.options,s=this;this._addClass("ui-resizable"),t.extend(this,{_aspectRatio:!!i.aspectRatio,aspectRatio:i.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:i.helper||i.ghost||i.animate?i.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(t("
").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),i.autoHide&&t(this.element).on("mouseenter",function(){i.disabled||(s._removeClass("ui-resizable-autohide"),s._handles.show())}).on("mouseleave",function(){i.disabled||s.resizing||(s._addClass("ui-resizable-autohide"),s._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,i=function(e){t(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;default:}},_setupHandles:function(){var e,i,s,n,o,a=this.options,r=this;if(this.handles=a.handles||(t(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=t(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),s=this.handles.split(","),this.handles={},i=0;s.length>i;i++)e=t.trim(s[i]),n="ui-resizable-"+e,o=t("
"),this._addClass(o,"ui-resizable-handle "+n),o.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(o);this._renderAxis=function(e){var i,s,n,o;e=e||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=t(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=t(this.handles[i],this.element),o=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),e.css(n,o),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){r.resizing||(this.className&&(o=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=o&&o[1]?o[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var i,s,n=!1;for(i in this.handles)s=t(this.handles[i])[0],(s===e.target||t.contains(s,e.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(e){var i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),o.containment&&(i+=t(o.containment).scrollLeft()||0,s+=t(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=t(".ui-resizable-"+this.axis).css("cursor"),t("body").css("cursor","auto"===n?this.axis+"-resize":n),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var i,s,n=this.originalMousePosition,o=this.axis,a=e.pageX-n.left||0,r=e.pageY-n.top||0,h=this._change[o];return this._updatePrevProperties(),h?(i=h.apply(this,[e,a,r]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(i=this._updateRatio(i,e)),i=this._respectSize(i,e),this._updateCache(i),this._propagate("resize",e),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),t.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(e){this.resizing=!1;var i,s,n,o,a,r,h,l=this.options,c=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:c.sizeDiff.height,o=s?0:c.sizeDiff.width,a={width:c.helper.width()-o,height:c.helper.height()-n},r=parseFloat(c.element.css("left"))+(c.position.left-c.originalPosition.left)||null,h=parseFloat(c.element.css("top"))+(c.position.top-c.originalPosition.top)||null,l.animate||this.element.css(t.extend(a,{top:h,left:r})),c.helper.height(c.size.height),c.helper.width(c.size.width),this._helper&&!l.animate&&this._proportionallyResize()),t("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px"),this.helper.css(t),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),o.maxWidth>i&&(o.maxWidth=i),o.maxHeight>n&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidtht.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,h=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(i),c=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&l&&(t.left=r-e.minWidth),s&&l&&(t.left=r-e.maxWidth),a&&c&&(t.top=h-e.minHeight),n&&c&&(t.top=h-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];4>e;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;this._proportionallyResizeElements.length>e;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,i=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||t("
"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element +},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize,s=this.originalPosition;return{left:s.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},sw:function(e,i,s){return t.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,i,s]))},ne:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,i,s]))},nw:function(e,i,s){return t.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,i,s]))}},_propagate:function(e,i){t.ui.plugin.call(this,e,[i,this.ui()]),"resize"!==e&&this._trigger(e,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),t.ui.plugin.add("resizable","animate",{stop:function(e){var i=t(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,o=n.length&&/textarea/i.test(n[0].nodeName),a=o&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=o?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-a},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,c=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(t.extend(h,c&&l?{top:c,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};n&&n.length&&t(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",e)}})}}),t.ui.plugin.add("resizable","containment",{start:function(){var e,i,s,n,o,a,r,h=t(this).resizable("instance"),l=h.options,c=h.element,u=l.containment,d=u instanceof t?u.get(0):/parent/.test(u)?c.parent().get(0):u;d&&(h.containerElement=t(d),/document/.test(u)||u===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:t(document),left:0,top:0,width:t(document).width(),height:t(document).height()||document.body.parentNode.scrollHeight}):(e=t(d),i=[],t(["Top","Right","Left","Bottom"]).each(function(t,s){i[t]=h._num(e.css("padding"+s))}),h.containerOffset=e.offset(),h.containerPosition=e.position(),h.containerSize={height:e.innerHeight()-i[3],width:e.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,o=h.containerSize.width,a=h._hasScroll(d,"left")?d.scrollWidth:o,r=h._hasScroll(d)?d.scrollHeight:n,h.parentData={element:d,left:s.left,top:s.top,width:a,height:r}))},resize:function(e){var i,s,n,o,a=t(this).resizable("instance"),r=a.options,h=a.containerOffset,l=a.position,c=a._aspectRatio||e.shiftKey,u={top:0,left:0},d=a.containerElement,p=!0;d[0]!==document&&/static/.test(d.css("position"))&&(u=h),l.left<(a._helper?h.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-h.left:a.position.left-u.left),c&&(a.size.height=a.size.width/a.aspectRatio,p=!1),a.position.left=r.helper?h.left:0),l.top<(a._helper?h.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-h.top:a.position.top),c&&(a.size.width=a.size.height*a.aspectRatio,p=!1),a.position.top=a._helper?h.top:0),n=a.containerElement.get(0)===a.element.parent().get(0),o=/relative|absolute/.test(a.containerElement.css("position")),n&&o?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),i=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-h.left)),s=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-h.top)),i+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-i,c&&(a.size.height=a.size.width/a.aspectRatio,p=!1)),s+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-s,c&&(a.size.width=a.size.height*a.aspectRatio,p=!1)),p||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=t(this).resizable("instance"),i=e.options,s=e.containerOffset,n=e.containerPosition,o=e.containerElement,a=t(e.helper),r=a.offset(),h=a.outerWidth()-e.sizeDiff.width,l=a.outerHeight()-e.sizeDiff.height;e._helper&&!i.animate&&/relative/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l}),e._helper&&!i.animate&&/static/.test(o.css("position"))&&t(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),t.ui.plugin.add("resizable","alsoResize",{start:function(){var e=t(this).resizable("instance"),i=e.options;t(i.alsoResize).each(function(){var e=t(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,i){var s=t(this).resizable("instance"),n=s.options,o=s.originalSize,a=s.originalPosition,r={height:s.size.height-o.height||0,width:s.size.width-o.width||0,top:s.position.top-a.top||0,left:s.position.left-a.left||0};t(n.alsoResize).each(function(){var e=t(this),s=t(this).data("ui-resizable-alsoresize"),n={},o=e.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];t.each(o,function(t,e){var i=(s[e]||0)+(r[e]||0);i&&i>=0&&(n[e]=i||null)}),e.css(n)})},stop:function(){t(this).removeData("ui-resizable-alsoresize")}}),t.ui.plugin.add("resizable","ghost",{start:function(){var e=t(this).resizable("instance"),i=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),t.uiBackCompat!==!1&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=t(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=t(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),t.ui.plugin.add("resizable","grid",{resize:function(){var e,i=t(this).resizable("instance"),s=i.options,n=i.size,o=i.originalSize,a=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,c=h[1]||1,u=Math.round((n.width-o.width)/l)*l,d=Math.round((n.height-o.height)/c)*c,p=o.width+u,f=o.height+d,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,_=s.minWidth&&s.minWidth>p,v=s.minHeight&&s.minHeight>f;s.grid=h,_&&(p+=l),v&&(f+=c),m&&(p-=l),g&&(f-=c),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=a.top-d):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=a.left-u):((0>=f-c||0>=p-l)&&(e=i._getPaddingPlusBorderDimensions(this)),f-c>0?(i.size.height=f,i.position.top=a.top-d):(f=c-e.height,i.size.height=f,i.position.top=a.top+o.height-f),p-l>0?(i.size.width=p,i.position.left=a.left-u):(p=l-e.width,i.size.width=p,i.position.left=a.left+o.width-p))}}),t.ui.resizable});/** + * Copyright (c) 2007 Ariel Flesler - aflesler ○ gmail • com | https://github.com/flesler + * Licensed under MIT + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(f){"use strict";"function"===typeof define&&define.amd?define(["jquery"],f):"undefined"!==typeof module&&module.exports?module.exports=f(require("jquery")):f(jQuery)})(function($){"use strict";function n(a){return!a.nodeName||-1!==$.inArray(a.nodeName.toLowerCase(),["iframe","#document","html","body"])}function h(a){return $.isFunction(a)||$.isPlainObject(a)?a:{top:a,left:a}}var p=$.scrollTo=function(a,d,b){return $(window).scrollTo(a,d,b)};p.defaults={axis:"xy",duration:0,limit:!0};$.fn.scrollTo=function(a,d,b){"object"=== typeof d&&(b=d,d=0);"function"===typeof b&&(b={onAfter:b});"max"===a&&(a=9E9);b=$.extend({},p.defaults,b);d=d||b.duration;var u=b.queue&&1=f[g]?0:Math.min(f[g],n));!a&&1-1){targetElements.on(evt+EVENT_NAMESPACE,function elementToggle(event){$.powerTip.toggle(this,event)})}else{targetElements.on(evt+EVENT_NAMESPACE,function elementOpen(event){$.powerTip.show(this,event)})}});$.each(options.closeEvents,function(idx,evt){if($.inArray(evt,options.openEvents)<0){targetElements.on(evt+EVENT_NAMESPACE,function elementClose(event){$.powerTip.hide(this,!isMouseEvent(event))})}});targetElements.on("keydown"+EVENT_NAMESPACE,function elementKeyDown(event){if(event.keyCode===27){$.powerTip.hide(this,true)}})}return targetElements};$.fn.powerTip.defaults={fadeInTime:200,fadeOutTime:100,followMouse:false,popupId:"powerTip",popupClass:null,intentSensitivity:7,intentPollInterval:100,closeDelay:100,placement:"n",smartPlacement:false,offset:10,mouseOnToPopup:false,manual:false,openEvents:["mouseenter","focus"],closeEvents:["mouseleave","blur"]};$.fn.powerTip.smartPlacementLists={n:["n","ne","nw","s"],e:["e","ne","se","w","nw","sw","n","s","e"],s:["s","se","sw","n"],w:["w","nw","sw","e","ne","se","n","s","w"],nw:["nw","w","sw","n","s","se","nw"],ne:["ne","e","se","n","s","sw","ne"],sw:["sw","w","nw","s","n","ne","sw"],se:["se","e","ne","s","n","nw","se"],"nw-alt":["nw-alt","n","ne-alt","sw-alt","s","se-alt","w","e"],"ne-alt":["ne-alt","n","nw-alt","se-alt","s","sw-alt","e","w"],"sw-alt":["sw-alt","s","se-alt","nw-alt","n","ne-alt","w","e"],"se-alt":["se-alt","s","sw-alt","ne-alt","n","nw-alt","e","w"]};$.powerTip={show:function apiShowTip(element,event){if(isMouseEvent(event)){trackMouse(event);session.previousX=event.pageX;session.previousY=event.pageY;$(element).data(DATA_DISPLAYCONTROLLER).show()}else{$(element).first().data(DATA_DISPLAYCONTROLLER).show(true,true)}return element},reposition:function apiResetPosition(element){$(element).first().data(DATA_DISPLAYCONTROLLER).resetPosition();return element},hide:function apiCloseTip(element,immediate){var displayController;immediate=element?immediate:true;if(element){displayController=$(element).first().data(DATA_DISPLAYCONTROLLER)}else if(session.activeHover){displayController=session.activeHover.data(DATA_DISPLAYCONTROLLER)}if(displayController){displayController.hide(immediate)}return element},toggle:function apiToggle(element,event){if(session.activeHover&&session.activeHover.is(element)){$.powerTip.hide(element,!isMouseEvent(event))}else{$.powerTip.show(element,event)}return element}};$.powerTip.showTip=$.powerTip.show;$.powerTip.closeTip=$.powerTip.hide;function CSSCoordinates(){var me=this;me.top="auto";me.left="auto";me.right="auto";me.bottom="auto";me.set=function(property,value){if($.isNumeric(value)){me[property]=Math.round(value)}}}function DisplayController(element,options,tipController){var hoverTimer=null,myCloseDelay=null;function openTooltip(immediate,forceOpen){cancelTimer();if(!element.data(DATA_HASACTIVEHOVER)){if(!immediate){session.tipOpenImminent=true;hoverTimer=setTimeout(function intentDelay(){hoverTimer=null;checkForIntent()},options.intentPollInterval)}else{if(forceOpen){element.data(DATA_FORCEDOPEN,true)}closeAnyDelayed();tipController.showTip(element)}}else{cancelClose()}}function closeTooltip(disableDelay){if(myCloseDelay){myCloseDelay=session.closeDelayTimeout=clearTimeout(myCloseDelay);session.delayInProgress=false}cancelTimer();session.tipOpenImminent=false;if(element.data(DATA_HASACTIVEHOVER)){element.data(DATA_FORCEDOPEN,false);if(!disableDelay){session.delayInProgress=true;session.closeDelayTimeout=setTimeout(function closeDelay(){session.closeDelayTimeout=null;tipController.hideTip(element);session.delayInProgress=false;myCloseDelay=null},options.closeDelay);myCloseDelay=session.closeDelayTimeout}else{tipController.hideTip(element)}}}function checkForIntent(){var xDifference=Math.abs(session.previousX-session.currentX),yDifference=Math.abs(session.previousY-session.currentY),totalDifference=xDifference+yDifference;if(totalDifference",{id:options.popupId});if($body.length===0){$body=$("body")}$body.append(tipElement);session.tooltips=session.tooltips?session.tooltips.add(tipElement):tipElement}if(options.followMouse){if(!tipElement.data(DATA_HASMOUSEMOVE)){$document.on("mousemove"+EVENT_NAMESPACE,positionTipOnCursor);$window.on("scroll"+EVENT_NAMESPACE,positionTipOnCursor);tipElement.data(DATA_HASMOUSEMOVE,true)}}function beginShowTip(element){element.data(DATA_HASACTIVEHOVER,true);tipElement.queue(function queueTipInit(next){showTip(element);next()})}function showTip(element){var tipContent;if(!element.data(DATA_HASACTIVEHOVER)){return}if(session.isTipOpen){if(!session.isClosing){hideTip(session.activeHover)}tipElement.delay(100).queue(function queueTipAgain(next){showTip(element);next()});return}element.trigger("powerTipPreRender");tipContent=getTooltipContent(element);if(tipContent){tipElement.empty().append(tipContent)}else{return}element.trigger("powerTipRender");session.activeHover=element;session.isTipOpen=true;tipElement.data(DATA_MOUSEONTOTIP,options.mouseOnToPopup);tipElement.addClass(options.popupClass);if(!options.followMouse||element.data(DATA_FORCEDOPEN)){positionTipOnElement(element);session.isFixedTipOpen=true}else{positionTipOnCursor()}if(!element.data(DATA_FORCEDOPEN)&&!options.followMouse){$document.on("click"+EVENT_NAMESPACE,function documentClick(event){var target=event.target;if(target!==element[0]){if(options.mouseOnToPopup){if(target!==tipElement[0]&&!$.contains(tipElement[0],target)){$.powerTip.hide()}}else{$.powerTip.hide()}}})}if(options.mouseOnToPopup&&!options.manual){tipElement.on("mouseenter"+EVENT_NAMESPACE,function tipMouseEnter(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).cancel()}});tipElement.on("mouseleave"+EVENT_NAMESPACE,function tipMouseLeave(){if(session.activeHover){session.activeHover.data(DATA_DISPLAYCONTROLLER).hide()}})}tipElement.fadeIn(options.fadeInTime,function fadeInCallback(){if(!session.desyncTimeout){session.desyncTimeout=setInterval(closeDesyncedTip,500)}element.trigger("powerTipOpen")})}function hideTip(element){session.isClosing=true;session.isTipOpen=false;session.desyncTimeout=clearInterval(session.desyncTimeout);element.data(DATA_HASACTIVEHOVER,false);element.data(DATA_FORCEDOPEN,false);$document.off("click"+EVENT_NAMESPACE);tipElement.off(EVENT_NAMESPACE);tipElement.fadeOut(options.fadeOutTime,function fadeOutCallback(){var coords=new CSSCoordinates;session.activeHover=null;session.isClosing=false;session.isFixedTipOpen=false;tipElement.removeClass();coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);tipElement.css(coords);element.trigger("powerTipClose")})}function positionTipOnCursor(){var tipWidth,tipHeight,coords,collisions,collisionCount;if(!session.isFixedTipOpen&&(session.isTipOpen||session.tipOpenImminent&&tipElement.data(DATA_HASMOUSEMOVE))){tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=new CSSCoordinates;coords.set("top",session.currentY+options.offset);coords.set("left",session.currentX+options.offset);collisions=getViewportCollisions(coords,tipWidth,tipHeight);if(collisions!==Collision.none){collisionCount=countFlags(collisions);if(collisionCount===1){if(collisions===Collision.right){coords.set("left",session.scrollLeft+session.windowWidth-tipWidth)}else if(collisions===Collision.bottom){coords.set("top",session.scrollTop+session.windowHeight-tipHeight)}}else{coords.set("left",session.currentX-tipWidth-options.offset);coords.set("top",session.currentY-tipHeight-options.offset)}}tipElement.css(coords)}}function positionTipOnElement(element){var priorityList,finalPlacement;if(options.smartPlacement||options.followMouse&&element.data(DATA_FORCEDOPEN)){priorityList=$.fn.powerTip.smartPlacementLists[options.placement];$.each(priorityList,function(idx,pos){var collisions=getViewportCollisions(placeTooltip(element,pos),tipElement.outerWidth(),tipElement.outerHeight());finalPlacement=pos;return collisions!==Collision.none})}else{placeTooltip(element,options.placement);finalPlacement=options.placement}tipElement.removeClass("w nw sw e ne se n s w se-alt sw-alt ne-alt nw-alt");tipElement.addClass(finalPlacement)}function placeTooltip(element,placement){var iterationCount=0,tipWidth,tipHeight,coords=new CSSCoordinates;coords.set("top",0);coords.set("left",0);tipElement.css(coords);do{tipWidth=tipElement.outerWidth();tipHeight=tipElement.outerHeight();coords=placementCalculator.compute(element,placement,tipWidth,tipHeight,options.offset);tipElement.css(coords)}while(++iterationCount<=5&&(tipWidth!==tipElement.outerWidth()||tipHeight!==tipElement.outerHeight()));return coords}function closeDesyncedTip(){var isDesynced=false,hasDesyncableCloseEvent=$.grep(["mouseleave","mouseout","blur","focusout"],function(eventType){return $.inArray(eventType,options.closeEvents)!==-1}).length>0;if(session.isTipOpen&&!session.isClosing&&!session.delayInProgress&&hasDesyncableCloseEvent){if(session.activeHover.data(DATA_HASACTIVEHOVER)===false||session.activeHover.is(":disabled")){isDesynced=true}else if(!isMouseOver(session.activeHover)&&!session.activeHover.is(":focus")&&!session.activeHover.data(DATA_FORCEDOPEN)){if(tipElement.data(DATA_MOUSEONTOTIP)){if(!isMouseOver(tipElement)){isDesynced=true}}else{isDesynced=true}}if(isDesynced){hideTip(session.activeHover)}}}this.showTip=beginShowTip;this.hideTip=hideTip;this.resetPosition=positionTipOnElement}function isSvgElement(element){return Boolean(window.SVGElement&&element[0]instanceof SVGElement)}function isMouseEvent(event){return Boolean(event&&$.inArray(event.type,MOUSE_EVENTS)>-1&&typeof event.pageX==="number")}function initTracking(){if(!session.mouseTrackingActive){session.mouseTrackingActive=true;getViewportDimensions();$(getViewportDimensions);$document.on("mousemove"+EVENT_NAMESPACE,trackMouse);$window.on("resize"+EVENT_NAMESPACE,trackResize);$window.on("scroll"+EVENT_NAMESPACE,trackScroll)}}function getViewportDimensions(){session.scrollLeft=$window.scrollLeft();session.scrollTop=$window.scrollTop();session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackResize(){session.windowWidth=$window.width();session.windowHeight=$window.height()}function trackScroll(){var x=$window.scrollLeft(),y=$window.scrollTop();if(x!==session.scrollLeft){session.currentX+=x-session.scrollLeft;session.scrollLeft=x}if(y!==session.scrollTop){session.currentY+=y-session.scrollTop;session.scrollTop=y}}function trackMouse(event){session.currentX=event.pageX;session.currentY=event.pageY}function isMouseOver(element){var elementPosition=element.offset(),elementBox=element[0].getBoundingClientRect(),elementWidth=elementBox.right-elementBox.left,elementHeight=elementBox.bottom-elementBox.top;return session.currentX>=elementPosition.left&&session.currentX<=elementPosition.left+elementWidth&&session.currentY>=elementPosition.top&&session.currentY<=elementPosition.top+elementHeight}function getTooltipContent(element){var tipText=element.data(DATA_POWERTIP),tipObject=element.data(DATA_POWERTIPJQ),tipTarget=element.data(DATA_POWERTIPTARGET),targetElement,content;if(tipText){if($.isFunction(tipText)){tipText=tipText.call(element[0])}content=tipText}else if(tipObject){if($.isFunction(tipObject)){tipObject=tipObject.call(element[0])}if(tipObject.length>0){content=tipObject.clone(true,true)}}else if(tipTarget){targetElement=$("#"+tipTarget);if(targetElement.length>0){content=targetElement.html()}}return content}function getViewportCollisions(coords,elementWidth,elementHeight){var viewportTop=session.scrollTop,viewportLeft=session.scrollLeft,viewportBottom=viewportTop+session.windowHeight,viewportRight=viewportLeft+session.windowWidth,collisions=Collision.none;if(coords.topviewportBottom||Math.abs(coords.bottom-session.windowHeight)>viewportBottom){collisions|=Collision.bottom}if(coords.leftviewportRight){collisions|=Collision.left}if(coords.left+elementWidth>viewportRight||coords.right1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery);/*! SmartMenus jQuery Plugin - v1.1.0 - September 17, 2017 + * http://www.smartmenus.org/ + * Copyright Vasil Dinkov, Vadikom Web Ltd. http://vadikom.com; Licensed MIT */(function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof module&&"object"==typeof module.exports?module.exports=t(require("jquery")):t(jQuery)})(function($){function initMouseDetection(t){var e=".smartmenus_mouse";if(mouseDetectionEnabled||t)mouseDetectionEnabled&&t&&($(document).off(e),mouseDetectionEnabled=!1);else{var i=!0,s=null,o={mousemove:function(t){var e={x:t.pageX,y:t.pageY,timeStamp:(new Date).getTime()};if(s){var o=Math.abs(s.x-e.x),a=Math.abs(s.y-e.y);if((o>0||a>0)&&2>=o&&2>=a&&300>=e.timeStamp-s.timeStamp&&(mouse=!0,i)){var n=$(t.target).closest("a");n.is("a")&&$.each(menuTrees,function(){return $.contains(this.$root[0],n[0])?(this.itemEnter({currentTarget:n[0]}),!1):void 0}),i=!1}}s=e}};o[touchEvents?"touchstart":"pointerover pointermove pointerout MSPointerOver MSPointerMove MSPointerOut"]=function(t){isTouchEvent(t.originalEvent)&&(mouse=!1)},$(document).on(getEventsNS(o,e)),mouseDetectionEnabled=!0}}function isTouchEvent(t){return!/^(4|mouse)$/.test(t.pointerType)}function getEventsNS(t,e){e||(e="");var i={};for(var s in t)i[s.split(" ").join(e+" ")+e]=t[s];return i}var menuTrees=[],mouse=!1,touchEvents="ontouchstart"in window,mouseDetectionEnabled=!1,requestAnimationFrame=window.requestAnimationFrame||function(t){return setTimeout(t,1e3/60)},cancelAnimationFrame=window.cancelAnimationFrame||function(t){clearTimeout(t)},canAnimate=!!$.fn.animate;return $.SmartMenus=function(t,e){this.$root=$(t),this.opts=e,this.rootId="",this.accessIdPrefix="",this.$subArrow=null,this.activatedItems=[],this.visibleSubMenus=[],this.showTimeout=0,this.hideTimeout=0,this.scrollTimeout=0,this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.idInc=0,this.$firstLink=null,this.$firstSub=null,this.disabled=!1,this.$disableOverlay=null,this.$touchScrollingSub=null,this.cssTransforms3d="perspective"in t.style||"webkitPerspective"in t.style,this.wasCollapsible=!1,this.init()},$.extend($.SmartMenus,{hideAll:function(){$.each(menuTrees,function(){this.menuHideAll()})},destroy:function(){for(;menuTrees.length;)menuTrees[0].destroy();initMouseDetection(!0)},prototype:{init:function(t){var e=this;if(!t){menuTrees.push(this),this.rootId=((new Date).getTime()+Math.random()+"").replace(/\D/g,""),this.accessIdPrefix="sm-"+this.rootId+"-",this.$root.hasClass("sm-rtl")&&(this.opts.rightToLeftSubMenus=!0);var i=".smartmenus";this.$root.data("smartmenus",this).attr("data-smartmenus-id",this.rootId).dataSM("level",1).on(getEventsNS({"mouseover focusin":$.proxy(this.rootOver,this),"mouseout focusout":$.proxy(this.rootOut,this),keydown:$.proxy(this.rootKeyDown,this)},i)).on(getEventsNS({mouseenter:$.proxy(this.itemEnter,this),mouseleave:$.proxy(this.itemLeave,this),mousedown:$.proxy(this.itemDown,this),focus:$.proxy(this.itemFocus,this),blur:$.proxy(this.itemBlur,this),click:$.proxy(this.itemClick,this)},i),"a"),i+=this.rootId,this.opts.hideOnClick&&$(document).on(getEventsNS({touchstart:$.proxy(this.docTouchStart,this),touchmove:$.proxy(this.docTouchMove,this),touchend:$.proxy(this.docTouchEnd,this),click:$.proxy(this.docClick,this)},i)),$(window).on(getEventsNS({"resize orientationchange":$.proxy(this.winResize,this)},i)),this.opts.subIndicators&&(this.$subArrow=$("").addClass("sub-arrow"),this.opts.subIndicatorsText&&this.$subArrow.html(this.opts.subIndicatorsText)),initMouseDetection()}if(this.$firstSub=this.$root.find("ul").each(function(){e.menuInit($(this))}).eq(0),this.$firstLink=this.$root.find("a").eq(0),this.opts.markCurrentItem){var s=/(index|default)\.[^#\?\/]*/i,o=/#.*/,a=window.location.href.replace(s,""),n=a.replace(o,"");this.$root.find("a").each(function(){var t=this.href.replace(s,""),i=$(this);(t==a||t==n)&&(i.addClass("current"),e.opts.markCurrentTree&&i.parentsUntil("[data-smartmenus-id]","ul").each(function(){$(this).dataSM("parent-a").addClass("current")}))})}this.wasCollapsible=this.isCollapsible()},destroy:function(t){if(!t){var e=".smartmenus";this.$root.removeData("smartmenus").removeAttr("data-smartmenus-id").removeDataSM("level").off(e),e+=this.rootId,$(document).off(e),$(window).off(e),this.opts.subIndicators&&(this.$subArrow=null)}this.menuHideAll();var i=this;this.$root.find("ul").each(function(){var t=$(this);t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.dataSM("shown-before")&&((i.opts.subMenusMinWidth||i.opts.subMenusMaxWidth)&&t.css({width:"",minWidth:"",maxWidth:""}).removeClass("sm-nowrap"),t.dataSM("scroll-arrows")&&t.dataSM("scroll-arrows").remove(),t.css({zIndex:"",top:"",left:"",marginLeft:"",marginTop:"",display:""})),0==(t.attr("id")||"").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeDataSM("in-mega").removeDataSM("shown-before").removeDataSM("scroll-arrows").removeDataSM("parent-a").removeDataSM("level").removeDataSM("beforefirstshowfired").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeAttr("aria-expanded"),this.$root.find("a.has-submenu").each(function(){var t=$(this);0==t.attr("id").indexOf(i.accessIdPrefix)&&t.removeAttr("id")}).removeClass("has-submenu").removeDataSM("sub").removeAttr("aria-haspopup").removeAttr("aria-controls").removeAttr("aria-expanded").closest("li").removeDataSM("sub"),this.opts.subIndicators&&this.$root.find("span.sub-arrow").remove(),this.opts.markCurrentItem&&this.$root.find("a.current").removeClass("current"),t||(this.$root=null,this.$firstLink=null,this.$firstSub=null,this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),menuTrees.splice($.inArray(this,menuTrees),1))},disable:function(t){if(!this.disabled){if(this.menuHideAll(),!t&&!this.opts.isPopup&&this.$root.is(":visible")){var e=this.$root.offset();this.$disableOverlay=$('
').css({position:"absolute",top:e.top,left:e.left,width:this.$root.outerWidth(),height:this.$root.outerHeight(),zIndex:this.getStartZIndex(!0),opacity:0}).appendTo(document.body)}this.disabled=!0}},docClick:function(t){return this.$touchScrollingSub?(this.$touchScrollingSub=null,void 0):((this.visibleSubMenus.length&&!$.contains(this.$root[0],t.target)||$(t.target).closest("a").length)&&this.menuHideAll(),void 0)},docTouchEnd:function(){if(this.lastTouch){if(!(!this.visibleSubMenus.length||void 0!==this.lastTouch.x2&&this.lastTouch.x1!=this.lastTouch.x2||void 0!==this.lastTouch.y2&&this.lastTouch.y1!=this.lastTouch.y2||this.lastTouch.target&&$.contains(this.$root[0],this.lastTouch.target))){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var t=this;this.hideTimeout=setTimeout(function(){t.menuHideAll()},350)}this.lastTouch=null}},docTouchMove:function(t){if(this.lastTouch){var e=t.originalEvent.touches[0];this.lastTouch.x2=e.pageX,this.lastTouch.y2=e.pageY}},docTouchStart:function(t){var e=t.originalEvent.touches[0];this.lastTouch={x1:e.pageX,y1:e.pageY,target:e.target}},enable:function(){this.disabled&&(this.$disableOverlay&&(this.$disableOverlay.remove(),this.$disableOverlay=null),this.disabled=!1)},getClosestMenu:function(t){for(var e=$(t).closest("ul");e.dataSM("in-mega");)e=e.parent().closest("ul");return e[0]||null},getHeight:function(t){return this.getOffset(t,!0)},getOffset:function(t,e){var i;"none"==t.css("display")&&(i={position:t[0].style.position,visibility:t[0].style.visibility},t.css({position:"absolute",visibility:"hidden"}).show());var s=t[0].getBoundingClientRect&&t[0].getBoundingClientRect(),o=s&&(e?s.height||s.bottom-s.top:s.width||s.right-s.left);return o||0===o||(o=e?t[0].offsetHeight:t[0].offsetWidth),i&&t.hide().css(i),o},getStartZIndex:function(t){var e=parseInt(this[t?"$root":"$firstSub"].css("z-index"));return!t&&isNaN(e)&&(e=parseInt(this.$root.css("z-index"))),isNaN(e)?1:e},getTouchPoint:function(t){return t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0]||t},getViewport:function(t){var e=t?"Height":"Width",i=document.documentElement["client"+e],s=window["inner"+e];return s&&(i=Math.min(i,s)),i},getViewportHeight:function(){return this.getViewport(!0)},getViewportWidth:function(){return this.getViewport()},getWidth:function(t){return this.getOffset(t)},handleEvents:function(){return!this.disabled&&this.isCSSOn()},handleItemEvents:function(t){return this.handleEvents()&&!this.isLinkInMegaMenu(t)},isCollapsible:function(){return"static"==this.$firstSub.css("position")},isCSSOn:function(){return"inline"!=this.$firstLink.css("display")},isFixed:function(){var t="fixed"==this.$root.css("position");return t||this.$root.parentsUntil("body").each(function(){return"fixed"==$(this).css("position")?(t=!0,!1):void 0}),t},isLinkInMegaMenu:function(t){return $(this.getClosestMenu(t[0])).hasClass("mega-menu")},isTouchMode:function(){return!mouse||this.opts.noMouseOver||this.isCollapsible()},itemActivate:function(t,e){var i=t.closest("ul"),s=i.dataSM("level");if(s>1&&(!this.activatedItems[s-2]||this.activatedItems[s-2][0]!=i.dataSM("parent-a")[0])){var o=this;$(i.parentsUntil("[data-smartmenus-id]","ul").get().reverse()).add(i).each(function(){o.itemActivate($(this).dataSM("parent-a"))})}if((!this.isCollapsible()||e)&&this.menuHideSubMenus(this.activatedItems[s-1]&&this.activatedItems[s-1][0]==t[0]?s:s-1),this.activatedItems[s-1]=t,this.$root.triggerHandler("activate.smapi",t[0])!==!1){var a=t.dataSM("sub");a&&(this.isTouchMode()||!this.opts.showOnClick||this.clickActivated)&&this.menuShow(a)}},itemBlur:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&this.$root.triggerHandler("blur.smapi",e[0])},itemClick:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(this.$touchScrollingSub&&this.$touchScrollingSub[0]==e.closest("ul")[0])return this.$touchScrollingSub=null,t.stopPropagation(),!1;if(this.$root.triggerHandler("click.smapi",e[0])===!1)return!1;var i=$(t.target).is(".sub-arrow"),s=e.dataSM("sub"),o=s?2==s.dataSM("level"):!1,a=this.isCollapsible(),n=/toggle$/.test(this.opts.collapsibleBehavior),r=/link$/.test(this.opts.collapsibleBehavior),h=/^accordion/.test(this.opts.collapsibleBehavior);if(s&&!s.is(":visible")){if((!r||!a||i)&&(this.opts.showOnClick&&o&&(this.clickActivated=!0),this.itemActivate(e,h),s.is(":visible")))return this.focusActivated=!0,!1}else if(a&&(n||i))return this.itemActivate(e,h),this.menuHide(s),n&&(this.focusActivated=!1),!1;return this.opts.showOnClick&&o||e.hasClass("disabled")||this.$root.triggerHandler("select.smapi",e[0])===!1?!1:void 0}},itemDown:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&e.dataSM("mousedown",!0)},itemEnter:function(t){var e=$(t.currentTarget);if(this.handleItemEvents(e)){if(!this.isTouchMode()){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);var i=this;this.showTimeout=setTimeout(function(){i.itemActivate(e)},this.opts.showOnClick&&1==e.closest("ul").dataSM("level")?1:this.opts.showTimeout)}this.$root.triggerHandler("mouseenter.smapi",e[0])}},itemFocus:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(!this.focusActivated||this.isTouchMode()&&e.dataSM("mousedown")||this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0]==e[0]||this.itemActivate(e,!0),this.$root.triggerHandler("focus.smapi",e[0]))},itemLeave:function(t){var e=$(t.currentTarget);this.handleItemEvents(e)&&(this.isTouchMode()||(e[0].blur(),this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0)),e.removeDataSM("mousedown"),this.$root.triggerHandler("mouseleave.smapi",e[0]))},menuHide:function(t){if(this.$root.triggerHandler("beforehide.smapi",t[0])!==!1&&(canAnimate&&t.stop(!0,!0),"none"!=t.css("display"))){var e=function(){t.css("z-index","")};this.isCollapsible()?canAnimate&&this.opts.collapsibleHideFunction?this.opts.collapsibleHideFunction.call(this,t,e):t.hide(this.opts.collapsibleHideDuration,e):canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,t,e):t.hide(this.opts.hideDuration,e),t.dataSM("scroll")&&(this.menuScrollStop(t),t.css({"touch-action":"","-ms-touch-action":"","-webkit-transform":"",transform:""}).off(".smartmenus_scroll").removeDataSM("scroll").dataSM("scroll-arrows").hide()),t.dataSM("parent-a").removeClass("highlighted").attr("aria-expanded","false"),t.attr({"aria-expanded":"false","aria-hidden":"true"});var i=t.dataSM("level");this.activatedItems.splice(i-1,1),this.visibleSubMenus.splice($.inArray(t,this.visibleSubMenus),1),this.$root.triggerHandler("hide.smapi",t[0])}},menuHideAll:function(){this.showTimeout&&(clearTimeout(this.showTimeout),this.showTimeout=0);for(var t=this.opts.isPopup?1:0,e=this.visibleSubMenus.length-1;e>=t;e--)this.menuHide(this.visibleSubMenus[e]);this.opts.isPopup&&(canAnimate&&this.$root.stop(!0,!0),this.$root.is(":visible")&&(canAnimate&&this.opts.hideFunction?this.opts.hideFunction.call(this,this.$root):this.$root.hide(this.opts.hideDuration))),this.activatedItems=[],this.visibleSubMenus=[],this.clickActivated=!1,this.focusActivated=!1,this.zIndexInc=0,this.$root.triggerHandler("hideAll.smapi")},menuHideSubMenus:function(t){for(var e=this.activatedItems.length-1;e>=t;e--){var i=this.activatedItems[e].dataSM("sub");i&&this.menuHide(i)}},menuInit:function(t){if(!t.dataSM("in-mega")){t.hasClass("mega-menu")&&t.find("ul").dataSM("in-mega",!0);for(var e=2,i=t[0];(i=i.parentNode.parentNode)!=this.$root[0];)e++;var s=t.prevAll("a").eq(-1);s.length||(s=t.prevAll().find("a").eq(-1)),s.addClass("has-submenu").dataSM("sub",t),t.dataSM("parent-a",s).dataSM("level",e).parent().dataSM("sub",t);var o=s.attr("id")||this.accessIdPrefix+ ++this.idInc,a=t.attr("id")||this.accessIdPrefix+ ++this.idInc;s.attr({id:o,"aria-haspopup":"true","aria-controls":a,"aria-expanded":"false"}),t.attr({id:a,role:"group","aria-hidden":"true","aria-labelledby":o,"aria-expanded":"false"}),this.opts.subIndicators&&s[this.opts.subIndicatorsPos](this.$subArrow.clone())}},menuPosition:function(t){var e,i,s=t.dataSM("parent-a"),o=s.closest("li"),a=o.parent(),n=t.dataSM("level"),r=this.getWidth(t),h=this.getHeight(t),u=s.offset(),l=u.left,c=u.top,d=this.getWidth(s),m=this.getHeight(s),p=$(window),f=p.scrollLeft(),v=p.scrollTop(),b=this.getViewportWidth(),S=this.getViewportHeight(),g=a.parent().is("[data-sm-horizontal-sub]")||2==n&&!a.hasClass("sm-vertical"),M=this.opts.rightToLeftSubMenus&&!o.is("[data-sm-reverse]")||!this.opts.rightToLeftSubMenus&&o.is("[data-sm-reverse]"),w=2==n?this.opts.mainMenuSubOffsetX:this.opts.subMenusSubOffsetX,T=2==n?this.opts.mainMenuSubOffsetY:this.opts.subMenusSubOffsetY;if(g?(e=M?d-r-w:w,i=this.opts.bottomToTopSubMenus?-h-T:m+T):(e=M?w-r:d-w,i=this.opts.bottomToTopSubMenus?m-T-h:T),this.opts.keepInViewport){var y=l+e,I=c+i;if(M&&f>y?e=g?f-y+e:d-w:!M&&y+r>f+b&&(e=g?f+b-r-y+e:w-r),g||(S>h&&I+h>v+S?i+=v+S-h-I:(h>=S||v>I)&&(i+=v-I)),g&&(I+h>v+S+.49||v>I)||!g&&h>S+.49){var x=this;t.dataSM("scroll-arrows")||t.dataSM("scroll-arrows",$([$('')[0],$('')[0]]).on({mouseenter:function(){t.dataSM("scroll").up=$(this).hasClass("scroll-up"),x.menuScroll(t)},mouseleave:function(e){x.menuScrollStop(t),x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(t){t.preventDefault()}}).insertAfter(t));var A=".smartmenus_scroll";if(t.dataSM("scroll",{y:this.cssTransforms3d?0:i-m,step:1,itemH:m,subH:h,arrowDownH:this.getHeight(t.dataSM("scroll-arrows").eq(1))}).on(getEventsNS({mouseover:function(e){x.menuScrollOver(t,e)},mouseout:function(e){x.menuScrollOut(t,e)},"mousewheel DOMMouseScroll":function(e){x.menuScrollMousewheel(t,e)}},A)).dataSM("scroll-arrows").css({top:"auto",left:"0",marginLeft:e+(parseInt(t.css("border-left-width"))||0),width:r-(parseInt(t.css("border-left-width"))||0)-(parseInt(t.css("border-right-width"))||0),zIndex:t.css("z-index")}).eq(g&&this.opts.bottomToTopSubMenus?0:1).show(),this.isFixed()){var C={};C[touchEvents?"touchstart touchmove touchend":"pointerdown pointermove pointerup MSPointerDown MSPointerMove MSPointerUp"]=function(e){x.menuScrollTouch(t,e)},t.css({"touch-action":"none","-ms-touch-action":"none"}).on(getEventsNS(C,A))}}}t.css({top:"auto",left:"0",marginLeft:e,marginTop:i-m})},menuScroll:function(t,e,i){var s,o=t.dataSM("scroll"),a=t.dataSM("scroll-arrows"),n=o.up?o.upEnd:o.downEnd;if(!e&&o.momentum){if(o.momentum*=.92,s=o.momentum,.5>s)return this.menuScrollStop(t),void 0}else s=i||(e||!this.opts.scrollAccelerate?this.opts.scrollStep:Math.floor(o.step));var r=t.dataSM("level");if(this.activatedItems[r-1]&&this.activatedItems[r-1].dataSM("sub")&&this.activatedItems[r-1].dataSM("sub").is(":visible")&&this.menuHideSubMenus(r-1),o.y=o.up&&o.y>=n||!o.up&&n>=o.y?o.y:Math.abs(n-o.y)>s?o.y+(o.up?s:-s):n,t.css(this.cssTransforms3d?{"-webkit-transform":"translate3d(0, "+o.y+"px, 0)",transform:"translate3d(0, "+o.y+"px, 0)"}:{marginTop:o.y}),mouse&&(o.up&&o.y>o.downEnd||!o.up&&o.y0;t.dataSM("scroll-arrows").eq(i?0:1).is(":visible")&&(t.dataSM("scroll").up=i,this.menuScroll(t,!0))}e.preventDefault()},menuScrollOut:function(t,e){mouse&&(/^scroll-(up|down)/.test((e.relatedTarget||"").className)||(t[0]==e.relatedTarget||$.contains(t[0],e.relatedTarget))&&this.getClosestMenu(e.relatedTarget)==t[0]||t.dataSM("scroll-arrows").css("visibility","hidden"))},menuScrollOver:function(t,e){if(mouse&&!/^scroll-(up|down)/.test(e.target.className)&&this.getClosestMenu(e.target)==t[0]){this.menuScrollRefreshData(t);var i=t.dataSM("scroll"),s=$(window).scrollTop()-t.dataSM("parent-a").offset().top-i.itemH;t.dataSM("scroll-arrows").eq(0).css("margin-top",s).end().eq(1).css("margin-top",s+this.getViewportHeight()-i.arrowDownH).end().css("visibility","visible")}},menuScrollRefreshData:function(t){var e=t.dataSM("scroll"),i=$(window).scrollTop()-t.dataSM("parent-a").offset().top-e.itemH;this.cssTransforms3d&&(i=-(parseFloat(t.css("margin-top"))-i)),$.extend(e,{upEnd:i,downEnd:i+this.getViewportHeight()-e.subH})},menuScrollStop:function(t){return this.scrollTimeout?(cancelAnimationFrame(this.scrollTimeout),this.scrollTimeout=0,t.dataSM("scroll").step=1,!0):void 0},menuScrollTouch:function(t,e){if(e=e.originalEvent,isTouchEvent(e)){var i=this.getTouchPoint(e);if(this.getClosestMenu(i.target)==t[0]){var s=t.dataSM("scroll");if(/(start|down)$/i.test(e.type))this.menuScrollStop(t)?(e.preventDefault(),this.$touchScrollingSub=t):this.$touchScrollingSub=null,this.menuScrollRefreshData(t),$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp});else if(/move$/i.test(e.type)){var o=void 0!==s.touchY?s.touchY:s.touchStartY;if(void 0!==o&&o!=i.pageY){this.$touchScrollingSub=t;var a=i.pageY>o;void 0!==s.up&&s.up!=a&&$.extend(s,{touchStartY:i.pageY,touchStartTime:e.timeStamp}),$.extend(s,{up:a,touchY:i.pageY}),this.menuScroll(t,!0,Math.abs(i.pageY-o))}e.preventDefault()}else void 0!==s.touchY&&((s.momentum=15*Math.pow(Math.abs(i.pageY-s.touchStartY)/(e.timeStamp-s.touchStartTime),2))&&(this.menuScrollStop(t),this.menuScroll(t),e.preventDefault()),delete s.touchY)}}},menuShow:function(t){if((t.dataSM("beforefirstshowfired")||(t.dataSM("beforefirstshowfired",!0),this.$root.triggerHandler("beforefirstshow.smapi",t[0])!==!1))&&this.$root.triggerHandler("beforeshow.smapi",t[0])!==!1&&(t.dataSM("shown-before",!0),canAnimate&&t.stop(!0,!0),!t.is(":visible"))){var e=t.dataSM("parent-a"),i=this.isCollapsible();if((this.opts.keepHighlighted||i)&&e.addClass("highlighted"),i)t.removeClass("sm-nowrap").css({zIndex:"",width:"auto",minWidth:"",maxWidth:"",top:"",left:"",marginLeft:"",marginTop:""});else{if(t.css("z-index",this.zIndexInc=(this.zIndexInc||this.getStartZIndex())+1),(this.opts.subMenusMinWidth||this.opts.subMenusMaxWidth)&&(t.css({width:"auto",minWidth:"",maxWidth:""}).addClass("sm-nowrap"),this.opts.subMenusMinWidth&&t.css("min-width",this.opts.subMenusMinWidth),this.opts.subMenusMaxWidth)){var s=this.getWidth(t);t.css("max-width",this.opts.subMenusMaxWidth),s>this.getWidth(t)&&t.removeClass("sm-nowrap").css("width",this.opts.subMenusMaxWidth)}this.menuPosition(t)}var o=function(){t.css("overflow","")};i?canAnimate&&this.opts.collapsibleShowFunction?this.opts.collapsibleShowFunction.call(this,t,o):t.show(this.opts.collapsibleShowDuration,o):canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,t,o):t.show(this.opts.showDuration,o),e.attr("aria-expanded","true"),t.attr({"aria-expanded":"true","aria-hidden":"false"}),this.visibleSubMenus.push(t),this.$root.triggerHandler("show.smapi",t[0])}},popupHide:function(t){this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0);var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},t?1:this.opts.hideTimeout)},popupShow:function(t,e){if(!this.opts.isPopup)return alert('SmartMenus jQuery Error:\n\nIf you want to show this menu via the "popupShow" method, set the isPopup:true option.'),void 0;if(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),this.$root.dataSM("shown-before",!0),canAnimate&&this.$root.stop(!0,!0),!this.$root.is(":visible")){this.$root.css({left:t,top:e});var i=this,s=function(){i.$root.css("overflow","")};canAnimate&&this.opts.showFunction?this.opts.showFunction.call(this,this.$root,s):this.$root.show(this.opts.showDuration,s),this.visibleSubMenus[0]=this.$root}},refresh:function(){this.destroy(!0),this.init(!0)},rootKeyDown:function(t){if(this.handleEvents())switch(t.keyCode){case 27:var e=this.activatedItems[0];if(e){this.menuHideAll(),e[0].focus();var i=e.dataSM("sub");i&&this.menuHide(i)}break;case 32:var s=$(t.target);if(s.is("a")&&this.handleItemEvents(s)){var i=s.dataSM("sub");i&&!i.is(":visible")&&(this.itemClick({currentTarget:t.target}),t.preventDefault())}}},rootOut:function(t){if(this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&(this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0),!this.opts.showOnClick||!this.opts.hideOnClick)){var e=this;this.hideTimeout=setTimeout(function(){e.menuHideAll()},this.opts.hideTimeout)}},rootOver:function(t){this.handleEvents()&&!this.isTouchMode()&&t.target!=this.$root[0]&&this.hideTimeout&&(clearTimeout(this.hideTimeout),this.hideTimeout=0)},winResize:function(t){if(this.handleEvents()){if(!("onorientationchange"in window)||"orientationchange"==t.type){var e=this.isCollapsible();this.wasCollapsible&&e||(this.activatedItems.length&&this.activatedItems[this.activatedItems.length-1][0].blur(),this.menuHideAll()),this.wasCollapsible=e}}else if(this.$disableOverlay){var i=this.$root.offset();this.$disableOverlay.css({top:i.top,left:i.left,width:this.$root.outerWidth(),height:this.$root.outerHeight()})}}}}),$.fn.dataSM=function(t,e){return e?this.data(t+"_smartmenus",e):this.data(t+"_smartmenus")},$.fn.removeDataSM=function(t){return this.removeData(t+"_smartmenus")},$.fn.smartmenus=function(options){if("string"==typeof options){var args=arguments,method=options;return Array.prototype.shift.call(args),this.each(function(){var t=$(this).data("smartmenus");t&&t[method]&&t[method].apply(t,args)})}return this.each(function(){var dataOpts=$(this).data("sm-options")||null;if(dataOpts)try{dataOpts=eval("("+dataOpts+")")}catch(e){dataOpts=null,alert('ERROR\n\nSmartMenus jQuery init:\nInvalid "data-sm-options" attribute value syntax.')}new $.SmartMenus(this,$.extend({},$.fn.smartmenus.defaults,options,dataOpts))})},$.fn.smartmenus.defaults={isPopup:!1,mainMenuSubOffsetX:0,mainMenuSubOffsetY:0,subMenusSubOffsetX:0,subMenusSubOffsetY:0,subMenusMinWidth:"10em",subMenusMaxWidth:"20em",subIndicators:!0,subIndicatorsPos:"append",subIndicatorsText:"",scrollStep:30,scrollAccelerate:!0,showTimeout:250,hideTimeout:500,showDuration:0,showFunction:null,hideDuration:0,hideFunction:function(t,e){t.fadeOut(200,e)},collapsibleShowDuration:0,collapsibleShowFunction:function(t,e){t.slideDown(200,e)},collapsibleHideDuration:0,collapsibleHideFunction:function(t,e){t.slideUp(200,e)},showOnClick:!1,hideOnClick:!0,noMouseOver:!1,keepInViewport:!0,keepHighlighted:!0,markCurrentItem:!1,markCurrentTree:!0,rightToLeftSubMenus:!1,bottomToTopSubMenus:!1,collapsibleBehavior:"default"},$}); \ No newline at end of file diff --git a/doxygen/doc/html/md_C_1_dev_icub-tests_README.html b/doxygen/doc/html/md_C_1_dev_icub-tests_README.html new file mode 100644 index 00000000..d1701832 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-tests_README.html @@ -0,0 +1,93 @@ + + + + + + + +icub-test: icub-tests + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
icub-tests
+
+
+

gh-pages

+

The icub-tests repository contains tests for the iCub robot. Tests are written using the Robot Testing Framework.

+

Installation, tutorial and available tests

+

See the icub-test documentation.

+

Contributors

+ +
+
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-tests_src_cartesian-control_README.html b/doxygen/doc/html/md_C_1_dev_icub-tests_src_cartesian-control_README.html new file mode 100644 index 00000000..60041a59 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-tests_src_cartesian-control_README.html @@ -0,0 +1,83 @@ + + + + + + + +icub-test: iCub cartesian-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub cartesian-control
+
+
+

Set of tests meant to verify the functionality of the Cartesian Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-tests_src_gaze-control_README.html b/doxygen/doc/html/md_C_1_dev_icub-tests_src_gaze-control_README.html new file mode 100644 index 00000000..e2ae31f8 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-tests_src_gaze-control_README.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: iCub gaze-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub gaze-control
+
+
+

Set of tests meant to verify the functionality of the Gaze Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-tests_src_models-consistency_README.html b/doxygen/doc/html/md_C_1_dev_icub-tests_src_models-consistency_README.html new file mode 100644 index 00000000..6a3d7d99 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-tests_src_models-consistency_README.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: iCub models-consistency + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub models-consistency
+
+
+

Set of tests meant to ensure consistency in kinematics model used in iCub.

+

ikin-idyn-consistency

+

This test will check that the end effector transforms (for the two hands and the two feet) provided by the iKin chains and the iDyn iCubWholeBody object are consistent. While iDyn is being discontinued, this check is important because URDF models for some model of iCub (for example iCub v1) are generated from iDyn models.

+
+
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-tests_src_skinWrapperTest_README.html b/doxygen/doc/html/md_C_1_dev_icub-tests_src_skinWrapperTest_README.html new file mode 100644 index 00000000..88451ee6 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-tests_src_skinWrapperTest_README.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: iCub skinWrapper + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub skinWrapper
+
+
+

Set of tests meant to verify the functionality of the Skin Wrapper component after its cleaning and after the removal of AnalogServer from icub-main.

+

Usage

+

robottestingframework-testrunner -v -s /icub-tests/suites/skinWrapper-YarpPluginFixture.xml

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.html b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.html new file mode 100644 index 00000000..b6c3b766 --- /dev/null +++ b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.html @@ -0,0 +1,91 @@ + + + + + + + +icub-test: icub-tests + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
icub-tests
+
+
+

The icub-tests repository contains tests for the iCub robot. Tests are written using the Robot Testing Framework.

+

Installation, tutorial and available tests

+

See the icub-test documentation.

+

Update the documentation

+

To update documentation follow these steps:

+
git checkout gh-pages
git rebase master
cd doxygen
rm -rf doc
doxygen ./generate.txt
git add ./doc
git log -1
git commit --amend
git push --force-with-lease
git checkout master

For in-depth details about doxygen documentation and gh-pages, see how-to-document-modules.

+

Contributors

+ +
+ + + + diff --git a/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.html b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.html new file mode 100644 index 00000000..e3559b68 --- /dev/null +++ b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.html @@ -0,0 +1,79 @@ + + + + + + + +icub-test: iCub cartesian-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub cartesian-control
+
+
+

Set of tests meant to verify the functionality of the Cartesian Control component.

+

Available tests

+ +
+ + + + diff --git a/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.html b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.html new file mode 100644 index 00000000..e6afe0d6 --- /dev/null +++ b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: iCub gaze-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub gaze-control
+
+
+

Set of tests meant to verify the functionality of the Gaze Control component.

+

Available tests

+ +
+ + + + diff --git a/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.html b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.html new file mode 100644 index 00000000..64cf8f1f --- /dev/null +++ b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.html @@ -0,0 +1,76 @@ + + + + + + + +icub-test: iCub models-consistency + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub models-consistency
+
+
+

Set of tests meant to ensure consistency in kinematics model used in iCub.

+

ikin-idyn-consistency

+

This test will check that the end effector transforms (for the two hands and the two feet) provided by the iKin chains and the iDyn iCubWholeBody object are consistent. While iDyn is being discontinued, this check is important because URDF models for some model of iCub (for example iCub v1) are generated from iDyn models.

+
+ + + + diff --git a/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.html b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.html new file mode 100644 index 00000000..3c005fbd --- /dev/null +++ b/doxygen/doc/html/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.html @@ -0,0 +1,76 @@ + + + + + + + +icub-test: iCub skinWrapper + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub skinWrapper
+
+
+

Set of tests meant to verify the functionality of the Skin Wrapper component after its cleaning and after the removal of AnalogServer from icub-main.

+

Usage

+

robottestingframework-testrunner -v -s /icub-tests/suites/skinWrapper-YarpPluginFixture.xml

+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.html b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.html new file mode 100644 index 00000000..e74c2918 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.html @@ -0,0 +1,101 @@ + + + + + + + +icub-test: icub-tests + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
icub-tests
+
+
+

ci gh-pages

+

Maintainers

+

This repository is maintained by:

+ + + + + +
@Nicogene
+

The icub-tests repository contains tests for the iCub robot. Tests are written using the Robot Testing Framework.

+

Installation, tutorial and available tests

+

See the icub-test documentation.

+

Contributors

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.html b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.html new file mode 100644 index 00000000..60041a59 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.html @@ -0,0 +1,83 @@ + + + + + + + +icub-test: iCub cartesian-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub cartesian-control
+
+
+

Set of tests meant to verify the functionality of the Cartesian Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.html b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.html new file mode 100644 index 00000000..e2ae31f8 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.html @@ -0,0 +1,82 @@ + + + + + + + +icub-test: iCub gaze-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub gaze-control
+
+
+

Set of tests meant to verify the functionality of the Gaze Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.html b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.html new file mode 100644 index 00000000..6a3d7d99 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: iCub models-consistency + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub models-consistency
+
+
+

Set of tests meant to ensure consistency in kinematics model used in iCub.

+

ikin-idyn-consistency

+

This test will check that the end effector transforms (for the two hands and the two feet) provided by the iKin chains and the iDyn iCubWholeBody object are consistent. While iDyn is being discontinued, this check is important because URDF models for some model of iCub (for example iCub v1) are generated from iDyn models.

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.html b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.html new file mode 100644 index 00000000..88451ee6 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: iCub skinWrapper + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub skinWrapper
+
+
+

Set of tests meant to verify the functionality of the Skin Wrapper component after its cleaning and after the removal of AnalogServer from icub-main.

+

Usage

+

robottestingframework-testrunner -v -s /icub-tests/suites/skinWrapper-YarpPluginFixture.xml

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html new file mode 100644 index 00000000..0157c139 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html @@ -0,0 +1,99 @@ + + + + + + + +icub-test: icub-tests + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
icub-tests
+
+
+

ci gh-pages

+

Maintainers

+

This repository is maintained by:

+ + + + + +
@Nicogene
+

The icub-tests repository contains tests for the iCub robot. Tests are written using the Robot Testing Framework.

+

Installation, tutorial and available tests

+

See the icub-test documentation.

+

Contributors

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html new file mode 100644 index 00000000..70346804 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html @@ -0,0 +1,81 @@ + + + + + + + +icub-test: iCub cartesian-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub cartesian-control
+
+
+

Set of tests meant to verify the functionality of the Cartesian Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html new file mode 100644 index 00000000..1212fc46 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html @@ -0,0 +1,80 @@ + + + + + + + +icub-test: iCub gaze-control + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub gaze-control
+
+
+

Set of tests meant to verify the functionality of the Gaze Control component.

+

Available tests

+ +
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html new file mode 100644 index 00000000..d921709f --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: iCub models-consistency + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub models-consistency
+
+
+

Set of tests meant to ensure consistency in kinematics model used in iCub.

+

ikin-idyn-consistency

+

This test will check that the end effector transforms (for the two hands and the two feet) provided by the iKin chains and the iDyn iCubWholeBody object are consistent. While iDyn is being discontinued, this check is important because URDF models for some model of iCub (for example iCub v1) are generated from iDyn models.

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html new file mode 100644 index 00000000..1d871021 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html @@ -0,0 +1,78 @@ + + + + + + + +icub-test: iCub skinWrapper + + + + + + + + + +
+
+ + + + + + +
+
icub-test +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
iCub skinWrapper
+
+
+

Set of tests meant to verify the functionality of the Skin Wrapper component after its cleaning and after the removal of AnalogServer from icub-main.

+

Usage

+

robottestingframework-testrunner -v -s /icub-tests/suites/skinWrapper-YarpPluginFixture.xml

+
+
+ + + + diff --git a/doxygen/doc/html/menu.js b/doxygen/doc/html/menu.js new file mode 100644 index 00000000..2fe2214f --- /dev/null +++ b/doxygen/doc/html/menu.js @@ -0,0 +1,51 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { + function makeTree(data,relPath) { + var result=''; + if ('children' in data) { + result+=''; + } + return result; + } + + $('#main-nav').append(makeTree(menudata,relPath)); + $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); + if (searchEnabled) { + if (serverSide) { + $('#main-menu').append('
  • '); + } else { + $('#main-menu').append('
  • '); + } + } + $('#main-menu').smartmenus(); +} +/* @license-end */ diff --git a/doxygen/doc/html/menudata.js b/doxygen/doc/html/menudata.js new file mode 100644 index 00000000..5452b566 --- /dev/null +++ b/doxygen/doc/html/menudata.js @@ -0,0 +1,32 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file +*/ +var menudata={children:[ +{text:"Main Page",url:"index.html"}, +{text:"Related Pages",url:"pages.html"}, +{text:"Modules",url:"modules.html"}, +{text:"Data Structures",url:"annotated.html",children:[ +{text:"Data Structures",url:"annotated.html"}]}, +{text:"Files",url:"files.html",children:[ +{text:"File List",url:"files.html"}]}]} diff --git a/doxygen/doc/html/modules.html b/doxygen/doc/html/modules.html new file mode 100644 index 00000000..83804223 --- /dev/null +++ b/doxygen/doc/html/modules.html @@ -0,0 +1,79 @@ + + + + + + + +icub-test: Modules + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Modules
    +
    +
    +
    Here is a list of all modules:
    + + +
     A list of available testsThis page contains the list of all the tests tht are currently available and documented
    +
    +
    + + + + diff --git a/doxygen/doc/html/motorEncodersConsistency_8cpp_source.html b/doxygen/doc/html/motorEncodersConsistency_8cpp_source.html new file mode 100644 index 00000000..98b3a319 --- /dev/null +++ b/doxygen/doc/html/motorEncodersConsistency_8cpp_source.html @@ -0,0 +1,712 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncoders-consistency/motorEncodersConsistency.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    motorEncodersConsistency.cpp
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #include <math.h>
    +
    22 #include <robottestingframework/TestAssert.h>
    +
    23 #include <robottestingframework/dll/Plugin.h>
    +
    24 #include <yarp/os/Time.h>
    +
    25 #include <yarp/os/LogStream.h>
    +
    26 #include <yarp/math/Math.h>
    +
    27 #include <yarp/os/Property.h>
    +
    28 #include <yarp/os/ResourceFinder.h>
    +
    29 #include <algorithm>
    +
    30 #include <cstdlib>
    +
    31 #include <fstream>
    +
    32 #include "motorEncodersConsistency.h"
    +
    33 #include <iostream>
    +
    34 #include <yarp/dev/IRemoteVariables.h>
    +
    35 
    +
    36 using namespace std;
    +
    37 
    +
    38 //example -v -t OpticalEncodersConsistency.dll -p "--robot icub --part left_arm --joints ""(0 1 2)"" --home ""(-30 30 10)"" --speed ""(20 20 20)"" --max ""(-20 40 20)"" --min ""(-40 20 0)"" --cycles 10 --tolerance 1.0 "
    +
    39 //example2 -v -t OpticalEncodersConsistency.dll -p "--robot icub --part head --joints ""(2)"" --home ""(0)"" --speed ""(20 )"" --max ""(10 )"" --min ""(-10)"" --cycles 10 --tolerance 1.0 "
    +
    40 //-v - s "C:\software\icub-tests\suites\encoders-icubSim.xml"
    +
    41 using namespace robottestingframework;
    +
    42 using namespace yarp::os;
    +
    43 using namespace yarp::dev;
    +
    44 using namespace yarp::math;
    +
    45 
    +
    46 // prepare the plugin
    +
    47 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(OpticalEncodersConsistency)
    +
    48 
    +
    49 OpticalEncodersConsistency::OpticalEncodersConsistency() : yarp::robottestingframework::TestCase("OpticalEncodersConsistency") {
    +
    50  jointsList=0;
    +
    51  dd=0;
    +
    52  ipos=0;
    +
    53  icmd=0;
    +
    54  iimd=0;
    +
    55  ienc=0;
    +
    56  imot=0;
    +
    57  imotenc=0;
    +
    58 
    +
    59  enc_jnt=0;
    +
    60  enc_jnt2mot=0;
    +
    61  enc_mot=0;
    +
    62  vel_jnt=0;
    +
    63  vel_jnt2mot=0;
    +
    64  vel_mot=0;
    +
    65  acc_jnt=0;
    +
    66  acc_jnt2mot=0;
    +
    67  acc_mot=0;
    +
    68  cycles =10;
    +
    69  tolerance = 1.0;
    +
    70  plot_enabled = false;
    +
    71 }
    +
    72 
    +
    73 OpticalEncodersConsistency::~OpticalEncodersConsistency() { }
    +
    74 
    +
    75 bool OpticalEncodersConsistency::setup(yarp::os::Property& property) {
    +
    76 
    +
    77  if(property.check("name"))
    +
    78  setName(property.find("name").asString());
    +
    79 
    +
    80  char b[5000];
    +
    81  strcpy (b,property.toString().c_str());
    +
    82  ROBOTTESTINGFRAMEWORK_TEST_REPORT("on setup()");
    +
    83  // updating parameters
    +
    84  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
    +
    85  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
    +
    86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
    +
    87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position must be given as the test parameter!");
    +
    88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("max"), "The max position must be given as the test parameter!");
    +
    89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("min"), "The min position must be given as the test parameter!");
    +
    90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("speed"), "The positionMove reference speed must be given as the test parameter!");
    +
    91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("tolerance"), "The tolerance of the control signal must be given as the test parameter!");
    +
    92  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("matrix_size"), "The matrix size must be given!");
    +
    93  // ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("matrix"), "The coupling matrix must be given!");
    +
    94  robotName = property.find("robot").asString();
    +
    95  partName = property.find("part").asString();
    +
    96  if(property.check("plot_enabled"))
    +
    97  plot_enabled = property.find("plot_enabled").asBool();
    +
    98  /*if(plot_enabled)
    +
    99  {
    +
    100  plotString1 = property.find("plotString1").asString();
    +
    101  plotString2 = property.find("plotString2").asString();
    +
    102  plotString3 = property.find("plotString3").asString();
    +
    103  plotString4 = property.find("plotString4").asString();
    +
    104  }*/
    +
    105  Bottle* jointsBottle = property.find("joints").asList();
    +
    106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
    +
    107 
    +
    108  Bottle* homeBottle = property.find("home").asList();
    +
    109  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse home parameter");
    +
    110 
    +
    111  Bottle* maxBottle = property.find("max").asList();
    +
    112  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(maxBottle!=0,"unable to parse max parameter");
    +
    113 
    +
    114  Bottle* minBottle = property.find("min").asList();
    +
    115  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(minBottle!=0,"unable to parse min parameter");
    +
    116 
    +
    117  Bottle* speedBottle = property.find("speed").asList();
    +
    118  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(speedBottle!=0,"unable to parse speed parameter");
    +
    119 
    +
    120  tolerance = property.find("tolerance").asFloat64();
    +
    121  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(tolerance>=0,"invalid tolerance");
    +
    122 
    +
    123  int matrix_size=property.find("matrix_size").asInt32();
    +
    124  if (matrix_size>0)
    +
    125  {
    +
    126  matrix.resize(matrix_size,matrix_size);
    +
    127  matrix.eye();
    +
    128 
    +
    129  // The couplig matrix is retrived run-time by the IRemoteVariable interface accessing the jinimatic_mj variable
    +
    130  //
    +
    131  // Bottle* matrixBottle = property.find("matrix").asList();
    +
    132 
    +
    133  // if (matrixBottle!= NULL && matrixBottle->size() == (matrix_size*matrix_size) )
    +
    134  // {
    +
    135  // for (int i=0; i< (matrix_size*matrix_size); i++)
    +
    136  // {
    +
    137  // matrix.data()[i]=matrixBottle->get(i).asFloat64();
    +
    138  // }
    +
    139  // }
    +
    140  // else
    +
    141  // {
    +
    142  // char buff [500];
    +
    143  // sprintf (buff, "invalid number of elements of parameter matrix %d!=%d", matrixBottle->size() , (matrix_size*matrix_size));
    +
    144  // ROBOTTESTINGFRAMEWORK_ASSERT_ERROR(buff);
    +
    145  // }
    +
    146  }
    +
    147  else
    +
    148  {
    +
    149  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("invalid matrix_size: must be >0");
    +
    150  }
    +
    151 
    +
    152  //optional parameters
    +
    153  if (property.check("cycles"))
    +
    154  {cycles = property.find("cycles").asInt32();}
    +
    155 
    +
    156  Property options;
    +
    157  options.put("device", "remote_controlboard");
    +
    158  options.put("remote", "/"+robotName+"/"+partName);
    +
    159  options.put("local", "/positionDirectTest/"+robotName+"/"+partName);
    +
    160 
    +
    161  dd = new PolyDriver(options);
    +
    162  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
    +
    163  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
    +
    164  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
    +
    165  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
    +
    166  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
    +
    167  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(imotenc),"Unable to open motor encoders interface");
    +
    168  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(imot),"Unable to open motor interface");
    +
    169  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ivar),"Unable to open remote variables interface");
    +
    170 
    +
    171 
    +
    172  if (!ienc->getAxes(&n_part_joints))
    +
    173  {
    +
    174  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
    +
    175  }
    +
    176 
    +
    177  int n_cmd_joints = jointsBottle->size();
    +
    178  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0 && n_cmd_joints<=n_part_joints,"invalid number of joints, it must be >0 & <= number of part joints");
    +
    179  jointsList.clear();
    +
    180  for (int i=0; i <n_cmd_joints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
    +
    181 
    +
    182  enc_jnt.resize(n_cmd_joints); enc_jnt.zero();
    +
    183  enc_mot.resize(n_cmd_joints); enc_mot.zero();
    +
    184  vel_jnt.resize(n_cmd_joints); vel_jnt.zero();
    +
    185  vel_mot.resize(n_cmd_joints); vel_mot.zero();
    +
    186  acc_jnt.resize(n_cmd_joints); acc_jnt.zero();
    +
    187  acc_mot.resize(n_cmd_joints); acc_mot.zero();
    +
    188  prev_enc_jnt.resize(n_cmd_joints); prev_enc_jnt.zero();
    +
    189  prev_enc_mot.resize(n_cmd_joints); prev_enc_mot.zero();
    +
    190  prev_enc_jnt2mot.resize(n_cmd_joints); prev_enc_jnt2mot.zero();
    +
    191  prev_vel_jnt.resize(n_cmd_joints); prev_vel_jnt.zero();
    +
    192  prev_vel_mot.resize(n_cmd_joints); prev_vel_mot.zero();
    +
    193  prev_vel_jnt2mot.resize(n_cmd_joints); prev_vel_jnt2mot.zero();
    +
    194  prev_acc_jnt.resize(n_cmd_joints); prev_acc_jnt.zero();
    +
    195  prev_acc_mot.resize(n_cmd_joints); prev_acc_mot.zero();
    +
    196  prev_acc_jnt2mot.resize(n_cmd_joints); prev_acc_jnt2mot.zero();
    +
    197  zero_vector.resize(n_cmd_joints);
    +
    198  zero_vector.zero();
    +
    199 
    +
    200  max.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) max[i]=maxBottle->get(i).asFloat64();
    +
    201  min.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) min[i]=minBottle->get(i).asFloat64();
    +
    202  home.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
    +
    203  speed.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) speed[i]=speedBottle->get(i).asFloat64();
    +
    204  gearbox.resize(n_cmd_joints);
    +
    205  for (int i=0; i< n_cmd_joints; i++)
    +
    206  {
    +
    207  double t;
    +
    208  int b=imot->getGearboxRatio(jointsList[i],&t);
    +
    209  gearbox[i]=t;
    +
    210  }
    +
    211 
    +
    212 
    +
    213  return true;
    +
    214 }
    +
    215 
    +
    216 void OpticalEncodersConsistency::tearDown()
    +
    217 {
    +
    218  char buff[500];
    +
    219  sprintf(buff,"Closing test module");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    220  setMode(VOCAB_CM_POSITION);
    +
    221  goHome();
    +
    222  if (dd) {delete dd; dd =0;}
    +
    223 }
    +
    224 
    +
    225 void OpticalEncodersConsistency::setMode(int desired_mode)
    +
    226 {
    +
    227  if (icmd == 0) ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid control mode interface");
    +
    228  if (iimd == 0) ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid interaction mode interface");
    +
    229 
    +
    230  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    231  {
    +
    232  icmd->setControlMode((int)jointsList[i],desired_mode);
    +
    233  iimd->setInteractionMode((int)jointsList[i],VOCAB_IM_STIFF);
    +
    234  yarp::os::Time::delay(0.010);
    +
    235  }
    +
    236 
    +
    237  int cmode;
    +
    238  yarp::dev::InteractionModeEnum imode;
    +
    239  int timeout = 0;
    +
    240 
    +
    241  while (1)
    +
    242  {
    +
    243  int ok=0;
    +
    244  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    245  {
    +
    246  icmd->getControlMode ((int)jointsList[i],&cmode);
    +
    247  iimd->getInteractionMode((int)jointsList[i],&imode);
    +
    248  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
    +
    249  }
    +
    250  if (ok==jointsList.size()) break;
    +
    251  if (timeout>100)
    +
    252  {
    +
    253  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
    +
    254  }
    +
    255  yarp::os::Time::delay(0.2);
    +
    256  timeout++;
    +
    257  }
    +
    258 }
    +
    259 
    +
    260 void OpticalEncodersConsistency::goHome()
    +
    261 {
    +
    262  if (ipos == 0) ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid position control interface");
    +
    263  if (ienc == 0) ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Invalid encoders interface");
    +
    264 
    +
    265  bool ret = true;
    +
    266  char buff [500];
    +
    267  sprintf(buff,"Homing the whole part");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    268 
    +
    269  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    270  {
    +
    271  ret = ipos->setRefSpeed((int)jointsList[i],speed[i]);
    +
    272  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "ipos->setRefSpeed returned false");
    +
    273  ret = ipos->positionMove((int)jointsList[i],home[i]);
    +
    274  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "ipos->positionMove returned false");
    +
    275  }
    +
    276 
    +
    277  int timeout = 0;
    +
    278  while (1)
    +
    279  {
    +
    280  int in_position=0;
    +
    281  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    282  {
    +
    283  double tmp=0;
    +
    284  ienc->getEncoder((int)jointsList[i],&tmp);
    +
    285  if (fabs(tmp-home[i])<tolerance) in_position++;
    +
    286  }
    +
    287  if (in_position==jointsList.size()) break;
    +
    288  if (timeout>100)
    +
    289  {
    +
    290  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while reaching home position");
    +
    291  }
    +
    292  yarp::os::Time::delay(0.2);
    +
    293  timeout++;
    +
    294  }
    +
    295 }
    +
    296 
    +
    297 void OpticalEncodersConsistency::saveToFile(std::string filename, yarp::os::Bottle &b)
    +
    298 {
    +
    299  std::fstream fs;
    +
    300  fs.open (filename.c_str(), std::fstream::out);
    +
    301 
    +
    302  for (int i=0; i<b.size(); i++)
    +
    303  {
    +
    304  std::string s = b.get(i).toString();
    +
    305  std::replace(s.begin(), s.end(), '(', ' ');
    +
    306  std::replace(s.begin(), s.end(), ')', ' ');
    +
    307  fs << s << endl;
    +
    308  }
    +
    309 
    +
    310  fs.close();
    +
    311 }
    +
    312 
    +
    313 void OpticalEncodersConsistency::run()
    +
    314 {
    +
    315  char buff [500];
    +
    316  setMode(VOCAB_CM_POSITION);
    +
    317  goHome();
    +
    318 
    +
    319  bool go_to_max=false;
    +
    320  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    321  {
    +
    322  ipos->positionMove((int)jointsList[i], min[i]);
    +
    323  }
    +
    324 
    +
    325  int cycle=0;
    +
    326  double start_time = yarp::os::Time::now();
    +
    327 
    +
    328  //****************************************************************************************
    +
    329  //Retrieving coupling matrix using IRemoteVariable
    +
    330  //****************************************************************************************
    +
    331 
    +
    332  yarp::os::Bottle b;
    +
    333 
    +
    334  ivar->getRemoteVariable("kinematic_mj", b);
    +
    335 
    +
    336  int matrix_size = matrix.cols();
    +
    337 
    +
    338  matrix.eye();
    +
    339 
    +
    340  int njoints [4];
    +
    341 
    +
    342  for(int i=0 ; i< b.size() ; i++)
    +
    343  {
    +
    344  Bottle bv;
    +
    345  bv.fromString(b.get(i).toString());
    +
    346  njoints[i] = sqrt(bv.size());
    +
    347 
    +
    348  int ele = 0;
    +
    349  if(i==0) {
    +
    350  for (int r=0; r < njoints[i]; r++)
    +
    351  {
    +
    352  for (int c=0; c < njoints[i]; c++)
    +
    353  {
    +
    354  matrix(r,c) = bv.get(ele).asFloat64();
    +
    355  ele++;
    +
    356  }
    +
    357  }
    +
    358 
    +
    359  }
    +
    360  else{
    +
    361  for (int r=0; r < njoints[i]; r++)
    +
    362  {
    +
    363  for (int c=0; c < njoints[i]; c++)
    +
    364  {
    +
    365  int jntprev = 0;
    +
    366  for (int j=0; j < i; j++) jntprev += njoints[j];
    +
    367  if(!jntprev > matrix_size) matrix(r+jntprev,c+jntprev) = bv.get(ele).asFloat64();
    +
    368  ele++;
    +
    369  }
    +
    370  }
    +
    371  }
    +
    372 
    +
    373  }
    +
    374 
    +
    375  // yDebug() << "MATRIX J2M : \n" << matrix.toString();
    +
    376 
    +
    377 // **************************************************************************************
    +
    378 
    +
    379  trasp_matrix = matrix.transposed();
    +
    380  inv_matrix = yarp::math::luinv(matrix);
    +
    381  inv_trasp_matrix = inv_matrix.transposed();
    +
    382 
    +
    383  sprintf(buff,"Matrix:\n %s \n", matrix.toString().c_str());
    +
    384  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    385  sprintf(buff,"Inv matrix:\n %s \n", inv_matrix.toString().c_str());
    +
    386  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    387 
    +
    388  Bottle dataToPlot_test1;
    +
    389  Bottle dataToPlot_test2;
    +
    390  Bottle dataToPlot_test3;
    +
    391  Bottle dataToPlot_test4;
    +
    392  Bottle dataToPlot_test1rev;
    +
    393 
    +
    394  bool test_data_is_valid = false;
    +
    395  bool first_time = true;
    +
    396  yarp::sig::Vector off_enc_mot; off_enc_mot.resize(jointsList.size());
    +
    397  yarp::sig::Vector off_enc_jnt; off_enc_jnt.resize(jointsList.size());
    +
    398  yarp::sig::Vector off_enc_jnt2mot; off_enc_jnt2mot.resize(jointsList.size());
    +
    399  yarp::sig::Vector off_enc_mot2jnt; off_enc_mot2jnt.resize(jointsList.size());
    +
    400  yarp::sig::Vector tmp_vector;
    +
    401  tmp_vector.resize(n_part_joints);
    +
    402 
    +
    403 
    +
    404 
    +
    405  while (1)
    +
    406  {
    +
    407  double curr_time = yarp::os::Time::now();
    +
    408  double elapsed = curr_time - start_time;
    +
    409 
    +
    410  bool ret = true;
    +
    411  ret = ienc->getEncoders(tmp_vector.data());
    +
    412  for (unsigned int i = 0; i < jointsList.size(); i++)
    +
    413  enc_jnt[i] = tmp_vector[jointsList[i]];
    +
    414 
    +
    415 
    +
    416  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "ienc->getEncoders returned false");
    +
    417  ret = imotenc->getMotorEncoders(tmp_vector.data()); for (unsigned int i = 0; i < jointsList.size(); i++) enc_mot[i] = tmp_vector[jointsList(i)];
    +
    418  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "imotenc->getMotorEncoder returned false");
    +
    419  ret = ienc->getEncoderSpeeds(tmp_vector.data()); for (unsigned int i = 0; i < jointsList.size(); i++) vel_jnt[i] = tmp_vector[jointsList(i)];
    +
    420  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "ienc->getEncoderSpeeds returned false");
    +
    421  ret = imotenc->getMotorEncoderSpeeds(tmp_vector.data()); for (unsigned int i = 0; i < jointsList.size(); i++) vel_mot[i] = tmp_vector[jointsList(i)];
    +
    422  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "imotenc->getMotorEncoderSpeeds returned false");
    +
    423  ret = ienc->getEncoderAccelerations(tmp_vector.data()); for (unsigned int i = 0; i < jointsList.size(); i++) acc_jnt[i] = tmp_vector[jointsList(i)];
    +
    424  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "ienc->getEncoderAccelerations returned false");
    +
    425  ret = imotenc->getMotorEncoderAccelerations(tmp_vector.data()); for (unsigned int i = 0; i < jointsList.size(); i++) acc_mot[i] = tmp_vector[jointsList(i)];
    +
    426  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(ret, "imotenc->getMotorEncoderAccelerations returned false");
    +
    427 
    +
    428  //if (enc_jnt == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getEncoders data"); test_data_is_valid = true; }
    +
    429  //if (enc_mot == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getMotorEncoders data"); test_data_is_valid = true; }
    +
    430  //if (vel_jnt == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getEncoderSpeeds data"); test_data_is_valid = true; }
    +
    431  //if (vel_mot == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getMotorEncoderSpeeds data"); test_data_is_valid = true; }
    +
    432  //if (acc_jnt == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getEncoderAccelerations data"); test_data_is_valid = true; }
    +
    433  //if (acc_mot == zero_vector) { ROBOTTESTINGFRAMEWORK_TEST_REPORT("Invalid getMotorEncoderAccelerations data"); test_data_is_valid = true; }
    +
    434 
    +
    435  if (first_time)
    +
    436  {
    +
    437  off_enc_jnt = enc_jnt;
    +
    438  off_enc_mot2jnt = enc_mot2jnt;
    +
    439 
    +
    440  }
    +
    441 
    +
    442  enc_jnt2mot = matrix * enc_jnt;
    +
    443  enc_mot2jnt = inv_matrix * (enc_mot - off_enc_mot);
    +
    444  vel_jnt2mot = matrix * vel_jnt;
    +
    445  //acc_jnt2mot = matrix * acc_jnt;
    +
    446 
    +
    447 
    +
    448  for (unsigned int i = 0; i < jointsList.size(); i++) enc_jnt2mot[i] = enc_jnt2mot[i] * gearbox[i];;
    +
    449  for (unsigned int i = 0; i < jointsList.size(); i++) vel_jnt2mot[i] = vel_jnt2mot[i] * gearbox[i];
    +
    450  //for (unsigned int i = 0; i < jointsList.size(); i++) acc_jnt2mot[i] = acc_jnt2mot[i] * gearbox[i];
    +
    451  for (unsigned int i = 0; i < jointsList.size(); i++) enc_mot2jnt[i] = enc_mot2jnt[i] / gearbox[i];
    +
    452 
    +
    453  bool reached = false;
    +
    454  int in_position = 0;
    +
    455  for (unsigned int i = 0; i < jointsList.size(); i++)
    +
    456  {
    +
    457  double curr_val = 0;
    +
    458  if (go_to_max == false) curr_val = min[i];
    +
    459  else curr_val = max[i];
    +
    460  if (fabs(enc_jnt[i] - curr_val) < tolerance) in_position++;
    +
    461  }
    +
    462  if (in_position == jointsList.size()) reached = true;
    +
    463 
    +
    464  if (elapsed >= 20.0)
    +
    465  {
    +
    466  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while moving joint");
    +
    467  }
    +
    468 
    +
    469  if (reached)
    +
    470  {
    +
    471  sprintf(buff, "Test cycle %d/%d", cycle, cycles); ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    472  if (go_to_max == false)
    +
    473  {
    +
    474  for (unsigned int i = 0; i < jointsList.size(); i++)
    +
    475  ipos->positionMove(jointsList[i], max[i]);
    +
    476  go_to_max = true;
    +
    477  cycle++;
    +
    478  start_time = yarp::os::Time::now();
    +
    479  }
    +
    480  else
    +
    481  {
    +
    482  for (unsigned int i = 0; i < jointsList.size(); i++)
    +
    483  ipos->positionMove(jointsList[i], min[i]);
    +
    484  go_to_max = false;
    +
    485  cycle++;
    +
    486  start_time = yarp::os::Time::now();
    +
    487  }
    +
    488  }
    +
    489 
    +
    490  //update previous and computes diff
    +
    491  diff_enc_jnt = (enc_jnt - prev_enc_jnt) / 0.010;
    +
    492  diff_enc_mot = (enc_mot - prev_enc_mot) / 0.010;
    +
    493  diff_enc_jnt2mot = (enc_jnt2mot - prev_enc_jnt2mot) / 0.010;
    +
    494  diff_vel_jnt = (vel_jnt - prev_vel_jnt) / 0.010;
    +
    495  diff_vel_mot = (vel_mot - prev_vel_mot) / 0.010;
    +
    496  diff_vel_jnt2mot = (vel_jnt2mot - prev_vel_jnt2mot) / 0.010;
    +
    497  diff_acc_jnt = (acc_jnt - prev_acc_jnt) / 0.010;
    +
    498  diff_acc_mot = (acc_mot - prev_acc_mot) / 0.010;
    +
    499  //diff_acc_jnt2mot = (acc_jnt2mot - prev_acc_jnt2mot) / 0.010;
    +
    500  prev_enc_jnt = enc_jnt;
    +
    501  prev_enc_mot = enc_mot;
    +
    502  prev_enc_jnt2mot = enc_jnt2mot;
    +
    503  prev_vel_jnt = vel_jnt;
    +
    504  prev_vel_mot = vel_mot;
    +
    505  prev_vel_jnt2mot = vel_jnt2mot;
    +
    506  // prev_acc_jnt = acc_jnt;
    +
    507  //prev_acc_mot = acc_mot;
    +
    508  // prev_acc_jnt2mot = acc_jnt2mot;
    +
    509 
    +
    510  if (first_time)
    +
    511  {
    +
    512  off_enc_mot = enc_mot;
    +
    513  off_enc_jnt2mot = enc_jnt2mot;
    +
    514  }
    +
    515 
    +
    516  {
    +
    517  //prepare data to plot
    +
    518  //JOINT POSITIONS vs MOTOR POSITIONS
    +
    519  Bottle& row_test1 = dataToPlot_test1.addList();
    +
    520  Bottle& v1_test1 = row_test1.addList();
    +
    521  Bottle& v2_test1 = row_test1.addList();
    +
    522  yarp::sig::Vector v1 = enc_mot - off_enc_mot;
    +
    523  yarp::sig::Vector v2 = enc_jnt2mot - off_enc_jnt2mot;
    +
    524  v1_test1.read(v1);
    +
    525  v2_test1.read(v2);
    +
    526  }
    +
    527 
    +
    528  {
    +
    529  //JOINT VELOCITES vs MOTOR VELOCITIES
    +
    530  Bottle& row_test2 = dataToPlot_test2.addList();
    +
    531  Bottle& v1_test2 = row_test2.addList();
    +
    532  Bottle& v2_test2 = row_test2.addList();
    +
    533  v1_test2.read(vel_mot);
    +
    534  v2_test2.read(vel_jnt2mot);
    +
    535  }
    +
    536 
    +
    537  {
    +
    538  //JOINT POSITIONS(DERIVED) vs JOINT SPEED
    +
    539  if (first_time == false)
    +
    540  {
    +
    541  Bottle& row_test3 = dataToPlot_test3.addList();
    +
    542  Bottle& v1_test3 = row_test3.addList();
    +
    543  Bottle& v2_test3 = row_test3.addList();
    +
    544  v1_test3.read(vel_jnt);
    +
    545  v2_test3.read(diff_enc_jnt);
    +
    546  }
    +
    547  }
    +
    548 
    +
    549  {
    +
    550  //MOTOR POSITIONS(DERIVED) vs MOTOR SPEED
    +
    551  if (first_time == false)
    +
    552  {
    +
    553  Bottle& row_test4 = dataToPlot_test4.addList();
    +
    554  Bottle& v1_test4 = row_test4.addList();
    +
    555  Bottle& v2_test4 = row_test4.addList();
    +
    556  v1_test4.read(vel_mot);
    +
    557  v2_test4.read(diff_enc_mot);
    +
    558  }
    +
    559  }
    +
    560 
    +
    561  {
    +
    562  //JOINT POSITIONS vs MOTOR POSITIONS REVERSED
    +
    563  Bottle& row_test1 = dataToPlot_test1rev.addList();
    +
    564  Bottle& v1_test1 = row_test1.addList();
    +
    565  Bottle& v2_test1 = row_test1.addList();
    +
    566  yarp::sig::Vector v1 = enc_jnt;
    +
    567  yarp::sig::Vector v2 = enc_mot2jnt + off_enc_jnt;
    +
    568  v1_test1.read(v1);
    +
    569  v2_test1.read(v2);
    +
    570  }
    +
    571 
    +
    572  //flag set
    +
    573  first_time = false;
    +
    574 
    +
    575  //exit condition
    +
    576  if (cycle>=cycles) break;
    +
    577  }
    +
    578 
    +
    579  goHome();
    +
    580 
    +
    581  yarp::os::ResourceFinder rf;
    +
    582  rf.setDefaultContext("scripts");
    +
    583 
    +
    584  string partfilename = partName+".txt";
    +
    585  string testfilename = "encConsis_";
    +
    586  string filename1 = testfilename + "jointPos_MotorPos_" + partfilename;
    +
    587  saveToFile(filename1,dataToPlot_test1);
    +
    588  string filename2 = testfilename + "jointVel_motorVel_" + partfilename;
    +
    589  saveToFile(filename2,dataToPlot_test2);
    +
    590  string filename3 = testfilename + "joint_derivedVel_vel_" + partfilename;
    +
    591  saveToFile(filename3,dataToPlot_test3);
    +
    592  string filename4 = testfilename + "motor_derivedVel_vel_" + partfilename;
    +
    593  saveToFile(filename4,dataToPlot_test4);
    +
    594 
    +
    595  string filename1rev = testfilename + "jointPos_MotorPos_reversed_" + partfilename;
    +
    596  saveToFile(filename1rev,dataToPlot_test1rev);
    +
    597 
    +
    598  //find octave scripts
    +
    599  std::string octaveFile = rf.findFile("encoderConsistencyPlotAll.m");
    +
    600  if(octaveFile.size() == 0)
    +
    601  {
    +
    602  yError()<<"Cannot find file encoderConsistencyPlotAll.m";
    +
    603  return;
    +
    604  }
    +
    605 
    +
    606  //prepare octave command
    +
    607  std::string octaveCommand= "octave --path "+ getPath(octaveFile);
    +
    608  stringstream ss;
    +
    609  ss << jointsList.size();
    +
    610  string str = ss.str();
    +
    611  octaveCommand+= " -q --eval \"encoderConsistencyPlotAll('" +partName +"'," + str +")\" --persist";
    +
    612 
    +
    613  if(plot_enabled)
    +
    614  {
    +
    615  int ret = system (octaveCommand.c_str());
    +
    616  }
    +
    617  else
    +
    618  {
    +
    619  yInfo() << "Test has collected all data. You need to plot data to check is test is passed";
    +
    620  yInfo() << "Please run following command to plot data.";
    +
    621  yInfo() << octaveCommand;
    +
    622  yInfo() << "To exit from Octave application please type 'exit' command.";
    +
    623  }
    +
    624  // ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(test_data_is_valid,"Invalid data obtained from encoders interface");
    +
    625 }
    +
    626 
    +
    627 
    +
    628 std::string OpticalEncodersConsistency::getPath(const std::string& str)
    +
    629 {
    +
    630  size_t found;
    +
    631  found=str.find_last_of("/\\");
    +
    632  return(str.substr(0,found));
    +
    633 }
    +
    This tests checks if the motor encoder reading are consistent with the joint encoder readings.
    +
    + + + + diff --git a/doxygen/doc/html/motorEncodersConsistency_8h_source.html b/doxygen/doc/html/motorEncodersConsistency_8h_source.html new file mode 100644 index 00000000..889ee968 --- /dev/null +++ b/doxygen/doc/html/motorEncodersConsistency_8h_source.html @@ -0,0 +1,208 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncoders-consistency/motorEncodersConsistency.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    motorEncodersConsistency.h
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #ifndef _OPTICALENCODERSCONSISTENCY_H_
    +
    22 #define _OPTICALENCODERSCONSISTENCY_H_
    +
    23 
    +
    24 #include <string>
    +
    25 #include <yarp/robottestingframework/TestCase.h>
    +
    26 #include <yarp/dev/ControlBoardInterfaces.h>
    +
    27 #include <yarp/dev/PolyDriver.h>
    +
    28 #include <yarp/sig/Vector.h>
    +
    29 #include <yarp/sig/Matrix.h>
    +
    30 
    +
    80 class OpticalEncodersConsistency : public yarp::robottestingframework::TestCase {
    +
    81 public:
    + +
    83  virtual ~OpticalEncodersConsistency();
    +
    84 
    +
    85  virtual bool setup(yarp::os::Property& property);
    +
    86 
    +
    87  virtual void tearDown();
    +
    88 
    +
    89  virtual void run();
    +
    90 
    +
    91  void goHome();
    +
    92  void setMode(int desired_mode);
    +
    93  void saveToFile(std::string filename, yarp::os::Bottle &b);
    +
    94 
    +
    95 private:
    +
    96  std::string getPath(const std::string& str);
    +
    97  std::string robotName;
    +
    98  std::string partName;
    +
    99  std::string plotString1;
    +
    100  std::string plotString2;
    +
    101  std::string plotString3;
    +
    102  std::string plotString4;
    +
    103 
    +
    104  yarp::sig::Vector jointsList;
    +
    105 
    +
    106  double tolerance;
    +
    107  bool plot_enabled;
    +
    108 
    +
    109  int n_part_joints;
    +
    110  int cycles;
    +
    111 
    +
    112  yarp::dev::PolyDriver *dd;
    +
    113  yarp::dev::IPositionControl *ipos;
    +
    114  yarp::dev::IControlMode *icmd;
    +
    115  yarp::dev::IInteractionMode *iimd;
    +
    116  yarp::dev::IEncoders *ienc;
    +
    117  yarp::dev::IMotorEncoders *imotenc;
    +
    118  yarp::dev::IMotor *imot;
    +
    119  yarp::dev::IRemoteVariables *ivar;
    +
    120 
    +
    121  yarp::sig::Vector zero_vector;
    +
    122  yarp::sig::Vector enc_jnt;
    +
    123  yarp::sig::Vector enc_jnt2mot;
    +
    124  yarp::sig::Vector enc_mot;
    +
    125  yarp::sig::Vector enc_mot2jnt;
    +
    126  yarp::sig::Vector vel_jnt;
    +
    127  yarp::sig::Vector vel_jnt2mot;
    +
    128  yarp::sig::Vector vel_mot;
    +
    129  yarp::sig::Vector vel_mot2jnt;
    +
    130  yarp::sig::Vector acc_jnt;
    +
    131  yarp::sig::Vector acc_jnt2mot;
    +
    132  yarp::sig::Vector acc_mot;
    +
    133  yarp::sig::Vector acc_mot2jnt;
    +
    134 
    +
    135  yarp::sig::Vector prev_enc_jnt;
    +
    136  yarp::sig::Vector prev_enc_jnt2mot;
    +
    137  yarp::sig::Vector prev_enc_mot;
    +
    138  yarp::sig::Vector prev_enc_mot2jnt;
    +
    139  yarp::sig::Vector prev_vel_jnt;
    +
    140  yarp::sig::Vector prev_vel_jnt2mot;
    +
    141  yarp::sig::Vector prev_vel_mot;
    +
    142  yarp::sig::Vector prev_vel_mot2jnt;
    +
    143  yarp::sig::Vector prev_acc_jnt;
    +
    144  yarp::sig::Vector prev_acc_jnt2mot;
    +
    145  yarp::sig::Vector prev_acc_mot;
    +
    146  yarp::sig::Vector prev_acc_mot2jnt;
    +
    147 
    +
    148  yarp::sig::Vector diff_enc_jnt;
    +
    149  yarp::sig::Vector diff_enc_jnt2mot;
    +
    150  yarp::sig::Vector diff_enc_mot;
    +
    151  yarp::sig::Vector diff_enc_mot2jnt;
    +
    152  yarp::sig::Vector diff_vel_jnt;
    +
    153  yarp::sig::Vector diff_vel_jnt2mot;
    +
    154  yarp::sig::Vector diff_vel_mot;
    +
    155  yarp::sig::Vector diff_vel_mot2jnt;
    +
    156  yarp::sig::Vector diff_acc_jnt;
    +
    157  yarp::sig::Vector diff_acc_jnt2mot;
    +
    158  yarp::sig::Vector diff_acc_mot;
    +
    159  yarp::sig::Vector diff_acc_mot2jnt;
    +
    160 
    +
    161  yarp::sig::Vector max;
    +
    162  yarp::sig::Vector min;
    +
    163  yarp::sig::Vector home;
    +
    164  yarp::sig::Vector speed;
    +
    165  yarp::sig::Vector gearbox;
    +
    166 
    +
    167  yarp::sig::Matrix matrix_arms;
    +
    168  yarp::sig::Matrix matrix_torso;
    +
    169  yarp::sig::Matrix matrix_legs;
    +
    170  yarp::sig::Matrix matrix_head;
    +
    171 
    +
    172  yarp::sig::Matrix matrix;
    +
    173  yarp::sig::Matrix inv_matrix;
    +
    174  yarp::sig::Matrix trasp_matrix;
    +
    175  yarp::sig::Matrix inv_trasp_matrix;
    +
    176 };
    +
    177 
    +
    178 #endif //_opticalEncoders_H
    +
    This tests checks if the motor encoder reading are consistent with the joint encoder readings.
    +
    + + + + diff --git a/doxygen/doc/html/motorEncodersSignCheck_8cpp_source.html b/doxygen/doc/html/motorEncodersSignCheck_8cpp_source.html new file mode 100644 index 00000000..e5ae0659 --- /dev/null +++ b/doxygen/doc/html/motorEncodersSignCheck_8cpp_source.html @@ -0,0 +1,345 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncodersSignCheck/motorEncodersSignCheck.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    motorEncodersSignCheck.cpp
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 
    +
    22 #include <robottestingframework/TestAssert.h>
    +
    23 #include <robottestingframework/dll/Plugin.h>
    +
    24 #include <yarp/os/Time.h>
    +
    25 #include <yarp/os/Property.h>
    +
    26 #include <algorithm>
    +
    27 #include "motorEncodersSignCheck.h"
    +
    28 #include "iostream"
    +
    29 
    +
    30 
    +
    31 using namespace robottestingframework;
    +
    32 
    +
    33 using namespace yarp::os;
    +
    34 using namespace yarp::dev;
    +
    35 
    +
    36 // prepare the plugin
    +
    37 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(MotorEncodersSignCheck)
    +
    38 
    +
    39 MotorEncodersSignCheck::MotorEncodersSignCheck() : yarp::robottestingframework::TestCase("MotorEncodersSignCheck") {
    +
    40  jointsList=0;
    +
    41  dd=0;
    +
    42  icmd=0;
    +
    43  iimd=0;
    +
    44  ienc=0;
    +
    45  imenc=0;
    +
    46  jPosMotion=0;
    +
    47 }
    +
    48 
    +
    49 MotorEncodersSignCheck::~MotorEncodersSignCheck() { }
    +
    50 
    +
    51 bool MotorEncodersSignCheck::setup(yarp::os::Property& property) {
    +
    52 
    +
    53  if(property.check("name"))
    +
    54  setName(property.find("name").asString());
    +
    55 
    +
    56  // updating parameters
    +
    57  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
    +
    58  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
    +
    59  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
    +
    60  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position must be given as the test parameter!");
    +
    61 
    +
    62  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("pwmStep"), "The output_step must be given as the test parameter!");
    +
    63  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("pwmMax"), "The output_max must be given as the test parameter!");
    +
    64 
    +
    65  robotName = property.find("robot").asString();
    +
    66  partName = property.find("part").asString();
    +
    67 
    +
    68  Bottle* homeBottle = property.find("home").asList();
    +
    69  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse zero parameter");
    +
    70 
    +
    71  Bottle* jointsBottle = property.find("joints").asList();
    +
    72  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
    +
    73 
    +
    74  Bottle* pwm_step_Bottle = property.find("pwmStep").asList();
    +
    75  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(pwm_step_Bottle!=0,"unable to parse pwmStep parameter");
    +
    76 
    +
    77  Bottle* command_delay_Bottle = property.find("commandDelay").asList();
    +
    78  if(command_delay_Bottle==0)
    +
    79  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Command delay not configured. default value (0.1 sec) will be used ");
    +
    80 
    +
    81 
    +
    82  Bottle* pwm_max_Bottle = property.find("pwmMax").asList();
    +
    83  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(pwm_max_Bottle!=0,"unable to parse joints parameter");
    +
    84 
    +
    85  Bottle* threshold_Bottle = property.find("PosThreshold").asList();
    +
    86  if(threshold_Bottle==0)
    +
    87  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Position threshold not configured. default value (5 deg) will be used ");
    +
    88 
    +
    89  Bottle* pwm_start_Bottle = property.find("pwmStart").asList();
    +
    90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(pwm_start_Bottle!=0,"unable to parse pwmStart parameter");
    +
    91 
    +
    92 
    +
    93  Property options;
    +
    94  options.put("device", "remote_controlboard");
    +
    95  options.put("remote", "/"+robotName+"/"+partName);
    +
    96  options.put("local", "/mEncSignCheckTest/"+robotName+"/"+partName);
    +
    97 
    +
    98  dd = new PolyDriver(options);
    +
    99  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
    +
    100  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipwm),"Unable to open pwm interface");
    +
    101  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
    +
    102  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
    +
    103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
    +
    104  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(imenc),"Unable to open interaction mode interface");
    +
    105  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipid),"Unable to open ipidcontrol interface");
    +
    106 
    +
    107  if (!ienc->getAxes(&n_part_joints))
    +
    108  {
    +
    109  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
    +
    110  }
    +
    111 
    +
    112  int n_cmd_joints = jointsBottle->size();
    +
    113  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0 && n_cmd_joints<=n_part_joints,"invalid number of joints, it must be >0 & <= number of part joints");
    +
    114  jointsList.clear();
    +
    115  for (int i=0; i <n_cmd_joints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
    +
    116 
    +
    117  home.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
    +
    118  opl_step.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_step[i]=pwm_step_Bottle->get(i).asFloat64();
    +
    119  opl_max.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_max[i]=pwm_max_Bottle->get(i).asFloat64();
    +
    120  opl_start.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) opl_start[i]=pwm_start_Bottle->get(i).asFloat64();
    +
    121  pos_threshold.resize (n_cmd_joints);
    +
    122  if(threshold_Bottle!=0)
    +
    123  {
    +
    124  for (int i=0; i< n_cmd_joints; i++)
    +
    125  pos_threshold[i]=threshold_Bottle->get(i).asFloat64();
    +
    126  }
    +
    127  else
    +
    128  {
    +
    129  for (int i=0; i< n_cmd_joints; i++)
    +
    130  pos_threshold[i]=5;
    +
    131  }
    +
    132 
    +
    133  opl_delay.resize (n_cmd_joints);
    +
    134  if(command_delay_Bottle!=0)
    +
    135  {
    +
    136  for (int i=0; i< n_cmd_joints; i++)
    +
    137  opl_delay[i]=command_delay_Bottle->get(i).asFloat64();
    +
    138  }
    +
    139  else
    +
    140  {
    +
    141  for (int i=0; i< n_cmd_joints; i++)
    +
    142  opl_delay[i]=0.1;
    +
    143  }
    +
    144 
    +
    145  jPosMotion = new yarp::robottestingframework::jointsPosMotion(dd, jointsList);
    +
    146  jPosMotion->setTolerance(2.0);
    +
    147  jPosMotion->setTimeout(10); //10 sec
    +
    148 
    +
    149 
    +
    150  return true;
    +
    151 }
    +
    152 
    +
    153 void MotorEncodersSignCheck::tearDown()
    +
    154 {
    +
    155  char buff[500];
    +
    156  sprintf(buff,"Closing test module");ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    157  if(jPosMotion)
    +
    158  {
    +
    159  jPosMotion->setAndCheckPosControlMode();
    +
    160  jPosMotion->goTo(home);
    +
    161  }
    +
    162  delete jPosMotion;
    +
    163 
    +
    164  if (dd) {delete dd; dd =0;}
    +
    165 }
    +
    166 
    +
    167 
    +
    168 void MotorEncodersSignCheck::setModeSingle(int i, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode)
    +
    169 {
    +
    170  icmd->setControlMode((int)jointsList[i],desired_control_mode);
    +
    171  iimd->setInteractionMode((int)jointsList[i],desired_interaction_mode);
    +
    172  yarp::os::Time::delay(0.010);
    +
    173 }
    +
    174 
    +
    175 void MotorEncodersSignCheck::OplExecute(int i)
    +
    176 {
    +
    177  char buff[500];
    +
    178  double time = yarp::os::Time::now();
    +
    179  double time_old = yarp::os::Time::now();
    +
    180  double enc=0;
    +
    181  double start_enc=0;
    +
    182  double const delta = 10;
    +
    183  bool not_moving = true;
    +
    184  double opl=opl_start[i];
    +
    185 
    +
    186  ipwm->setRefDutyCycle((int)jointsList[i], opl);
    +
    187  double last_opl_cmd=yarp::os::Time::now();
    +
    188  yarp::os::Time::delay(3.0); //i need to wait a while because when i set ref output zero, joint may move (due to stiction or gravity) and I should save the position when pwm=0
    +
    189 
    +
    190  imenc->getMotorEncoder((int)jointsList[i],&start_enc);
    +
    191 
    +
    192 
    +
    193  while (not_moving)
    +
    194  {
    +
    195 
    +
    196  ipwm->setRefDutyCycle(jointsList[i], opl);
    +
    197  imenc->getMotorEncoder((int)jointsList[i],&enc);
    +
    198 
    +
    199  if(enc > start_enc+pos_threshold[i])
    +
    200  {
    +
    201  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
    +
    202  not_moving=false;
    +
    203  sprintf(buff,"TEST SUCCESS (pwm=%f) enc=%f start_enc=%f",opl, enc, start_enc);
    +
    204  ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    205  }
    +
    206  else if(enc < start_enc-pos_threshold[i])
    +
    207  {
    +
    208  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
    +
    209  not_moving=false;
    +
    210  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(0, robottestingframework::Asserter::format("because enc readings drecrease enc=%f start_enc=%f (output=%f)", enc, start_enc, opl));
    +
    211  }
    +
    212  else if (jPosMotion->checkJointLimitsReached((int)jointsList[i]))
    +
    213  {
    +
    214  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
    +
    215  not_moving=false;
    +
    216  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(0,robottestingframework::Asserter::format("Test failed because hw limit was touched (enc=%f)",enc));
    +
    217  }
    +
    218 
    +
    219  if (yarp::os::Time::now()-last_opl_cmd>opl_delay[i])
    +
    220  {
    +
    221  opl+=opl_step[i];
    +
    222  last_opl_cmd=yarp::os::Time::now();
    +
    223  }
    +
    224  if (opl>=opl_max[i])
    +
    225  {
    +
    226  ipwm->setRefDutyCycle((int)jointsList[i], 0.0);
    +
    227  not_moving=false;
    +
    228  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(0,robottestingframework::Asserter::format("Test failed failed because max output was reached(output=%f)",opl));
    +
    229  }
    +
    230 
    +
    231  yarp::os::Time::delay(0.010);
    +
    232 
    +
    233  if (time-time_old>5.0 && not_moving==true)
    +
    234  {
    +
    235  sprintf(buff,"test in progress on joint %d, current output value = %f",(int)jointsList[i],opl);ROBOTTESTINGFRAMEWORK_TEST_REPORT(buff);
    +
    236  time_old=time;
    +
    237  }
    +
    238  }
    +
    239 }
    +
    240 
    +
    241 void MotorEncodersSignCheck::run()
    +
    242 {
    +
    243 
    +
    244  char buff[500];
    +
    245  jPosMotion->setAndCheckPosControlMode();
    +
    246  jPosMotion->goTo(home);
    +
    247 
    +
    248 
    +
    249  for (unsigned int i=0 ; i<jointsList.size(); i++)
    +
    250  {
    +
    251  double posout=0;
    +
    252  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE((ipid->getPidOutput(yarp::dev::PidControlTypeEnum::VOCAB_PIDTYPE_POSITION, (int)jointsList[i], &posout)),
    +
    253  robottestingframework::Asserter::format(" getOutput j %d return false",(int)jointsList[i]));
    +
    254 
    +
    255  setModeSingle(i,VOCAB_CM_PWM,VOCAB_IM_STIFF);
    +
    256  ipwm->setRefDutyCycle((int)jointsList[i],0.0);
    +
    257 
    +
    258  ROBOTTESTINGFRAMEWORK_TEST_REPORT(robottestingframework::Asserter::format("Testing joint %d with starting pwm = %.2f. In position j had pwm = %.2f",(int)jointsList[i], opl_start[i], posout));
    +
    259  OplExecute(i);
    +
    260 
    +
    261  jPosMotion->setAndCheckPosControlMode();
    +
    262  jPosMotion->goTo(home);
    +
    263 
    +
    264  }
    +
    265 
    +
    266  }
    +
    This tests checks if the motor encoder readings increase when positive pwm is applayed to motor.
    +
    + + + + diff --git a/doxygen/doc/html/motorEncodersSignCheck_8h_source.html b/doxygen/doc/html/motorEncodersSignCheck_8h_source.html new file mode 100644 index 00000000..a0319800 --- /dev/null +++ b/doxygen/doc/html/motorEncodersSignCheck_8h_source.html @@ -0,0 +1,152 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/motorEncodersSignCheck/motorEncodersSignCheck.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    motorEncodersSignCheck.h
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #ifndef _MOTORENCODERSSIGNCHECK_H_
    +
    22 #define _MOTORENCODERSSIGNCHECK_H_
    +
    23 
    +
    24 //#include <string>
    +
    25 #include <yarp/robottestingframework/TestCase.h>
    +
    26 #include <yarp/dev/ControlBoardInterfaces.h>
    +
    27 #include <yarp/dev/PolyDriver.h>
    +
    28 #include <yarp/sig/Vector.h>
    +
    29 //#include <yarp/sig/Matrix.h>
    +
    30 #include "yarp/robottestingframework/JointsPosMotion.h"
    +
    31 
    +
    32 
    +
    61 class MotorEncodersSignCheck : public yarp::robottestingframework::TestCase {
    +
    62 public:
    + +
    64  virtual ~MotorEncodersSignCheck();
    +
    65 
    +
    66  virtual bool setup(yarp::os::Property& property);
    +
    67 
    +
    68  virtual void tearDown();
    +
    69 
    +
    70  virtual void run();
    +
    71  void setModeSingle(int i, int desired_control_mode, yarp::dev::InteractionModeEnum desired_interaction_mode);
    +
    72  void OplExecute(int i);
    +
    73 
    +
    74 private:
    +
    75 
    +
    76  yarp::robottestingframework::jointsPosMotion *jPosMotion;
    +
    77 
    +
    78  std::string robotName;
    +
    79  std::string partName;
    +
    80  yarp::sig::Vector jointsList;
    +
    81  yarp::sig::Vector home;
    +
    82  yarp::sig::Vector opl_step;
    +
    83  yarp::sig::Vector opl_max;
    +
    84  yarp::sig::Vector opl_delay;
    +
    85  yarp::sig::Vector max_lims;
    +
    86  yarp::sig::Vector min_lims;
    +
    87  yarp::sig::Vector pos_threshold;
    +
    88  yarp::sig::Vector opl_start;
    +
    89 
    +
    90  int n_part_joints;
    +
    91 
    +
    92  yarp::dev::PolyDriver *dd;
    +
    93  yarp::dev::IControlMode *icmd;
    +
    94  yarp::dev::IInteractionMode *iimd;
    +
    95  yarp::dev::IEncoders *ienc;
    +
    96  yarp::dev::IPWMControl *ipwm;
    +
    97  yarp::dev::IMotorEncoders *imenc;
    +
    98  yarp::dev::IPidControl *ipid;
    +
    99 };
    +
    100 
    +
    101 #endif //_opticalEncoders_H
    +
    This tests checks if the motor encoder readings increase when positive pwm is applayed to motor.
    +
    + + + + diff --git a/doxygen/doc/html/movementReferencesTest_8cpp_source.html b/doxygen/doc/html/movementReferencesTest_8cpp_source.html new file mode 100644 index 00000000..b1b890b4 --- /dev/null +++ b/doxygen/doc/html/movementReferencesTest_8cpp_source.html @@ -0,0 +1,473 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/movementReferencesTest/movementReferencesTest.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    movementReferencesTest.cpp
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #include <cmath>
    +
    22 
    +
    23 #include <robottestingframework/dll/Plugin.h>
    +
    24 #include <robottestingframework/TestAssert.h>
    +
    25 #include <yarp/robottestingframework/TestAsserter.h>
    +
    26 
    +
    27 #include "movementReferencesTest.h"
    +
    28 
    +
    29 using namespace std;
    +
    30 using namespace robottestingframework;
    +
    31 
    +
    32 using namespace yarp::os;
    +
    33 
    +
    34 
    +
    35 // prepare the plugin
    +
    36 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(MovementReferencesTest)
    +
    37 
    +
    38 MovementReferencesTest::MovementReferencesTest() : yarp::robottestingframework::TestCase("MovementReferencesTest")
    +
    39 {
    +
    40 
    +
    41 
    +
    42 }
    +
    43 
    +
    44 MovementReferencesTest::~MovementReferencesTest()
    +
    45 {
    +
    46 }
    +
    47 
    +
    48 bool MovementReferencesTest::setup(yarp::os::Property &config)
    +
    49 {
    +
    50 
    +
    51  // initialization goes here ...
    +
    52  numJointsInPart = 0;
    +
    53  jPosMotion=NULL;
    +
    54 
    +
    55  iEncoders=NULL;
    +
    56  iPosition=NULL;
    +
    57  iPosDirect=NULL;
    +
    58  iControlMode=NULL;
    +
    59  iVelocity=NULL;
    +
    60  initialized=false;
    +
    61 
    +
    62  if(config.check("name"))
    +
    63  setName(config.find("name").asString());
    +
    64  else
    +
    65  setName("MovementReferencesTest");
    +
    66 
    +
    67 
    +
    68  // updating parameters
    +
    69  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(config.check("robot"), "The robot name must be given as the test parameter!");
    +
    70  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(config.check("part"), "The part name must be given as the test parameter!");
    +
    71  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(config.check("joints"), "The joints list must be given as the test parameter!");
    +
    72  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(config.check("home"), "The home position must be given as the test parameter!");
    +
    73  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(config.check("target"), "Missing 'target' parameter, cannot open device");
    +
    74 
    +
    75  robotName = config.find("robot").asString();
    +
    76  partName = config.find("part").asString();
    +
    77 
    +
    78 
    +
    79  Property options;
    +
    80  options.put("device", "remote_controlboard");
    +
    81  options.put("remote", "/"+robotName+"/"+partName);
    +
    82  options.put("local", "/moveRefTest/"+robotName+"/"+partName);
    +
    83 
    +
    84  dd = new yarp::dev::PolyDriver(options);
    +
    85  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
    +
    86  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iPosition),"Unable to open position interface");
    +
    87  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iEncoders),"Unable to open encoders interface");
    +
    88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iControlMode),"Unable to open control mode interface");
    +
    89  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iPWM), "Unable to open PWM interface");
    +
    90  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iPosDirect),"Unable to open OpnLoop interface");
    +
    91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iVelocity),"Unable to open velocity2 interface");
    +
    92 
    +
    93 
    +
    94 
    +
    95  if (!iEncoders->getAxes(&numJointsInPart))
    +
    96  {
    +
    97  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
    +
    98  }
    +
    99 
    +
    100  Bottle* homeBottle = config.find("home").asList();
    +
    101  if(homeBottle == NULL)
    +
    102  {
    +
    103 
    +
    104  ROBOTTESTINGFRAMEWORK_TEST_REPORT("home bottle is null");
    +
    105  }
    +
    106  else
    +
    107  {
    +
    108 
    +
    109  ROBOTTESTINGFRAMEWORK_TEST_REPORT("home bottle is not null");
    +
    110  }
    +
    111 
    +
    112  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse home parameter");
    +
    113 
    +
    114  Bottle* jointsBottle = config.find("joints").asList();
    +
    115  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
    +
    116 
    +
    117  Bottle* targetBottle = config.find("target").asList();
    +
    118  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(targetBottle!=0,"unable to parse target parameter");
    +
    119 
    +
    120  Bottle* refAccBottle = config.find("refAcc").asList();
    +
    121  if(refAccBottle == NULL)
    +
    122  ROBOTTESTINGFRAMEWORK_TEST_REPORT("refAcc param not present. Test will use deafoult values.");
    +
    123 
    +
    124  Bottle* refVelBottle = config.find("refVel").asList();
    +
    125  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(refVelBottle!=0,"unable to parse refVel parameter");
    +
    126 
    +
    127 
    +
    128  numJoints = jointsBottle->size();
    +
    129  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("num joints: %d", numJoints));
    +
    130 
    +
    131 
    +
    132  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(numJoints>0 && numJoints<=numJointsInPart,"invalid number of joints, it must be >0 & <= number of part joints");
    +
    133 
    +
    134  //jointsList.clear();
    +
    135  targetPos.clear();
    +
    136 
    +
    137  jointsList.resize(numJoints);
    +
    138  for (int i=0; i< numJoints; i++)
    +
    139  {
    +
    140  jointsList[i]=jointsBottle->get(i).asInt32();
    +
    141  }
    +
    142 
    +
    143  jList = new int[numJoints];
    +
    144  for (int i=0; i< numJoints; i++)
    +
    145  {
    +
    146  jList[i]=jointsBottle->get(i).asInt32();
    +
    147  }
    +
    148 
    +
    149 
    +
    150 
    +
    151  //for (int i=0; i <numJoints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
    +
    152 
    +
    153  homePos.resize (numJoints); for (int i=0; i< numJoints; i++) homePos[i]=homeBottle->get(i).asFloat64();
    +
    154  targetPos.resize (numJoints); for (int i=0; i< numJoints; i++) targetPos[i]=targetBottle->get(i).asFloat64();
    +
    155  refVel.resize (numJoints); for (int i=0; i< numJoints; i++) refVel[i]=refVelBottle->get(i).asFloat64();
    +
    156  if(refAccBottle != NULL)
    +
    157  {
    +
    158  refAcc.resize (numJoints);
    +
    159  for (int i=0; i< numJoints; i++) refAcc[i]=refAccBottle->get(i).asFloat64();
    +
    160  }
    +
    161  else
    +
    162  {
    +
    163  refAcc.resize (0);
    +
    164  }
    +
    165 
    +
    166  jPosMotion = new yarp::robottestingframework::jointsPosMotion(dd, jointsList);
    +
    167  jPosMotion->setTolerance(2.0);
    +
    168  jPosMotion->setTimeout(5); //5 sec
    +
    169 
    +
    170 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(jointsList.toString().c_str());
    +
    171 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("startup num joints: %d partnj=%d", numJoints, numJointsInPart));
    +
    172 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(targetPos.toString().c_str());
    +
    173 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(refVel.toString().c_str());
    +
    174 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(refAcc.toString().c_str());
    +
    175 
    +
    176 // for(int k=0; k<numJoints; k++)
    +
    177 // {
    +
    178 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("targetpos [%d]=%.2f", k, targetPos[k]));
    +
    179 // }
    +
    180 
    +
    181  /* for(int k=0; k<numJoints; k++)
    +
    182  {
    +
    183  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("jointlist [%d]=%d", k, (int)jointsList[k]));
    +
    184  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("jlist [%d]=%d", k, jList[k]));
    +
    185  }*/
    +
    186  return true;
    +
    187 }
    +
    188 
    +
    189 void MovementReferencesTest::tearDown() {
    +
    190 
    +
    191  // finalization goes her ...
    +
    192 
    +
    193  for (int i=0; i<numJoints; ++i)
    +
    194  {
    +
    195 
    +
    196  // 1) check get reference position returns the target position set by positionMove(..)
    +
    197 
    +
    198  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("tear down: joint %d is going to home", jList[i]));
    +
    199 
    +
    200  setAndCheckControlMode(jList[i], VOCAB_CM_POSITION);
    +
    201 
    +
    202  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(jPosMotion->goToSingle(jList[i], homePos[i]),
    +
    203  Asserter::format(("go to target pos for j %d"),jList[i]));
    +
    204  }
    +
    205 
    +
    206 
    +
    207  if(jPosMotion)
    +
    208  delete jPosMotion;
    +
    209 }
    +
    210 
    +
    211 
    +
    212 void MovementReferencesTest::setAndCheckControlMode(int j, int mode)
    +
    213 {
    +
    214  int rec_mode=VOCAB_CM_IDLE;
    +
    215  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iControlMode->setControlMode(j, mode),
    +
    216  Asserter::format(("setting control mode for j %d"),j));
    +
    217 
    +
    218  yarp::os::Time::delay(0.1);
    +
    219 
    +
    220  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iControlMode->getControlMode(j, &rec_mode),
    +
    221  Asserter::format(("getting control mode for j %d"),j));
    +
    222 
    +
    223  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE((rec_mode == mode),
    +
    224  Asserter::format(("joint %d: is not in position"),j));
    +
    225 
    +
    226 }
    +
    227 
    +
    228 void MovementReferencesTest::run() {
    +
    229 
    +
    230  int nJoints=0;
    +
    231  bool doneAll=false;
    +
    232  bool ret=false;
    +
    233 
    +
    234 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(jointsList.toString().c_str());
    +
    235 // for(int k=0; k<numJoints; k++)
    +
    236 // {
    +
    237 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("targetpos [%d]=%.2f", k, targetPos[k]));
    +
    238 // }
    +
    239 
    +
    240 // for(int k=0; k<numJoints; k++)
    +
    241 // {
    +
    242 // ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("jointlist [%d]=%d", k, jointsList[k]));
    +
    243 // }
    +
    244 
    +
    245 
    +
    246  ROBOTTESTINGFRAMEWORK_TEST_REPORT("setting velocity refs for all joints...");
    +
    247 
    +
    248  if(refAcc.size() != 0)
    +
    249  {
    +
    250  ROBOTTESTINGFRAMEWORK_TEST_REPORT("setting acceleration refs for all joints...");
    +
    251  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iVelocity->setRefAccelerations(numJoints, jList, refAcc.data()),
    +
    252  Asserter::format("setting reference acceleration on joints"));
    +
    253  }
    +
    254 
    +
    255  ROBOTTESTINGFRAMEWORK_TEST_REPORT("setting velocity refs for all joints...");
    +
    256  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->setRefSpeeds(numJoints, jList, refVel.data()),
    +
    257  Asserter::format("setting reference speed on joints"));
    +
    258 
    +
    259 
    +
    260 
    +
    261 
    +
    262  ROBOTTESTINGFRAMEWORK_TEST_REPORT("all joints are going to home...");
    +
    263  for (int i=0; i<numJoints; ++i)
    +
    264  {
    +
    265 
    +
    266  // 1) check get reference position returns the target position set by positionMove(..)
    +
    267 
    +
    268  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format(" joint %d is going to home", jList[i]));
    +
    269 
    +
    270  setAndCheckControlMode(jList[i], VOCAB_CM_POSITION);
    +
    271 
    +
    272  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(jPosMotion->goToSingle(jList[i], homePos[i]),
    +
    273  Asserter::format(("go to target pos for j %d"),jList[i]));
    +
    274  }
    +
    275 
    +
    276  yarp::os::Time::delay(5);
    +
    277 
    +
    278  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Checking individual joints...");
    +
    279 
    +
    280  const double res_th = 0.01; //resolution threshold
    +
    281  //numJoints=numJointsInPart;
    +
    282  for (int i=0; i<numJoints; ++i)
    +
    283  {
    +
    284  //double reached_pos;
    +
    285  double rec_targetPos=200.0;
    +
    286 
    +
    287  // 1) check get reference position returns the target position set by positionMove(..)
    +
    288 
    +
    289  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking PosReference joint %d with resolution threshold %.3f", jList[i], res_th));
    +
    290 
    +
    291  setAndCheckControlMode(jList[i], VOCAB_CM_POSITION);
    +
    292 
    +
    293  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(jPosMotion->goToSingle(jList[i], targetPos[i]),
    +
    294  Asserter::format(("go to target pos for j %d"),jList[i])); //Note: gotosingle use IPositioncontrol2::PositionMove
    +
    295 
    +
    296  yarp::os::Time::delay(0.5);
    +
    297 
    +
    298  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->getTargetPosition(jList[i], &rec_targetPos),
    +
    299  Asserter::format(("getting target pos for j %d"),jList[i]));
    +
    300 
    +
    301  bool res = yarp::robottestingframework::TestAsserter::isApproxEqual(targetPos[i], rec_targetPos, res_th, res_th);
    +
    302  ROBOTTESTINGFRAMEWORK_TEST_CHECK(res, Asserter::format(
    +
    303  ("IPositionControl: getting target pos for j %d: setval =%.2f received %.2f"),
    +
    304  jList[i], targetPos[i],rec_targetPos));
    +
    305 
    +
    306  //if(!res)
    +
    307  // std::cout <<"ERRORE: getTargetPosition: j " << jList[i] << "sent" << targetPos[i] << "rec" << rec_targetPos;
    +
    308  //else
    +
    309  // std::cout <<"OK: getTargetPosition: j " << jList[i] << "sent" << targetPos[i] << "rec" << rec_targetPos;
    +
    310 
    +
    311  yarp::os::Time::delay(3);
    +
    312 
    +
    313  //2) check get reference output (pwm mode) returns the ouput set by setRefOutput
    +
    314  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking pwm reference joint %d", jList[i]));
    +
    315 
    +
    316 
    +
    317  setAndCheckControlMode(jList[i], VOCAB_CM_PWM);
    +
    318 
    +
    319  double output = 2;
    +
    320  double rec_output = 0;
    +
    321  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPWM->setRefDutyCycle(jList[i], output),
    +
    322  Asserter::format(("set ref output for j %d"),jList[i]));
    +
    323 yarp::os::Time::delay(0.5);
    +
    324 
    +
    325  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPWM->getRefDutyCycle(jList[i], &rec_output),
    +
    326  Asserter::format(("get ref output for j %d"),jList[i]));
    +
    327 
    +
    328  ROBOTTESTINGFRAMEWORK_TEST_CHECK((output == rec_output),
    +
    329  Asserter::format(("getting target output for j %d: setval =%.2f received %.2f"),jList[i], output,rec_output));
    +
    330 
    +
    331  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->positionMove(jList[i], homePos[i]),
    +
    332  Asserter::format(("go to home for j %d"),jList[i]));
    +
    333 yarp::os::Time::delay(0.5);
    +
    334  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->getTargetPosition(jList[i], &rec_targetPos),
    +
    335  Asserter::format(("getting target pos for j %d"),jList[i]));
    +
    336 
    +
    337  //here I expect getTargetPosition returns targetPos[j] and not homePos[j] because joint is in pwm control mode and
    +
    338  //the positionMove(homepos) command should be discarded by firmware motor controller
    +
    339  res = yarp::robottestingframework::TestAsserter::isApproxEqual(homePos[i], rec_targetPos, res_th, res_th);
    +
    340  ROBOTTESTINGFRAMEWORK_TEST_CHECK(!res,
    +
    341  Asserter::format(("joint %d discards PosotinMove command while it is in opnLoop mode. Set=%.2f rec=%.2f"),jList[i], homePos[i], rec_targetPos));
    +
    342 
    +
    343  //3) check get reference pos (directPosition mode) returns the target position set by setPosition()
    +
    344  //set direct mode
    +
    345  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking directPos reference joint %d", jList[i]));
    +
    346 
    +
    347  setAndCheckControlMode(jList[i], VOCAB_CM_POSITION_DIRECT);
    +
    348 
    +
    349  double curr_pos=targetPos[i];
    +
    350  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iEncoders->getEncoder(jList[i], &curr_pos),
    +
    351  Asserter::format(("get encoders for j %d"),jList[i]));
    +
    352 
    +
    353  double delta = 0.1;
    +
    354  double new_directPos = curr_pos+delta;
    +
    355  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosDirect->setPosition(jList[i], new_directPos),
    +
    356  Asserter::format(("Direct:setPosition for j %d"),jList[i]));
    +
    357 yarp::os::Time::delay(0.5);
    +
    358 
    +
    359  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosDirect->getRefPosition(jList[i], &rec_targetPos),
    +
    360  Asserter::format(("getting target pos for j %d"),jList[i]));
    +
    361 
    +
    362  res = yarp::robottestingframework::TestAsserter::isApproxEqual(new_directPos, rec_targetPos, res_th, res_th);
    +
    363  ROBOTTESTINGFRAMEWORK_TEST_CHECK(res,
    +
    364  Asserter::format(("iDirect: getting target direct pos for j %d: setval =%.2f received %.2f"),jList[i], new_directPos,rec_targetPos));
    +
    365 
    +
    366  //here I'm going to check the position reference is not changed.
    +
    367  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iPosition->getTargetPosition(jList[i], &rec_targetPos),
    +
    368  Asserter::format(("getting target pos for j %d"),jList[i]));
    +
    369 
    +
    370  res = yarp::robottestingframework::TestAsserter::isApproxEqual(targetPos[i], rec_targetPos, res_th, res_th);
    +
    371  ROBOTTESTINGFRAMEWORK_TEST_CHECK(res, Asserter::format(
    +
    372  ("IPositionControl: getting target pos for j %d: setval =%.2f received %.2f"),
    +
    373  jList[i], targetPos[i],rec_targetPos));
    +
    374 
    +
    375  //4) check get reference velocity (velocity mode) returns the target velocity set by velocityMove()
    +
    376  //set velocity mode
    +
    377  ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Checking velocity reference joint %d", jList[i]));
    +
    378 
    +
    379  setAndCheckControlMode(jList[i], VOCAB_CM_VELOCITY);
    +
    380 
    +
    381  double vel= 0.5;
    +
    382  double rec_vel;
    +
    383  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iVelocity->velocityMove(jList[i], vel),
    +
    384  Asserter::format(("IVelocity:velocityMove for j %d"),jList[i]));
    +
    385 
    +
    386 yarp::os::Time::delay(0.5);
    +
    387  ROBOTTESTINGFRAMEWORK_TEST_FAIL_IF_FALSE(iVelocity->getRefVelocity(jList[i], &rec_vel),
    +
    388  Asserter::format(("IVelocity:getting target velocity for j %d"),jList[i]));
    +
    389  res = yarp::robottestingframework::TestAsserter::isApproxEqual(vel, rec_vel, res_th, res_th);
    +
    390  ROBOTTESTINGFRAMEWORK_TEST_CHECK(res,
    +
    391  Asserter::format(("iVelocity: getting target vel for j %d: setval =%.2f received %.2f"),jList[i], vel,rec_vel));
    +
    392  }
    +
    393 
    +
    394 }
    +
    Check IPositionControl, IVelocityControl, IPWMControl, IPositionDirect.
    +
    + + + + diff --git a/doxygen/doc/html/movementReferencesTest_8h_source.html b/doxygen/doc/html/movementReferencesTest_8h_source.html new file mode 100644 index 00000000..70e4d67a --- /dev/null +++ b/doxygen/doc/html/movementReferencesTest_8h_source.html @@ -0,0 +1,154 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/movementReferencesTest/movementReferencesTest.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    movementReferencesTest.h
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #ifndef _MOVEMENTREFERNCESTEST_
    +
    22 #define _MOVEMENTREFERNCESTEST_
    +
    23 
    +
    24 #include <yarp/robottestingframework/TestCase.h>
    +
    25 
    +
    26 #include <yarp/os/Value.h>
    +
    27 #include <yarp/sig/Vector.h>
    +
    28 #include <yarp/os/Time.h>
    +
    29 #include <yarp/dev/PolyDriver.h>
    +
    30 #include <yarp/dev/ControlBoardInterfaces.h>
    +
    31 #include "yarp/robottestingframework/JointsPosMotion.h"
    +
    32 
    +
    56 class MovementReferencesTest : public yarp::robottestingframework::TestCase {
    +
    57 public:
    + +
    59  virtual ~MovementReferencesTest();
    +
    60 
    +
    61  virtual bool setup(yarp::os::Property& configuration);
    +
    62 
    +
    63  virtual void tearDown();
    +
    64 
    +
    65  virtual void run();
    +
    66 
    +
    67 private:
    +
    68  void setAndCheckControlMode(int j, int mode);
    +
    69 
    +
    70 
    +
    71  yarp::dev::PolyDriver *dd;
    +
    72  yarp::dev::IEncoders *iEncoders;
    +
    73  yarp::dev::IPositionControl *iPosition;
    +
    74  yarp::dev::IPWMControl *iPWM;
    +
    75  yarp::dev::IPositionDirect *iPosDirect;
    +
    76  yarp::dev::IControlMode *iControlMode;
    +
    77  yarp::dev::IVelocityControl *iVelocity;
    +
    78 
    +
    79 
    +
    80 
    +
    81  bool initialized;
    +
    82  std::string robotName;
    +
    83  std::string partName;
    +
    84 
    +
    85  int numJointsInPart;
    +
    86  int numJoints;
    +
    87  yarp::robottestingframework::jointsPosMotion *jPosMotion;
    +
    88  yarp::sig::Vector jointsList;
    +
    89  int *jList;
    +
    90 
    +
    91  yarp::sig::Vector targetPos;
    +
    92  yarp::sig::Vector homePos;
    +
    93  yarp::sig::Vector refVel;
    +
    94  yarp::sig::Vector refAcc;
    +
    95  //yarp::sig::Vector timeout;
    +
    96 };
    +
    97 
    +
    98 #endif //_MOVEMENTREFERNCESTEST_
    +
    Check IPositionControl, IVelocityControl, IPWMControl, IPositionDirect.
    +
    + + + + diff --git a/doxygen/doc/html/nav_f.png b/doxygen/doc/html/nav_f.png new file mode 100644 index 0000000000000000000000000000000000000000..72a58a529ed3a9ed6aa0c51a79cf207e026deee2 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^j6iI`!2~2XGqLUlQVE_ejv*C{Z|{2ZH7M}7UYxc) zn!W8uqtnIQ>_z8U literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/nav_g.png b/doxygen/doc/html/nav_g.png new file mode 100644 index 0000000000000000000000000000000000000000..2093a237a94f6c83e19ec6e5fd42f7ddabdafa81 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0vp^j6lrB!3HFm1ilyoDK$?Q$B+ufw|5PB85lU25BhtE tr?otc=hd~V+ws&_A@j8Fiv!KF$B+ufw|5=67#uj90@pIL wZ=Q8~_Ju`#59=RjDrmm`tMD@M=!-l18IR?&vFVdQ&MBb@0HFXL + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts/scripts/oneFile_plot.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    oneFile_plot.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 #define functio to plot one file
    +
    20 function oneFile_plot(filename, titleStr, numofjoint)
    +
    21 
    +
    22 data = load(filename);
    +
    23 for i= 1:1:numofjoint
    +
    24 
    +
    25  subplot(numofjoint, 1, i, "align");
    +
    26  printf("index %d\n", i);
    +
    27  plot(data(:, 0+i), "r", data(:,numofjoint+i), "b");
    +
    28  refresh();
    +
    29  if(i==1)
    +
    30  title(titleStr);
    +
    31  endif
    +
    32 endfor
    +
    33 
    +
    34 endfunction
    +
    + + + + diff --git a/doxygen/doc/html/open.png b/doxygen/doc/html/open.png new file mode 100644 index 0000000000000000000000000000000000000000..30f75c7efe2dd0c9e956e35b69777a02751f048b GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/opticalEncoders-drift/opticalEncodersDrift.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    opticalEncodersDrift.cpp
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2022 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 
    +
    22 #include <math.h>
    +
    23 #include <robottestingframework/TestAssert.h>
    +
    24 #include <robottestingframework/dll/Plugin.h>
    +
    25 #include <yarp/os/Time.h>
    +
    26 #include <yarp/math/Math.h>
    +
    27 #include <yarp/os/Property.h>
    +
    28 #include <yarp/conf/environment.h>
    +
    29 #include <fstream>
    +
    30 #include <algorithm>
    +
    31 #include <cstdlib>
    +
    32 #include "opticalEncodersDrift.h"
    +
    33 #include <iostream>
    +
    34 #include <ctime>
    +
    35 #include <filesystem>
    +
    36 
    +
    37 //example -v -t OpticalEncodersDrift.dll -p "--robot icub --part head --joints ""(0 1 2)"" --home ""(0 0 0)" --speed "(20 20 20)" --max "(10 10 10)" --min "(-10 -10 -10)" --cycles 100 --tolerance 1.0 "
    +
    38 //example2 -v -t OpticalEncodersDrift.dll -p "--robot icub --part head --joints ""(2)"" --home ""(0)"" --speed "(20 )" --max "(10 )" --min "(-10)" --cycles 100 --tolerance 1.0 "
    +
    39 using namespace robottestingframework;
    +
    40 using namespace yarp::os;
    +
    41 using namespace yarp::dev;
    +
    42 using namespace yarp::math;
    +
    43 using namespace std;
    +
    44 using namespace std::filesystem;
    +
    45 
    +
    46 // prepare the plugin
    +
    47 ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(OpticalEncodersDrift)
    +
    48 
    +
    49 OpticalEncodersDrift::OpticalEncodersDrift() : yarp::robottestingframework::TestCase("OpticalEncodersDrift") {
    +
    50  jointsList=0;
    +
    51  dd=0;
    +
    52  ipos=0;
    +
    53  icmd=0;
    +
    54  iimd=0;
    +
    55  ienc=0;
    +
    56  imot=0;
    +
    57  enc_jnt=0;
    +
    58  enc_mot=0;
    +
    59  home_enc_mot=0;
    +
    60  end_enc_mot=0;
    +
    61  err_enc_mot=0;
    +
    62  cycles=100;
    +
    63 }
    +
    64 
    +
    65 OpticalEncodersDrift::~OpticalEncodersDrift() { }
    +
    66 
    +
    67 bool OpticalEncodersDrift::setup(yarp::os::Property& property) {
    +
    68 
    +
    69  if(property.check("name"))
    +
    70  setName(property.find("name").asString());
    +
    71 
    +
    72  // updating parameters
    +
    73  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("robot"), "The robot name must be given as the test parameter!");
    +
    74  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("part"), "The part name must be given as the test parameter!");
    +
    75  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("joints"), "The joints list must be given as the test parameter!");
    +
    76  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("home"), "The home position must be given as the test parameter!");
    +
    77  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("max"), "The max position must be given as the test parameter!");
    +
    78  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("min"), "The min position must be given as the test parameter!");
    +
    79  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("speed"), "The positionMove reference speed must be given as the test parameter!");
    +
    80  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("cycles"), "The number of cycles of the control signal must be given as the test parameter!");
    +
    81  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(property.check("tolerance"), "The max error tolerance must be given as the test parameter!");
    +
    82 
    +
    83  robotName = property.find("robot").asString();
    +
    84 
    +
    85  partName = property.find("part").asString();
    +
    86 
    +
    87  Bottle* jointsBottle = property.find("joints").asList();
    +
    88  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(jointsBottle!=0,"unable to parse joints parameter");
    +
    89 
    +
    90  Bottle* homeBottle = property.find("home").asList();
    +
    91  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(homeBottle!=0,"unable to parse zero parameter");
    +
    92 
    +
    93  Bottle* maxBottle = property.find("max").asList();
    +
    94  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(maxBottle!=0,"unable to parse max parameter");
    +
    95 
    +
    96  Bottle* minBottle = property.find("min").asList();
    +
    97  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(minBottle!=0,"unable to parse min parameter");
    +
    98 
    +
    99  Bottle* speedBottle = property.find("speed").asList();
    +
    100  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(speedBottle!=0,"unable to parse speed parameter");
    +
    101 
    +
    102  tolerance = property.find("tolerance").asFloat64();
    +
    103  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(tolerance>=0,"invalid tolerance");
    +
    104 
    +
    105  cycles = property.find("cycles").asInt32();
    +
    106  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(cycles>=0,"invalid cycles");
    +
    107 
    +
    108  plot = property.find("plot_enabled").asBool();
    +
    109 
    +
    110  if(plot)
    +
    111  ROBOTTESTINGFRAMEWORK_TEST_REPORT("This test will run gnuplot utility at the end.");
    +
    112  else
    +
    113  ROBOTTESTINGFRAMEWORK_TEST_REPORT("This test will NOT run gnuplot utility at the end.");
    +
    114 
    +
    115 
    +
    116 
    +
    117  Property options;
    +
    118  options.put("device", "remote_controlboard");
    +
    119  options.put("remote", "/"+robotName+"/"+partName);
    +
    120  options.put("local", "/opticalEncodersDrift/"+robotName+"/"+partName);
    +
    121 
    +
    122  dd = new PolyDriver(options);
    +
    123  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->isValid(),"Unable to open device driver");
    +
    124  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ienc),"Unable to open encoders interface");
    +
    125  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(ipos),"Unable to open position interface");
    +
    126  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(icmd),"Unable to open control mode interface");
    +
    127  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(iimd),"Unable to open interaction mode interface");
    +
    128  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(dd->view(imot),"Unable to open motor encoders interface");
    +
    129 
    +
    130  if (!ienc->getAxes(&n_part_joints))
    +
    131  {
    +
    132  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("unable to get the number of joints of the part");
    +
    133  }
    +
    134 
    +
    135  int n_cmd_joints = jointsBottle->size();
    +
    136  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(n_cmd_joints>0 && n_cmd_joints<=n_part_joints,"invalid number of joints, it must be >0 & <= number of part joints");
    +
    137  for (int i=0; i <n_cmd_joints; i++) jointsList.push_back(jointsBottle->get(i).asInt32());
    +
    138 
    +
    139  enc_jnt.resize(n_part_joints);
    +
    140  enc_mot.resize(n_part_joints);
    +
    141  home_enc_mot.resize(n_part_joints);
    +
    142  end_enc_mot.resize(n_part_joints);
    +
    143  err_enc_mot.resize(n_part_joints);
    +
    144 
    +
    145  max.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) max[i]=maxBottle->get(i).asFloat64();
    +
    146  min.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) min[i]=minBottle->get(i).asFloat64();
    +
    147  home.resize (n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) home[i]=homeBottle->get(i).asFloat64();
    +
    148  speed.resize(n_cmd_joints); for (int i=0; i< n_cmd_joints; i++) speed[i]=speedBottle->get(i).asFloat64();
    +
    149 
    +
    150  return true;
    +
    151 }
    +
    152 
    +
    153 void OpticalEncodersDrift::tearDown()
    +
    154 {
    +
    155  if (dd) {delete dd; dd =0;}
    +
    156 }
    +
    157 
    +
    158 void OpticalEncodersDrift::setMode(int desired_mode)
    +
    159 {
    +
    160  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    161  {
    +
    162  icmd->setControlMode((int)jointsList[i],desired_mode);
    +
    163  iimd->setInteractionMode((int)jointsList[i],VOCAB_IM_STIFF);
    +
    164  yarp::os::Time::delay(0.010);
    +
    165  }
    +
    166 
    +
    167  int cmode;
    +
    168  yarp::dev::InteractionModeEnum imode;
    +
    169  int timeout = 0;
    +
    170 
    +
    171  while (1)
    +
    172  {
    +
    173  int ok=0;
    +
    174  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    175  {
    +
    176  icmd->getControlMode ((int)jointsList[i],&cmode);
    +
    177  iimd->getInteractionMode((int)jointsList[i],&imode);
    +
    178  if (cmode==desired_mode && imode==VOCAB_IM_STIFF) ok++;
    +
    179  }
    +
    180  if (ok==jointsList.size()) break;
    +
    181  if (timeout>100)
    +
    182  {
    +
    183  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Unable to set control mode/interaction mode");
    +
    184  }
    +
    185  yarp::os::Time::delay(0.2);
    +
    186  timeout++;
    +
    187  }
    +
    188 }
    +
    189 
    +
    190 bool OpticalEncodersDrift::goHome()
    +
    191 {
    +
    192  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    193  {
    +
    194  ipos->setRefSpeed((int)jointsList[i],speed[i]);
    +
    195  ipos->positionMove((int)jointsList[i],home[i]);
    +
    196  }
    +
    197 
    +
    198  int timeout = 0;
    +
    199  while (1)
    +
    200  {
    +
    201  int in_position=0;
    +
    202  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    203  {
    +
    204  double tmp=0;
    +
    205  ienc->getEncoder((int)jointsList[i],&tmp);
    +
    206  if (fabs(tmp-home[i])<tolerance) in_position++;
    +
    207  }
    +
    208  if (in_position==jointsList.size()) break;
    +
    209  if (timeout>100)
    +
    210  {
    +
    211  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Timeout while reaching home position");
    +
    212  return false;
    +
    213  }
    +
    214  yarp::os::Time::delay(0.2);
    +
    215  timeout++;
    +
    216  }
    +
    217  return true;
    +
    218 }
    +
    219 
    +
    220 bool OpticalEncodersDrift::saveToFile(const std::string &filename, const yarp::os::Bottle &b)
    +
    221 {
    +
    222  std::fstream fs;
    +
    223  fs.open (filename.c_str(), std::fstream::out);
    +
    224 
    +
    225  if ( (fs.rdstate() & std::ifstream::failbit ) != 0 )
    +
    226  {
    +
    227  std::cerr << "Error opening " << filename << "\n";
    +
    228  return false;
    +
    229  }
    +
    230 
    +
    231  for (unsigned int i=0; i<b.size(); i++)
    +
    232  {
    +
    233  std::string s = b.get(i).toString();
    +
    234  std::replace(s.begin(), s.end(), '(', ' ');
    +
    235  std::replace(s.begin(), s.end(), ')', ' ');
    +
    236  fs << s << std::endl;
    +
    237  }
    +
    238 
    +
    239  fs.close();
    +
    240  return true;
    +
    241 }
    +
    242 
    +
    243 void OpticalEncodersDrift::run()
    +
    244 {
    +
    245  setMode(VOCAB_CM_POSITION);
    +
    246  ROBOTTESTINGFRAMEWORK_ASSERT_FAIL_IF_FALSE(goHome(), "Test can't run");
    +
    247 
    +
    248  bool go_to_max=false;
    +
    249  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    250  {
    +
    251  ipos->positionMove((int)jointsList[i], min[i]);
    +
    252  }
    +
    253 
    +
    254  int curr_cycle=0;
    +
    255  double start_time = yarp::os::Time::now();
    +
    256  Bottle dataToPlot;
    +
    257 
    +
    258  imot->getMotorEncoders (home_enc_mot.data());
    +
    259  while(1)
    +
    260  {
    +
    261  double curr_time = yarp::os::Time::now();
    +
    262  double elapsed = curr_time-start_time;
    +
    263 
    +
    264  //get joint e motor encoders data for the whole robot part
    +
    265  ienc->getEncoders (enc_jnt.data());
    +
    266  imot->getMotorEncoders (enc_mot.data());
    +
    267  //extract only the joints of interest
    +
    268  yarp::sig::Vector enc_jnt_of_interest (jointsList.size());
    +
    269  yarp::sig::Vector enc_mot_of_interest (jointsList.size());
    +
    270  for (size_t i =0; i< jointsList.size(); i++)
    +
    271  {
    +
    272  enc_jnt_of_interest[i] = enc_jnt[jointsList[i]];
    +
    273  enc_mot_of_interest[i] = enc_mot[jointsList[i]];
    +
    274  }
    +
    275  //put the data into a Bottle
    +
    276  //this is the output format: n values for the motor encoders, then n values for the jnt encoders
    +
    277  Bottle& row = dataToPlot.addList();
    +
    278  Bottle& b_mot = row.addList();
    +
    279  Bottle& b_jnt = row.addList();
    +
    280  b_mot.read(enc_mot_of_interest);
    +
    281  b_jnt.read(enc_jnt_of_interest);
    +
    282 
    +
    283  bool reached= false;
    +
    284  int in_position=0;
    +
    285  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    286  {
    +
    287  double curr_val=0;
    +
    288  if (go_to_max==false) curr_val = min[i];
    +
    289  else curr_val = max[i];
    +
    290  if (fabs(enc_jnt[i]-curr_val)<tolerance) in_position++;
    +
    291  }
    +
    292  if (in_position==jointsList.size()) reached=true;
    +
    293 
    +
    294  if (elapsed >= 20.0)
    +
    295  {
    +
    296  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR("Timeout while moving joint");
    +
    297  }
    +
    298 
    +
    299  if (reached)
    +
    300  {
    +
    301  if (go_to_max==false)
    +
    302  {
    +
    303  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    304  ipos->positionMove(i,max[i]);
    +
    305  go_to_max=true;
    +
    306  curr_cycle++;
    +
    307  start_time = yarp::os::Time::now();
    +
    308  if (curr_cycle % 10 == 0) ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Cycle %d/%d completed", curr_cycle, cycles));
    +
    309  }
    +
    310  else
    +
    311  {
    +
    312  for (unsigned int i=0; i<jointsList.size(); i++)
    +
    313  ipos->positionMove(i,min[i]);
    +
    314  go_to_max=false;
    +
    315  curr_cycle++;
    +
    316  start_time = yarp::os::Time::now();
    +
    317  if (curr_cycle % 10 == 0) ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Cycle %d/%d completed", curr_cycle, cycles));
    +
    318  }
    +
    319  }
    +
    320 
    +
    321  if (curr_cycle>=cycles) break;
    +
    322 
    +
    323  yarp::os::Time::delay(0.010);
    +
    324  }
    +
    325 
    +
    326  bool isInHome = goHome();
    +
    327  yarp::os::Time::delay(2.0);
    +
    328 
    +
    329  //automatic check, not complete yet
    +
    330  {
    +
    331  imot->getMotorEncoders (end_enc_mot.data());
    +
    332  for (int i=0; i<n_part_joints; i++)
    +
    333  {
    +
    334  err_enc_mot[i]=home_enc_mot[i]-end_enc_mot[i];
    +
    335 
    +
    336  if (fabs(err_enc_mot[i]) > tolerance)
    +
    337  {
    +
    338  //...assert something
    +
    339  }
    +
    340  }
    +
    341  }
    +
    342 
    +
    343  time_t now = time(0);
    +
    344  tm *ltm = localtime(&now);
    +
    345 
    +
    346  char folder_time_buffer[80];
    +
    347  char file_time_buffer[80];
    +
    348 
    +
    349  strftime(folder_time_buffer, sizeof(folder_time_buffer), "%d%m%Y", ltm);
    +
    350  strftime(file_time_buffer, sizeof(file_time_buffer), "%d%m%Y_%H%M", ltm);
    +
    351 
    +
    352  string folder_time_str(folder_time_buffer);
    +
    353  string file_time_str(file_time_buffer); //This string contain also minutes
    +
    354 
    +
    355  // Create the filename with date and time
    +
    356  string filename = "encDrift_plot_";
    +
    357  filename += partName;
    +
    358  filename += "_";
    +
    359  filename += file_time_str;
    +
    360  filename += ".txt";
    +
    361 
    +
    362  constexpr char default_robot_name[] = "RobotName";
    +
    363 
    +
    364  string robot_str = yarp::conf::environment::get_string("YARP_ROBOT_NAME", default_robot_name);
    +
    365  string directory_tree = "results/" + robot_str + "/encoders-icub_" + folder_time_str + "/encDrift";
    +
    366  create_directories(directory_tree); // This function return false if there is an error or if the directories already exist
    +
    367 
    +
    368  string filename_with_path = directory_tree + "/" + filename;
    +
    369  bool saved_files = saveToFile(filename_with_path,dataToPlot);
    +
    370 
    +
    371  if(!saved_files)
    +
    372  {
    +
    373  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Error saving files to plot!");
    +
    374  }
    +
    375 
    +
    376  char plotstring[1000];
    +
    377  sprintf (plotstring, "gnuplot -e \" unset key; plot for [col=1:%d] '%s' using col with lines \" -persist", (int)jointsList.size(),filename_with_path.c_str());
    +
    378 
    +
    379  if(plot)
    +
    380  {
    +
    381  system (plotstring);
    +
    382  }
    +
    383  else
    +
    384  {
    +
    385  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Test is finished. Please check if collected date are ok, by using following command: ");
    +
    386  ROBOTTESTINGFRAMEWORK_TEST_REPORT(robottestingframework::Asserter::format("%s", plotstring));
    +
    387  }
    +
    388 
    +
    389  ROBOTTESTINGFRAMEWORK_ASSERT_ERROR_IF_FALSE(isInHome, "This part is not in home. Suite test will be terminated!");
    +
    390  ROBOTTESTINGFRAMEWORK_TEST_REPORT("Test is finished. Your files are saved in: \n" + filename_with_path);
    +
    391 
    +
    392 }
    +
    This tests checks if the relative encoders measurements are consistent over time, by performing cycli...
    +
    + + + + diff --git a/doxygen/doc/html/opticalEncodersDrift_8h_source.html b/doxygen/doc/html/opticalEncodersDrift_8h_source.html new file mode 100644 index 00000000..3f8d06e3 --- /dev/null +++ b/doxygen/doc/html/opticalEncodersDrift_8h_source.html @@ -0,0 +1,157 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/opticalEncoders-drift/opticalEncodersDrift.h Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    opticalEncodersDrift.h
    +
    +
    +
    1 /*
    +
    2  * iCub Robot Unit Tests (Robot Testing Framework)
    +
    3  *
    +
    4  * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    5  *
    +
    6  * This library is free software; you can redistribute it and/or
    +
    7  * modify it under the terms of the GNU Lesser General Public
    +
    8  * License as published by the Free Software Foundation; either
    +
    9  * version 2.1 of the License, or (at your option) any later version.
    +
    10  *
    +
    11  * This library is distributed in the hope that it will be useful,
    +
    12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    14  * Lesser General Public License for more details.
    +
    15  *
    +
    16  * You should have received a copy of the GNU Lesser General Public
    +
    17  * License along with this library; if not, write to the Free Software
    +
    18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    19  */
    +
    20 
    +
    21 #ifndef _OPTICALENCODERSDRIFT_H_
    +
    22 #define _OPTICALENCODERSDRIFT_H_
    +
    23 
    +
    24 #include <string>
    +
    25 #include <yarp/robottestingframework/TestCase.h>
    +
    26 #include <yarp/dev/ControlBoardInterfaces.h>
    +
    27 #include <yarp/dev/PolyDriver.h>
    +
    28 #include <yarp/sig/Vector.h>
    +
    29 #include <yarp/os/Bottle.h>
    +
    30 #include <yarp/sig/Matrix.h>
    +
    31 
    +
    62 class OpticalEncodersDrift : public yarp::robottestingframework::TestCase {
    +
    63 public:
    + +
    65  virtual ~OpticalEncodersDrift();
    +
    66 
    +
    67  virtual bool setup(yarp::os::Property& property);
    +
    68 
    +
    69  virtual void tearDown();
    +
    70 
    +
    71  virtual void run();
    +
    72 
    +
    73  bool goHome();
    +
    74  void setMode(int desired_mode);
    +
    75  bool saveToFile(const std::string &filename, const yarp::os::Bottle &b);
    +
    76 
    +
    77 private:
    +
    78  std::string robotName;
    +
    79  std::string partName;
    +
    80  yarp::sig::Vector jointsList;
    +
    81 
    +
    82  double tolerance;
    +
    83 
    +
    84  int n_part_joints;
    +
    85 
    +
    86  yarp::dev::PolyDriver *dd;
    +
    87  yarp::dev::IPositionControl *ipos;
    +
    88  yarp::dev::IControlMode *icmd;
    +
    89  yarp::dev::IInteractionMode *iimd;
    +
    90  yarp::dev::IEncoders *ienc;
    +
    91  yarp::dev::IMotorEncoders *imot;
    +
    92 
    +
    93  yarp::sig::Vector enc_jnt;
    +
    94  yarp::sig::Vector enc_mot;
    +
    95  yarp::sig::Vector home_enc_mot;
    +
    96  yarp::sig::Vector end_enc_mot;
    +
    97  yarp::sig::Vector err_enc_mot;
    +
    98 
    +
    99  int cycles;
    +
    100  yarp::sig::Vector max;
    +
    101  yarp::sig::Vector min;
    +
    102  yarp::sig::Vector home;
    +
    103  yarp::sig::Vector speed;
    +
    104 
    +
    105  bool plot; //if true, the test runs gnuplot utility at end of test.
    +
    106 };
    +
    107 
    +
    108 #endif //_opticalEncodersDRIFT_H
    +
    This tests checks if the relative encoders measurements are consistent over time, by performing cycli...
    +
    + + + + diff --git a/doxygen/doc/html/pages.html b/doxygen/doc/html/pages.html new file mode 100644 index 00000000..98342168 --- /dev/null +++ b/doxygen/doc/html/pages.html @@ -0,0 +1,85 @@ + + + + + + + +icub-test: Related Pages + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Related Pages
    +
    + + + + + diff --git a/doxygen/doc/html/plotDataPosition_8m_source.html b/doxygen/doc/html/plotDataPosition_8m_source.html new file mode 100644 index 00000000..2664db20 --- /dev/null +++ b/doxygen/doc/html/plotDataPosition_8m_source.html @@ -0,0 +1,110 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy/plotDataPosition.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    plotDataPosition.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 hold on;
    +
    20 data = load ('positionControlAccuracy_plot_head0.txt');
    +
    21 cycles = max(data(:,1));
    +
    22 for cyc=0:cycles;
    +
    23  cyc
    +
    24  vec = find(data(:,1)==cyc);
    +
    25  plot (data(vec,2), data(vec,3),'b');
    +
    26  plot (data(vec,2), data(vec,4),'r');
    +
    27 end
    +
    28 xlim ([-0.9 3]);
    +
    29 ylim ([-1 6]);
    +
    30 grid on;
    +
    + + + + diff --git a/doxygen/doc/html/plotDataTorque_8m_source.html b/doxygen/doc/html/plotDataTorque_8m_source.html new file mode 100644 index 00000000..345ec538 --- /dev/null +++ b/doxygen/doc/html/plotDataTorque_8m_source.html @@ -0,0 +1,108 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/torqueControl-accuracy/plotDataTorque.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    plotDataTorque.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 hold on;
    +
    20 data = load ('torqueControlAccuracy_plot_head0.txt');
    +
    21 cycles = max(data(:,1));
    +
    22 for cyc=0:cycles;
    +
    23  cyc
    +
    24  vec = find(data(:,1)==cyc);
    +
    25  plot (data(vec,2), data(vec,3),'b');
    +
    26  plot (data(vec,2), data(vec,4),'r');
    +
    27 end
    +
    28 xlim ([-0.9 3]);
    +
    29 ylim ([-1 6]);
    +
    30 grid on;
    +
    + + + + diff --git a/doxygen/doc/html/positionControl-accuracy-ExternalPid_2plotDataPosition_8m_source.html b/doxygen/doc/html/positionControl-accuracy-ExternalPid_2plotDataPosition_8m_source.html new file mode 100644 index 00000000..deb3e965 --- /dev/null +++ b/doxygen/doc/html/positionControl-accuracy-ExternalPid_2plotDataPosition_8m_source.html @@ -0,0 +1,108 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy-ExternalPid/plotDataPosition.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    plotDataPosition.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 hold on;
    +
    20 data = load ('positionControlAccuracy_plot_head0.txt');
    +
    21 cycles = max(data(:,1));
    +
    22 for cyc=0:cycles;
    +
    23  cyc
    +
    24  vec = find(data(:,1)==cyc);
    +
    25  plot (data(vec,2), data(vec,3),'b');
    +
    26  plot (data(vec,2), data(vec,4),'r');
    +
    27 end
    +
    28 xlim ([-0.9 3]);
    +
    29 ylim ([-1 6]);
    +
    30 grid on;
    +
    + + + + diff --git a/doxygen/doc/html/positionControl-accuracy_2plotDataPosition_8m_source.html b/doxygen/doc/html/positionControl-accuracy_2plotDataPosition_8m_source.html new file mode 100644 index 00000000..2bc96aff --- /dev/null +++ b/doxygen/doc/html/positionControl-accuracy_2plotDataPosition_8m_source.html @@ -0,0 +1,108 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/positionControl-accuracy/plotDataPosition.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    plotDataPosition.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 hold on;
    +
    20 data = load ('positionControlAccuracy_plot_head0.txt');
    +
    21 cycles = max(data(:,1));
    +
    22 for cyc=0:cycles;
    +
    23  cyc
    +
    24  vec = find(data(:,1)==cyc);
    +
    25  plot (data(vec,2), data(vec,3),'b');
    +
    26  plot (data(vec,2), data(vec,4),'r');
    +
    27 end
    +
    28 xlim ([-0.9 3]);
    +
    29 ylim ([-1 6]);
    +
    30 grid on;
    +
    + + + + diff --git a/doxygen/doc/html/search/all_0.html b/doxygen/doc/html/search/all_0.html new file mode 100644 index 00000000..1ec5b2d5 --- /dev/null +++ b/doxygen/doc/html/search/all_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_0.js b/doxygen/doc/html/search/all_0.js new file mode 100644 index 00000000..321a6c1a --- /dev/null +++ b/doxygen/doc/html/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['a_20list_20of_20available_20tests_0',['A list of available tests',['../group__icub-tests.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_1.html b/doxygen/doc/html/search/all_1.html new file mode 100644 index 00000000..9f80e904 --- /dev/null +++ b/doxygen/doc/html/search/all_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_1.js b/doxygen/doc/html/search/all_1.js new file mode 100644 index 00000000..a790758b --- /dev/null +++ b/doxygen/doc/html/search/all_1.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['cameratest_1',['CameraTest',['../classCameraTest.html',1,'']]], + ['cartesiancontrolreachingtolerancetest_2',['CartesianControlReachingToleranceTest',['../classCartesianControlReachingToleranceTest.html',1,'']]], + ['cartesiancontrolsimplep2pmovementtest_3',['CartesianControlSimpleP2pMovementTest',['../classCartesianControlSimpleP2pMovementTest.html',1,'']]], + ['controlmodes_4',['ControlModes',['../classControlModes.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_2.html b/doxygen/doc/html/search/all_2.html new file mode 100644 index 00000000..02cfffc2 --- /dev/null +++ b/doxygen/doc/html/search/all_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_2.js b/doxygen/doc/html/search/all_2.js new file mode 100644 index 00000000..7099d2d3 --- /dev/null +++ b/doxygen/doc/html/search/all_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['demoredballtest_5',['DemoRedBallTest',['../classDemoRedBallTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_3.html b/doxygen/doc/html/search/all_3.html new file mode 100644 index 00000000..39767b85 --- /dev/null +++ b/doxygen/doc/html/search/all_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_3.js b/doxygen/doc/html/search/all_3.js new file mode 100644 index 00000000..5535db8c --- /dev/null +++ b/doxygen/doc/html/search/all_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['exampletest_6',['ExampleTest',['../classExampleTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_4.html b/doxygen/doc/html/search/all_4.html new file mode 100644 index 00000000..fc40463c --- /dev/null +++ b/doxygen/doc/html/search/all_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_4.js b/doxygen/doc/html/search/all_4.js new file mode 100644 index 00000000..0006a68e --- /dev/null +++ b/doxygen/doc/html/search/all_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ftsensortest_7',['FtSensorTest',['../classFtSensorTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_5.html b/doxygen/doc/html/search/all_5.html new file mode 100644 index 00000000..9dd9344b --- /dev/null +++ b/doxygen/doc/html/search/all_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_5.js b/doxygen/doc/html/search/all_5.js new file mode 100644 index 00000000..8e91504d --- /dev/null +++ b/doxygen/doc/html/search/all_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gazecontrolsimplelooktest_8',['GazeControlSimpleLookTest',['../classGazeControlSimpleLookTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_6.html b/doxygen/doc/html/search/all_6.html new file mode 100644 index 00000000..f1e516d7 --- /dev/null +++ b/doxygen/doc/html/search/all_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_6.js b/doxygen/doc/html/search/all_6.js new file mode 100644 index 00000000..31ee117e --- /dev/null +++ b/doxygen/doc/html/search/all_6.js @@ -0,0 +1,11 @@ +var searchData= +[ + ['icub_20cartesian_2dcontrol_9',['iCub cartesian-control',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html',1,'']]], + ['icub_20gaze_2dcontrol_10',['iCub gaze-control',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html',1,'']]], + ['icub_20models_2dconsistency_11',['iCub models-consistency',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html',1,'']]], + ['icub_20skinwrapper_12',['iCub skinWrapper',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html',1,'']]], + ['icub_2dtests_13',['icub-tests',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html',1,'']]], + ['icub_2dtests_20main_20page_14',['iCub-tests main page',['../index.html',1,'']]], + ['imu_15',['Imu',['../classImu.html',1,'']]], + ['installation_20instructions_16',['Installation Instructions',['../installation.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_7.html b/doxygen/doc/html/search/all_7.html new file mode 100644 index 00000000..8ddbf6c8 --- /dev/null +++ b/doxygen/doc/html/search/all_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_7.js b/doxygen/doc/html/search/all_7.js new file mode 100644 index 00000000..c2ae42f0 --- /dev/null +++ b/doxygen/doc/html/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['jointlimits_17',['JointLimits',['../classJointLimits.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_8.html b/doxygen/doc/html/search/all_8.html new file mode 100644 index 00000000..83c55ae2 --- /dev/null +++ b/doxygen/doc/html/search/all_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_8.js b/doxygen/doc/html/search/all_8.js new file mode 100644 index 00000000..66ac0a7b --- /dev/null +++ b/doxygen/doc/html/search/all_8.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['motorencoderssigncheck_18',['MotorEncodersSignCheck',['../classMotorEncodersSignCheck.html',1,'']]], + ['motortest_19',['MotorTest',['../classMotorTest.html',1,'']]], + ['movementreferencestest_20',['MovementReferencesTest',['../classMovementReferencesTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_9.html b/doxygen/doc/html/search/all_9.html new file mode 100644 index 00000000..1e263c13 --- /dev/null +++ b/doxygen/doc/html/search/all_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_9.js b/doxygen/doc/html/search/all_9.js new file mode 100644 index 00000000..07d21e80 --- /dev/null +++ b/doxygen/doc/html/search/all_9.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['opticalencodersconsistency_21',['OpticalEncodersConsistency',['../classOpticalEncodersConsistency.html',1,'']]], + ['opticalencodersdrift_22',['OpticalEncodersDrift',['../classOpticalEncodersDrift.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_a.html b/doxygen/doc/html/search/all_a.html new file mode 100644 index 00000000..3a6cac10 --- /dev/null +++ b/doxygen/doc/html/search/all_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_a.js b/doxygen/doc/html/search/all_a.js new file mode 100644 index 00000000..473f2292 --- /dev/null +++ b/doxygen/doc/html/search/all_a.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['positioncontrolaccuracy_23',['PositionControlAccuracy',['../classPositionControlAccuracy.html',1,'']]], + ['positioncontrolaccuracyexernalpid_24',['PositionControlAccuracyExernalPid',['../classPositionControlAccuracyExernalPid.html',1,'']]], + ['positiondirect_25',['PositionDirect',['../classPositionDirect.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_b.html b/doxygen/doc/html/search/all_b.html new file mode 100644 index 00000000..130deb4e --- /dev/null +++ b/doxygen/doc/html/search/all_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_b.js b/doxygen/doc/html/search/all_b.js new file mode 100644 index 00000000..38cfc98f --- /dev/null +++ b/doxygen/doc/html/search/all_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['sensorsduplicatereadings_26',['SensorsDuplicateReadings',['../classSensorsDuplicateReadings.html',1,'']]], + ['skinwrappertest_27',['SkinWrapperTest',['../classSkinWrapperTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_c.html b/doxygen/doc/html/search/all_c.html new file mode 100644 index 00000000..3dd5af06 --- /dev/null +++ b/doxygen/doc/html/search/all_c.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_c.js b/doxygen/doc/html/search/all_c.js new file mode 100644 index 00000000..f2bb4123 --- /dev/null +++ b/doxygen/doc/html/search/all_c.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['torquecontrolaccuracy_28',['TorqueControlAccuracy',['../classTorqueControlAccuracy.html',1,'']]], + ['torquecontrolgravityconsistency_29',['TorqueControlGravityConsistency',['../classTorqueControlGravityConsistency.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/all_d.html b/doxygen/doc/html/search/all_d.html new file mode 100644 index 00000000..af7f2f0f --- /dev/null +++ b/doxygen/doc/html/search/all_d.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/all_d.js b/doxygen/doc/html/search/all_d.js new file mode 100644 index 00000000..21913c7d --- /dev/null +++ b/doxygen/doc/html/search/all_d.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['writing_20and_20running_20tests_30',['Writing and Running Tests',['../writing-and-running.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_0.html b/doxygen/doc/html/search/classes_0.html new file mode 100644 index 00000000..af8159ee --- /dev/null +++ b/doxygen/doc/html/search/classes_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_0.js b/doxygen/doc/html/search/classes_0.js new file mode 100644 index 00000000..569ea389 --- /dev/null +++ b/doxygen/doc/html/search/classes_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['cameratest_31',['CameraTest',['../classCameraTest.html',1,'']]], + ['cartesiancontrolreachingtolerancetest_32',['CartesianControlReachingToleranceTest',['../classCartesianControlReachingToleranceTest.html',1,'']]], + ['cartesiancontrolsimplep2pmovementtest_33',['CartesianControlSimpleP2pMovementTest',['../classCartesianControlSimpleP2pMovementTest.html',1,'']]], + ['controlmodes_34',['ControlModes',['../classControlModes.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_1.html b/doxygen/doc/html/search/classes_1.html new file mode 100644 index 00000000..576e9168 --- /dev/null +++ b/doxygen/doc/html/search/classes_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_1.js b/doxygen/doc/html/search/classes_1.js new file mode 100644 index 00000000..da2d50ea --- /dev/null +++ b/doxygen/doc/html/search/classes_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['demoredballtest_35',['DemoRedBallTest',['../classDemoRedBallTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_2.html b/doxygen/doc/html/search/classes_2.html new file mode 100644 index 00000000..956405e5 --- /dev/null +++ b/doxygen/doc/html/search/classes_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_2.js b/doxygen/doc/html/search/classes_2.js new file mode 100644 index 00000000..df3f1f30 --- /dev/null +++ b/doxygen/doc/html/search/classes_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['exampletest_36',['ExampleTest',['../classExampleTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_3.html b/doxygen/doc/html/search/classes_3.html new file mode 100644 index 00000000..d33343bc --- /dev/null +++ b/doxygen/doc/html/search/classes_3.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_3.js b/doxygen/doc/html/search/classes_3.js new file mode 100644 index 00000000..e372a7d2 --- /dev/null +++ b/doxygen/doc/html/search/classes_3.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['ftsensortest_37',['FtSensorTest',['../classFtSensorTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_4.html b/doxygen/doc/html/search/classes_4.html new file mode 100644 index 00000000..8430b07f --- /dev/null +++ b/doxygen/doc/html/search/classes_4.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_4.js b/doxygen/doc/html/search/classes_4.js new file mode 100644 index 00000000..e6a43ff2 --- /dev/null +++ b/doxygen/doc/html/search/classes_4.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['gazecontrolsimplelooktest_38',['GazeControlSimpleLookTest',['../classGazeControlSimpleLookTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_5.html b/doxygen/doc/html/search/classes_5.html new file mode 100644 index 00000000..c2f1b767 --- /dev/null +++ b/doxygen/doc/html/search/classes_5.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_5.js b/doxygen/doc/html/search/classes_5.js new file mode 100644 index 00000000..bc3a6f8c --- /dev/null +++ b/doxygen/doc/html/search/classes_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['imu_39',['Imu',['../classImu.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_6.html b/doxygen/doc/html/search/classes_6.html new file mode 100644 index 00000000..e39847ce --- /dev/null +++ b/doxygen/doc/html/search/classes_6.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_6.js b/doxygen/doc/html/search/classes_6.js new file mode 100644 index 00000000..c168d7f4 --- /dev/null +++ b/doxygen/doc/html/search/classes_6.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['jointlimits_40',['JointLimits',['../classJointLimits.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_7.html b/doxygen/doc/html/search/classes_7.html new file mode 100644 index 00000000..a2c4d1a3 --- /dev/null +++ b/doxygen/doc/html/search/classes_7.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_7.js b/doxygen/doc/html/search/classes_7.js new file mode 100644 index 00000000..ed275ab5 --- /dev/null +++ b/doxygen/doc/html/search/classes_7.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['motorencoderssigncheck_41',['MotorEncodersSignCheck',['../classMotorEncodersSignCheck.html',1,'']]], + ['motortest_42',['MotorTest',['../classMotorTest.html',1,'']]], + ['movementreferencestest_43',['MovementReferencesTest',['../classMovementReferencesTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_8.html b/doxygen/doc/html/search/classes_8.html new file mode 100644 index 00000000..17003e48 --- /dev/null +++ b/doxygen/doc/html/search/classes_8.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_8.js b/doxygen/doc/html/search/classes_8.js new file mode 100644 index 00000000..b5f10b09 --- /dev/null +++ b/doxygen/doc/html/search/classes_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['opticalencodersconsistency_44',['OpticalEncodersConsistency',['../classOpticalEncodersConsistency.html',1,'']]], + ['opticalencodersdrift_45',['OpticalEncodersDrift',['../classOpticalEncodersDrift.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_9.html b/doxygen/doc/html/search/classes_9.html new file mode 100644 index 00000000..b8afa8cb --- /dev/null +++ b/doxygen/doc/html/search/classes_9.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_9.js b/doxygen/doc/html/search/classes_9.js new file mode 100644 index 00000000..67eef421 --- /dev/null +++ b/doxygen/doc/html/search/classes_9.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['positioncontrolaccuracy_46',['PositionControlAccuracy',['../classPositionControlAccuracy.html',1,'']]], + ['positioncontrolaccuracyexernalpid_47',['PositionControlAccuracyExernalPid',['../classPositionControlAccuracyExernalPid.html',1,'']]], + ['positiondirect_48',['PositionDirect',['../classPositionDirect.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_a.html b/doxygen/doc/html/search/classes_a.html new file mode 100644 index 00000000..6788af27 --- /dev/null +++ b/doxygen/doc/html/search/classes_a.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_a.js b/doxygen/doc/html/search/classes_a.js new file mode 100644 index 00000000..437d31dc --- /dev/null +++ b/doxygen/doc/html/search/classes_a.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['sensorsduplicatereadings_49',['SensorsDuplicateReadings',['../classSensorsDuplicateReadings.html',1,'']]], + ['skinwrappertest_50',['SkinWrapperTest',['../classSkinWrapperTest.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/classes_b.html b/doxygen/doc/html/search/classes_b.html new file mode 100644 index 00000000..3fcb4985 --- /dev/null +++ b/doxygen/doc/html/search/classes_b.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/classes_b.js b/doxygen/doc/html/search/classes_b.js new file mode 100644 index 00000000..fa19e9c4 --- /dev/null +++ b/doxygen/doc/html/search/classes_b.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['torquecontrolaccuracy_51',['TorqueControlAccuracy',['../classTorqueControlAccuracy.html',1,'']]], + ['torquecontrolgravityconsistency_52',['TorqueControlGravityConsistency',['../classTorqueControlGravityConsistency.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/close.png b/doxygen/doc/html/search/close.png new file mode 100644 index 0000000000000000000000000000000000000000..9342d3dfeea7b7c4ee610987e717804b5a42ceb9 GIT binary patch literal 273 zcmV+s0q*{ZP)4(RlMby96)VwnbG{ zbe&}^BDn7x>$<{ck4zAK-=nT;=hHG)kmplIF${xqm8db3oX6wT3bvp`TE@m0cg;b) zBuSL}5?N7O(iZLdAlz@)b)Rd~DnSsSX&P5qC`XwuFwcAYLC+d2>+1(8on;wpt8QIC X2MT$R4iQDd00000NkvXXu0mjfia~GN literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/search/close.svg b/doxygen/doc/html/search/close.svg new file mode 100644 index 00000000..a933eea1 --- /dev/null +++ b/doxygen/doc/html/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/doxygen/doc/html/search/groups_0.html b/doxygen/doc/html/search/groups_0.html new file mode 100644 index 00000000..c600b497 --- /dev/null +++ b/doxygen/doc/html/search/groups_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/groups_0.js b/doxygen/doc/html/search/groups_0.js new file mode 100644 index 00000000..8de9a25b --- /dev/null +++ b/doxygen/doc/html/search/groups_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['a_20list_20of_20available_20tests_53',['A list of available tests',['../group__icub-tests.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/mag_sel.png b/doxygen/doc/html/search/mag_sel.png new file mode 100644 index 0000000000000000000000000000000000000000..39c0ed52a25dd9d080ee0d42ae6c6042bdfa04d7 GIT binary patch literal 465 zcmeAS@N?(olHy`uVBq!ia0vp^B0wz6!2%?$TA$hhDVB6cUq=Rpjs4tz5?O(Kg=CK) zUj~NU84L`?eGCi_EEpJ?t}-xGu`@87+QPtK?83kxQ`TapwHK(CDaqU2h2ejD|C#+j z9%q3^WHAE+w=f7ZGR&GI0Tg5}@$_|Nf5gMiEhFgvHvB$N=!mC_V~EE2vzPXI9ZnEo zd+1zHor@dYLod2Y{ z@R$7$Z!PXTbY$|@#T!bMzm?`b<(R`cbw(gxJHzu zB$lLFB^RXvDF!10LknF)BV7aY5JN*NBMU1-b8Q0yD+2>vd*|CI8glbfGSez?Ylunu RoetE%;OXk;vd$@?2>>CYplSdB literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/search/mag_sel.svg b/doxygen/doc/html/search/mag_sel.svg new file mode 100644 index 00000000..03626f64 --- /dev/null +++ b/doxygen/doc/html/search/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/doxygen/doc/html/search/nomatches.html b/doxygen/doc/html/search/nomatches.html new file mode 100644 index 00000000..2b9360b6 --- /dev/null +++ b/doxygen/doc/html/search/nomatches.html @@ -0,0 +1,13 @@ + + + + + + + + +
    +
    No Matches
    +
    + + diff --git a/doxygen/doc/html/search/pages_0.html b/doxygen/doc/html/search/pages_0.html new file mode 100644 index 00000000..8517b48f --- /dev/null +++ b/doxygen/doc/html/search/pages_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/pages_0.js b/doxygen/doc/html/search/pages_0.js new file mode 100644 index 00000000..d2c06ec6 --- /dev/null +++ b/doxygen/doc/html/search/pages_0.js @@ -0,0 +1,10 @@ +var searchData= +[ + ['icub_20cartesian_2dcontrol_54',['iCub cartesian-control',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.html',1,'']]], + ['icub_20gaze_2dcontrol_55',['iCub gaze-control',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.html',1,'']]], + ['icub_20models_2dconsistency_56',['iCub models-consistency',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.html',1,'']]], + ['icub_20skinwrapper_57',['iCub skinWrapper',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.html',1,'']]], + ['icub_2dtests_58',['icub-tests',['../md__home_runner_work_icub_tests_icub_tests_gh_pages_README.html',1,'']]], + ['icub_2dtests_20main_20page_59',['iCub-tests main page',['../index.html',1,'']]], + ['installation_20instructions_60',['Installation Instructions',['../installation.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/pages_1.html b/doxygen/doc/html/search/pages_1.html new file mode 100644 index 00000000..a0fb6796 --- /dev/null +++ b/doxygen/doc/html/search/pages_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/pages_1.js b/doxygen/doc/html/search/pages_1.js new file mode 100644 index 00000000..dcfc725b --- /dev/null +++ b/doxygen/doc/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['writing_20and_20running_20tests_61',['Writing and Running Tests',['../writing-and-running.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/search.css b/doxygen/doc/html/search/search.css new file mode 100644 index 00000000..9074198f --- /dev/null +++ b/doxygen/doc/html/search/search.css @@ -0,0 +1,257 @@ +/*---------------- Search Box */ + +#MSearchBox { + white-space : nowrap; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; + z-index: 102; +} + +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; +} + +#MSearchSelect { + display: inline-block; + vertical-align: middle; + height: 1.4em; + padding: 0 0 0 0.3em; + margin: 0; +} + +#MSearchField { + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 1.1em; + margin: 0 0.15em; + padding: 0; + line-height: 1em; + border:none; + color: #909090; + outline: none; + font-family: Arial, Verdana, sans-serif; + -webkit-border-radius: 0px; + border-radius: 0px; + background: none; +} + + +#MSearchBox .right { + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; +} + +#MSearchClose { + display: none; + font-size: inherit; + background : none; + border: none; + margin: 0; + padding: 0; + outline: none; + +} + +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; +} + +.MSearchBoxActive #MSearchField { + color: #000000; +} + +#main-menu > li:last-child { + /* This
  • object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + +/*---------------- Search filter selection */ + +#MSearchSelectWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #90A5CE; + background-color: #F9FAFC; + z-index: 10001; + padding-top: 4px; + padding-bottom: 4px; + -moz-border-radius: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.SelectItem { + font: 8pt Arial, Verdana, sans-serif; + padding-left: 2px; + padding-right: 12px; + border: 0px; +} + +span.SelectionMark { + margin-right: 4px; + font-family: monospace; + outline-style: none; + text-decoration: none; +} + +a.SelectItem { + display: block; + outline-style: none; + color: #000000; + text-decoration: none; + padding-left: 6px; + padding-right: 12px; +} + +a.SelectItem:focus, +a.SelectItem:active { + color: #000000; + outline-style: none; + text-decoration: none; +} + +a.SelectItem:hover { + color: #FFFFFF; + background-color: #3D578C; + outline-style: none; + text-decoration: none; + cursor: pointer; + display: block; +} + +/*---------------- Search results window */ + +iframe#MSearchResults { + width: 60ex; + height: 15em; +} + +#MSearchResultsWindow { + display: none; + position: absolute; + left: 0; top: 0; + border: 1px solid #000; + background-color: #EEF1F7; + z-index:10000; +} + +/* ----------------------------------- */ + + +#SRIndex { + clear:both; + padding-bottom: 15px; +} + +.SREntry { + font-size: 10pt; + padding-left: 1ex; +} + +.SRPage .SREntry { + font-size: 8pt; + padding: 1px 5px; +} + +body.SRPage { + margin: 5px 2px; +} + +.SRChildren { + padding-left: 3ex; padding-bottom: .5em +} + +.SRPage .SRChildren { + display: none; +} + +.SRSymbol { + font-weight: bold; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRScope { + display: block; + color: #425E97; + font-family: Arial, Verdana, sans-serif; + text-decoration: none; + outline: none; +} + +a.SRSymbol:focus, a.SRSymbol:active, +a.SRScope:focus, a.SRScope:active { + text-decoration: underline; +} + +span.SRScope { + padding-left: 4px; + font-family: Arial, Verdana, sans-serif; +} + +.SRPage .SRStatus { + padding: 2px 5px; + font-size: 8pt; + font-style: italic; + font-family: Arial, Verdana, sans-serif; +} + +.SRResult { + display: none; +} + +div.searchresults { + margin-left: 10px; + margin-right: 10px; +} + +/*---------------- External search page results */ + +.searchresult { + background-color: #F0F3F8; +} + +.pages b { + color: white; + padding: 5px 5px 3px 5px; + background-image: url("../tab_a.png"); + background-repeat: repeat-x; + text-shadow: 0 1px 1px #000000; +} + +.pages { + line-height: 17px; + margin-left: 4px; + text-decoration: none; +} + +.hl { + font-weight: bold; +} + +#searchresults { + margin-bottom: 20px; +} + +.searchpages { + margin-top: 10px; +} + diff --git a/doxygen/doc/html/search/search.js b/doxygen/doc/html/search/search.js new file mode 100644 index 00000000..fb226f73 --- /dev/null +++ b/doxygen/doc/html/search/search.js @@ -0,0 +1,816 @@ +/* + @licstart The following is the entire license notice for the JavaScript code in this file. + + The MIT License (MIT) + + Copyright (C) 1997-2020 by Dimitri van Heesch + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software + and associated documentation files (the "Software"), to deal in the Software without restriction, + including without limitation the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING + BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + @licend The above is the entire license notice for the JavaScript code in this file + */ +function convertToId(search) +{ + var result = ''; + for (i=0;i do a search + { + this.Search(); + } + } + + this.OnSearchSelectKey = function(evt) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==40 && this.searchIndex0) // Up + { + this.searchIndex--; + this.OnSelectItem(this.searchIndex); + } + else if (e.keyCode==13 || e.keyCode==27) + { + this.OnSelectItem(this.searchIndex); + this.CloseSelectionWindow(); + this.DOMSearchField().focus(); + } + return false; + } + + // --------- Actions + + // Closes the results window. + this.CloseResultsWindow = function() + { + this.DOMPopupSearchResultsWindow().style.display = 'none'; + this.DOMSearchClose().style.display = 'none'; + this.Activate(false); + } + + this.CloseSelectionWindow = function() + { + this.DOMSearchSelectWindow().style.display = 'none'; + } + + // Performs a search. + this.Search = function() + { + this.keyTimeout = 0; + + // strip leading whitespace + var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); + + var code = searchValue.toLowerCase().charCodeAt(0); + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair + { + idxChar = searchValue.substr(0, 2); + } + + var resultsPage; + var resultsPageWithSearch; + var hasResultsPage; + + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) + { + var hexCode=idx.toString(16); + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPageWithSearch = resultsPage+'?'+escape(searchValue); + hasResultsPage = true; + } + else // nothing available for this search term + { + resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPageWithSearch = resultsPage; + hasResultsPage = false; + } + + window.frames.MSearchResults.location = resultsPageWithSearch; + var domPopupSearchResultsWindow = this.DOMPopupSearchResultsWindow(); + + if (domPopupSearchResultsWindow.style.display!='block') + { + var domSearchBox = this.DOMSearchBox(); + this.DOMSearchClose().style.display = 'inline-block'; + if (this.insideFrame) + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + domPopupSearchResultsWindow.style.position = 'relative'; + domPopupSearchResultsWindow.style.display = 'block'; + var width = document.body.clientWidth - 8; // the -8 is for IE :-( + domPopupSearchResultsWindow.style.width = width + 'px'; + domPopupSearchResults.style.width = width + 'px'; + } + else + { + var domPopupSearchResults = this.DOMPopupSearchResults(); + var left = getXPos(domSearchBox) + 150; // domSearchBox.offsetWidth; + var top = getYPos(domSearchBox) + 20; // domSearchBox.offsetHeight + 1; + domPopupSearchResultsWindow.style.display = 'block'; + left -= domPopupSearchResults.offsetWidth; + domPopupSearchResultsWindow.style.top = top + 'px'; + domPopupSearchResultsWindow.style.left = left + 'px'; + } + } + + this.lastSearchValue = searchValue; + this.lastResultsPage = resultsPage; + } + + // -------- Activation Functions + + // Activates or deactivates the search panel, resetting things to + // their default values if necessary. + this.Activate = function(isActive) + { + if (isActive || // open it + this.DOMPopupSearchResultsWindow().style.display == 'block' + ) + { + this.DOMSearchBox().className = 'MSearchBoxActive'; + + var searchField = this.DOMSearchField(); + + if (searchField.value == this.searchLabel) // clear "Search" term upon entry + { + searchField.value = ''; + this.searchActive = true; + } + } + else if (!isActive) // directly remove the panel + { + this.DOMSearchBox().className = 'MSearchBoxInactive'; + this.DOMSearchField().value = this.searchLabel; + this.searchActive = false; + this.lastSearchValue = '' + this.lastResultsPage = ''; + } + } +} + +// ----------------------------------------------------------------------- + +// The class that handles everything on the search results page. +function SearchResults(name) +{ + // The number of matches from the last run of . + this.lastMatchCount = 0; + this.lastKey = 0; + this.repeatOn = false; + + // Toggles the visibility of the passed element ID. + this.FindChildElement = function(id) + { + var parentElement = document.getElementById(id); + var element = parentElement.firstChild; + + while (element && element!=parentElement) + { + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + { + return element; + } + + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + { + element = element.firstChild; + } + else if (element.nextSibling) + { + element = element.nextSibling; + } + else + { + do + { + element = element.parentNode; + } + while (element && element!=parentElement && !element.nextSibling); + + if (element && element!=parentElement) + { + element = element.nextSibling; + } + } + } + } + + this.Toggle = function(id) + { + var element = this.FindChildElement(id); + if (element) + { + if (element.style.display == 'block') + { + element.style.display = 'none'; + } + else + { + element.style.display = 'block'; + } + } + } + + // Searches for the passed string. If there is no parameter, + // it takes it from the URL query. + // + // Always returns true, since other documents may try to call it + // and that may or may not be possible. + this.Search = function(search) + { + if (!search) // get search word from URL + { + search = window.location.search; + search = search.substring(1); // Remove the leading '?' + search = unescape(search); + } + + search = search.replace(/^ +/, ""); // strip leading spaces + search = search.replace(/ +$/, ""); // strip trailing spaces + search = search.toLowerCase(); + search = convertToId(search); + + var resultRows = document.getElementsByTagName("div"); + var matches = 0; + + var i = 0; + while (i < resultRows.length) + { + var row = resultRows.item(i); + if (row.className == "SRResult") + { + var rowMatchName = row.id.toLowerCase(); + rowMatchName = rowMatchName.replace(/^sr\d*_/, ''); // strip 'sr123_' + + if (search.length<=rowMatchName.length && + rowMatchName.substr(0, search.length)==search) + { + row.style.display = 'block'; + matches++; + } + else + { + row.style.display = 'none'; + } + } + i++; + } + document.getElementById("Searching").style.display='none'; + if (matches == 0) // no results + { + document.getElementById("NoMatches").style.display='block'; + } + else // at least one result + { + document.getElementById("NoMatches").style.display='none'; + } + this.lastMatchCount = matches; + return true; + } + + // return the first item with index index or higher that is visible + this.NavNext = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index++; + } + return focusItem; + } + + this.NavPrev = function(index) + { + var focusItem; + while (1) + { + var focusName = 'Item'+index; + focusItem = document.getElementById(focusName); + if (focusItem && focusItem.parentNode.parentNode.style.display=='block') + { + break; + } + else if (!focusItem) // last element + { + break; + } + focusItem=null; + index--; + } + return focusItem; + } + + this.ProcessKeys = function(e) + { + if (e.type == "keydown") + { + this.repeatOn = false; + this.lastKey = e.keyCode; + } + else if (e.type == "keypress") + { + if (!this.repeatOn) + { + if (this.lastKey) this.repeatOn = true; + return false; // ignore first keypress after keydown + } + } + else if (e.type == "keyup") + { + this.lastKey = 0; + this.repeatOn = false; + } + return this.lastKey!=0; + } + + this.Nav = function(evt,itemIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + var newIndex = itemIndex-1; + var focusItem = this.NavPrev(newIndex); + if (focusItem) + { + var child = this.FindChildElement(focusItem.parentNode.parentNode.id); + if (child && child.style.display == 'block') // children visible + { + var n=0; + var tmpElem; + while (1) // search for last child + { + tmpElem = document.getElementById('Item'+newIndex+'_c'+n); + if (tmpElem) + { + focusItem = tmpElem; + } + else // found it! + { + break; + } + n++; + } + } + } + if (focusItem) + { + focusItem.focus(); + } + else // return focus to search field + { + parent.document.getElementById("MSearchField").focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = itemIndex+1; + var focusItem; + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem && elem.style.display == 'block') // children visible + { + focusItem = document.getElementById('Item'+itemIndex+'_c0'); + } + if (!focusItem) focusItem = this.NavNext(newIndex); + if (focusItem) focusItem.focus(); + } + else if (this.lastKey==39) // Right + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'block'; + } + else if (this.lastKey==37) // Left + { + var item = document.getElementById('Item'+itemIndex); + var elem = this.FindChildElement(item.parentNode.parentNode.id); + if (elem) elem.style.display = 'none'; + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } + + this.NavChild = function(evt,itemIndex,childIndex) + { + var e = (evt) ? evt : window.event; // for IE + if (e.keyCode==13) return true; + if (!this.ProcessKeys(e)) return false; + + if (this.lastKey==38) // Up + { + if (childIndex>0) + { + var newIndex = childIndex-1; + document.getElementById('Item'+itemIndex+'_c'+newIndex).focus(); + } + else // already at first child, jump to parent + { + document.getElementById('Item'+itemIndex).focus(); + } + } + else if (this.lastKey==40) // Down + { + var newIndex = childIndex+1; + var elem = document.getElementById('Item'+itemIndex+'_c'+newIndex); + if (!elem) // last child, jump to parent next parent + { + elem = this.NavNext(itemIndex+1); + } + if (elem) + { + elem.focus(); + } + } + else if (this.lastKey==27) // Escape + { + parent.searchBox.CloseResultsWindow(); + parent.document.getElementById("MSearchField").focus(); + } + else if (this.lastKey==13) // Enter + { + return true; + } + return false; + } +} + +function setKeyActions(elem,action) +{ + elem.setAttribute('onkeydown',action); + elem.setAttribute('onkeypress',action); + elem.setAttribute('onkeyup',action); +} + +function setClassAttr(elem,attr) +{ + elem.setAttribute('class',attr); + elem.setAttribute('className',attr); +} + +function createResults() +{ + var results = document.getElementById("SRResults"); + for (var e=0; e(R!W8j_r#qQ#gnr4kAxdU#F0+OBry$Z+ z_0PMi;P|#{d%mw(dnw=jM%@$onTJa%@6Nm3`;2S#nwtVFJI#`U@2Q@@JCCctagvF- z8H=anvo~dTmJ2YA%wA6IHRv%{vxvUm|R)kgZeo zmX%Zb;mpflGZdXCTAgit`||AFzkI#z&(3d4(htA?U2FOL4WF6wY&TB#n3n*I4+hl| z*NBpo#FA92vEu822WQ%mvv4FO#qs` BFGc_W literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/search/search_r.png b/doxygen/doc/html/search/search_r.png new file mode 100644 index 0000000000000000000000000000000000000000..1af5d21ee13e070d7600f1c4657fde843b953a69 GIT binary patch literal 553 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9c!2%@BXHTsJQY`6?zK#qG8~eHcB(ehe3dtTp zz6=bxGZ+|(`xqD=STHa&U1eaXVrO7DwS|Gf*oA>XrmV$GYcEhOQT(QLuS{~ooZ2P@v=Xc@RKW@Irliv8_;wroU0*)0O?temdsA~70jrdux+`@W7 z-N(<(C)L?hOO?KV{>8(jC{hpKsws)#Fh zvsO>IB+gb@b+rGWaO&!a9Z{!U+fV*s7TS>fdt&j$L%^U@Epd$~Nl7e8wMs5Z1yT$~ z28I^8hDN#u<{^fLRz?<9hUVG^237_Jy7tbuQ8eV{r(~v8;?@w8^gA7>fx*+&&t;uc GLK6VEQpiUD literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/search/searchdata.js b/doxygen/doc/html/search/searchdata.js new file mode 100644 index 00000000..1a967b61 --- /dev/null +++ b/doxygen/doc/html/search/searchdata.js @@ -0,0 +1,24 @@ +var indexSectionsWithContent = +{ + 0: "acdefgijmopstw", + 1: "cdefgijmopst", + 2: "a", + 3: "iw" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "groups", + 3: "pages" +}; + +var indexSectionLabels = +{ + 0: "All", + 1: "Data Structures", + 2: "Modules", + 3: "Pages" +}; + diff --git a/doxygen/doc/html/splitbar.png b/doxygen/doc/html/splitbar.png new file mode 100644 index 0000000000000000000000000000000000000000..fe895f2c58179b471a22d8320b39a4bd7312ec8e GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^Yzz!63>-{AmhX=Jf(#6djGiuzAr*{o?=JLmPLyc> z_*`QK&+BH@jWrYJ7>r6%keRM@)Qyv8R=enp0jiI>aWlGyB58O zFVR20d+y`K7vDw(hJF3;>dD*3-?v=<8M)@x|EEGLnJsniYK!2U1 Y!`|5biEc?d1`HDhPgg&ebxsLQ02F6;9RL6T literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/src_2cartesian-control_2README_8md_source.html b/doxygen/doc/html/src_2cartesian-control_2README_8md_source.html new file mode 100644 index 00000000..889597d1 --- /dev/null +++ b/doxygen/doc/html/src_2cartesian-control_2README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/README.md Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    /home/runner/work/icub-tests/icub-tests/gh-pages/src/cartesian-control/README.md
    +
    +
    +
    1 iCub cartesian-control
    2 ======================
    3 
    4 Set of tests meant to verify the functionality of the [**Cartesian Control**](http://wiki.icub.org/iCub/main/dox/html/icub_cartesian_interface.html)
    5 component.
    6 
    7 ### Available tests
    8 
    9 - [`simple-p2p-movement`](https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/simple-p2p-movement).
    10 - [`reaching-tolerance`](https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/reaching-tolerance).
    + + + + diff --git a/doxygen/doc/html/src_2gaze-control_2README_8md_source.html b/doxygen/doc/html/src_2gaze-control_2README_8md_source.html new file mode 100644 index 00000000..8cc3131c --- /dev/null +++ b/doxygen/doc/html/src_2gaze-control_2README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control/README.md Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    /home/runner/work/icub-tests/icub-tests/gh-pages/src/gaze-control/README.md
    +
    +
    +
    1 iCub gaze-control
    2 ======================
    3 
    4 Set of tests meant to verify the functionality of the [**Gaze Control**](http://wiki.icub.org/iCub/main/dox/html/icub_gaze_interface.html)
    5 component.
    6 
    7 ### Available tests
    8 
    9 - [`simple-look`](https://github.com/robotology/icub-tests/blob/master/src/gaze-control/simple-look).
    + + + + diff --git a/doxygen/doc/html/src_2models-consistency_2README_8md_source.html b/doxygen/doc/html/src_2models-consistency_2README_8md_source.html new file mode 100644 index 00000000..298f6e15 --- /dev/null +++ b/doxygen/doc/html/src_2models-consistency_2README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/models-consistency/README.md Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    /home/runner/work/icub-tests/icub-tests/gh-pages/src/models-consistency/README.md
    +
    +
    +
    1 iCub models-consistency
    2 ======================
    3 
    4 Set of tests meant to ensure consistency in kinematics model used
    5 in iCub.
    6 
    7 ikin-idyn-consistency
    8 ---------------------
    9 This test will check that the end effector transforms (for the two hands and the two feet)
    10 provided by the iKin chains and the iDyn iCubWholeBody object are consistent. While iDyn
    11 is being discontinued, this check is important because URDF models for some model of iCub
    12 (for example iCub v1) are generated from iDyn models.
    + + + + diff --git a/doxygen/doc/html/src_2skinWrapperTest_2README_8md_source.html b/doxygen/doc/html/src_2skinWrapperTest_2README_8md_source.html new file mode 100644 index 00000000..1a2dfe06 --- /dev/null +++ b/doxygen/doc/html/src_2skinWrapperTest_2README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/README.md Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    /home/runner/work/icub-tests/icub-tests/gh-pages/src/skinWrapperTest/README.md
    +
    +
    +
    1 iCub skinWrapper
    2 ================
    3 
    4 Set of tests meant to verify the functionality of the [**Skin Wrapper**](http://wiki.icub.org/iCub/main/dox/html/classskinWrapper.html)
    5 component after its cleaning and after the removal of AnalogServer from icub-main.
    6 
    7 Usage
    8 -----
    9 `robottestingframework-testrunner -v -s /icub-tests/suites/skinWrapper-YarpPluginFixture.xml`
    10 
    + + + + diff --git a/doxygen/doc/html/sync_off.png b/doxygen/doc/html/sync_off.png new file mode 100644 index 0000000000000000000000000000000000000000..3b443fc62892114406e3d399421b2a881b897acc GIT binary patch literal 853 zcmV-b1FHOqP)oT|#XixUYy%lpuf3i8{fX!o zUyDD0jOrAiT^tq>fLSOOABs-#u{dV^F$b{L9&!2=9&RmV;;8s^x&UqB$PCj4FdKbh zoB1WTskPUPu05XzFbA}=KZ-GP1fPpAfSs>6AHb12UlR%-i&uOlTpFNS7{jm@mkU1V zh`nrXr~+^lsV-s1dkZOaI|kYyVj3WBpPCY{n~yd%u%e+d=f%`N0FItMPtdgBb@py; zq@v6NVArhyTC7)ULw-Jy8y42S1~4n(3LkrW8mW(F-4oXUP3E`e#g**YyqI7h-J2zK zK{m9##m4ri!7N>CqQqCcnI3hqo1I;Yh&QLNY4T`*ptiQGozK>FF$!$+84Z`xwmeMh zJ0WT+OH$WYFALEaGj2_l+#DC3t7_S`vHpSivNeFbP6+r50cO8iu)`7i%Z4BTPh@_m3Tk!nAm^)5Bqnr%Ov|Baunj#&RPtRuK& z4RGz|D5HNrW83-#ydk}tVKJrNmyYt-sTxLGlJY5nc&Re zU4SgHNPx8~Yxwr$bsju?4q&%T1874xxzq+_%?h8_ofw~(bld=o3iC)LUNR*BY%c0y zWd_jX{Y8`l%z+ol1$@Qa?Cy!(0CVIEeYpKZ`(9{z>3$CIe;pJDQk$m3p}$>xBm4lb zKo{4S)`wdU9Ba9jJbVJ0C=SOefZe%d$8=2r={nu<_^a3~>c#t_U6dye5)JrR(_a^E f@}b6j1K9lwFJq@>o)+Ry00000NkvXXu0mjfWa5j* literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/sync_on.png b/doxygen/doc/html/sync_on.png new file mode 100644 index 0000000000000000000000000000000000000000..e08320fb64e6fa33b573005ed6d8fe294e19db76 GIT binary patch literal 845 zcmV-T1G4;yP)Y;xxyHF2B5Wzm| zOOGupOTn@c(JmBOl)e;XMNnZuiTJP>rM8<|Q`7I_))aP?*T)ow&n59{}X4$3Goat zgjs?*aasfbrokzG5cT4K=uG`E14xZl@z)F={P0Y^?$4t z>v!teRnNZym<6h{7sLyF1V0HsfEl+l6TrZpsfr1}luH~F7L}ktXu|*uVX^RG$L0`K zWs3j|0tIvVe(N%_?2{(iCPFGf#B6Hjy6o&}D$A%W%jfO8_W%ZO#-mh}EM$LMn7joJ z05dHr!5Y92g+31l<%i1(=L1a1pXX+OYnalY>31V4K}BjyRe3)9n#;-cCVRD_IG1fT zOKGeNY8q;TL@K{dj@D^scf&VCs*-Jb>8b>|`b*osv52-!A?BpbYtTQBns5EAU**$m zSnVSm(teh>tQi*S*A>#ySc=n;`BHz`DuG4&g4Kf8lLhca+zvZ7t7RflD6-i-mcK=M z!=^P$*u2)bkY5asG4gsss!Hn%u~>}kIW`vMs%lJLH+u*9<4PaV_c6U`KqWXQH%+Nu zTv41O(^ZVi@qhjQdG!fbZw&y+2o!iYymO^?ud3{P*HdoX83YV*Uu_HB=?U&W9%AU# z80}k1SS-CXTU7dcQlsm<^oYLxVSseqY6NO}dc`Nj?8vrhNuCdm@^{a3AQ_>6myOj+ z`1RsLUXF|dm|3k7s2jD(B{rzE>WI2scH8i1;=O5Cc9xB3^aJk%fQjqsu+kH#0=_5a z0nCE8@dbQa-|YIuUVvG0L_IwHMEhOj$Mj4Uq05 X8=0q~qBNan00000NkvXXu0mjfptF>5 literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/tab_a.png b/doxygen/doc/html/tab_a.png new file mode 100644 index 0000000000000000000000000000000000000000..3b725c41c5a527a3a3e40097077d0e206a681247 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QlXwMjv*C{Z|8b*H5dputLHD# z=<0|*y7z(Vor?d;H&?EG&cXR}?!j-Lm&u1OOI7AIF5&c)RFE;&p0MYK>*Kl@eiymD r@|NpwKX@^z+;{u_Z~trSBfrMKa%3`zocFjEXaR$#tDnm{r-UW|TZ1%4 literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/tab_b.png b/doxygen/doc/html/tab_b.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b4a8638cb3496a016eaed9e16ffc12846dea18 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^j6kfy!2~3aiye;!QU#tajv*C{Z}0l@H7kg?K0Lnr z!j&C6_(~HV9oQ0Pa6x{-v0AGV_E?vLn=ZI-;YrdjIl`U`uzuDWSP?o#Dmo{%SgM#oan kX~E1%D-|#H#QbHoIja2U-MgvsK&LQxy85}Sb4q9e0Efg%P5=M^ literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/tabs.css b/doxygen/doc/html/tabs.css new file mode 100644 index 00000000..7d45d36c --- /dev/null +++ b/doxygen/doc/html/tabs.css @@ -0,0 +1 @@ +.sm{position:relative;z-index:9999}.sm,.sm ul,.sm li{display:block;list-style:none;margin:0;padding:0;line-height:normal;direction:ltr;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0)}.sm-rtl,.sm-rtl ul,.sm-rtl li{direction:rtl;text-align:right}.sm>li>h1,.sm>li>h2,.sm>li>h3,.sm>li>h4,.sm>li>h5,.sm>li>h6{margin:0;padding:0}.sm ul{display:none}.sm li,.sm a{position:relative}.sm a{display:block}.sm a.disabled{cursor:not-allowed}.sm:after{content:"\00a0";display:block;height:0;font:0px/0 serif;clear:both;visibility:hidden;overflow:hidden}.sm,.sm *,.sm *:before,.sm *:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.sm-dox{background-image:url("tab_b.png")}.sm-dox a,.sm-dox a:focus,.sm-dox a:hover,.sm-dox a:active{padding:0px 12px;padding-right:43px;font-family:"Lucida Grande","Geneva","Helvetica",Arial,sans-serif;font-size:13px;font-weight:bold;line-height:36px;text-decoration:none;text-shadow:0px 1px 1px rgba(255,255,255,0.9);color:#283A5D;outline:none}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a.current{color:#D23600}.sm-dox a.disabled{color:#bbb}.sm-dox a span.sub-arrow{position:absolute;top:50%;margin-top:-14px;left:auto;right:3px;width:28px;height:28px;overflow:hidden;font:bold 12px/28px monospace !important;text-align:center;text-shadow:none;background:rgba(255,255,255,0.5);border-radius:5px}.sm-dox a.highlighted span.sub-arrow:before{display:block;content:'-'}.sm-dox>li:first-child>a,.sm-dox>li:first-child>:not(ul) a{border-radius:5px 5px 0 0}.sm-dox>li:last-child>a,.sm-dox>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul{border-radius:0 0 5px 5px}.sm-dox>li:last-child>a.highlighted,.sm-dox>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>a.highlighted,.sm-dox>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>ul>li:last-child>*:not(ul) a.highlighted{border-radius:0}.sm-dox ul{background:rgba(162,162,162,0.1)}.sm-dox ul a,.sm-dox ul a:focus,.sm-dox ul a:hover,.sm-dox ul a:active{font-size:12px;border-left:8px solid transparent;line-height:36px;text-shadow:none;background-color:white;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul ul a,.sm-dox ul ul a:hover,.sm-dox ul ul a:focus,.sm-dox ul ul a:active{border-left:16px solid transparent}.sm-dox ul ul ul a,.sm-dox ul ul ul a:hover,.sm-dox ul ul ul a:focus,.sm-dox ul ul ul a:active{border-left:24px solid transparent}.sm-dox ul ul ul ul a,.sm-dox ul ul ul ul a:hover,.sm-dox ul ul ul ul a:focus,.sm-dox ul ul ul ul a:active{border-left:32px solid transparent}.sm-dox ul ul ul ul ul a,.sm-dox ul ul ul ul ul a:hover,.sm-dox ul ul ul ul ul a:focus,.sm-dox ul ul ul ul ul a:active{border-left:40px solid transparent}@media (min-width: 768px){.sm-dox ul{position:absolute;width:12em}.sm-dox li{float:left}.sm-dox.sm-rtl li{float:right}.sm-dox ul li,.sm-dox.sm-rtl ul li,.sm-dox.sm-vertical li{float:none}.sm-dox a{white-space:nowrap}.sm-dox ul a,.sm-dox.sm-vertical a{white-space:normal}.sm-dox .sm-nowrap>li>a,.sm-dox .sm-nowrap>li>:not(ul) a{white-space:nowrap}.sm-dox{padding:0 10px;background-image:url("tab_b.png");line-height:36px}.sm-dox a span.sub-arrow{top:50%;margin-top:-2px;right:12px;width:0;height:0;border-width:4px;border-style:solid dashed dashed dashed;border-color:#283A5D transparent transparent transparent;background:transparent;border-radius:0}.sm-dox a,.sm-dox a:focus,.sm-dox a:active,.sm-dox a:hover,.sm-dox a.highlighted{padding:0px 12px;background-image:url("tab_s.png");background-repeat:no-repeat;background-position:right;border-radius:0 !important}.sm-dox a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox a:hover span.sub-arrow{border-color:#fff transparent transparent transparent}.sm-dox a.has-submenu{padding-right:24px}.sm-dox li{border-top:0}.sm-dox>li>ul:before,.sm-dox>li>ul:after{content:'';position:absolute;top:-18px;left:30px;width:0;height:0;overflow:hidden;border-width:9px;border-style:dashed dashed solid dashed;border-color:transparent transparent #bbb transparent}.sm-dox>li>ul:after{top:-16px;left:31px;border-width:8px;border-color:transparent transparent #fff transparent}.sm-dox ul{border:1px solid #bbb;padding:5px 0;background:#fff;border-radius:5px !important;box-shadow:0 5px 9px rgba(0,0,0,0.2)}.sm-dox ul a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-color:transparent transparent transparent #555;border-style:dashed dashed dashed solid}.sm-dox ul a,.sm-dox ul a:hover,.sm-dox ul a:focus,.sm-dox ul a:active,.sm-dox ul a.highlighted{color:#555;background-image:none;border:0 !important;color:#555;background-image:none}.sm-dox ul a:hover{background-image:url("tab_a.png");background-repeat:repeat-x;color:#fff;text-shadow:0px 1px 1px #000}.sm-dox ul a:hover span.sub-arrow{border-color:transparent transparent transparent #fff}.sm-dox span.scroll-up,.sm-dox span.scroll-down{position:absolute;display:none;visibility:hidden;overflow:hidden;background:#fff;height:36px}.sm-dox span.scroll-up:hover,.sm-dox span.scroll-down:hover{background:#eee}.sm-dox span.scroll-up:hover span.scroll-up-arrow,.sm-dox span.scroll-up:hover span.scroll-down-arrow{border-color:transparent transparent #D23600 transparent}.sm-dox span.scroll-down:hover span.scroll-down-arrow{border-color:#D23600 transparent transparent transparent}.sm-dox span.scroll-up-arrow,.sm-dox span.scroll-down-arrow{position:absolute;top:0;left:50%;margin-left:-6px;width:0;height:0;overflow:hidden;border-width:6px;border-style:dashed dashed solid dashed;border-color:transparent transparent #555 transparent}.sm-dox span.scroll-down-arrow{top:8px;border-style:solid dashed dashed dashed;border-color:#555 transparent transparent transparent}.sm-dox.sm-rtl a.has-submenu{padding-right:12px;padding-left:24px}.sm-dox.sm-rtl a span.sub-arrow{right:auto;left:12px}.sm-dox.sm-rtl.sm-vertical a.has-submenu{padding:10px 20px}.sm-dox.sm-rtl.sm-vertical a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-rtl>li>ul:before{left:auto;right:30px}.sm-dox.sm-rtl>li>ul:after{left:auto;right:31px}.sm-dox.sm-rtl ul a.has-submenu{padding:10px 20px !important}.sm-dox.sm-rtl ul a span.sub-arrow{right:auto;left:8px;border-style:dashed solid dashed dashed;border-color:transparent #555 transparent transparent}.sm-dox.sm-vertical{padding:10px 0;border-radius:5px}.sm-dox.sm-vertical a{padding:10px 20px}.sm-dox.sm-vertical a:hover,.sm-dox.sm-vertical a:focus,.sm-dox.sm-vertical a:active,.sm-dox.sm-vertical a.highlighted{background:#fff}.sm-dox.sm-vertical a.disabled{background-image:url("tab_b.png")}.sm-dox.sm-vertical a span.sub-arrow{right:8px;top:50%;margin-top:-5px;border-width:5px;border-style:dashed dashed dashed solid;border-color:transparent transparent transparent #555}.sm-dox.sm-vertical>li>ul:before,.sm-dox.sm-vertical>li>ul:after{display:none}.sm-dox.sm-vertical ul a{padding:10px 20px}.sm-dox.sm-vertical ul a:hover,.sm-dox.sm-vertical ul a:focus,.sm-dox.sm-vertical ul a:active,.sm-dox.sm-vertical ul a.highlighted{background:#eee}.sm-dox.sm-vertical ul a.disabled{background:#fff}} diff --git a/doxygen/doc/html/torqueStiffDamp__plotAll_8m_source.html b/doxygen/doc/html/torqueStiffDamp__plotAll_8m_source.html new file mode 100644 index 00000000..c7c4c9b8 --- /dev/null +++ b/doxygen/doc/html/torqueStiffDamp__plotAll_8m_source.html @@ -0,0 +1,139 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts/scripts/torqueStiffDamp_plotAll.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    torqueStiffDamp_plotAll.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 function torqueStiffDamp_plotAll(partname, numofjoint, stiffness, damping, jointlist)
    +
    20 
    +
    21 
    +
    22 p=mfilename("fullpath"); #get current funtion file name with full path
    +
    23 
    +
    24 in = rindex (p, "/"); #get the index of last occurence of /
    +
    25 onlydir = strtrunc(p, in); #cat the name of file from full path. in Only dit i have the path to scripts
    +
    26 
    +
    27 #I need to add the path to script torqueStiffDump_plot
    +
    28 addpath(onlydir);
    +
    29 
    +
    30 figure(1);
    +
    31 
    +
    32 for i= 1:1:numofjoint
    +
    33 
    +
    34  subplot(numofjoint, 1, i, "align");
    +
    35  filename = strcat("posVStrq_", partname, "_j", num2str(jointlist(i)), ".txt");
    +
    36  printf("I'm going to plot file %s\n", filename);
    +
    37  torqueStiffDamp_plot(filename, stiffness(i));
    +
    38  refresh();
    +
    39  if(i==1)
    +
    40  title("Position vs Torque");
    +
    41  endif
    +
    42 endfor
    +
    43 
    +
    44 
    +
    45 
    +
    46 figure(2);
    +
    47 
    +
    48 for i= 1:1:numofjoint
    +
    49 
    +
    50  subplot(numofjoint, 1, i, "align");
    +
    51  filename = strcat("velVStrq_", partname, "_j", num2str(jointlist(i)), ".txt");
    +
    52  printf("I'm going to plot file %s\n", filename);
    +
    53  torqueStiffDamp_plot(filename, damping(i));
    +
    54  refresh();
    +
    55  if(i==1)
    +
    56  title("Velocity vs Torque");
    +
    57  endif
    +
    58 endfor
    +
    59 
    +
    60 endfunction
    +
    61 
    +
    + + + + diff --git a/doxygen/doc/html/torqueStiffDamp__plot_8m_source.html b/doxygen/doc/html/torqueStiffDamp__plot_8m_source.html new file mode 100644 index 00000000..8c0da52b --- /dev/null +++ b/doxygen/doc/html/torqueStiffDamp__plot_8m_source.html @@ -0,0 +1,106 @@ + + + + + + + +icub-test: /home/runner/work/icub-tests/icub-tests/gh-pages/suites/contexts/scripts/torqueStiffDamp_plot.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    torqueStiffDamp_plot.m
    +
    +
    +
    1 % iCub Robot Unit Tests (Robot Testing Framework)
    +
    2 %
    +
    3 % Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    4 %
    +
    5 % This library is free software; you can redistribute it and/or
    +
    6 % modify it under the terms of the GNU Lesser General Public
    +
    7 % License as published by the Free Software Foundation; either
    +
    8 % version 2.1 of the License, or (at your option) any later version.
    +
    9 %
    +
    10 % This library is distributed in the hope that it will be useful,
    +
    11 % but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    12 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    13 % Lesser General Public License for more details.
    +
    14 %
    +
    15 % You should have received a copy of the GNU Lesser General Public
    +
    16 % License along with this library; if not, write to the Free Software
    +
    17 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    18 
    +
    19 #define function to plot one file
    +
    20 function torqueStiffDamp_plot(filename, linearfact)
    +
    21 data = load(filename);
    +
    22 m=min(data(:,1));
    +
    23 mx=max(data(:,1));
    +
    24 
    +
    25 x=m:1:mx;
    +
    26 y=x*(-linearfact);
    +
    27 plot(data(:,1), data(:,2), "ro;torque;", data(:,1), data(:,3), "go;refTrq;",x, y, "-;y=x*linearfactor;");
    +
    28 endfunction
    +
    + + + + diff --git a/doxygen/doc/html/writing-and-running.html b/doxygen/doc/html/writing-and-running.html new file mode 100644 index 00000000..087893e6 --- /dev/null +++ b/doxygen/doc/html/writing-and-running.html @@ -0,0 +1,276 @@ + + + + + + + +icub-test: Writing and Running Tests + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-test +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    +
    +
    Writing and Running Tests
    +
    +
    + +

    +Writing a new test

    +

    Create a folder with the name of your test case in the icub-tests/src/ folder to keep your test codes:

    +
    $ mkdir icub-tests/src/example-test
    +

    Create a child test class inherited from the YarpTestCase:

    +
    /*
    +
    * iCub Robot Unit Tests (Robot Testing Framework)
    +
    *
    +
    * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    *
    +
    * This library is free software; you can redistribute it and/or
    +
    * modify it under the terms of the GNU Lesser General Public
    +
    * License as published by the Free Software Foundation; either
    +
    * version 2.1 of the License, or (at your option) any later version.
    +
    *
    +
    * This library is distributed in the hope that it will be useful,
    +
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    * Lesser General Public License for more details.
    +
    *
    +
    * You should have received a copy of the GNU Lesser General Public
    +
    * License along with this library; if not, write to the Free Software
    +
    * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    */
    +
    +
    #ifndef _EXAMPLE_TEST_H_
    +
    #define _EXAMPLE_TEST_H_
    +
    +
    #include <yarp/robottestingframework/TestCase.h>
    +
    +
    class ExampleTest : public yarp::robottestingframework::TestCase {
    +
    public:
    + +
    virtual ~ExampleTest();
    +
    +
    virtual bool setup(yarp::os::Property& property);
    +
    +
    virtual void tearDown();
    +
    +
    virtual void run();
    +
    };
    +
    +
    #endif //_EXAMPLE_TEST_H
    +
    This is just an example test, use it as a reference to implement new tests.
    Definition: ExampleTest.h:41
    +

    Implement the test case:

    +
    /*
    +
    * iCub Robot Unit Tests (Robot Testing Framework)
    +
    *
    +
    * Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    *
    +
    * This library is free software; you can redistribute it and/or
    +
    * modify it under the terms of the GNU Lesser General Public
    +
    * License as published by the Free Software Foundation; either
    +
    * version 2.1 of the License, or (at your option) any later version.
    +
    *
    +
    * This library is distributed in the hope that it will be useful,
    +
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    * Lesser General Public License for more details.
    +
    *
    +
    * You should have received a copy of the GNU Lesser General Public
    +
    * License along with this library; if not, write to the Free Software
    +
    * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    */
    +
    +
    #include "ExampleTest.h"
    +
    #include <robottestingframework/dll/Plugin.h>
    +
    #include <robottestingframework/TestAssert.h>
    +
    +
    using namespace std;
    +
    using namespace robottestingframework;
    +
    using namespace yarp::os;
    +
    +
    // prepare the plugin
    +
    ROBOTTESTINGFRAMEWORK_PREPARE_PLUGIN(ExampleTest)
    +
    +
    ExampleTest::ExampleTest() : yarp::robottestingframework::TestCase("ExampleTest") {
    +
    }
    +
    +
    ExampleTest::~ExampleTest() { }
    +
    +
    bool ExampleTest::setup(yarp::os::Property &property) {
    +
    +
    // initialization goes here ...
    +
    //updating the test name
    +
    if(property.check("name"))
    +
    setName(property.find("name").asString());
    +
    +
    string example = property.check("example", Value("default value")).asString();
    +
    +
    ROBOTTESTINGFRAMEWORK_TEST_REPORT(Asserter::format("Use '%s' for the example param!",
    +
    example.c_str()));
    +
    return true;
    +
    }
    +
    +
    void ExampleTest::tearDown() {
    +
    // finalization goes her ...
    +
    }
    +
    +
    void ExampleTest::run() {
    +
    +
    int a = 5; int b = 3;
    +
    ROBOTTESTINGFRAMEWORK_TEST_CHECK(a<b, "a smaller then b");
    +
    ROBOTTESTINGFRAMEWORK_TEST_CHECK(a>b, "a bigger then b");
    +
    ROBOTTESTINGFRAMEWORK_TEST_CHECK(a==b, "a equal to b");
    +
    +
    // add more
    +
    // ...
    +
    }
    +
    +

    Notice: The ROBOTTESTINGFRAMEWORK_TEST_CHECK, ROBOTTESTINGFRAMEWORK_TEST_REPORT do NOT threw any exception and are used to add failure or report messages to the result collector. Instead, all the macros which include _ASSERT_ within their names (e.g., ROBOTTESTINGFRAMEWORK_ASSERT_FAIL) throw exceptions which prevent only the current test case (Not the whole test suite) of being proceed. The error/failure messages thrown by the exceptions are caught. (See Basic Assertion macros).

    +

    The report/assertion macros store the source line number where the check/report or assertion happen. To see them, you can run the test case or suite with --detail parameter using the robottestingframework-testrunner (See Running test case plug-ins using robottestingframework-testrunner).

    +

    Create a cmake file to build the plug-in:

    +
    # iCub Robot Unit Tests (Robot Testing Framework)
    +
    #
    +
    # Copyright (C) 2015-2019 Istituto Italiano di Tecnologia (IIT)
    +
    #
    +
    # This library is free software; you can redistribute it and/or
    +
    # modify it under the terms of the GNU Lesser General Public
    +
    # License as published by the Free Software Foundation; either
    +
    # version 2.1 of the License, or (at your option) any later version.
    +
    #
    +
    # This library is distributed in the hope that it will be useful,
    +
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    +
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    +
    # Lesser General Public License for more details.
    +
    #
    +
    # You should have received a copy of the GNU Lesser General Public
    +
    # License along with this library; if not, write to the Free Software
    +
    # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    +
    +
    +
    if(NOT DEFINED CMAKE_MINIMUM_REQUIRED_VERSION)
    +
    cmake_minimum_required(VERSION 3.5)
    +
    endif()
    +
    +
    project(ExampleTest)
    +
    +
    # add the required cmake packages
    +
    find_package(RobotTestingFramework 2 COMPONENTS DLL)
    +
    find_package(YARP 3.5.1 COMPONENTS os robottestingframework)
    +
    +
    # add the source codes to build the plugin library
    +
    add_library(${PROJECT_NAME} MODULE ExampleTest.h
    + +
    +
    # add required libraries
    +
    target_link_libraries(${PROJECT_NAME} RobotTestingFramework::RTF
    +
    RobotTestingFramework::RTF_dll
    +
    YARP::YARP_os
    +
    YARP::YARP_init
    +
    YARP::YARP_robottestingframework)
    +
    +
    # set the installation options
    +
    install(TARGETS ${PROJECT_NAME}
    +
    EXPORT ${PROJECT_NAME}
    +
    COMPONENT runtime
    +
    LIBRARY DESTINATION lib)
    +
    +

    Call your cmake file from the icub-test/CMakeLists.txt to build it along with the other other test plugins. To do that, adds the following line to the icub-test/CMakeLists.txt

    +
    # Build example test
    +
    add_subdirectory(src/example-test)
    +

    Please check the icub-tests/example folder for a template for developing tests for the iCub.

    +

    +Running a single test case

    +

    As it is documented here (Running test case plug-ins using robottestingframework-testrunner) you can run a single test case or run it with the other tests using a test suite. For example, to run a single test case:

    +
    robottestingframework-testrunner --verbose --test plugins/ExampleTest.so --param "--name MyExampleTest"
    +

    Notice that this test require the yarpserver to be running and it contains tests that are programmed to succeed and some that are programmed to fail.

    +

    or to run the iCubSim camera test whith the test configuration file:

    +
    robottestingframework-testrunner --verbose --test plugins/CameraTest.so --param "--from camera_right.ini" --environment "--robotname icubSim"
    +
    Check if a camera is publishing images at desired framerate.
    Definition: CameraTest.h:44
    +

    This runs the icubSim right-camera test with the parameters specified in the right_camera.ini which can be found in icub-tests/suites/contexts/icubSim folder. This test assumes you are running yarpserver and the iCub simulator (i.e. iCub_SIM).

    +

    Notice that the environment parameter --robotname icubSim is used to locate the correct context (for this examples is icubSim) and also to update the variables loaded from the right_camera.ini file.

    +

    +Running multiple tests using a test suite

    +

    You can update one of the existing suite XML files to add your test case plug-in and its parameters or create a new test suite which keeps all the relevant test cases. For example the basic-icubSim.xml test suite keeps the basic tests for cameras and motors:

    +
    <?xml version="1.0" encoding="UTF-8"?>
    +
    +
    <suite name="Basic Tests Suite">
    +
    <description>Testing robot's basic features</description>
    +
    <environment>--robotname icubSim</environment>
    +
    <fixture param="--fixture icubsim-fixture.xml"> yarpmanager </fixture>
    +
    +
    <!-- Camera -->
    +
    <test type="dll" param="--from right_camera.ini"> CameraTest </test>
    +
    <test type="dll" param="--from left_camera.ini"> CameraTest </test>
    +
    +
    <!-- Motors -->
    +
    <test type="dll" param="--from test_right_arm.ini"> MotorTest </test>
    +
    <test type="dll" param="--from test_left_arm.ini"> MotorTest </test>
    +
    </suite>
    +

    Then you can run all the test cases from the test suite:

    +
    robottestingframework-testrunner --verbose --suite icub-tests/suites/basics-icubSim.xml
    +

    The robottestingframework-testrunner, first, launches the iCub simulator and then runs all the tests one after each other. After running all the test cases, the tesrunner stop the simulator. If the iCub simulator crashes during the test run, the robottestingframework-testrunner re-launchs it and continues running the remaining tests.

    +

    How robottestingframework-testrunner knows that it should launch the iCub simulator before running the tests? Well, this is indicated by <fixture param="--fixture icubsim-fixture.xml"> yarpmanager </fixture>. The robottestingframework-testrunner uses the yarpmanager fixture plug-in to launch the modules which are listed in the icubsim-fixture.xml. Notice that all the fixture files should be located in the icub-tests/suites/fixtures folder.

    +
    +
    + + + + diff --git a/doxygen/doc/latex/Makefile b/doxygen/doc/latex/Makefile new file mode 100644 index 00000000..9d671516 --- /dev/null +++ b/doxygen/doc/latex/Makefile @@ -0,0 +1,43 @@ +LATEX_CMD=latex + +all: refman.dvi + +ps: refman.ps + +pdf: refman.pdf + +ps_2on1: refman_2on1.ps + +pdf_2on1: refman_2on1.pdf + +refman.ps: refman.dvi + dvips -o refman.ps refman.dvi + +refman.pdf: refman.ps + ps2pdf refman.ps refman.pdf + +refman.dvi: clean refman.tex doxygen.sty + echo "Running latex..." + $(LATEX_CMD) refman.tex + echo "Running makeindex..." + makeindex refman.idx + echo "Rerunning latex...." + $(LATEX_CMD) refman.tex + latex_count=8 ; \ + while egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\ + do \ + echo "Rerunning latex...." ;\ + $(LATEX_CMD) refman.tex ; \ + latex_count=`expr $$latex_count - 1` ;\ + done + makeindex refman.idx + $(LATEX_CMD) refman.tex + +refman_2on1.ps: refman.ps + psnup -2 refman.ps >refman_2on1.ps + +refman_2on1.pdf: refman_2on1.ps + ps2pdf refman_2on1.ps refman_2on1.pdf + +clean: + rm -f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf diff --git a/doxygen/doc/latex/annotated.tex b/doxygen/doc/latex/annotated.tex new file mode 100644 index 00000000..921d9f71 --- /dev/null +++ b/doxygen/doc/latex/annotated.tex @@ -0,0 +1,25 @@ +\doxysection{Data Structures} +Here are the data structures with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{classCameraTest}{Camera\+Test}} \\*Check if a camera is publishing images at desired framerate }{\pageref{classCameraTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classCartesianControlReachingToleranceTest}{Cartesian\+Control\+Reaching\+Tolerance\+Test}} \\*This test verifies the point-\/to-\/point cartesian movement }{\pageref{classCartesianControlReachingToleranceTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classCartesianControlSimpleP2pMovementTest}{Cartesian\+Control\+Simple\+P2p\+Movement\+Test}} \\*This test verifies the point-\/to-\/point cartesian movement }{\pageref{classCartesianControlSimpleP2pMovementTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classControlModes}{Control\+Modes}} \\*The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct }{\pageref{classControlModes}}{} +\item\contentsline{section}{\mbox{\hyperlink{classDemoRedBallTest}{Demo\+Red\+Ball\+Test}} \\*This test verifies the point-\/to-\/point cartesian movement }{\pageref{classDemoRedBallTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classExampleTest}{Example\+Test}} \\*This is just an example test, use it as a reference to implement new tests }{\pageref{classExampleTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classFtSensorTest}{Ft\+Sensor\+Test}} \\*Check if a FT sensor port is correctly publishing a vector with 6 values }{\pageref{classFtSensorTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classGazeControlSimpleLookTest}{Gaze\+Control\+Simple\+Look\+Test}} \\*This test verifies the simple gaze movements }{\pageref{classGazeControlSimpleLookTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classImu}{Imu}} \\*The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements }{\pageref{classImu}}{} +\item\contentsline{section}{\mbox{\hyperlink{classJointLimits}{Joint\+Limits}} \\*Check if the software joint limits are properly set }{\pageref{classJointLimits}}{} +\item\contentsline{section}{\mbox{\hyperlink{classMotorEncodersSignCheck}{Motor\+Encoders\+Sign\+Check}} \\*This tests checks if the motor encoder readings increase when positive pwm is applayed to motor }{\pageref{classMotorEncodersSignCheck}}{} +\item\contentsline{section}{\mbox{\hyperlink{classMotorTest}{Motor\+Test}} \\*Check IPosition\+Control and IEncoders }{\pageref{classMotorTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classMovementReferencesTest}{Movement\+References\+Test}} \\*Check IPosition\+Control, IVelocity\+Control, IPWMControl, IPosition\+Direct }{\pageref{classMovementReferencesTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOpticalEncodersConsistency}{Optical\+Encoders\+Consistency}} \\*This tests checks if the motor encoder reading are consistent with the joint encoder readings }{\pageref{classOpticalEncodersConsistency}}{} +\item\contentsline{section}{\mbox{\hyperlink{classOpticalEncodersDrift}{Optical\+Encoders\+Drift}} \\*This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max) }{\pageref{classOpticalEncodersDrift}}{} +\item\contentsline{section}{\mbox{\hyperlink{classPositionControlAccuracy}{Position\+Control\+Accuracy}} \\*This tests checks the a position PID response, sending a step reference signal with a position\+Direct command }{\pageref{classPositionControlAccuracy}}{} +\item\contentsline{section}{\mbox{\hyperlink{classPositionControlAccuracyExernalPid}{Position\+Control\+Accuracy\+Exernal\+Pid}} \\*This tests checks the response of the system to a position step, sending directly PWM commands to a joint }{\pageref{classPositionControlAccuracyExernalPid}}{} +\item\contentsline{section}{\mbox{\hyperlink{classPositionDirect}{Position\+Direct}} \\*This tests checks the position\+Direct control, sending a sinusoidal reference signal, with parametric frequency and amplitude }{\pageref{classPositionDirect}}{} +\item\contentsline{section}{\mbox{\hyperlink{classSensorsDuplicateReadings}{Sensors\+Duplicate\+Readings}} \\*Check if a yarp port is correctly publishing unique values at each update }{\pageref{classSensorsDuplicateReadings}}{} +\item\contentsline{section}{\mbox{\hyperlink{classSkinWrapperTest}{Skin\+Wrapper\+Test}} \\*This test verifies the functionalities of skin\+Wrapper after the removal of analog\+Server from icub-\/main }{\pageref{classSkinWrapperTest}}{} +\item\contentsline{section}{\mbox{\hyperlink{classTorqueControlAccuracy}{Torque\+Control\+Accuracy}} \\*This tests checks the a torque PID response, sending a step reference signal with a set\+Ref\+Torque command }{\pageref{classTorqueControlAccuracy}}{} +\item\contentsline{section}{\mbox{\hyperlink{classTorqueControlGravityConsistency}{Torque\+Control\+Gravity\+Consistency}} \\*The test is supposed to be run with the i\+Cub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the whole\+Body\+Dynamics(\+Tree) running }{\pageref{classTorqueControlGravityConsistency}}{} +\end{DoxyCompactList} diff --git a/doxygen/doc/latex/classCameraTest.tex b/doxygen/doc/latex/classCameraTest.tex new file mode 100644 index 00000000..e54f7952 --- /dev/null +++ b/doxygen/doc/latex/classCameraTest.tex @@ -0,0 +1,58 @@ +\doxysection{Camera\+Test Class Reference} +\label{classCameraTest}\index{CameraTest@{CameraTest}} + + +Check if a camera is publishing images at desired framerate. + + + + +{\ttfamily \#include $<$Camera\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classCameraTest_ac059968960ce6deaee9c60623ba2266d}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classCameraTest_a9d99fe4d4b8929fbfaf280ed87388dc2}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classCameraTest_a1c55590d1e9b43051fa8a818559abff2}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check if a camera is publishing images at desired framerate. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Camera\+Test\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering portname &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The yarp port name of the camera to test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering measure\+\_\+time &\PBS\centering int &\PBS\centering s &\PBS\centering 1 &\PBS\centering No &\PBS\centering The duration of the test. &\PBS\centering \\\cline{1-7} +\PBS\centering expected\+\_\+frequency &\PBS\centering int &\PBS\centering Hz &\PBS\centering 30 &\PBS\centering No &\PBS\centering The expected framerate of the camera. &\PBS\centering \\\cline{1-7} +\PBS\centering tolerance &\PBS\centering int &\PBS\centering Number of frames &\PBS\centering 5 &\PBS\centering No &\PBS\centering The tolerance on the total number of frames read during the period (expected\+\_\+frequency$\ast$measure\+\_\+time) to consider the test sucessful. &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 44 of file Camera\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/camera/Camera\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/camera/Camera\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classCartesianControlReachingToleranceTest.tex b/doxygen/doc/latex/classCartesianControlReachingToleranceTest.tex new file mode 100644 index 00000000..0c07901b --- /dev/null +++ b/doxygen/doc/latex/classCartesianControlReachingToleranceTest.tex @@ -0,0 +1,55 @@ +\doxysection{Cartesian\+Control\+Reaching\+Tolerance\+Test Class Reference} +\label{classCartesianControlReachingToleranceTest}\index{CartesianControlReachingToleranceTest@{CartesianControlReachingToleranceTest}} + + +This test verifies the point-\/to-\/point cartesian movement. + + + + +{\ttfamily \#include $<$Cartesian\+Control\+Reaching\+Tolerance\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classCartesianControlReachingToleranceTest_a305952143966c0f4d96cd80398d1ca12}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classCartesianControlReachingToleranceTest_a17e31164ca9d1f4e3fc4f81e0555eec4}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classCartesianControlReachingToleranceTest_aa76ce8eec92f87b62b7d3bc479e3f184}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This test verifies the point-\/to-\/point cartesian movement. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering icub\+Sim &\PBS\centering No &\PBS\centering robot name &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering arm-\/type &\PBS\centering string &\PBS\centering -\/ &\PBS\centering left &\PBS\centering No &\PBS\centering left or right &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +Definition at line 40 of file Cartesian\+Control\+Reaching\+Tolerance\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/reaching-\/tolerance/Cartesian\+Control\+Reaching\+Tolerance\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/reaching-\/tolerance/Cartesian\+Control\+Reaching\+Tolerance\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classCartesianControlSimpleP2pMovementTest.tex b/doxygen/doc/latex/classCartesianControlSimpleP2pMovementTest.tex new file mode 100644 index 00000000..e6b6c48c --- /dev/null +++ b/doxygen/doc/latex/classCartesianControlSimpleP2pMovementTest.tex @@ -0,0 +1,55 @@ +\doxysection{Cartesian\+Control\+Simple\+P2p\+Movement\+Test Class Reference} +\label{classCartesianControlSimpleP2pMovementTest}\index{CartesianControlSimpleP2pMovementTest@{CartesianControlSimpleP2pMovementTest}} + + +This test verifies the point-\/to-\/point cartesian movement. + + + + +{\ttfamily \#include $<$Cartesian\+Control\+Simple\+P2p\+Movement\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classCartesianControlSimpleP2pMovementTest_a9e6f25e238962dbdc3eb10186bb9fd33}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classCartesianControlSimpleP2pMovementTest_aa4c07cd7b9bdb954df333387d5d1e200}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classCartesianControlSimpleP2pMovementTest_af6579692f5c18efea453fbb38092281d}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This test verifies the point-\/to-\/point cartesian movement. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering icub\+Sim &\PBS\centering No &\PBS\centering robot name &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering arm-\/type &\PBS\centering string &\PBS\centering -\/ &\PBS\centering left &\PBS\centering No &\PBS\centering left or right &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +Definition at line 39 of file Cartesian\+Control\+Simple\+P2p\+Movement\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/simple-\/p2p-\/movement/Cartesian\+Control\+Simple\+P2p\+Movement\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/simple-\/p2p-\/movement/Cartesian\+Control\+Simple\+P2p\+Movement\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classControlModes.tex b/doxygen/doc/latex/classControlModes.tex new file mode 100644 index 00000000..fed8eee5 --- /dev/null +++ b/doxygen/doc/latex/classControlModes.tex @@ -0,0 +1,97 @@ +\doxysection{Control\+Modes Class Reference} +\label{classControlModes}\index{ControlModes@{ControlModes}} + + +The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. + + + + +{\ttfamily \#include $<$Control\+Modes.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classControlModes_a906098cdeee49ee608ec27e14d17fe4a}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classControlModes_a96e49aa347dc1a743e5f506672f72dc5}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classControlModes_ae438acaf6677471f962d3d6eec430b52}} +virtual void {\bfseries run} () +\item +\mbox{\label{classControlModes_aba99419a0f329ef8db34b3247c9e8461}} +void {\bfseries go\+Home} () +\item +\mbox{\label{classControlModes_a499fb7c42dc501895e41fb8e7922f3fb}} +void {\bfseries execute\+Cmd} () +\item +\mbox{\label{classControlModes_a2db54b3f482b49317a73caffba85fe98}} +void {\bfseries set\+Mode} (int desired\+\_\+control\+\_\+mode, yarp\+::dev\+::\+Interaction\+Mode\+Enum desired\+\_\+interaction\+\_\+mode) +\item +\mbox{\label{classControlModes_a0fd65934486cb3b04051457157588da0}} +void {\bfseries verify\+Mode} (int desired\+\_\+control\+\_\+mode, yarp\+::dev\+::\+Interaction\+Mode\+Enum desired\+\_\+interaction\+\_\+mode, std\+::string title) +\item +\mbox{\label{classControlModes_a8a5254839c70e03ba027506e84ccde96}} +void {\bfseries verify\+Amplifier} (int desired\+\_\+amplifier\+\_\+mode, std\+::string title) +\item +\mbox{\label{classControlModes_af8d034ed81bad265bef55868c93dccbb}} +void {\bfseries zero\+Current\+Limits} () +\item +\mbox{\label{classControlModes_a07b40de5590b6de6465275f120cc0278}} +void {\bfseries get\+Original\+Current\+Limits} () +\item +\mbox{\label{classControlModes_a4829a8e1d1d0a9bc97d6f99a39f200fb}} +void {\bfseries reset\+Original\+Current\+Limits} () +\item +\mbox{\label{classControlModes_a2f143308636985ca5e9b54886d88ab37}} +void {\bfseries verify\+Mode\+Single} (int joint, int desired\+\_\+control\+\_\+mode, yarp\+::dev\+::\+Interaction\+Mode\+Enum desired\+\_\+interaction\+\_\+mode, std\+::string title) +\item +\mbox{\label{classControlModes_af9a2fe5d8cdeba9c6a4c6419b7e10c26}} +void {\bfseries set\+Mode\+Single} (int joint, int desired\+\_\+control\+\_\+mode, yarp\+::dev\+::\+Interaction\+Mode\+Enum desired\+\_\+interaction\+\_\+mode) +\item +\mbox{\label{classControlModes_a5a886c22a344441ff40d7223b1a9b7aa}} +void {\bfseries check\+Joint\+With\+Torque\+Mode} () +\item +\mbox{\label{classControlModes_a7711d4bf20776b36e5707d04d7919250}} +void {\bfseries check\+Control\+Mode\+With\+Im\+Compliant} (int desired\+\_\+control\+\_\+mode, std\+::string title) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. + +The following control modes are test\+: VOCAB\+\_\+\+CM\+\_\+\+POSITION, VOCAB\+\_\+\+CM\+\_\+\+POSITION\+\_\+\+DIRECT, VOCAB\+\_\+\+CM\+\_\+\+VELOCITY, VOCAB\+\_\+\+CM\+\_\+\+MIXED, VOCAB\+\_\+\+CM\+\_\+\+PWM, VOCAB\+\_\+\+CM\+\_\+\+IDLE, VOCAB\+\_\+\+CM\+\_\+\+FORCE\+\_\+\+IDLE, VOCAB\+\_\+\+HW\+\_\+\+FAULT. The following interaction modes are tested\+: VOCAB\+\_\+\+IM\+\_\+\+STIFF, VOCAB\+\_\+\+IM\+\_\+\+COMPLIANT. For some modes (VOCAB\+\_\+\+CM\+\_\+\+TORQUE, VOCAB\+\_\+\+IM\+\_\+\+COMPLIANT) the test asks to robot\+Interface if the joint capabilities, skipping the test if those modes are not implemented. The test intentionally generates an hardware fault to test the transition between VOCAB\+\_\+\+CM\+\_\+\+HW\+\_\+\+FAULT to VOCAB\+\_\+\+CM\+\_\+\+IDLE. The fault is generated by zeroing the max current limit. Check of the amplifier internal status (i\+Amplifier-\/$>$get\+Amp\+Status) has to be implemented yet. + +Example\+: test\+Runner -\/v -\/t Control\+Modes.\+dll -\/p \char`\"{}-\/-\/robot icub -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2 3 4 5)\char`\"{}\char`\"{} -\/-\/zero 0\char`\"{} + +Check the following functions\+: \begin{DoxyItemize} +\item IControl\+Mode\+::get\+Control\+Mode()/set\+Control\+Mode() \item IInteraction\+Mode\+::get\+Interaction\+Mode()/set\+Interaction\+Mode()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\end{longtabu} +$\vert$ joints $\vert$ vector of ints $\vert$ -\/ $\vert$ Yes $\vert$ List of joints to be tested. $\vert$ $\vert$ $\vert$ zero $\vert$ double $\vert$ deg $\vert$ -\/ $\vert$ Yes $\vert$ The home position for the tested joints. $\vert$ $\vert$ + +Definition at line 53 of file Control\+Modes.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/control\+Modes/Control\+Modes.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/control\+Modes/Control\+Modes.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classDemoRedBallTest.tex b/doxygen/doc/latex/classDemoRedBallTest.tex new file mode 100644 index 00000000..ea965094 --- /dev/null +++ b/doxygen/doc/latex/classDemoRedBallTest.tex @@ -0,0 +1,57 @@ +\doxysection{Demo\+Red\+Ball\+Test Class Reference} +\label{classDemoRedBallTest}\index{DemoRedBallTest@{DemoRedBallTest}} + + +This test verifies the point-\/to-\/point cartesian movement. + + + + +{\ttfamily \#include $<$Demo\+Red\+Ball\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classDemoRedBallTest_ac659a7047cc7329f932a52489c836c40}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classDemoRedBallTest_a57f96bc8718f248f25fa2aced05223db}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classDemoRedBallTest_a80b08218a2980e2aed26cd55066d3917}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This test verifies the point-\/to-\/point cartesian movement. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering context &\PBS\centering string &\PBS\centering -\/ &\PBS\centering demo\+Red\+Ball &\PBS\centering No &\PBS\centering context containing the demo\+Red\+Ball conf file &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering from &\PBS\centering string &\PBS\centering -\/ &\PBS\centering config-\/test.\+ini &\PBS\centering No &\PBS\centering demo\+Red\+Ball configuration file &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +You can watch a \href{https://www.youtube.com/watch?v=ackQ5Bfk9jk}{\texttt{ video}} of how this test will be performing. + +Definition at line 50 of file Demo\+Red\+Ball\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/demo\+Red\+Ball/Demo\+Red\+Ball\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/demo\+Red\+Ball/Demo\+Red\+Ball\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classExampleTest.tex b/doxygen/doc/latex/classExampleTest.tex new file mode 100644 index 00000000..e31b3b55 --- /dev/null +++ b/doxygen/doc/latex/classExampleTest.tex @@ -0,0 +1,57 @@ +\doxysection{Example\+Test Class Reference} +\label{classExampleTest}\index{ExampleTest@{ExampleTest}} + + +This is just an example test, use it as a reference to implement new tests. + + + + +{\ttfamily \#include $<$Example\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classExampleTest_a952d7388955c0b21767b06ac53598320}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classExampleTest_a7bc18f291c6b1355e3c6e01817611882}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classExampleTest_a281e1c9d6ed1826a183dfa137eb779e5}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This is just an example test, use it as a reference to implement new tests. + +Check the following functions\+: \begin{DoxyItemize} +\item NA\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Example\+Test\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering example &\PBS\centering string &\PBS\centering -\/ &\PBS\centering default value &\PBS\centering No &\PBS\centering An example value. &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +Definition at line 41 of file Example\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Test/Example\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Test/Example\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classFtSensorTest.tex b/doxygen/doc/latex/classFtSensorTest.tex new file mode 100644 index 00000000..9002b403 --- /dev/null +++ b/doxygen/doc/latex/classFtSensorTest.tex @@ -0,0 +1,57 @@ +\doxysection{Ft\+Sensor\+Test Class Reference} +\label{classFtSensorTest}\index{FtSensorTest@{FtSensorTest}} + + +Check if a FT sensor port is correctly publishing a vector with 6 values. + + + + +{\ttfamily \#include $<$Ft\+Sensor\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classFtSensorTest_a20aecc0e89885642abd4d27f75836e98}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&configuration) +\item +\mbox{\label{classFtSensorTest_a27fa9542e7c6a00d9c5c9a1d2b25c578}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classFtSensorTest_a5ed3e6191421d4a1c315bd1aef3e0d44}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check if a FT sensor port is correctly publishing a vector with 6 values. + +No further check on the content of the vector is done. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Ft\+Sensor\+Test\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering portname &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The yarp port name of the FT sensor to test. &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +Definition at line 41 of file Ft\+Sensor\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ftsensor-\/tests/Ft\+Sensor\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ftsensor-\/tests/Ft\+Sensor\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classGazeControlSimpleLookTest.tex b/doxygen/doc/latex/classGazeControlSimpleLookTest.tex new file mode 100644 index 00000000..b334b6c2 --- /dev/null +++ b/doxygen/doc/latex/classGazeControlSimpleLookTest.tex @@ -0,0 +1,54 @@ +\doxysection{Gaze\+Control\+Simple\+Look\+Test Class Reference} +\label{classGazeControlSimpleLookTest}\index{GazeControlSimpleLookTest@{GazeControlSimpleLookTest}} + + +This test verifies the simple gaze movements. + + + + +{\ttfamily \#include $<$Gaze\+Control\+Simple\+Look\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classGazeControlSimpleLookTest_ad06961bcea58df13429199afc7d2738d}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classGazeControlSimpleLookTest_a41529c31af3bba99f5b75df1e8de955a}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classGazeControlSimpleLookTest_acea98f73c14a41bb9cc88606f8ee731a}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This test verifies the simple gaze movements. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering -\/ \\\cline{1-7} +\end{longtabu} + + +Definition at line 38 of file Gaze\+Control\+Simple\+Look\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control/simple-\/look/Gaze\+Control\+Simple\+Look\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control/simple-\/look/Gaze\+Control\+Simple\+Look\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classImu.tex b/doxygen/doc/latex/classImu.tex new file mode 100644 index 00000000..f7b9d08f --- /dev/null +++ b/doxygen/doc/latex/classImu.tex @@ -0,0 +1,71 @@ +\doxysection{Imu Class Reference} +\label{classImu}\index{Imu@{Imu}} + + +The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements. + + + + +{\ttfamily \#include $<$imu.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classImu_a2bd75f1be1f28fecbff074a7cb12ed8a}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classImu_aefc1351bbb75573d08c851a3d1d11a6d}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classImu_a8af2b1c07ac7950215df4d4ece2008c0}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements. + +It takes as input the urdf of the robot and make a comparison between the expected values retrieved from the forward kinematics and the ones read from the IMU itself. The test involves the movements of the joints belonging to the part on which the sensor is mounted. The movements are executed sequentially, traversing from the home position to the lower limit, upper limit and back to the home position for each joint. + +Example\+: robottestingframework-\/testrunner --test plugins/imu.\+so --param \char`\"{}-\/-\/robot icub -\/-\/model model.\+urdf -\/-\/port /icub/head/inertials -\/-\/part head -\/-\/controlboards (\char`\"{}torso\char`\"{}, \char`\"{}head\char`\"{}) -\/-\/sensor head\+\_\+imu\+\_\+0 -\/-\/frame head\+\_\+imu\+\_\+0 -\/-\/mean\+\_\+error 0.\+1\char`\"{} + +Moreover, you can manually modify the suites/contexts/icub/test\+\_\+imu.\+ini file depending on the parameters of the test. In this case, after compiling, you can run\+: + +robottestingframework-\/testrunner --suite ../suites/imu.xml + +This will launch the test and open a yarpscope with the plots of the IMU traces. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering model &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot model. &\PBS\centering e.\+g. model.\+urdf \\\cline{1-7} +\PBS\centering port &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the port streaming IMU data. &\PBS\centering e.\+g. /icub/head/inertials \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot part on which the sensor is mounted. &\PBS\centering e.\+g. head \\\cline{1-7} +\PBS\centering controlboards &\PBS\centering vector of string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The list of the controlboards to open. &\PBS\centering e.\+g. (\char`\"{}torso\char`\"{}, \char`\"{}head\char`\"{}) \\\cline{1-7} +\PBS\centering sensor &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the sensor to be tested. &\PBS\centering e.\+g. head\+\_\+imu\+\_\+0 \\\cline{1-7} +\PBS\centering frame &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the frame on which the sensor is attached. &\PBS\centering e.\+g. head\+\_\+imu\+\_\+0 \\\cline{1-7} +\PBS\centering mean\+\_\+error &\PBS\centering double &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The tolerance on the mean of the error. &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 44 of file imu.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/imu/imu.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/imu/imu.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classJointLimits.tex b/doxygen/doc/latex/classJointLimits.tex new file mode 100644 index 00000000..86f66297 --- /dev/null +++ b/doxygen/doc/latex/classJointLimits.tex @@ -0,0 +1,84 @@ +\doxysection{Joint\+Limits Class Reference} +\label{classJointLimits}\index{JointLimits@{JointLimits}} + + +Check if the software joint limits are properly set. + + + + +{\ttfamily \#include $<$joint\+Limits.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classJointLimits_aab2cba8458562fa010452d40812d2088}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classJointLimits_af90bca494fc174654dbd23050438f677}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classJointLimits_a7d638220c08c9c3c500ffb6b4ecfcaa9}} +virtual void {\bfseries run} () +\item +\mbox{\label{classJointLimits_af409fb877cde1701963fa0d5bcbb12be}} +void {\bfseries go\+To} (yarp\+::sig\+::\+Vector position) +\item +\mbox{\label{classJointLimits_a5a4a3ea41f4fb7c0e9d93fbc75a6c71c}} +bool {\bfseries go\+To\+Single} (int i, double pos, double $\ast$reached\+\_\+pos) +\item +\mbox{\label{classJointLimits_a8430fc193c56418843c67ddde4966571}} +bool {\bfseries go\+To\+Single\+Exceed} (int i, double position\+\_\+to\+\_\+reach, double limit, double reached\+Limit, double $\ast$reached\+\_\+pos) +\item +\mbox{\label{classJointLimits_ae4d5b348e7689e4c1382252bcbb0ae0a}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classJointLimits_a0790f6c7d9d1886aaa1bb4848cf790ef}} +void {\bfseries save\+To\+File} (std\+::string filename, yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check if the software joint limits are properly set. + +The limits are set in the robot configuration files. The test asks the limits to robot\+Interface using the IControl\+Limits interface. The test moves each joint first to the max lim, then to the min lim, then to home. If the joint is unable to reach the software limits within a certain tolerance, the test fails and the joint is put back in home position. The timeout for each joint to reach the limit position is fixed to 20 seconds. The test uses an limited output to avoid to damage the joint if, for example, an hardware limit is reached before the software limit. If this limit is too small, the the joint may be unable to reach the limit (e.\+g. because of friction), so the value must be chosen accurately. The test assumes the the position control is properly working and the position pid is properly tuned. After testing the limits, this test also tries to move the joint out of the limits on puropose (adding to the joint limits the value of out\+Of\+Bound\+Position). The test is successfull if the position move command is correctly stopped at the limit. + +Example\+: test\+Runner -\/v -\/t Joint\+Limits.\+dll -\/p \char`\"{}-\/-\/robot icub -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/home \char`\"{}\char`\"{}(0 0 0)\char`\"{}\char`\"{} -\/-\/speed \char`\"{}\char`\"{}(20 20 20)\char`\"{}\char`\"{} -\/-\/output\+Limit\+Percent \char`\"{}\char`\"{}(30 30 30)\char`\"{}\char`\"{} -\/-\/out\+Of\+Bound\+Position \char`\"{}\char`\"{}(2 2 2)\char`\"{}\char`\"{} -\/-\/tolerance 0.\+2\char`\"{} + +Check the following functions\+: \begin{DoxyItemize} +\item IControl\+Limits\+::get\+Limits()\end{DoxyItemize} +Support functions\+: \begin{DoxyItemize} +\item IPosition\+Control\+::get\+Axes() \item IPosition\+Control\+::position\+Move() \item IPosition\+Contol\+::set\+Ref\+Speeds() \item IEncoders\+::get\+Encoder() \item IEncoders\+::get\+Encoders() \item IPid\+::get\+Pid()/\+IPid\+::set\+Pid() \item IControl\+Mode\+::get\+Control\+Mode()/set\+Control\+Mode() \item IInteraction\+Mode\+::get\+Interaction\+Mode()/set\+Interaction\+Mode()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering home &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering speed &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The reference speed used furing the movement &\PBS\centering \\\cline{1-7} +\PBS\centering tolerance &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The position tolerance used to check if the limit has been properly reached. &\PBS\centering Typical value = 0.\+2 deg. \\\cline{1-7} +\PBS\centering output\+Limit\+Percent &\PBS\centering vector of doubles of size joints &\PBS\centering \% &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The maximum motor output (expressed as percentage). &\PBS\centering Safe values can be, for example, 30\%. \\\cline{1-7} +\PBS\centering out\+Of\+Bound\+Position &\PBS\centering vector of doubles of size joints &\PBS\centering \% &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering This value is added the joint limit to test that a position command is not able to move out of the joint limits &\PBS\centering Typical value 2 deg. \\\cline{1-7} +\end{longtabu} + + +Definition at line 74 of file joint\+Limits.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/joint\+Limits/joint\+Limits.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/joint\+Limits/joint\+Limits.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classMotorEncodersSignCheck.tex b/doxygen/doc/latex/classMotorEncodersSignCheck.tex new file mode 100644 index 00000000..35c2aaf3 --- /dev/null +++ b/doxygen/doc/latex/classMotorEncodersSignCheck.tex @@ -0,0 +1,74 @@ +\doxysection{Motor\+Encoders\+Sign\+Check Class Reference} +\label{classMotorEncodersSignCheck}\index{MotorEncodersSignCheck@{MotorEncodersSignCheck}} + + +This tests checks if the motor encoder readings increase when positive pwm is applayed to motor. + + + + +{\ttfamily \#include $<$motor\+Encoders\+Sign\+Check.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classMotorEncodersSignCheck_a9473c20f3efe4b8fc2c554b6d12f65f9}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classMotorEncodersSignCheck_a706ce3dbc1073c90b2981ed55286a407}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classMotorEncodersSignCheck_ac1bb7e6d1b55c9e97c2432dd78f0c625}} +virtual void {\bfseries run} () +\item +\mbox{\label{classMotorEncodersSignCheck_adc3e407539e8368936eed1749dc69317}} +void {\bfseries set\+Mode\+Single} (int i, int desired\+\_\+control\+\_\+mode, yarp\+::dev\+::\+Interaction\+Mode\+Enum desired\+\_\+interaction\+\_\+mode) +\item +\mbox{\label{classMotorEncodersSignCheck_aeb8969c7334373e30d409de1a4efb429}} +void {\bfseries Opl\+Execute} (int i) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks if the motor encoder readings increase when positive pwm is applayed to motor. + +This test helps you to check if Rotor\+Encoder\+Resolution parameter in robot\textquotesingle{}s configuration files has correct sign. The test sets one joint per time in Open Loop control mode; then applies positive pwm starting with value defined in parameter \char`\"{}pwm\+Start\char`\"{} and increments pwm with step defined in parameter \char`\"{}pwm\+Step\char`\"{} until motor doesn\textquotesingle{}t move of Posthreshold degree at least. + +Note\+: This test uses yarp\+::robottestingframework\+::joints\+Pos\+Motion class, a class for reduce time in developing test. + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering No &\PBS\centering The name of test. &\PBS\centering e.\+g. mot\+Enc\+Sign\+Check\+\_\+\+Head \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. head \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering home &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint. It should be distant from joint\textquotesingle{}s limits &\PBS\centering \\\cline{1-7} +\PBS\centering speed &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The reference speed used during the movement &\PBS\centering \\\cline{1-7} +\PBS\centering pwm\+Start &\PBS\centering vector of doubles of size joints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The starting pwm applied to joint &\PBS\centering \\\cline{1-7} +\PBS\centering pwm\+Step &\PBS\centering vector of doubles of size joints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The increment of pwm per time &\PBS\centering \\\cline{1-7} +\PBS\centering pwm\+Max &\PBS\centering vector of doubles of size joints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The max pwm applicable &\PBS\centering \\\cline{1-7} +\PBS\centering Posthreshold &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering 5 &\PBS\centering No &\PBS\centering The minumum movement to check if motor position increases &\PBS\centering \\\cline{1-7} +\PBS\centering command\+Delay &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering 0.\+1 &\PBS\centering No &\PBS\centering The delay between two Set\+Ref\+Open\+Looop commands consecutive &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 61 of file motor\+Encoders\+Sign\+Check.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders\+Sign\+Check/motor\+Encoders\+Sign\+Check.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders\+Sign\+Check/motor\+Encoders\+Sign\+Check.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classMotorTest.tex b/doxygen/doc/latex/classMotorTest.tex new file mode 100644 index 00000000..9e8bda6e --- /dev/null +++ b/doxygen/doc/latex/classMotorTest.tex @@ -0,0 +1,64 @@ +\doxysection{Motor\+Test Class Reference} +\label{classMotorTest}\index{MotorTest@{MotorTest}} + + +Check IPosition\+Control and IEncoders. + + + + +{\ttfamily \#include $<$Motor\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classMotorTest_a899f7015f4c982fd25b0a2de4d693562}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&configuration) +\item +\mbox{\label{classMotorTest_a35093fc16f2160699a962e2e600d12f7}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classMotorTest_a7f262c968aa26e60b2d654fa0f3b6d1a}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check IPosition\+Control and IEncoders. + +Check the following functions\+: \begin{DoxyItemize} +\item IPosition\+Control\+::get\+Axes() \item IPosition\+Control\+::position\+Move() \item IPosition\+Control\+::check\+Motion\+Done() \item IPosition\+Contol\+::set\+Ref\+Speeds() \item IPosition\+Control\+::set\+Ref\+Accelerations() \item IEncoders\+::get\+Encoder() \item IEncoders\+::get\+Encoders()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Motor\+Test\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering portname &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The yarp port name of the controlboard to test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering joints &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Number of axes in the controlboard. &\PBS\centering Must be consistent with the value returned by get\+Axes method. \\\cline{1-7} +\PBS\centering target &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the position to reach for passing the test. &\PBS\centering \\\cline{1-7} +\PBS\centering min &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the maximum lower error with respect to the target to consider the test as successful. &\PBS\centering \\\cline{1-7} +\PBS\centering max &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the maximum upper error with respect to the target to consider the test as successful. &\PBS\centering \\\cline{1-7} +\PBS\centering refvel &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the reference velocity value to set in the low level trajectory generator. &\PBS\centering \\\cline{1-7} +\PBS\centering refacc &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s$^\wedge$2 &\PBS\centering -\/ &\PBS\centering No &\PBS\centering For each joint the reference acceleration value to set in the low level trajectory generator. &\PBS\centering \\\cline{1-7} +\PBS\centering timeout &\PBS\centering vector of doubles of size joints &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the maximum time to wait for the joint to reach the target. &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 59 of file Motor\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/tests/Motor\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/tests/Motor\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classMovementReferencesTest.tex b/doxygen/doc/latex/classMovementReferencesTest.tex new file mode 100644 index 00000000..49dfa7d8 --- /dev/null +++ b/doxygen/doc/latex/classMovementReferencesTest.tex @@ -0,0 +1,62 @@ +\doxysection{Movement\+References\+Test Class Reference} +\label{classMovementReferencesTest}\index{MovementReferencesTest@{MovementReferencesTest}} + + +Check IPosition\+Control, IVelocity\+Control, IPWMControl, IPosition\+Direct. + + + + +{\ttfamily \#include $<$movement\+References\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classMovementReferencesTest_ad9cc73f5b5865dec9d185bf4063e53a8}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&configuration) +\item +\mbox{\label{classMovementReferencesTest_a593c8be2be3fe9bf79c7d0d7c5d817b9}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classMovementReferencesTest_afd727ad62714859a969e5b3c47959eca}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check IPosition\+Control, IVelocity\+Control, IPWMControl, IPosition\+Direct. + +Check the following functions\+: \begin{DoxyItemize} +\item IPosition\+Control\+::get\+Position\+Target() \item IVelocity\+Control\+::get\+Ref\+Velocity() \item IPosition\+Direct\+::get\+Ref\+Position() \item IPWMControl\+::get\+Ref\+Duty\+Cycle()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Movement\+References\+Test\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering portname &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The yarp port name of the controlboard to test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering joints &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Number of axes in the controlboard. &\PBS\centering Must be consistent with the value returned by get\+Axes method. \\\cline{1-7} +\PBS\centering home &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the position to reach for passing the test. &\PBS\centering \\\cline{1-7} +\PBS\centering target &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the position to reach for passing the test. &\PBS\centering \\\cline{1-7} +\PBS\centering refvel &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering For each joint the reference velocity value to set in the low level trajectory generator. &\PBS\centering \\\cline{1-7} +\PBS\centering refacc &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s$^\wedge$2 &\PBS\centering -\/ &\PBS\centering No &\PBS\centering For each joint the reference acceleration value to set in the low level trajectory generator. &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 56 of file movement\+References\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/movement\+References\+Test/movement\+References\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/movement\+References\+Test/movement\+References\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classOpticalEncodersConsistency.tex b/doxygen/doc/latex/classOpticalEncodersConsistency.tex new file mode 100644 index 00000000..bf13dfdb --- /dev/null +++ b/doxygen/doc/latex/classOpticalEncodersConsistency.tex @@ -0,0 +1,83 @@ +\doxysection{Optical\+Encoders\+Consistency Class Reference} +\label{classOpticalEncodersConsistency}\index{OpticalEncodersConsistency@{OpticalEncodersConsistency}} + + +This tests checks if the motor encoder reading are consistent with the joint encoder readings. + + + + +{\ttfamily \#include $<$motor\+Encoders\+Consistency.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classOpticalEncodersConsistency_a51df63f87479ffa4f2f05c99f9c06863}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classOpticalEncodersConsistency_a8751028fa2a3bb23acc51693f47a9b75}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classOpticalEncodersConsistency_a372d7c32a10225fcda5e6621c6494ad7}} +virtual void {\bfseries run} () +\item +\mbox{\label{classOpticalEncodersConsistency_a1b18ff12291b46dddca9e0a11584887d}} +void {\bfseries go\+Home} () +\item +\mbox{\label{classOpticalEncodersConsistency_ae1e7c3909700d9a39fe9dad1b4f5c9d5}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classOpticalEncodersConsistency_a7afe73617f00256e49c9a3c506f481a7}} +void {\bfseries save\+To\+File} (std\+::string filename, yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks if the motor encoder reading are consistent with the joint encoder readings. + +Since the two sensors may be placed in different places, with gearboxes or tendon transmissions in between, a (signed) factor is needed to convert the two measurements. The test performes a cyclic movement between two reference positions (min and max) and collects data from both the encoders during the movement. The test generates four text data files, which are subsequently opened to generate plots. In all figures the joint and motor plots need to be reasonably aligned. The four plots are\+: \begin{DoxyItemize} +\item joint positions vs motor positions \item joint velocities vs motor velocities \item joint positions (numerically derived by the test) vs joint velocities (measured by the control board) \item motor positions (numerically derived by the test) vs motor velocities (measured by the control board) The conversion formula from motor measurments (M) to joint encoder measurements (J) is the following\+: J = kinematic\+\_\+mj $\ast$ gearbox $\ast$ M with kinematic\+\_\+mj the joints coupling matrix and gearbox the gearbox reduction factor (e.\+g. 1\+:100)\end{DoxyItemize} +Example\+: test\+Runner v -\/t motor\+Encoders\+Consistency.\+dll -\/p \char`\"{}-\/-\/robot icub -\/-\/part left\+\_\+arm -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/home \char`\"{}\char`\"{}(-\/30 30 10)\char`\"{}\char`\"{} -\/-\/speed \char`\"{}\char`\"{}(20 20 20)\char`\"{}\char`\"{} -\/-\/max \char`\"{}\char`\"{}(-\/20 40 20)\char`\"{}\char`\"{} -\/-\/min \char`\"{}\char`\"{}(-\/40 20 0)\char`\"{}\char`\"{} -\/-\/cycles 10 -\/-\/tolerance 1.\+0 \char`\"{} Example\+: test\+Runner v -\/s \char`\"{}..\textbackslash{}icub-\/tests\textbackslash{}suites\textbackslash{}encoders-\/icub\+Sim.\+xml\char`\"{} + +Check the following functions\+: \begin{DoxyItemize} +\item IEncoders\+::get\+Encoders() \item IEncoders\+::get\+Encoder\+Speeds() \item IEncoders\+::get\+Encoder\+Accelerations() \item IMotor\+Encoder\+::get\+Motor\+Encoders() \item IMotor\+Encoder\+::get\+Motor\+Encoder\+Speeds() \item IMotor\+Encoder\+::get\+Motor\+Encoder\+Accelerations() Note\+: Acceleration is not currently tested.\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering home &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering 10 &\PBS\centering No &\PBS\centering The number of test cycles (going from max to min position and viceversa &\PBS\centering \\\cline{1-7} +\PBS\centering max &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The max position using during the joint movement &\PBS\centering \\\cline{1-7} +\PBS\centering min &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The min position using during the joint movement &\PBS\centering \\\cline{1-7} +\PBS\centering tolerance &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The tolerance used when moving from min to max reference position and viceversa &\PBS\centering \\\cline{1-7} +\PBS\centering speed &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The reference speed used during the movement &\PBS\centering \\\cline{1-7} +\PBS\centering matrix\+\_\+size &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The number of rows of the coupling matrix &\PBS\centering Typical value = 4. \\\cline{1-7} +\PBS\centering matrix &\PBS\centering vector of doubles of size matrix\+\_\+size &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The kinematic\+\_\+mj coupling matrix &\PBS\centering matrix is identity if joints are not coupled \\\cline{1-7} +\PBS\centering plotstring1 &\PBS\centering string &\PBS\centering &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The string which generates plot 1 &\PBS\centering \\\cline{1-7} +\PBS\centering plotstring2 &\PBS\centering string &\PBS\centering &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The string which generates plot 2 &\PBS\centering \\\cline{1-7} +\PBS\centering plotstring3 &\PBS\centering string &\PBS\centering &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The string which generates plot 3 &\PBS\centering \\\cline{1-7} +\PBS\centering plotstring4 &\PBS\centering string &\PBS\centering &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The string which generates plot 4 &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 80 of file motor\+Encoders\+Consistency.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders-\/consistency/motor\+Encoders\+Consistency.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders-\/consistency/motor\+Encoders\+Consistency.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classOpticalEncodersDrift.tex b/doxygen/doc/latex/classOpticalEncodersDrift.tex new file mode 100644 index 00000000..cccbfca2 --- /dev/null +++ b/doxygen/doc/latex/classOpticalEncodersDrift.tex @@ -0,0 +1,77 @@ +\doxysection{Optical\+Encoders\+Drift Class Reference} +\label{classOpticalEncodersDrift}\index{OpticalEncodersDrift@{OpticalEncodersDrift}} + + +This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max). + + + + +{\ttfamily \#include $<$optical\+Encoders\+Drift.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classOpticalEncodersDrift_aaf2fb9fd56a67ad676afb53110a7fadd}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classOpticalEncodersDrift_a54fbea332ba8cc678415595243daed45}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classOpticalEncodersDrift_a92d1a9549df738b811ac64d1606fb4d8}} +virtual void {\bfseries run} () +\item +\mbox{\label{classOpticalEncodersDrift_aa712ab13068e2b998519674dd806dfc6}} +bool {\bfseries go\+Home} () +\item +\mbox{\label{classOpticalEncodersDrift_a21d00ce0925d82329311b9f60b651c5b}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classOpticalEncodersDrift_a0820fec65128490eaafed20d5d97466c}} +bool {\bfseries save\+To\+File} (const std\+::string \&filename, const yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max). + +The test collects data during the joint motion, saves data to a text file a plots the result. If the relative encoder is working correctly, the plot should have no drift. Otherwise, a drift in the plot may be caused by a damaged reflective encoder/ optical disk. For best reliability an high number of cycles (e.\+g. $>$100) is suggested. + +example\+: test\+Runner -\/v -\/t Optical\+Encoders\+Drift.\+dll -\/p \char`\"{}-\/-\/robot icub -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/home \char`\"{}\char`\"{}(0 0 0)\char`\"{} --speed \char`\"{}(20 20 20)\char`\"{} --max \char`\"{}(10 10 10)\char`\"{} --min \char`\"{}(-\/10 -\/10 -\/10)\char`\"{} --cycles 100 --tolerance 1.\+0 \char`\"{} example\+: test\+Runner -\/v -\/t Optical\+Encoders\+Drift.\+dll -\/p \char`\"{}--robot icub --part head --joints \char`\"{}\char`\"{}(2)\char`\"{}\char`\"{} --home \char`\"{}\char`\"{}(0)\char`\"{}\char`\"{} --speed \char`\"{}(20 )\char`\"{} --max \char`\"{}(10 )\char`\"{} --min \char`\"{}(-\/10)\char`\"{} --cycles 100 --tolerance 1.\+0 "{} + +Check the following functions\+: \begin{DoxyItemize} +\item IMotor\+Encoder\+::get\+Motor\+Encoders()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering home &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The number of test cycles (going from max to min position and viceversa) &\PBS\centering Use values $>$ 100 \\\cline{1-7} +\PBS\centering max &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The max position using during the joint movement &\PBS\centering \\\cline{1-7} +\PBS\centering min &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The min position using during the joint movement &\PBS\centering \\\cline{1-7} +\PBS\centering tolerance &\PBS\centering vector of doubles of size joints &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The tolerance used when moving from min to max reference position and viceversa &\PBS\centering \\\cline{1-7} +\PBS\centering speed &\PBS\centering vector of doubles of size joints &\PBS\centering deg/s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The reference speed used during the movement &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 62 of file optical\+Encoders\+Drift.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/optical\+Encoders-\/drift/optical\+Encoders\+Drift.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/optical\+Encoders-\/drift/optical\+Encoders\+Drift.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classPositionControlAccuracy.tex b/doxygen/doc/latex/classPositionControlAccuracy.tex new file mode 100644 index 00000000..5bb54f2f --- /dev/null +++ b/doxygen/doc/latex/classPositionControlAccuracy.tex @@ -0,0 +1,79 @@ +\doxysection{Position\+Control\+Accuracy Class Reference} +\label{classPositionControlAccuracy}\index{PositionControlAccuracy@{PositionControlAccuracy}} + + +This tests checks the a position PID response, sending a step reference signal with a position\+Direct command. + + + + +{\ttfamily \#include $<$Position\+Control\+Accuracy.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classPositionControlAccuracy_adb156243b1570d3276e7e6f217191ac6}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classPositionControlAccuracy_a8b495b1aad8dc533b511d3174ee18c39}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classPositionControlAccuracy_ac8736e319fec35ddbc438cca26af1edc}} +virtual void {\bfseries run} () +\item +\mbox{\label{classPositionControlAccuracy_abbd39a006a4eaf23d6f1f87c075b1eb5}} +bool {\bfseries go\+Home} () +\item +\mbox{\label{classPositionControlAccuracy_a2bf6444424941e46c05ea0ce688541dd}} +void {\bfseries execute\+Cmd} () +\item +\mbox{\label{classPositionControlAccuracy_a7283e81727c2bf30637d3e6624b286dd}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classPositionControlAccuracy_ab91897f04d1850ba76a30c4c75f7f186}} +void {\bfseries save\+To\+File} (std\+::string filename, yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks the a position PID response, sending a step reference signal with a position\+Direct command. + +This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analyzed with a Matlab script to evaluate the position PID properties. Be aware that a step greater than 5 degrees at the maximum speed can be dangerous for both the robot and the human operator! + +example\+: test\+Runner -\/v -\/t Position\+Control\+Accuracy.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0 0 0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010\char`\"{} example\+: test\+Runner -\/v -\/t Position\+Control\+Accuracy.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010\char`\"{} + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering zeros &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Each joint will be tested multiple times &\PBS\centering \\\cline{1-7} +\PBS\centering step &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The amplitude of the step reference signal &\PBS\centering Recommended max\+: 5 deg! \\\cline{1-7} +\PBS\centering sample\+Time &\PBS\centering double &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The sample time of the control thread &\PBS\centering \\\cline{1-7} +\PBS\centering home\+\_\+tolerance &\PBS\centering double &\PBS\centering deg &\PBS\centering 0.\+5 &\PBS\centering No &\PBS\centering The max acceptable position error during the homing phase. &\PBS\centering \\\cline{1-7} +\PBS\centering filename &\PBS\centering string &\PBS\centering &\PBS\centering &\PBS\centering No &\PBS\centering The output filename. If not specified, the name will be generated using \textquotesingle{}part\textquotesingle{} parameter and joint number &\PBS\centering \\\cline{1-7} +\PBS\centering step\+\_\+duration &\PBS\centering double &\PBS\centering s &\PBS\centering &\PBS\centering No &\PBS\centering The duration of the step. After this time, a new test cycle starts. &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 55 of file Position\+Control\+Accuracy.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy/Position\+Control\+Accuracy.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy/Position\+Control\+Accuracy.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classPositionControlAccuracyExernalPid.tex b/doxygen/doc/latex/classPositionControlAccuracyExernalPid.tex new file mode 100644 index 00000000..e1f9b28a --- /dev/null +++ b/doxygen/doc/latex/classPositionControlAccuracyExernalPid.tex @@ -0,0 +1,83 @@ +\doxysection{Position\+Control\+Accuracy\+Exernal\+Pid Class Reference} +\label{classPositionControlAccuracyExernalPid}\index{PositionControlAccuracyExernalPid@{PositionControlAccuracyExernalPid}} + + +This tests checks the response of the system to a position step, sending directly PWM commands to a joint. + + + + +{\ttfamily \#include $<$Position\+Control\+Accuracy\+External\+Pid.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classPositionControlAccuracyExernalPid_abba945d5c3b4f4e4b5b0bd55f2b9204c}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classPositionControlAccuracyExernalPid_af669d21a9e774f141ff0a4263b1e42a4}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classPositionControlAccuracyExernalPid_a898e7627acaef71a92f734acc24ef17f}} +virtual void {\bfseries run} () +\item +\mbox{\label{classPositionControlAccuracyExernalPid_aa8d2b518229a4e63aa9f85c6f29d0679}} +bool {\bfseries go\+Home} () +\item +\mbox{\label{classPositionControlAccuracyExernalPid_aa83fe1e3938433dd5315ffa917966873}} +void {\bfseries execute\+Cmd} () +\item +\mbox{\label{classPositionControlAccuracyExernalPid_ab147307ff6b0f3be7bb895b2bed93dd3}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classPositionControlAccuracyExernalPid_af2a2eb5af608353daa6ebb002b06ab8d}} +void {\bfseries save\+To\+File} (std\+::string filename, yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks the response of the system to a position step, sending directly PWM commands to a joint. + +The PWM commands are computed using i\+Cub\+::ctrl\+::parallel\+PID class. This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analyzed with a Matlab script to evaluate the position PID properties. Be aware that a step greater than 5 degrees at the maximum speed can be dangerous for both the robot and the human operator! + +example\+: test\+Runner -\/v -\/t Position\+Control\+Accuracy\+External\+Pid.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0 0 0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010 -\/-\/\+Kp 1.\+0\char`\"{} example\+: test\+Runner -\/v -\/t Position\+Control\+Accuracy\+External\+Pid.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010 -\/-\/home\+Tolerance 1.\+0 -\/-\/step\+\_\+duration 8 -\/-\/\+Kp 2.\+2 -\/-\/\+Kd 0.\+01 -\/-\/\+Ki 100 -\/-\/\+Max\+Value 80\char`\"{} + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering zeros &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Each joint will be tested multiple times &\PBS\centering \\\cline{1-7} +\PBS\centering step &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The amplitude of the step reference signal &\PBS\centering Recommended max\+: 5 deg! \\\cline{1-7} +\PBS\centering sample\+Time &\PBS\centering double &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The sample time of the control thread &\PBS\centering \\\cline{1-7} +\PBS\centering home\+\_\+tolerance &\PBS\centering double &\PBS\centering deg &\PBS\centering 0.\+5 &\PBS\centering No &\PBS\centering The max acceptable position error during the homing phase. &\PBS\centering \\\cline{1-7} +\PBS\centering filename &\PBS\centering string &\PBS\centering &\PBS\centering &\PBS\centering No &\PBS\centering The output filename. If not specified, the name will be generated using \textquotesingle{}part\textquotesingle{} parameter and joint number &\PBS\centering \\\cline{1-7} +\PBS\centering step\+\_\+duration &\PBS\centering double &\PBS\centering s &\PBS\centering 4 &\PBS\centering No &\PBS\centering The duration of the step. After this time, a new test cycle starts. &\PBS\centering \\\cline{1-7} +\PBS\centering Kp &\PBS\centering double &\PBS\centering &\PBS\centering 0 &\PBS\centering No &\PBS\centering The Proportional gain &\PBS\centering \\\cline{1-7} +\PBS\centering Ki &\PBS\centering double &\PBS\centering &\PBS\centering 0 &\PBS\centering No &\PBS\centering The Integral gain &\PBS\centering \\\cline{1-7} +\PBS\centering Kd &\PBS\centering double &\PBS\centering &\PBS\centering 0 &\PBS\centering No &\PBS\centering The Derivative gain &\PBS\centering \\\cline{1-7} +\PBS\centering Max\+Value &\PBS\centering double &\PBS\centering \% &\PBS\centering 100 &\PBS\centering No &\PBS\centering max value for PID output (saturator). &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 62 of file Position\+Control\+Accuracy\+External\+Pid.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy-\/\+External\+Pid/Position\+Control\+Accuracy\+External\+Pid.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy-\/\+External\+Pid/Position\+Control\+Accuracy\+External\+Pid.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classPositionDirect.tex b/doxygen/doc/latex/classPositionDirect.tex new file mode 100644 index 00000000..ae4b7191 --- /dev/null +++ b/doxygen/doc/latex/classPositionDirect.tex @@ -0,0 +1,78 @@ +\doxysection{Position\+Direct Class Reference} +\label{classPositionDirect}\index{PositionDirect@{PositionDirect}} + + +This tests checks the position\+Direct control, sending a sinusoidal reference signal, with parametric frequency and amplitude. + + + + +{\ttfamily \#include $<$Position\+Direct.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classPositionDirect_a65b1833e16c9185db0d488248e59d7cc}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classPositionDirect_a84243f0cd8e5269d486899febfc47cca}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classPositionDirect_a70210708c01218e1aabbc657a16d85f4}} +virtual void {\bfseries run} () +\item +\mbox{\label{classPositionDirect_a2dd8350755621895f0bb36d176d65e4e}} +void {\bfseries go\+Home} () +\item +\mbox{\label{classPositionDirect_aa6f6d0aafdb7e339fa07bbc5232b4dfb}} +void {\bfseries execute\+Cmd} () +\item +\mbox{\label{classPositionDirect_aa18a4e2b7558adf62e72873a78fed7bd}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks the position\+Direct control, sending a sinusoidal reference signal, with parametric frequency and amplitude. + +The sample time, typical in the range of 10 ms, can be also be adjusted by the user. This test currently does not return any error report. It simply moves a joint, and the user visually evaluates the smoothness of the performed trajectory. In the future automatic checks/plots may be added to the test. Be aware theat may exists set of parameters (e.\+g. high values of sample time / ampiltude /frequency) that may lead to PID instability and damage the joint. The test is able to check all the three types of yarp methods (single joint, multi joint, all joints), depending on the value of cmd\+Mode Parameter. + +example\+: test\+Runner -\/v -\/t Position\+Direct.\+dll -\/ p \char`\"{}-\/-\/robot icub -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/zero 0 -\/-\/frequency 0.\+8 -\/-\/amplitude 10.\+0 -\/-\/cycles 10 -\/-\/tolerance 1.\+0 -\/-\/sample\+Time 0.\+010 -\/-\/cmd\+Mode 0\char`\"{} example\+: test\+Runner -\/v -\/t Position\+Direct.\+dll -\/ p \char`\"{}-\/-\/robot icub -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(2)\char`\"{}\char`\"{} -\/-\/zero 0 -\/-\/frequency 0.\+4 -\/-\/amplitude 10.\+0 -\/-\/cycles 10 -\/-\/tolerance 1.\+0 -\/-\/sample\+Time 0.\+010 -\/-\/cmd\+Mode 0\char`\"{} + +Check the following functions\+: \begin{DoxyItemize} +\item IPosition\+Direct\+::set\+Positions() \item IControl\+Mode\+::set\+Control\+Mode()\end{DoxyItemize} +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of trhe robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering zero &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The number of test cycles (going from max to min position and viceversa) &\PBS\centering \\\cline{1-7} +\PBS\centering frequency &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The frequency of the sine reference signal &\PBS\centering \\\cline{1-7} +\PBS\centering amplitude &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The ampiltude of the sine reference signal &\PBS\centering \\\cline{1-7} +\PBS\centering tolerance &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The tolerance used when moving from min to max reference position and viceversa &\PBS\centering \\\cline{1-7} +\PBS\centering sample\+Time &\PBS\centering double &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The sample time of the control thread &\PBS\centering \\\cline{1-7} +\PBS\centering cmd\+Mode &\PBS\centering int &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering = 0 to test single joint method, = 1 to test all joints, = 2 to test multi joint method &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 60 of file Position\+Direct.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Direct/Position\+Direct.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Direct/Position\+Direct.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classSensorsDuplicateReadings.tex b/doxygen/doc/latex/classSensorsDuplicateReadings.tex new file mode 100644 index 00000000..edfe884a --- /dev/null +++ b/doxygen/doc/latex/classSensorsDuplicateReadings.tex @@ -0,0 +1,62 @@ +\doxysection{Sensors\+Duplicate\+Readings Class Reference} +\label{classSensorsDuplicateReadings}\index{SensorsDuplicateReadings@{SensorsDuplicateReadings}} + + +Check if a yarp port is correctly publishing unique values at each update . + + + + +{\ttfamily \#include $<$Sensors\+Duplicate\+Readings.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classSensorsDuplicateReadings_ab59f0ef1631d3e9e32319d7258cfb1f8}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classSensorsDuplicateReadings_a985c191f7133ff39409a5d30f93316cf}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classSensorsDuplicateReadings_a4c03abe12e3dadaaa13a26a537a897e3}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Check if a yarp port is correctly publishing unique values at each update . + +For some sensors, such as strain gauge based force sensors, errors on the measurement ensure that two different readings of the sensors are always different. If on a port that is publishing a sensor reading you get two times exactly the same value, this could mean that the same sensor reading was sent multiple times. This could happen for several reasons\+: +\begin{DoxyItemize} +\item The wrapper is running faster than the sensor frequency (depending on the configuration this could make sense or not) +\item The sensor readings are not properly read, for example because packets are lost or dropped (this usually indicate some problem in your system). +\end{DoxyItemize} + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering name &\PBS\centering string &\PBS\centering -\/ &\PBS\centering \char`\"{}\+Sensors\+Duplicate\+Readings\char`\"{} &\PBS\centering No &\PBS\centering The name of the test. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering time &\PBS\centering double &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Duration of the test for each port. &\PBS\centering -\/ \\\cline{1-7} +\PBS\centering PORTS (group ) &\PBS\centering Bottle &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of couples of port/tolerated\+Duplicates with this format\+: (portname1, tolerated\+Duplicates1) (portname1, tolerated\+Duplicates1) &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 88 of file Sensors\+Duplicate\+Readings.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/sensors-\/duplicate-\/readings/Sensors\+Duplicate\+Readings.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/sensors-\/duplicate-\/readings/Sensors\+Duplicate\+Readings.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classSkinWrapperTest.tex b/doxygen/doc/latex/classSkinWrapperTest.tex new file mode 100644 index 00000000..41913bb7 --- /dev/null +++ b/doxygen/doc/latex/classSkinWrapperTest.tex @@ -0,0 +1,40 @@ +\doxysection{Skin\+Wrapper\+Test Class Reference} +\label{classSkinWrapperTest}\index{SkinWrapperTest@{SkinWrapperTest}} + + +This test verifies the functionalities of skin\+Wrapper after the removal of analog\+Server from icub-\/main. + + + + +{\ttfamily \#include $<$Skin\+Wrapper\+Test.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classSkinWrapperTest_aa22a01cedaf43f2a9b19d8837379de99}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classSkinWrapperTest_ac79f439b54f8f4d3268cc9c63765b852}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classSkinWrapperTest_a5ffdc900a2af2b9371626f0b2588d65a}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This test verifies the functionalities of skin\+Wrapper after the removal of analog\+Server from icub-\/main. + +Definition at line 34 of file Skin\+Wrapper\+Test.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/skin\+Wrapper\+Test/Skin\+Wrapper\+Test.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/skin\+Wrapper\+Test/Skin\+Wrapper\+Test.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classTorqueControlAccuracy.tex b/doxygen/doc/latex/classTorqueControlAccuracy.tex new file mode 100644 index 00000000..4f413c55 --- /dev/null +++ b/doxygen/doc/latex/classTorqueControlAccuracy.tex @@ -0,0 +1,76 @@ +\doxysection{Torque\+Control\+Accuracy Class Reference} +\label{classTorqueControlAccuracy}\index{TorqueControlAccuracy@{TorqueControlAccuracy}} + + +This tests checks the a torque PID response, sending a step reference signal with a set\+Ref\+Torque command. + + + + +{\ttfamily \#include $<$Torque\+Control\+Accuracy.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classTorqueControlAccuracy_a1f3e69c138869defb9650a8419df5cda}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classTorqueControlAccuracy_ae33e8f69b2d85ce6a0a8e44da2e7c35f}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classTorqueControlAccuracy_a7a66c140c54e15ee9ec99ae9ee612de1}} +virtual void {\bfseries run} () +\item +\mbox{\label{classTorqueControlAccuracy_a696a9ca098b4f8503bc00bfd38220b59}} +bool {\bfseries go\+Home} () +\item +\mbox{\label{classTorqueControlAccuracy_a4cc80a5a67cd30324a43edaacdc57b63}} +void {\bfseries execute\+Cmd} () +\item +\mbox{\label{classTorqueControlAccuracy_a5e4873980d651c4338206ef198e0478a}} +void {\bfseries set\+Mode} (int desired\+\_\+mode) +\item +\mbox{\label{classTorqueControlAccuracy_ac1584b48a23e8bbcc6069fcdd75f5215}} +void {\bfseries save\+To\+File} (std\+::string filename, yarp\+::os\+::\+Bottle \&b) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This tests checks the a torque PID response, sending a step reference signal with a set\+Ref\+Torque command. + +This test currently does not return any error report. It simply moves a joint, and saves data to a different file for each joint. The data acquired can be analized with a matalab script to evaluate the torque PID properties. Be aware that a step greater than 1 Nm may be dangerous for both the robot and the human operator! + +example\+: test\+Runner -\/v -\/t Torque\+Control\+Accuracy.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(0 1 2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0 0 0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010\char`\"{} example\+: test\+Runner -\/v -\/t Torque\+Control\+Accuracy.\+dll -\/p \char`\"{}-\/-\/robot icub\+Sim -\/-\/part head -\/-\/joints \char`\"{}\char`\"{}(2)\char`\"{}\char`\"{} -\/-\/zeros \char`\"{}\char`\"{}(0)\char`\"{}\char`\"{} -\/-\/step 5 -\/-\/cycles 10 -\/-\/sample\+Time 0.\+010\char`\"{} + +Accepts the following parameters\+: \tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{7}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Parameter name }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Type }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Units }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Default Value }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Required }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Description }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Notes }\\\cline{1-7} +\endhead +\PBS\centering robot &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot. &\PBS\centering e.\+g. icub \\\cline{1-7} +\PBS\centering part &\PBS\centering string &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The name of the robot part. &\PBS\centering e.\+g. left\+\_\+arm \\\cline{1-7} +\PBS\centering joints &\PBS\centering vector of ints &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering List of joints to be tested &\PBS\centering \\\cline{1-7} +\PBS\centering zeros &\PBS\centering double &\PBS\centering deg &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The home position for each joint &\PBS\centering \\\cline{1-7} +\PBS\centering cycles &\PBS\centering int &\PBS\centering -\/ &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering Each joint will be tested multiple times &\PBS\centering \\\cline{1-7} +\PBS\centering step &\PBS\centering double &\PBS\centering Nm &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The amplitude of the step reference signal &\PBS\centering Recommended max\+: 1 Nm! \\\cline{1-7} +\PBS\centering sample\+Time &\PBS\centering double &\PBS\centering s &\PBS\centering -\/ &\PBS\centering Yes &\PBS\centering The sample time of the control thread &\PBS\centering \\\cline{1-7} +\end{longtabu} + + +Definition at line 52 of file Torque\+Control\+Accuracy.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/accuracy/Torque\+Control\+Accuracy.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/accuracy/Torque\+Control\+Accuracy.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/classTorqueControlGravityConsistency.tex b/doxygen/doc/latex/classTorqueControlGravityConsistency.tex new file mode 100644 index 00000000..0764d9ee --- /dev/null +++ b/doxygen/doc/latex/classTorqueControlGravityConsistency.tex @@ -0,0 +1,44 @@ +\doxysection{Torque\+Control\+Gravity\+Consistency Class Reference} +\label{classTorqueControlGravityConsistency}\index{TorqueControlGravityConsistency@{TorqueControlGravityConsistency}} + + +The test is supposed to be run with the i\+Cub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the whole\+Body\+Dynamics(\+Tree) running. + + + + +{\ttfamily \#include $<$Torque\+Control\+Gravity\+Consistency.\+h$>$} + + + +Inherits yarp\+::robottestingframework\+::\+Test\+Case. + +\doxysubsection*{Public Member Functions} +\begin{DoxyCompactItemize} +\item +\mbox{\label{classTorqueControlGravityConsistency_af458d18b20938955516073ffbb9aeb8a}} +virtual bool {\bfseries setup} (yarp\+::os\+::\+Property \&property) +\item +\mbox{\label{classTorqueControlGravityConsistency_a530ffd6435bf66da62107510ef379c3b}} +virtual void {\bfseries tear\+Down} () +\item +\mbox{\label{classTorqueControlGravityConsistency_a0a60459b300343fe929867703d38a8da}} +virtual void {\bfseries run} () +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +The test is supposed to be run with the i\+Cub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the whole\+Body\+Dynamics(\+Tree) running. + +The tests opens the whole\+Body\+Interface (to be migrated to use material available on YARP and i\+Dyn\+Tree) and compares the gravity compensation torque coming from the model and assuming that the gravity is fixed in the based with the joint torques measured by i\+Cub (that actually come from the whole\+Body\+Dynamics(\+Tree) ). + +Example\+: test\+Runner -\/v -\/t Torque\+Control\+Gravity\+Consistency.\+dll -\/p \char`\"{}\char`\"{} + +Definition at line 45 of file Torque\+Control\+Gravity\+Consistency.\+h. + + + +The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/gravity\+Consistency/Torque\+Control\+Gravity\+Consistency.\+h\item +/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/gravity\+Consistency/Torque\+Control\+Gravity\+Consistency.\+cpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_0c804fff733e48d30e1bfca9c425d2ef.tex b/doxygen/doc/latex/dir_0c804fff733e48d30e1bfca9c425d2ef.tex new file mode 100644 index 00000000..80f5ed69 --- /dev/null +++ b/doxygen/doc/latex/dir_0c804fff733e48d30e1bfca9c425d2ef.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/stiff\+Damp\+Check Directory Reference} +\label{dir_0c804fff733e48d30e1bfca9c425d2ef}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/stiff\+Damp\+Check Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/stiff\+Damp\+Check Directory Reference}} diff --git a/doxygen/doc/latex/dir_1ff6e3a7912c7481e100b734d4f6c773.tex b/doxygen/doc/latex/dir_1ff6e3a7912c7481e100b734d4f6c773.tex new file mode 100644 index 00000000..3a2bc13c --- /dev/null +++ b/doxygen/doc/latex/dir_1ff6e3a7912c7481e100b734d4f6c773.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/movement\+References\+Test Directory Reference} +\label{dir_1ff6e3a7912c7481e100b734d4f6c773}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/movement\+References\+Test Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/movement\+References\+Test Directory Reference}} diff --git a/doxygen/doc/latex/dir_22920df90588b6b2fe85332a8ebd338b.tex b/doxygen/doc/latex/dir_22920df90588b6b2fe85332a8ebd338b.tex new file mode 100644 index 00000000..bc526d63 --- /dev/null +++ b/doxygen/doc/latex/dir_22920df90588b6b2fe85332a8ebd338b.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/system-\/status Directory Reference} +\label{dir_22920df90588b6b2fe85332a8ebd338b}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/system-\/status Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/system-\/status Directory Reference}} diff --git a/doxygen/doc/latex/dir_2cd82cc5f0bc63ecdc472ec984cf3931.tex b/doxygen/doc/latex/dir_2cd82cc5f0bc63ecdc472ec984cf3931.tex new file mode 100644 index 00000000..25993106 --- /dev/null +++ b/doxygen/doc/latex/dir_2cd82cc5f0bc63ecdc472ec984cf3931.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/accuracy Directory Reference} +\label{dir_2cd82cc5f0bc63ecdc472ec984cf3931}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/accuracy Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/accuracy Directory Reference}} diff --git a/doxygen/doc/latex/dir_2e031885cc4d3ad1ede3959cab4922b2.tex b/doxygen/doc/latex/dir_2e031885cc4d3ad1ede3959cab4922b2.tex new file mode 100644 index 00000000..d7023b4a --- /dev/null +++ b/doxygen/doc/latex/dir_2e031885cc4d3ad1ede3959cab4922b2.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts/scripts Directory Reference} +\label{dir_2e031885cc4d3ad1ede3959cab4922b2}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts/scripts Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts/scripts Directory Reference}} diff --git a/doxygen/doc/latex/dir_34519bff5ae72130fe71a8620cbf1fc0.tex b/doxygen/doc/latex/dir_34519bff5ae72130fe71a8620cbf1fc0.tex new file mode 100644 index 00000000..15e01cfa --- /dev/null +++ b/doxygen/doc/latex/dir_34519bff5ae72130fe71a8620cbf1fc0.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/camera Directory Reference} +\label{dir_34519bff5ae72130fe71a8620cbf1fc0}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/camera Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/camera Directory Reference}} diff --git a/doxygen/doc/latex/dir_3931dff736a77fff33906f875a0db8d7.tex b/doxygen/doc/latex/dir_3931dff736a77fff33906f875a0db8d7.tex new file mode 100644 index 00000000..d8e7e7ba --- /dev/null +++ b/doxygen/doc/latex/dir_3931dff736a77fff33906f875a0db8d7.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy Directory Reference} +\label{dir_3931dff736a77fff33906f875a0db8d7}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy Directory Reference}} diff --git a/doxygen/doc/latex/dir_3b1318bac6af3327e49b6f2c90562c86.tex b/doxygen/doc/latex/dir_3b1318bac6af3327e49b6f2c90562c86.tex new file mode 100644 index 00000000..698228eb --- /dev/null +++ b/doxygen/doc/latex/dir_3b1318bac6af3327e49b6f2c90562c86.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/stiction Directory Reference} +\label{dir_3b1318bac6af3327e49b6f2c90562c86}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/stiction Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/stiction Directory Reference}} diff --git a/doxygen/doc/latex/dir_52bb83cdfa78eea1d57abbea3c8e3d28.tex b/doxygen/doc/latex/dir_52bb83cdfa78eea1d57abbea3c8e3d28.tex new file mode 100644 index 00000000..fbabcd9d --- /dev/null +++ b/doxygen/doc/latex/dir_52bb83cdfa78eea1d57abbea3c8e3d28.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/joint\+Limits Directory Reference} +\label{dir_52bb83cdfa78eea1d57abbea3c8e3d28}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/joint\+Limits Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/joint\+Limits Directory Reference}} diff --git a/doxygen/doc/latex/dir_588ff9359adf1870eba017afede6f94d.tex b/doxygen/doc/latex/dir_588ff9359adf1870eba017afede6f94d.tex new file mode 100644 index 00000000..782a7792 --- /dev/null +++ b/doxygen/doc/latex/dir_588ff9359adf1870eba017afede6f94d.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/skin\+Wrapper\+Test Directory Reference} +\label{dir_588ff9359adf1870eba017afede6f94d}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/skin\+Wrapper\+Test Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/skin\+Wrapper\+Test Directory Reference}} diff --git a/doxygen/doc/latex/dir_58c9f48d72e7737305eca65c820f5d4c.tex b/doxygen/doc/latex/dir_58c9f48d72e7737305eca65c820f5d4c.tex new file mode 100644 index 00000000..4c0bbf24 --- /dev/null +++ b/doxygen/doc/latex/dir_58c9f48d72e7737305eca65c820f5d4c.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ftsensor-\/tests Directory Reference} +\label{dir_58c9f48d72e7737305eca65c820f5d4c}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ftsensor-\/tests Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ftsensor-\/tests Directory Reference}} diff --git a/doxygen/doc/latex/dir_5eba7e4699fbf6bf477756242c12a311.tex b/doxygen/doc/latex/dir_5eba7e4699fbf6bf477756242c12a311.tex new file mode 100644 index 00000000..2d668bac --- /dev/null +++ b/doxygen/doc/latex/dir_5eba7e4699fbf6bf477756242c12a311.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/tests Directory Reference} +\label{dir_5eba7e4699fbf6bf477756242c12a311}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/tests Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor-\/tests Directory Reference}} diff --git a/doxygen/doc/latex/dir_6355ee7e8e7fccbf90712e6e68524328.tex b/doxygen/doc/latex/dir_6355ee7e8e7fccbf90712e6e68524328.tex new file mode 100644 index 00000000..96a2b876 --- /dev/null +++ b/doxygen/doc/latex/dir_6355ee7e8e7fccbf90712e6e68524328.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/models-\/consistency Directory Reference} +\label{dir_6355ee7e8e7fccbf90712e6e68524328}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/models-\/consistency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/models-\/consistency Directory Reference}} diff --git a/doxygen/doc/latex/dir_67a6d6fd93427d49c4a56e9e89568513.tex b/doxygen/doc/latex/dir_67a6d6fd93427d49c4a56e9e89568513.tex new file mode 100644 index 00000000..90a5e04d --- /dev/null +++ b/doxygen/doc/latex/dir_67a6d6fd93427d49c4a56e9e89568513.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/control\+Modes Directory Reference} +\label{dir_67a6d6fd93427d49c4a56e9e89568513}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/control\+Modes Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/control\+Modes Directory Reference}} diff --git a/doxygen/doc/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex b/doxygen/doc/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex new file mode 100644 index 00000000..c27e8400 --- /dev/null +++ b/doxygen/doc/latex/dir_68267d1309a1af8e8297ef4c3efbcdba.tex @@ -0,0 +1,9 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src Directory Reference} +\label{dir_68267d1309a1af8e8297ef4c3efbcdba}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\item +directory \hyperlink{dir_684cb237cc589112c257fb2b82bbd35f}{cartesian-\/control} +\item +directory \hyperlink{dir_bb6085b5660958491f908beff56f4e11}{gaze-\/control} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_684cb237cc589112c257fb2b82bbd35f.tex b/doxygen/doc/latex/dir_684cb237cc589112c257fb2b82bbd35f.tex new file mode 100644 index 00000000..621f1da3 --- /dev/null +++ b/doxygen/doc/latex/dir_684cb237cc589112c257fb2b82bbd35f.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control Directory Reference} +\label{dir_684cb237cc589112c257fb2b82bbd35f}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.tex b/doxygen/doc/latex/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.tex new file mode 100644 index 00000000..a9bd5d7e --- /dev/null +++ b/doxygen/doc/latex/dir_6fc1adc4fe0a69d5cc9f87dc6006118e.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/sensors-\/duplicate-\/readings Directory Reference} +\label{dir_6fc1adc4fe0a69d5cc9f87dc6006118e}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/sensors-\/duplicate-\/readings Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/sensors-\/duplicate-\/readings Directory Reference}} diff --git a/doxygen/doc/latex/dir_77ddb71cb6ac5d6664d62b97f5abbc63.tex b/doxygen/doc/latex/dir_77ddb71cb6ac5d6664d62b97f5abbc63.tex new file mode 100644 index 00000000..de75f373 --- /dev/null +++ b/doxygen/doc/latex/dir_77ddb71cb6ac5d6664d62b97f5abbc63.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/simple-\/p2p-\/movement Directory Reference} +\label{dir_77ddb71cb6ac5d6664d62b97f5abbc63}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/simple-\/p2p-\/movement Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/simple-\/p2p-\/movement Directory Reference}} diff --git a/doxygen/doc/latex/dir_7afe760acf634ae748bef9bf87f73d01.tex b/doxygen/doc/latex/dir_7afe760acf634ae748bef9bf87f73d01.tex new file mode 100644 index 00000000..2ca205de --- /dev/null +++ b/doxygen/doc/latex/dir_7afe760acf634ae748bef9bf87f73d01.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders\+Sign\+Check Directory Reference} +\label{dir_7afe760acf634ae748bef9bf87f73d01}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders\+Sign\+Check Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders\+Sign\+Check Directory Reference}} diff --git a/doxygen/doc/latex/dir_7f61241abd7fbdf9954805296c6d0bed.tex b/doxygen/doc/latex/dir_7f61241abd7fbdf9954805296c6d0bed.tex new file mode 100644 index 00000000..315779a2 --- /dev/null +++ b/doxygen/doc/latex/dir_7f61241abd7fbdf9954805296c6d0bed.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/optical\+Encoders-\/drift Directory Reference} +\label{dir_7f61241abd7fbdf9954805296c6d0bed}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/optical\+Encoders-\/drift Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/optical\+Encoders-\/drift Directory Reference}} diff --git a/doxygen/doc/latex/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.tex b/doxygen/doc/latex/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.tex new file mode 100644 index 00000000..bcdf2502 --- /dev/null +++ b/doxygen/doc/latex/dir_9d63e44c2cb0ede5b4e8da10f50f63e8.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Fixture Directory Reference} +\label{dir_9d63e44c2cb0ede5b4e8da10f50f63e8}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Fixture Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Fixture Directory Reference}} diff --git a/doxygen/doc/latex/dir_9e7e413093116f0711b4468be0f53b25.tex b/doxygen/doc/latex/dir_9e7e413093116f0711b4468be0f53b25.tex new file mode 100644 index 00000000..921e0d04 --- /dev/null +++ b/doxygen/doc/latex/dir_9e7e413093116f0711b4468be0f53b25.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Test Directory Reference} +\label{dir_9e7e413093116f0711b4468be0f53b25}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Test Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp/\+Example\+Test Directory Reference}} diff --git a/doxygen/doc/latex/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.tex b/doxygen/doc/latex/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.tex new file mode 100644 index 00000000..2737371e --- /dev/null +++ b/doxygen/doc/latex/dir_9f31a7a24dbe04ff6c400c17d7d6f27b.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control/simple-\/look Directory Reference} +\label{dir_9f31a7a24dbe04ff6c400c17d7d6f27b}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control/simple-\/look Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control/simple-\/look Directory Reference}} diff --git a/doxygen/doc/latex/dir_a74cd033cebccd01e109eef31bc43830.tex b/doxygen/doc/latex/dir_a74cd033cebccd01e109eef31bc43830.tex new file mode 100644 index 00000000..b9b38c88 --- /dev/null +++ b/doxygen/doc/latex/dir_a74cd033cebccd01e109eef31bc43830.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy-\/\+External\+Pid Directory Reference} +\label{dir_a74cd033cebccd01e109eef31bc43830}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy-\/\+External\+Pid Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Control-\/accuracy-\/\+External\+Pid Directory Reference}} diff --git a/doxygen/doc/latex/dir_bb6085b5660958491f908beff56f4e11.tex b/doxygen/doc/latex/dir_bb6085b5660958491f908beff56f4e11.tex new file mode 100644 index 00000000..b25a66e6 --- /dev/null +++ b/doxygen/doc/latex/dir_bb6085b5660958491f908beff56f4e11.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control Directory Reference} +\label{dir_bb6085b5660958491f908beff56f4e11}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/gaze-\/control Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_c4278cdbadca2a5e8f60a98cd2517319.tex b/doxygen/doc/latex/dir_c4278cdbadca2a5e8f60a98cd2517319.tex new file mode 100644 index 00000000..12461444 --- /dev/null +++ b/doxygen/doc/latex/dir_c4278cdbadca2a5e8f60a98cd2517319.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp Directory Reference} +\label{dir_c4278cdbadca2a5e8f60a98cd2517319}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example/cpp Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.tex b/doxygen/doc/latex/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.tex new file mode 100644 index 00000000..de4293d5 --- /dev/null +++ b/doxygen/doc/latex/dir_cfafba98a580ce4b62f8a6fa96d7cbb0.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example Directory Reference} +\label{dir_cfafba98a580ce4b62f8a6fa96d7cbb0}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/example Directory Reference}} diff --git a/doxygen/doc/latex/dir_d0781ab5bdb71555a7f6c72636ba8088.tex b/doxygen/doc/latex/dir_d0781ab5bdb71555a7f6c72636ba8088.tex new file mode 100644 index 00000000..f56189b9 --- /dev/null +++ b/doxygen/doc/latex/dir_d0781ab5bdb71555a7f6c72636ba8088.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/reaching-\/tolerance Directory Reference} +\label{dir_d0781ab5bdb71555a7f6c72636ba8088}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/reaching-\/tolerance Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/cartesian-\/control/reaching-\/tolerance Directory Reference}} diff --git a/doxygen/doc/latex/dir_d6cc1804077fb7a0bee471bebe09c948.tex b/doxygen/doc/latex/dir_d6cc1804077fb7a0bee471bebe09c948.tex new file mode 100644 index 00000000..e6d742f4 --- /dev/null +++ b/doxygen/doc/latex/dir_d6cc1804077fb7a0bee471bebe09c948.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ports-\/frequency Directory Reference} +\label{dir_d6cc1804077fb7a0bee471bebe09c948}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ports-\/frequency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/ports-\/frequency Directory Reference}} diff --git a/doxygen/doc/latex/dir_de7c96bd180ef87bf5425ed419472c36.tex b/doxygen/doc/latex/dir_de7c96bd180ef87bf5425ed419472c36.tex new file mode 100644 index 00000000..080d781a --- /dev/null +++ b/doxygen/doc/latex/dir_de7c96bd180ef87bf5425ed419472c36.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Direct Directory Reference} +\label{dir_de7c96bd180ef87bf5425ed419472c36}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Direct Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/position\+Direct Directory Reference}} diff --git a/doxygen/doc/latex/dir_e570188f87838128b6c12995b595ee3e.tex b/doxygen/doc/latex/dir_e570188f87838128b6c12995b595ee3e.tex new file mode 100644 index 00000000..c91d755d --- /dev/null +++ b/doxygen/doc/latex/dir_e570188f87838128b6c12995b595ee3e.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts Directory Reference} +\label{dir_e570188f87838128b6c12995b595ee3e}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites/contexts Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_ea8250e1e424defa140420a75e35c564.tex b/doxygen/doc/latex/dir_ea8250e1e424defa140420a75e35c564.tex new file mode 100644 index 00000000..1db6fe5c --- /dev/null +++ b/doxygen/doc/latex/dir_ea8250e1e424defa140420a75e35c564.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/consistency Directory Reference} +\label{dir_ea8250e1e424defa140420a75e35c564}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/consistency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/consistency Directory Reference}} diff --git a/doxygen/doc/latex/dir_ec9ed375a115a2645126306c0ce5bc8a.tex b/doxygen/doc/latex/dir_ec9ed375a115a2645126306c0ce5bc8a.tex new file mode 100644 index 00000000..e55d29a4 --- /dev/null +++ b/doxygen/doc/latex/dir_ec9ed375a115a2645126306c0ce5bc8a.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites Directory Reference} +\label{dir_ec9ed375a115a2645126306c0ce5bc8a}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/suites Directory Reference}} diff --git a/doxygen/doc/latex/dir_f0b080432f22d2b191784a0df690e6ac.tex b/doxygen/doc/latex/dir_f0b080432f22d2b191784a0df690e6ac.tex new file mode 100644 index 00000000..0e9fbeea --- /dev/null +++ b/doxygen/doc/latex/dir_f0b080432f22d2b191784a0df690e6ac.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/gravity\+Consistency Directory Reference} +\label{dir_f0b080432f22d2b191784a0df690e6ac}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/gravity\+Consistency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/torque\+Control-\/gravity\+Consistency Directory Reference}} diff --git a/doxygen/doc/latex/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.tex b/doxygen/doc/latex/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.tex new file mode 100644 index 00000000..20e7c188 --- /dev/null +++ b/doxygen/doc/latex/dir_f821a201e4a79ecb65e6cdb9d62ed3ae.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/demo\+Red\+Ball Directory Reference} +\label{dir_f821a201e4a79ecb65e6cdb9d62ed3ae}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/demo\+Red\+Ball Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/demo\+Red\+Ball Directory Reference}} diff --git a/doxygen/doc/latex/dir_f9de59b413a1f1ae04ea264c82cc2719.tex b/doxygen/doc/latex/dir_f9de59b413a1f1ae04ea264c82cc2719.tex new file mode 100644 index 00000000..d411df20 --- /dev/null +++ b/doxygen/doc/latex/dir_f9de59b413a1f1ae04ea264c82cc2719.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/openloop-\/consistency Directory Reference} +\label{dir_f9de59b413a1f1ae04ea264c82cc2719}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/openloop-\/consistency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/openloop-\/consistency Directory Reference}} diff --git a/doxygen/doc/latex/dir_ff120bfd69174aceba0b7c2c1b4a03e3.tex b/doxygen/doc/latex/dir_ff120bfd69174aceba0b7c2c1b4a03e3.tex new file mode 100644 index 00000000..131836cb --- /dev/null +++ b/doxygen/doc/latex/dir_ff120bfd69174aceba0b7c2c1b4a03e3.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders-\/consistency Directory Reference} +\label{dir_ff120bfd69174aceba0b7c2c1b4a03e3}\index{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders-\/consistency Directory Reference@{/home/runner/work/icub-\/tests/icub-\/tests/gh-\/pages/src/motor\+Encoders-\/consistency Directory Reference}} diff --git a/doxygen/doc/latex/doxygen.sty b/doxygen/doc/latex/doxygen.sty new file mode 100644 index 00000000..8f59bccf --- /dev/null +++ b/doxygen/doc/latex/doxygen.sty @@ -0,0 +1,576 @@ +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{doxygen} + +% Packages used by this style file +\RequirePackage{alltt} +%%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{calc} +\RequirePackage{float} +%%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package +\RequirePackage{verbatim} +\RequirePackage[table]{xcolor} +\RequirePackage{longtable_doxygen} +\RequirePackage{tabu_doxygen} +\RequirePackage{fancyvrb} +\RequirePackage{tabularx} +\RequirePackage{multicol} +\RequirePackage{multirow} +\RequirePackage{hanging} +\RequirePackage{ifpdf} +\RequirePackage{adjustbox} +\RequirePackage{amssymb} +\RequirePackage{stackengine} +\RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis + +%---------- Internal commands used in this style file ---------------- + +\newcommand{\ensurespace}[1]{% + \begingroup% + \setlength{\dimen@}{#1}% + \vskip\z@\@plus\dimen@% + \penalty -100\vskip\z@\@plus -\dimen@% + \vskip\dimen@% + \penalty 9999% + \vskip -\dimen@% + \vskip\z@skip% hide the previous |\vskip| from |\addvspace| + \endgroup% +} + +\newcommand{\DoxyHorRuler}[1]{% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{#1=0}% + {% + \hrule% + }% + {% + \hrulefilll% + }% +} +\newcommand{\DoxyLabelFont}{} +\newcommand{\entrylabel}[1]{% + {% + \parbox[b]{\labelwidth-4pt}{% + \makebox[0pt][l]{\DoxyLabelFont#1}% + \vspace{1.5\baselineskip}% + }% + }% +} + +\newenvironment{DoxyDesc}[1]{% + \ensurespace{4\baselineskip}% + \begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + %\setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + }% + \item[#1]% +}{% + \end{list}% +} + +\newsavebox{\xrefbox} +\newlength{\xreflength} +\newcommand{\xreflabel}[1]{% + \sbox{\xrefbox}{#1}% + \setlength{\xreflength}{\wd\xrefbox}% + \ifthenelse{\xreflength>\labelwidth}{% + \begin{minipage}{\textwidth}% + \setlength{\parindent}{0pt}% + \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}% + \end{minipage}% + }{% + \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}% + }% +} + +%---------- Commands used by doxygen LaTeX output generator ---------- + +% Used by
     ... 
    +\newenvironment{DoxyPre}{% + \small% + \begin{alltt}% +}{% + \end{alltt}% + \normalsize% +} +% Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output. +\newlength{\CodeWidthChar} +\newlength{\CodeHeightChar} +\settowidth{\CodeWidthChar}{?} +\settoheight{\CodeHeightChar}{?} +% Necessary for hanging indent +\newlength{\DoxyCodeWidth} + +\newcommand\DoxyCodeLine[1]{\hangpara{\DoxyCodeWidth}{1}{#1}\par} + +\newcommand\NiceSpace{% + \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}% +} + +% Used by @code ... @endcode +\newenvironment{DoxyCode}[1]{% + \par% + \scriptsize% + \normalfont\ttfamily% + \rightskip0pt plus 1fil% + \settowidth{\DoxyCodeWidth}{000000}% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% + \setlength{\parskip}{0ex plus 0ex minus 0ex}% + \ifthenelse{\equal{#1}{0}} + { + {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces% + } + { + {\lccode`~32 \lowercase{\global\let~}}\obeyspaces% + } + +}{% + \normalfont% + \normalsize% + \settowidth{\CodeWidthChar}{?}% + \settoheight{\CodeHeightChar}{?}% +} + +% Redefining not defined characters, i.e. "Replacement Character" in tex output. +\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{% + \textcolor{white}{\sffamily\bfseries\small ?}}{% + \rotatebox{45}{$\blacksquare$}}}} + +% Used by @example, @include, @includelineno and @dontinclude +\newenvironment{DoxyCodeInclude}[1]{% + \DoxyCode{#1}% +}{% + \endDoxyCode% +} + +% Used by @verbatim ... @endverbatim +\newenvironment{DoxyVerb}{% + \footnotesize% + \verbatim% +}{% + \endverbatim% + \normalsize% +} + +% Used by @verbinclude +\newenvironment{DoxyVerbInclude}{% + \DoxyVerb% +}{% + \endDoxyVerb% +} + +% Used by numbered lists (using '-#' or
      ...
    ) +\newenvironment{DoxyEnumerate}{% + \enumerate% +}{% + \endenumerate% +} + +% Used by bullet lists (using '-', @li, @arg, or
      ...
    ) +\newenvironment{DoxyItemize}{% + \itemize% +}{% + \enditemize% +} + +% Used by description lists (using
    ...
    ) +\newenvironment{DoxyDescription}{% + \description% +}{% + \enddescription% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if caption is specified) +\newenvironment{DoxyImage}{% + \begin{figure}[H]% + \centering% +}{% + \end{figure}% +} + +% Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc +% (only if no caption is specified) +\newenvironment{DoxyImageNoCaption}{% + \begin{center}% +}{% + \end{center}% +} + +% Used by @image +% (only if inline is specified) +\newenvironment{DoxyInlineImage}{% +}{% +} + +% Used by @attention +\newenvironment{DoxyAttention}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @author and @authors +\newenvironment{DoxyAuthor}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @date +\newenvironment{DoxyDate}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @invariant +\newenvironment{DoxyInvariant}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @note +\newenvironment{DoxyNote}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @post +\newenvironment{DoxyPostcond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @pre +\newenvironment{DoxyPrecond}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @copyright +\newenvironment{DoxyCopyright}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @remark +\newenvironment{DoxyRemark}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @return and @returns +\newenvironment{DoxyReturn}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @since +\newenvironment{DoxySince}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @see +\newenvironment{DoxySeeAlso}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @version +\newenvironment{DoxyVersion}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @warning +\newenvironment{DoxyWarning}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by @internal +\newenvironment{DoxyInternal}[1]{% + \paragraph*{#1}% +}{% +} + +% Used by @par and @paragraph +\newenvironment{DoxyParagraph}[1]{% + \begin{DoxyDesc}{#1}% +}{% + \end{DoxyDesc}% +} + +% Used by parameter lists +\newenvironment{DoxyParams}[2][]{% + \tabulinesep=1mm% + \par% + \ifthenelse{\equal{#1}{}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description + {\ifthenelse{\equal{#1}{1}}% + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc + {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc + } + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields of simple structs +\newenvironment{DoxyFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for fields simple class style enums +\newenvironment{DoxyEnumFields}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for parameters within a detailed function description +\newenvironment{DoxyParamCaption}{% + \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}% +}{% +} + +% Used by return value lists +\newenvironment{DoxyRetVals}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by exception lists +\newenvironment{DoxyExceptions}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used by template parameter lists +\newenvironment{DoxyTemplParams}[1]{% + \tabulinesep=1mm% + \par% + \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endfirsthead% + \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]% + \hline% + \endhead% +}{% + \end{longtabu*}% + \vspace{6pt}% +} + +% Used for member lists +\newenvironment{DoxyCompactItemize}{% + \begin{itemize}% + \setlength{\itemsep}{-3pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \setlength{\partopsep}{0pt}% +}{% + \end{itemize}% +} + +% Used for member descriptions +\newenvironment{DoxyCompactList}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + \setlength{\itemsep}{0pt}% + \setlength{\parsep}{0pt}% + \setlength{\topsep}{0pt}% + \renewcommand{\makelabel}{\hfill}% + }% +}{% + \end{list}% +} + +% Used for reference lists (@bug, @deprecated, @todo, etc.) +\newenvironment{DoxyRefList}{% + \begin{list}{}{% + \setlength{\labelwidth}{10pt}% + \setlength{\leftmargin}{\labelwidth}% + \addtolength{\leftmargin}{\labelsep}% + \renewcommand{\makelabel}{\xreflabel}% + }% +}{% + \end{list}% +} + +% Used by @bug, @deprecated, @todo, etc. +\newenvironment{DoxyRefDesc}[1]{% + \begin{list}{}{% + \renewcommand\makelabel[1]{\textbf{##1}}% + \settowidth\labelwidth{\makelabel{#1}}% + \setlength\leftmargin{\labelwidth+\labelsep}% + }% +}{% + \end{list}% +} + +% Used by parameter lists and simple sections +\newenvironment{Desc} +{\begin{list}{}{% + \settowidth{\labelwidth}{20pt}% + \setlength{\parsep}{0pt}% + \setlength{\itemsep}{0pt}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% + \renewcommand{\makelabel}{\entrylabel}% + } +}{% + \end{list}% +} + +% Used by tables +\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}% +\newenvironment{TabularC}[1]% +{\tabulinesep=1mm +\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}% +{\end{longtabu*}\par}% + +\newenvironment{TabularNC}[1]% +{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}% +{\end{tabu}\par}% + +% Used for member group headers +\newenvironment{Indent}{% + \begin{list}{}{% + \setlength{\leftmargin}{0.5cm}% + }% + \item[]\ignorespaces% +}{% + \unskip% + \end{list}% +} + +% Used when hyperlinks are turned off +\newcommand{\doxyref}[3]{% + \textbf{#1} (\textnormal{#2}\,\pageref{#3})% +} + +% Used to link to a table when hyperlinks are turned on +\newcommand{\doxytablelink}[2]{% + \ref{#1}% +} + +% Used to link to a table when hyperlinks are turned off +\newcommand{\doxytableref}[3]{% + \ref{#3}% +} + +% Used by @addindex +\newcommand{\lcurly}{\{} +\newcommand{\rcurly}{\}} + +% Colors used for syntax highlighting +\definecolor{comment}{rgb}{0.5,0.0,0.0} +\definecolor{keyword}{rgb}{0.0,0.5,0.0} +\definecolor{keywordtype}{rgb}{0.38,0.25,0.125} +\definecolor{keywordflow}{rgb}{0.88,0.5,0.0} +\definecolor{preprocessor}{rgb}{0.5,0.38,0.125} +\definecolor{stringliteral}{rgb}{0.0,0.125,0.25} +\definecolor{charliteral}{rgb}{0.0,0.5,0.5} +\definecolor{vhdldigit}{rgb}{1.0,0.0,1.0} +\definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43} +\definecolor{vhdllogic}{rgb}{1.0,0.0,0.0} +\definecolor{vhdlchar}{rgb}{0.0,0.0,0.0} + +% Color used for table heading +\newcommand{\tableheadbgcolor}{lightgray}% + +% Version of hypertarget with correct landing location +\newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} + +% possibility to have sections etc. be within the margins +% unfortunately had to copy part of book.cls and add \raggedright +\makeatletter +\newcommand\doxysection{\@startsection {section}{1}{\z@}% + {-3.5ex \@plus -1ex \@minus -.2ex}% + {2.3ex \@plus.2ex}% + {\raggedright\normalfont\Large\bfseries}} +\newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\large\bfseries}} +\newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}% + {-3.25ex\@plus -1ex \@minus -.2ex}% + {1.5ex \@plus .2ex}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxyparagraph{\@startsection{paragraph}{4}{\z@}% + {3.25ex \@plus1ex \@minus.2ex}% + {-1em}% + {\raggedright\normalfont\normalsize\bfseries}} +\newcommand\doxysubparagraph{\@startsection{subparagraph}{5}{\parindent}% + {3.25ex \@plus1ex \@minus .2ex}% + {-1em}% + {\raggedright\normalfont\normalsize\bfseries}} +\makeatother +% Define caption that is also suitable in a table +\makeatletter +\def\doxyfigcaption{% +\H@refstepcounter{figure}% +\@dblarg{\@caption{figure}}} +\makeatother diff --git a/doxygen/doc/latex/group__icub-tests.tex b/doxygen/doc/latex/group__icub-tests.tex new file mode 100644 index 00000000..871f69e7 --- /dev/null +++ b/doxygen/doc/latex/group__icub-tests.tex @@ -0,0 +1,67 @@ +\doxysection{A list of available tests} +\label{group__icub-tests}\index{A list of available tests@{A list of available tests}} + + +This page contains the list of all the tests tht are currently available and documented. + + +\doxysubsection*{Data Structures} +\begin{DoxyCompactItemize} +\item +class \mbox{\hyperlink{classExampleTest}{Example\+Test}} +\begin{DoxyCompactList}\small\item\em This is just an example test, use it as a reference to implement new tests. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classCameraTest}{Camera\+Test}} +\begin{DoxyCompactList}\small\item\em Check if a camera is publishing images at desired framerate. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classCartesianControlReachingToleranceTest}{Cartesian\+Control\+Reaching\+Tolerance\+Test}} +\begin{DoxyCompactList}\small\item\em This test verifies the point-\/to-\/point cartesian movement. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classCartesianControlSimpleP2pMovementTest}{Cartesian\+Control\+Simple\+P2p\+Movement\+Test}} +\begin{DoxyCompactList}\small\item\em This test verifies the point-\/to-\/point cartesian movement. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classControlModes}{Control\+Modes}} +\begin{DoxyCompactList}\small\item\em The test checks if the joint is able to go in all the available control/interaction modes and if transition between the states is correct. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classDemoRedBallTest}{Demo\+Red\+Ball\+Test}} +\begin{DoxyCompactList}\small\item\em This test verifies the point-\/to-\/point cartesian movement. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classFtSensorTest}{Ft\+Sensor\+Test}} +\begin{DoxyCompactList}\small\item\em Check if a FT sensor port is correctly publishing a vector with 6 values. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classGazeControlSimpleLookTest}{Gaze\+Control\+Simple\+Look\+Test}} +\begin{DoxyCompactList}\small\item\em This test verifies the simple gaze movements. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classImu}{Imu}} +\begin{DoxyCompactList}\small\item\em The purpose of this test is to evaluate the accuracy of the IMU Euler angles measurements. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classJointLimits}{Joint\+Limits}} +\begin{DoxyCompactList}\small\item\em Check if the software joint limits are properly set. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classMotorTest}{Motor\+Test}} +\begin{DoxyCompactList}\small\item\em Check IPosition\+Control and IEncoders. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classOpticalEncodersConsistency}{Optical\+Encoders\+Consistency}} +\begin{DoxyCompactList}\small\item\em This tests checks if the motor encoder reading are consistent with the joint encoder readings. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classMotorEncodersSignCheck}{Motor\+Encoders\+Sign\+Check}} +\begin{DoxyCompactList}\small\item\em This tests checks if the motor encoder readings increase when positive pwm is applayed to motor. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classMovementReferencesTest}{Movement\+References\+Test}} +\begin{DoxyCompactList}\small\item\em Check IPosition\+Control, IVelocity\+Control, IPWMControl, IPosition\+Direct. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classOpticalEncodersDrift}{Optical\+Encoders\+Drift}} +\begin{DoxyCompactList}\small\item\em This tests checks if the relative encoders measurements are consistent over time, by performing cyclic movements between two reference positions (min and max). \end{DoxyCompactList}\item +class \mbox{\hyperlink{classPositionControlAccuracy}{Position\+Control\+Accuracy}} +\begin{DoxyCompactList}\small\item\em This tests checks the a position PID response, sending a step reference signal with a position\+Direct command. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classPositionControlAccuracyExernalPid}{Position\+Control\+Accuracy\+Exernal\+Pid}} +\begin{DoxyCompactList}\small\item\em This tests checks the response of the system to a position step, sending directly PWM commands to a joint. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classPositionDirect}{Position\+Direct}} +\begin{DoxyCompactList}\small\item\em This tests checks the position\+Direct control, sending a sinusoidal reference signal, with parametric frequency and amplitude. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classSensorsDuplicateReadings}{Sensors\+Duplicate\+Readings}} +\begin{DoxyCompactList}\small\item\em Check if a yarp port is correctly publishing unique values at each update . \end{DoxyCompactList}\item +class \mbox{\hyperlink{classSkinWrapperTest}{Skin\+Wrapper\+Test}} +\begin{DoxyCompactList}\small\item\em This test verifies the functionalities of skin\+Wrapper after the removal of analog\+Server from icub-\/main. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classTorqueControlAccuracy}{Torque\+Control\+Accuracy}} +\begin{DoxyCompactList}\small\item\em This tests checks the a torque PID response, sending a step reference signal with a set\+Ref\+Torque command. \end{DoxyCompactList}\item +class \mbox{\hyperlink{classTorqueControlGravityConsistency}{Torque\+Control\+Gravity\+Consistency}} +\begin{DoxyCompactList}\small\item\em The test is supposed to be run with the i\+Cub fixed to the pole, with the pole leveled with respect to the gravity (please check this with a level before running the test) and with the whole\+Body\+Dynamics(\+Tree) running. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This page contains the list of all the tests tht are currently available and documented. + +Each class is a test that can be ran and configured independently. + +To add a test to this list it is enough that you add the following line to the class that implements the test\+: + +\begin{DoxyVerb}\ingroup icub-tests\end{DoxyVerb} + + +Do not forget to generate the documentation either locally or online following the instructions \href{https://github.com/robotology/icub-tests/}{\texttt{ here}}. \ No newline at end of file diff --git a/doxygen/doc/latex/index.tex b/doxygen/doc/latex/index.tex new file mode 100644 index 00000000..3b4bef9d --- /dev/null +++ b/doxygen/doc/latex/index.tex @@ -0,0 +1,7 @@ +The {\ttfamily icub-\/tests} repository contains tests for the i\+Cub robot.\+Tests are written using the Robot Testing Framework. See \href{https://github.com/robotology/robot-testing-framework}{\texttt{ https\+://github.\+com/robotology/robot-\/testing-\/framework}} for how to use Robot Testing Framework. + +\begin{DoxyItemize} +\item Installation\+: \mbox{\hyperlink{installation}{Installation Instructions}} \item Getting started\+: \mbox{\hyperlink{writing-and-running}{Writing and Running Tests}} \item List of available tests\+: \mbox{\hyperlink{group__icub-tests}{A list of available tests}}\end{DoxyItemize} +\hypertarget{index_contributors}{}\doxysection{Contributors}\label{index_contributors} +\begin{DoxyItemize} +\item Ali Paikan \item Lorenzo Natale \item Silvio Traversaro \item Alessandro Scalzo \item Marco Randazzo \item Valentina Gaggero \item Ugo Pattacini \item Nicolò Genesio \item Daniele E. Domenichelli \end{DoxyItemize} diff --git a/doxygen/doc/latex/installation.tex b/doxygen/doc/latex/installation.tex new file mode 100644 index 00000000..4cec6449 --- /dev/null +++ b/doxygen/doc/latex/installation.tex @@ -0,0 +1,38 @@ +\hypertarget{installation_installing_robottestingframework}{}\doxysection{Installing Robot Testing Framework}\label{installation_installing_robottestingframework} +If you have not installed Robot Testing Framework, Please see \href{http://robotology.github.io/robot-testing-framework/index.html}{\texttt{ http\+://robotology.\+github.\+io/robot-\/testing-\/framework/index.\+html}}.~\newline +Make sure that the {\ttfamily yarpmanager} robottestingframework-\/plugin generated by YARP can be found by the {\ttfamily robottestingframework-\/testrunner}.~\newline +\hypertarget{installation_building_tests}{}\doxysection{Building tests}\label{installation_building_tests} +\hypertarget{installation_building_tests_unix}{}\doxysubsection{Linux/mac\+OS}\label{installation_building_tests_unix} +On Linux/mac\+OS machines, open a terminal and type\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{\$ git clone https:\textcolor{comment}{//github.com/robotology/icub-\/tests.git}} +\DoxyCodeLine{\$ cd icub-\/tests} +\DoxyCodeLine{\$ mkdir build} +\DoxyCodeLine{\$ cd build} +\DoxyCodeLine{\$ cmake ..} +\DoxyCodeLine{\$ make} + +\end{DoxyCode} +\hypertarget{installation_building_tests_win}{}\doxysubsection{Windows}\label{installation_building_tests_win} +On Windows machines use the CMake program to create Visual Studio project and build it.\hypertarget{installation_configuration}{}\doxysection{Configuration}\label{installation_configuration} +\hypertarget{installation_plugins}{}\doxysubsection{Plugins}\label{installation_plugins} +Test cases are built as Robot Testing Framework plug-\/ins (shared libraries) and can be found in {\ttfamily icub-\/tests/build/plugins} folder.~\newline +We need to add the plug-\/ins path to the OS-\/specific dynamic linker environment variable + +\begin{DoxyItemize} +\item {\bfseries{Linux}} {\ttfamily LD\+\_\+\+LIBRARY\+\_\+\+PATH} \item {\bfseries{mac\+OS}} {\ttfamily DYLD\+\_\+\+LIBRARY\+\_\+\+PATH} \item {\bfseries{Windows}} {\ttfamily PATH}\end{DoxyItemize} +As an example, under Linux\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{\$ echo \textcolor{stringliteral}{'export LD\_LIBRARY\_PATH=\$LD\_LIBRARY\_PATH:/build/plugins'} >> \string~/.bashrc} + +\end{DoxyCode} +\hypertarget{installation_context}{}\doxysubsection{Context}\label{installation_context} +Tests configuration (.ini files) can be found in {\ttfamily icub-\/tests/suite/contexts}.~\newline +We need to configure the OS-\/independent {\ttfamily YARP\+\_\+\+DATA\+\_\+\+DIRS} environment variable so that the test cases can load the configuration files. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{\$ echo \textcolor{stringliteral}{'export YARP\_DATA\_DIRS=\$YARP\_DATA\_DIRS:/suites'} >> \string~/.bashrc} + +\end{DoxyCode} + \ No newline at end of file diff --git a/doxygen/doc/latex/longtable_doxygen.sty b/doxygen/doc/latex/longtable_doxygen.sty new file mode 100644 index 00000000..a0eb314f --- /dev/null +++ b/doxygen/doc/latex/longtable_doxygen.sty @@ -0,0 +1,448 @@ +%% +%% This is file `longtable.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% longtable.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% The source is maintained by the LaTeX Project team and bug +%% reports for it can be opened at http://latex-project.org/bugs.html +%% (but please observe conditions on bug reports sent to that address!) +%% +%% Copyright 1993-2016 +%% The LaTeX3 Project and any individual authors listed elsewhere +%% in this file. +%% +%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'. +%% -------------------------------------------------------------------------- +%% +%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3c or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This file may only be distributed together with a copy of the LaTeX +%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle' +%% without such generated files. +%% +%% The list of all files belonging to the LaTeX `Tools Bundle' is +%% given in the file `manifest.txt'. +%% +%% File: longtable.dtx Copyright (C) 1990-2001 David Carlisle +\NeedsTeXFormat{LaTeX2e}[1995/06/01] +\ProvidesPackage{longtable_doxygen} + [2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen] +\def\LT@err{\PackageError{longtable}} +\def\LT@warn{\PackageWarning{longtable}} +\def\LT@final@warn{% + \AtEndDocument{% + \LT@warn{Table \@width s have changed. Rerun LaTeX.\@gobbletwo}}% + \global\let\LT@final@warn\relax} +\DeclareOption{errorshow}{% + \def\LT@warn{\PackageInfo{longtable}}} +\DeclareOption{pausing}{% + \def\LT@warn#1{% + \LT@err{#1}{This is not really an error}}} +\DeclareOption{set}{} +\DeclareOption{final}{} +\ProcessOptions +\newskip\LTleft \LTleft=\fill +\newskip\LTright \LTright=\fill +\newskip\LTpre \LTpre=\bigskipamount +\newskip\LTpost \LTpost=\bigskipamount +\newcount\LTchunksize \LTchunksize=20 +\let\c@LTchunksize\LTchunksize +\newdimen\LTcapwidth \LTcapwidth=4in +\newbox\LT@head +\newbox\LT@firsthead +\newbox\LT@foot +\newbox\LT@lastfoot +\newcount\LT@cols +\newcount\LT@rows +\newcounter{LT@tables} +\newcounter{LT@chunks}[LT@tables] +\ifx\c@table\undefined + \newcounter{table} + \def\fnum@table{\tablename~\thetable} +\fi +\ifx\tablename\undefined + \def\tablename{Table} +\fi +\newtoks\LT@p@ftn +\mathchardef\LT@end@pen=30000 +\def\longtable{% + \par + \ifx\multicols\@undefined + \else + \ifnum\col@number>\@ne + \@twocolumntrue + \fi + \fi + \if@twocolumn + \LT@err{longtable not in 1-column mode}\@ehc + \fi + \begingroup + \@ifnextchar[\LT@array{\LT@array[x]}} +\def\LT@array[#1]#2{% + \refstepcounter{table}\stepcounter{LT@tables}% + \if l#1% + \LTleft\z@ \LTright\fill + \else\if r#1% + \LTleft\fill \LTright\z@ + \else\if c#1% + \LTleft\fill \LTright\fill + \fi\fi\fi + \let\LT@mcol\multicolumn + \let\LT@@tabarray\@tabarray + \let\LT@@hl\hline + \def\@tabarray{% + \let\hline\LT@@hl + \LT@@tabarray}% + \let\\\LT@tabularcr\let\tabularnewline\\% + \def\newpage{\noalign{\break}}% + \def\pagebreak{\noalign{\ifnum`}=0\fi\@testopt{\LT@no@pgbk-}4}% + \def\nopagebreak{\noalign{\ifnum`}=0\fi\@testopt\LT@no@pgbk4}% + \let\hline\LT@hline \let\kill\LT@kill\let\caption\LT@caption + \@tempdima\ht\strutbox + \let\@endpbox\LT@endpbox + \ifx\extrarowheight\@undefined + \let\@acol\@tabacol + \let\@classz\@tabclassz \let\@classiv\@tabclassiv + \def\@startpbox{\vtop\LT@startpbox}% + \let\@@startpbox\@startpbox + \let\@@endpbox\@endpbox + \let\LT@LL@FM@cr\@tabularcr + \else + \advance\@tempdima\extrarowheight + \col@sep\tabcolsep + \let\@startpbox\LT@startpbox\let\LT@LL@FM@cr\@arraycr + \fi + \setbox\@arstrutbox\hbox{\vrule + \@height \arraystretch \@tempdima + \@depth \arraystretch \dp \strutbox + \@width \z@}% + \let\@sharp##\let\protect\relax + \begingroup + \@mkpream{#2}% + \xdef\LT@bchunk{% + \global\advance\c@LT@chunks\@ne + \global\LT@rows\z@\setbox\z@\vbox\bgroup + \LT@setprevdepth + \tabskip\LTleft \noexpand\halign to\hsize\bgroup + \tabskip\z@ \@arstrut \@preamble \tabskip\LTright \cr}% + \endgroup + \expandafter\LT@nofcols\LT@bchunk&\LT@nofcols + \LT@make@row + \m@th\let\par\@empty + \everycr{}\lineskip\z@\baselineskip\z@ + \LT@bchunk} +\def\LT@no@pgbk#1[#2]{\penalty #1\@getpen{#2}\ifnum`{=0\fi}} +\def\LT@start{% + \let\LT@start\endgraf + \endgraf\penalty\z@\vskip\LTpre + \dimen@\pagetotal + \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi + \advance\dimen@ \ht\LT@foot + \dimen@ii\vfuzz + \vfuzz\maxdimen + \setbox\tw@\copy\z@ + \setbox\tw@\vsplit\tw@ to \ht\@arstrutbox + \setbox\tw@\vbox{\unvbox\tw@}% + \vfuzz\dimen@ii + \advance\dimen@ \ht + \ifdim\ht\@arstrutbox>\ht\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@\dp + \ifdim\dp\@arstrutbox>\dp\tw@\@arstrutbox\else\tw@\fi + \advance\dimen@ -\pagegoal + \ifdim \dimen@>\z@\vfil\break\fi + \global\@colroom\@colht + \ifvoid\LT@foot\else + \advance\vsize-\ht\LT@foot + \global\advance\@colroom-\ht\LT@foot + \dimen@\pagegoal\advance\dimen@-\ht\LT@foot\pagegoal\dimen@ + \maxdepth\z@ + \fi + \ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak + \output{\LT@output}} +\def\endlongtable{% + \crcr + \noalign{% + \let\LT@entry\LT@entry@chop + \xdef\LT@save@row{\LT@save@row}}% + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \if@filesw + {\let\LT@entry\LT@entry@write\immediate\write\@auxout{% + \gdef\expandafter\noexpand + \csname LT@\romannumeral\c@LT@tables\endcsname + {\LT@save@row}}}% + \fi + \ifx\LT@save@row\LT@@save@row + \else + \LT@warn{Column \@width s have changed\MessageBreak + in table \thetable}% + \LT@final@warn + \fi + \endgraf\penalty -\LT@end@pen + \endgroup + \global\@mparbottom\z@ + \pagegoal\vsize + \endgraf\penalty\z@\addvspace\LTpost + \ifvoid\footins\else\insert\footins{}\fi} +\def\LT@nofcols#1&{% + \futurelet\@let@token\LT@n@fcols} +\def\LT@n@fcols{% + \advance\LT@cols\@ne + \ifx\@let@token\LT@nofcols + \expandafter\@gobble + \else + \expandafter\LT@nofcols + \fi} +\def\LT@tabularcr{% + \relax\iffalse{\fi\ifnum0=`}\fi + \@ifstar + {\def\crcr{\LT@crcr\noalign{\nobreak}}\let\cr\crcr + \LT@t@bularcr}% + {\LT@t@bularcr}} +\let\LT@crcr\crcr +\let\LT@setprevdepth\relax +\def\LT@t@bularcr{% + \global\advance\LT@rows\@ne + \ifnum\LT@rows=\LTchunksize + \gdef\LT@setprevdepth{% + \prevdepth\z@\global + \global\let\LT@setprevdepth\relax}% + \expandafter\LT@xtabularcr + \else + \ifnum0=`{}\fi + \expandafter\LT@LL@FM@cr + \fi} +\def\LT@xtabularcr{% + \@ifnextchar[\LT@argtabularcr\LT@ntabularcr} +\def\LT@ntabularcr{% + \ifnum0=`{}\fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@argtabularcr[#1]{% + \ifnum0=`{}\fi + \ifdim #1>\z@ + \unskip\@xargarraycr{#1}% + \else + \@yargarraycr{#1}% + \fi + \LT@echunk + \LT@start + \unvbox\z@ + \LT@get@widths + \LT@bchunk} +\def\LT@echunk{% + \crcr\LT@save@row\cr\egroup + \global\setbox\@ne\lastbox + \unskip + \egroup} +\def\LT@entry#1#2{% + \ifhmode\@firstofone{&}\fi\omit + \ifnum#1=\c@LT@chunks + \else + \kern#2\relax + \fi} +\def\LT@entry@chop#1#2{% + \noexpand\LT@entry + {\ifnum#1>\c@LT@chunks + 1}{0pt% + \else + #1}{#2% + \fi}} +\def\LT@entry@write{% + \noexpand\LT@entry^^J% + \@spaces} +\def\LT@kill{% + \LT@echunk + \LT@get@widths + \expandafter\LT@rebox\LT@bchunk} +\def\LT@rebox#1\bgroup{% + #1\bgroup + \unvbox\z@ + \unskip + \setbox\z@\lastbox} +\def\LT@blank@row{% + \xdef\LT@save@row{\expandafter\LT@build@blank + \romannumeral\number\LT@cols 001 }} +\def\LT@build@blank#1{% + \if#1m% + \noexpand\LT@entry{1}{0pt}% + \expandafter\LT@build@blank + \fi} +\def\LT@make@row{% + \global\expandafter\let\expandafter\LT@save@row + \csname LT@\romannumeral\c@LT@tables\endcsname + \ifx\LT@save@row\relax + \LT@blank@row + \else + {\let\LT@entry\or + \if!% + \ifcase\expandafter\expandafter\expandafter\LT@cols + \expandafter\@gobble\LT@save@row + \or + \else + \relax + \fi + !% + \else + \aftergroup\LT@blank@row + \fi}% + \fi} +\let\setlongtables\relax +\def\LT@get@widths{% + \setbox\tw@\hbox{% + \unhbox\@ne + \let\LT@old@row\LT@save@row + \global\let\LT@save@row\@empty + \count@\LT@cols + \loop + \unskip + \setbox\tw@\lastbox + \ifhbox\tw@ + \LT@def@row + \advance\count@\m@ne + \repeat}% + \ifx\LT@@save@row\@undefined + \let\LT@@save@row\LT@save@row + \fi} +\def\LT@def@row{% + \let\LT@entry\or + \edef\@tempa{% + \ifcase\expandafter\count@\LT@old@row + \else + {1}{0pt}% + \fi}% + \let\LT@entry\relax + \xdef\LT@save@row{% + \LT@entry + \expandafter\LT@max@sel\@tempa + \LT@save@row}} +\def\LT@max@sel#1#2{% + {\ifdim#2=\wd\tw@ + #1% + \else + \number\c@LT@chunks + \fi}% + {\the\wd\tw@}} +\def\LT@hline{% + \noalign{\ifnum0=`}\fi + \penalty\@M + \futurelet\@let@token\LT@@hline} +\def\LT@@hline{% + \ifx\@let@token\hline + \global\let\@gtempa\@gobble + \gdef\LT@sep{\penalty-\@medpenalty\vskip\doublerulesep}% + \else + \global\let\@gtempa\@empty + \gdef\LT@sep{\penalty-\@lowpenalty\vskip-\arrayrulewidth}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\LT@sep}% + \multispan\LT@cols + \unskip\leaders\hrule\@height\arrayrulewidth\hfill\cr + \noalign{\penalty\@M}% + \@gtempa} +\def\LT@caption{% + \noalign\bgroup + \@ifnextchar[{\egroup\LT@c@ption\@firstofone}\LT@capti@n} +\def\LT@c@ption#1[#2]#3{% + \LT@makecaption#1\fnum@table{#3}% + \def\@tempa{#2}% + \ifx\@tempa\@empty\else + {\let\\\space + \addcontentsline{lot}{table}{\protect\numberline{\thetable}{#2}}}% + \fi} +\def\LT@capti@n{% + \@ifstar + {\egroup\LT@c@ption\@gobble[]}% + {\egroup\@xdblarg{\LT@c@ption\@firstofone}}} +\def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss\parbox[t]\LTcapwidth{% + \sbox\@tempboxa{#1{#2: }#3}% + \ifdim\wd\@tempboxa>\hsize + #1{#2: }#3% + \else + \hbox to\hsize{\hfil\box\@tempboxa\hfil}% + \fi + \endgraf\vskip\baselineskip}% + \hss}}} +\def\LT@output{% + \ifnum\outputpenalty <-\@Mi + \ifnum\outputpenalty > -\LT@end@pen + \LT@err{floats and marginpars not allowed in a longtable}\@ehc + \else + \setbox\z@\vbox{\unvbox\@cclv}% + \ifdim \ht\LT@lastfoot>\ht\LT@foot + \dimen@\pagegoal + \advance\dimen@-\ht\LT@lastfoot + \ifdim\dimen@<\ht\z@ + \setbox\@cclv\vbox{\unvbox\z@\copy\LT@foot\vss}% + \@makecol + \@outputpage + \setbox\z@\vbox{\box\LT@head}% + \fi + \fi + \global\@colroom\@colht + \global\vsize\@colht + \vbox + {\unvbox\z@\box\ifvoid\LT@lastfoot\LT@foot\else\LT@lastfoot\fi}% + \fi + \else + \setbox\@cclv\vbox{\unvbox\@cclv\copy\LT@foot\vss}% + \@makecol + \@outputpage + \global\vsize\@colroom + \copy\LT@head\nobreak + \fi} +\def\LT@end@hd@ft#1{% + \LT@echunk + \ifx\LT@start\endgraf + \LT@err + {Longtable head or foot not at start of table}% + {Increase LTchunksize}% + \fi + \setbox#1\box\z@ + \LT@get@widths + \LT@bchunk} +\def\endfirsthead{\LT@end@hd@ft\LT@firsthead} +\def\endhead{\LT@end@hd@ft\LT@head} +\def\endfoot{\LT@end@hd@ft\LT@foot} +\def\endlastfoot{\LT@end@hd@ft\LT@lastfoot} +\def\LT@startpbox#1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \vrule \@height \ht\@arstrutbox \@width \z@} +\def\LT@endpbox{% + \@finalstrut\@arstrutbox + \egroup + \the\LT@p@ftn + \global\LT@p@ftn{}% + \hfil} +\def\LT@p@ftntext#1{% + \edef\@tempa{\the\LT@p@ftn\noexpand\footnotetext[\the\c@footnote]}% + \global\LT@p@ftn\expandafter{\@tempa{#1}}}% + +\@namedef{ver@longtable.sty}{2014/10/28 v4.11 Multi-page Table package (DPC) - frozen version for doxygen} +\endinput +%% +%% End of file `longtable.sty'. diff --git a/doxygen/doc/latex/make.bat b/doxygen/doc/latex/make.bat new file mode 100644 index 00000000..e1e55466 --- /dev/null +++ b/doxygen/doc/latex/make.bat @@ -0,0 +1,28 @@ +set Dir_Old=%cd% +cd /D %~dp0 + +del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf + +set LATEX_CMD=latex +%LATEX_CMD% refman.tex +echo ---- +makeindex refman.idx +setlocal enabledelayedexpansion +set count=8 +:repeat +set content=X +for /F "tokens=*" %%T in ( 'findstr /C:"Rerun LaTeX" refman.log' ) do set content="%%~T" +if !content! == X for /F "tokens=*" %%T in ( 'findstr /C:"Rerun to get cross-references right" refman.log' ) do set content="%%~T" +if !content! == X goto :skip +set /a count-=1 +if !count! EQU 0 goto :skip + +echo ---- +%LATEX_CMD% refman.tex +goto :repeat +:skip +endlocal +makeindex refman.idx +%LATEX_CMD% refman.tex +dvips -o refman.ps refman.dvi +gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=refman.pdf -c save pop -f refman.ps diff --git a/doxygen/doc/latex/md_C_1_dev_icub-tests_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-tests_README.tex new file mode 100644 index 00000000..b91ed525 --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-tests_README.tex @@ -0,0 +1,22 @@ + + +The {\ttfamily icub-\/tests} repository contains tests for the i\+Cub robot. Tests are written using the \href{https://github.com/robotology/robot-testing-framework}{\texttt{ Robot Testing Framework}}. + +\doxysection*{Installation, tutorial and available tests} + +See the \href{https://robotology.github.io/icub-tests/}{\texttt{ icub-\/test documentation}}. + +\doxysection*{Contributors} + + +\begin{DoxyItemize} +\item \href{https://github.com/apaikan}{\texttt{ {\bfseries{Ali Paikan}}}} +\item \href{https://github.com/lornat75}{\texttt{ {\bfseries{Lorenzo Natale}}}} +\item \href{https://github.com/traversaro}{\texttt{ {\bfseries{Silvio Traversaro}}}} +\item \href{https://github.com/ale-git}{\texttt{ {\bfseries{Alessandro Scalzo}}}} +\item \href{https://github.com/randaz81}{\texttt{ {\bfseries{Marco Randazzo}}}} +\item \href{https://github.com/valegagge}{\texttt{ {\bfseries{Valentina Gaggero}}}} +\item \href{https://github.com/pattacini}{\texttt{ {\bfseries{Ugo Pattacini}}}} +\item \href{https://github.com/Nicogene}{\texttt{ {\bfseries{Nicolo\textquotesingle{} Genesio}}}} +\item \href{https://github.com/giuliavezzani}{\texttt{ {\bfseries{Giulia Vezzani}}}} +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md_C_1_dev_icub-tests_src_cartesian-control_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_cartesian-control_README.tex new file mode 100644 index 00000000..e0375ee5 --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_cartesian-control_README.tex @@ -0,0 +1,9 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_cartesian_interface.html}{\texttt{ {\bfseries{Cartesian Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/simple-p2p-movement}{\texttt{ {\ttfamily simple-\/p2p-\/movement}}}. +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/reaching-tolerance}{\texttt{ {\ttfamily reaching-\/tolerance}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md_C_1_dev_icub-tests_src_gaze-control_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_gaze-control_README.tex new file mode 100644 index 00000000..a1ec8aa9 --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_gaze-control_README.tex @@ -0,0 +1,8 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_gaze_interface.html}{\texttt{ {\bfseries{Gaze Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/gaze-control/simple-look}{\texttt{ {\ttfamily simple-\/look}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md_C_1_dev_icub-tests_src_models-consistency_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_models-consistency_README.tex new file mode 100644 index 00000000..970ff9bc --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_models-consistency_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to ensure consistency in kinematics model used in i\+Cub. + +\doxysection*{ikin-\/idyn-\/consistency } + +This test will check that the end effector transforms (for the two hands and the two feet) provided by the i\+Kin chains and the i\+Dyn i\+Cub\+Whole\+Body object are consistent. While i\+Dyn is being discontinued, this check is important because U\+R\+DF models for some model of i\+Cub (for example i\+Cub v1) are generated from i\+Dyn models. \ No newline at end of file diff --git a/doxygen/doc/latex/md_C_1_dev_icub-tests_src_skinWrapperTest_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_skinWrapperTest_README.tex new file mode 100644 index 00000000..b5ecdacc --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-tests_src_skinWrapperTest_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/classskinWrapper.html}{\texttt{ {\bfseries{Skin Wrapper}}}} component after its cleaning and after the removal of Analog\+Server from icub-\/main. + +\doxysection*{Usage } + +{\ttfamily robottestingframework-\/testrunner -\/v -\/s /icub-\/tests/suites/skin\+Wrapper-\/\+Yarp\+Plugin\+Fixture.xml} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.tex b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.tex new file mode 100644 index 00000000..b417dab2 --- /dev/null +++ b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_README.tex @@ -0,0 +1,39 @@ +The {\ttfamily icub-\/tests} repository contains tests for the i\+Cub robot. Tests are written using the \href{https://github.com/robotology/robot-testing-framework}{\tt Robot Testing Framework}. + +\subsection*{Installation, tutorial and available tests} + +See the \href{https://robotology.github.io/icub-tests/}{\tt icub-\/test documentation}. + +\subsection*{Update the documentation} + +To update documentation follow these steps\+: + + +\begin{DoxyCode} +git checkout gh-pages +git rebase master +cd doxygen +rm -rf doc +doxygen ./generate.txt +git add ./doc +git log -1 +git commit --amend +git push --force-with-lease +git checkout master +\end{DoxyCode} + For in-\/depth details about doxygen documentation and gh-\/pages, see \href{https://github.com/robotology/how-to-document-modules}{\tt how-\/to-\/document-\/modules}. + +\subsection*{Contributors} + + +\begin{DoxyItemize} +\item \href{https://github.com/apaikan}{\tt {\bfseries Ali Paikan}} +\item \href{https://github.com/lornat75}{\tt {\bfseries Lorenzo Natale}} +\item \href{https://github.com/traversaro}{\tt {\bfseries Silvio Traversaro}} +\item \href{https://github.com/ale-git}{\tt {\bfseries Alessandro Scalzo}} +\item \href{https://github.com/randaz81}{\tt {\bfseries Marco Randazzo}} +\item \href{https://github.com/valegagge}{\tt {\bfseries Valentina Gaggero}} +\item \href{https://github.com/pattacini}{\tt {\bfseries Ugo Pattacini}} +\item \href{https://github.com/Nicogene}{\tt {\bfseries Nicolo\textquotesingle{} Genesio}} +\item \href{https://github.com/giuliavezzani}{\tt {\bfseries Giulia Vezzani}} +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.tex b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.tex new file mode 100644 index 00000000..825e699c --- /dev/null +++ b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_cartesian-control_README.tex @@ -0,0 +1,9 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_cartesian_interface.html}{\tt {\bfseries Cartesian Control}} component. + +\subsubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/simple-p2p-movement}{\tt {\ttfamily simple-\/p2p-\/movement}}. +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/reaching-tolerance}{\tt {\ttfamily reaching-\/tolerance}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.tex b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.tex new file mode 100644 index 00000000..5d22be0d --- /dev/null +++ b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_gaze-control_README.tex @@ -0,0 +1,8 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_gaze_interface.html}{\tt {\bfseries Gaze Control}} component. + +\subsubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/gaze-control/simple-look}{\tt {\ttfamily simple-\/look}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.tex b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.tex new file mode 100644 index 00000000..9d701333 --- /dev/null +++ b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_models-consistency_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to ensure consistency in kinematics model used in i\+Cub. + +\subsection*{ikin-\/idyn-\/consistency } + +This test will check that the end effector transforms (for the two hands and the two feet) provided by the i\+Kin chains and the i\+Dyn i\+Cub\+Whole\+Body object are consistent. While i\+Dyn is being discontinued, this check is important because U\+R\+DF models for some model of i\+Cub (for example i\+Cub v1) are generated from i\+Dyn models. \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.tex b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.tex new file mode 100644 index 00000000..8061ac29 --- /dev/null +++ b/doxygen/doc/latex/md__home_ddomenichelli_Workspace_iit_src_icub-tests_src_skinWrapperTest_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/classskinWrapper.html}{\tt {\bfseries Skin Wrapper}} component after its cleaning and after the removal of Analog\+Server from icub-\/main. + +\subsection*{Usage } + +{\ttfamily robottestingframework-\/testrunner -\/v -\/s /icub-\/tests/suites/skin\+Wrapper-\/\+Yarp\+Plugin\+Fixture.xml} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.tex new file mode 100644 index 00000000..eccbfbca --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_README.tex @@ -0,0 +1,40 @@ + + +\doxysection*{Maintainers} + +This repository is maintained by\+: + +\tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }\\\cline{1-2} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }\\\cline{1-2} +\endhead +\PBS\centering \href{https://github.com/niNicogenecogene}{\texttt{ }} &\PBS\centering \href{https://github.com/Nicogene}{\texttt{ @\+Nicogene}} \\\cline{1-2} +\end{longtabu} + + +The {\ttfamily icub-\/tests} repository contains tests for the i\+Cub robot. Tests are written using the \href{https://github.com/robotology/robot-testing-framework}{\texttt{ Robot Testing Framework}}. + +\doxysection*{Installation, tutorial and available tests} + +See the \href{https://robotology.github.io/icub-tests/}{\texttt{ icub-\/test documentation}}. + +\doxysection*{Contributors} + + +\begin{DoxyItemize} +\item \href{https://github.com/apaikan}{\texttt{ {\bfseries{Ali Paikan}}}} +\item \href{https://github.com/lornat75}{\texttt{ {\bfseries{Lorenzo Natale}}}} +\item \href{https://github.com/traversaro}{\texttt{ {\bfseries{Silvio Traversaro}}}} +\item \href{https://github.com/ale-git}{\texttt{ {\bfseries{Alessandro Scalzo}}}} +\item \href{https://github.com/randaz81}{\texttt{ {\bfseries{Marco Randazzo}}}} +\item \href{https://github.com/valegagge}{\texttt{ {\bfseries{Valentina Gaggero}}}} +\item \href{https://github.com/pattacini}{\texttt{ {\bfseries{Ugo Pattacini}}}} +\item \href{https://github.com/Nicogene}{\texttt{ {\bfseries{Nicolo\textquotesingle{} Genesio}}}} +\item \href{https://github.com/giuliavezzani}{\texttt{ {\bfseries{Giulia Vezzani}}}} +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.tex new file mode 100644 index 00000000..e0375ee5 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_cartesian-control_README.tex @@ -0,0 +1,9 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_cartesian_interface.html}{\texttt{ {\bfseries{Cartesian Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/simple-p2p-movement}{\texttt{ {\ttfamily simple-\/p2p-\/movement}}}. +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/reaching-tolerance}{\texttt{ {\ttfamily reaching-\/tolerance}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.tex new file mode 100644 index 00000000..a1ec8aa9 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_gaze-control_README.tex @@ -0,0 +1,8 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_gaze_interface.html}{\texttt{ {\bfseries{Gaze Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/gaze-control/simple-look}{\texttt{ {\ttfamily simple-\/look}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.tex new file mode 100644 index 00000000..970ff9bc --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_models-consistency_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to ensure consistency in kinematics model used in i\+Cub. + +\doxysection*{ikin-\/idyn-\/consistency } + +This test will check that the end effector transforms (for the two hands and the two feet) provided by the i\+Kin chains and the i\+Dyn i\+Cub\+Whole\+Body object are consistent. While i\+Dyn is being discontinued, this check is important because U\+R\+DF models for some model of i\+Cub (for example i\+Cub v1) are generated from i\+Dyn models. \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.tex new file mode 100644 index 00000000..b5ecdacc --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-tests_icub-tests_gh-pages_src_skinWrapperTest_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/classskinWrapper.html}{\texttt{ {\bfseries{Skin Wrapper}}}} component after its cleaning and after the removal of Analog\+Server from icub-\/main. + +\doxysection*{Usage } + +{\ttfamily robottestingframework-\/testrunner -\/v -\/s /icub-\/tests/suites/skin\+Wrapper-\/\+Yarp\+Plugin\+Fixture.xml} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.tex new file mode 100644 index 00000000..fe06df86 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_README.tex @@ -0,0 +1,40 @@ + + +\doxysection*{Maintainers} + +This repository is maintained by\+: + +\tabulinesep=1mm +\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|} +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }\\\cline{1-2} +\endfirsthead +\hline +\endfoot +\hline +\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ }\\\cline{1-2} +\endhead +\PBS\centering \href{https://github.com/niNicogenecogene}{\texttt{ }} &\PBS\centering \href{https://github.com/Nicogene}{\texttt{ @\+Nicogene}} \\\cline{1-2} +\end{longtabu} + + +The {\ttfamily icub-\/tests} repository contains tests for the i\+Cub robot. Tests are written using the \href{https://github.com/robotology/robot-testing-framework}{\texttt{ Robot Testing Framework}}. + +\doxysection*{Installation, tutorial and available tests} + +See the \href{https://robotology.github.io/icub-tests/}{\texttt{ icub-\/test documentation}}. + +\doxysection*{Contributors} + + +\begin{DoxyItemize} +\item \href{https://github.com/apaikan}{\texttt{ {\bfseries{Ali Paikan}}}} +\item \href{https://github.com/lornat75}{\texttt{ {\bfseries{Lorenzo Natale}}}} +\item \href{https://github.com/traversaro}{\texttt{ {\bfseries{Silvio Traversaro}}}} +\item \href{https://github.com/ale-git}{\texttt{ {\bfseries{Alessandro Scalzo}}}} +\item \href{https://github.com/randaz81}{\texttt{ {\bfseries{Marco Randazzo}}}} +\item \href{https://github.com/valegagge}{\texttt{ {\bfseries{Valentina Gaggero}}}} +\item \href{https://github.com/pattacini}{\texttt{ {\bfseries{Ugo Pattacini}}}} +\item \href{https://github.com/Nicogene}{\texttt{ {\bfseries{Nicolo\textquotesingle{} Genesio}}}} +\item \href{https://github.com/giuliavezzani}{\texttt{ {\bfseries{Giulia Vezzani}}}} +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.tex new file mode 100644 index 00000000..e0375ee5 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README.tex @@ -0,0 +1,9 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_cartesian_interface.html}{\texttt{ {\bfseries{Cartesian Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/simple-p2p-movement}{\texttt{ {\ttfamily simple-\/p2p-\/movement}}}. +\item \href{https://github.com/robotology/icub-tests/blob/master/src/cartesian-control/reaching-tolerance}{\texttt{ {\ttfamily reaching-\/tolerance}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.tex new file mode 100644 index 00000000..a1ec8aa9 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README.tex @@ -0,0 +1,8 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/icub_gaze_interface.html}{\texttt{ {\bfseries{Gaze Control}}}} component. + +\doxysubsection*{Available tests} + + +\begin{DoxyItemize} +\item \href{https://github.com/robotology/icub-tests/blob/master/src/gaze-control/simple-look}{\texttt{ {\ttfamily simple-\/look}}}. +\end{DoxyItemize} \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.tex new file mode 100644 index 00000000..ff108023 --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to ensure consistency in kinematics model used in i\+Cub. + +\doxysection*{ikin-\/idyn-\/consistency } + +This test will check that the end effector transforms (for the two hands and the two feet) provided by the i\+Kin chains and the i\+Dyn i\+Cub\+Whole\+Body object are consistent. While i\+Dyn is being discontinued, this check is important because URDF models for some model of i\+Cub (for example i\+Cub v1) are generated from i\+Dyn models. \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.tex new file mode 100644 index 00000000..b5ecdacc --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README.tex @@ -0,0 +1,5 @@ +Set of tests meant to verify the functionality of the \href{http://wiki.icub.org/iCub/main/dox/html/classskinWrapper.html}{\texttt{ {\bfseries{Skin Wrapper}}}} component after its cleaning and after the removal of Analog\+Server from icub-\/main. + +\doxysection*{Usage } + +{\ttfamily robottestingframework-\/testrunner -\/v -\/s /icub-\/tests/suites/skin\+Wrapper-\/\+Yarp\+Plugin\+Fixture.xml} \ No newline at end of file diff --git a/doxygen/doc/latex/modules.tex b/doxygen/doc/latex/modules.tex new file mode 100644 index 00000000..992a2072 --- /dev/null +++ b/doxygen/doc/latex/modules.tex @@ -0,0 +1,4 @@ +\doxysection{Modules} +Here is a list of all modules\+:\begin{DoxyCompactList} +\item \contentsline{section}{A list of available tests}{\pageref{group__icub-tests}}{} +\end{DoxyCompactList} diff --git a/doxygen/doc/latex/refman.tex b/doxygen/doc/latex/refman.tex new file mode 100644 index 00000000..df9dab29 --- /dev/null +++ b/doxygen/doc/latex/refman.tex @@ -0,0 +1,231 @@ +\let\mypdfximage\pdfximage\def\pdfximage{\immediate\mypdfximage}\documentclass[twoside]{book} + +%% moved from doxygen.sty due to workaround for LaTex 2019 version and unmaintained tabu package +\usepackage{ifthen} +\ifx\requestedLaTeXdate\undefined +\usepackage{array} +\else +\usepackage{array}[=2016-10-06] +\fi +%% +% Packages required by doxygen +\usepackage{fixltx2e} +\usepackage{doxygen} +\usepackage{graphicx} +\usepackage[utf8]{inputenc} +\usepackage{makeidx} +\PassOptionsToPackage{warn}{textcomp} +\usepackage{textcomp} +\usepackage[nointegrals]{wasysym} +\usepackage{ifxetex} + +% Font selection +\usepackage[T1]{fontenc} +\usepackage[scaled=.90]{helvet} +\usepackage{courier} +\renewcommand{\familydefault}{\sfdefault} +\usepackage{sectsty} +\allsectionsfont{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\renewcommand{\DoxyLabelFont}{% + \fontseries{bc}\selectfont% + \color{darkgray}% +} +\newcommand{\+}{\discretionary{\mbox{\scriptsize$\hookleftarrow$}}{}{}} + +% Arguments of doxygenemoji: +% 1) '::' form of the emoji, already "LaTeX"-escaped +% 2) file with the name of the emoji without the .png extension +% in case image exist use this otherwise use the '::' form +\newcommand{\doxygenemoji}[2]{% + \IfFileExists{./#2.png}{\raisebox{-0.1em}{\includegraphics[height=0.9em]{./#2.png}}}{#1}% +} +% Page & text layout +\usepackage{geometry} +\geometry{% + a4paper,% + top=2.5cm,% + bottom=2.5cm,% + left=2.5cm,% + right=2.5cm% +} +\tolerance=750 +\hfuzz=15pt +\hbadness=750 +\setlength{\emergencystretch}{15pt} +\setlength{\parindent}{0cm} +\newcommand{\doxynormalparskip}{\setlength{\parskip}{3ex plus 2ex minus 2ex}} +\newcommand{\doxytocparskip}{\setlength{\parskip}{1ex plus 0ex minus 0ex}} +\doxynormalparskip +\makeatletter +\renewcommand{\paragraph}{% + \@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@parafont% + }% +} +\renewcommand{\subparagraph}{% + \@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{% + \normalfont\normalsize\bfseries\SS@subparafont% + }% +} +\makeatother + +\makeatletter +\newcommand\hrulefilll{\leavevmode\leaders\hrule\hskip 0pt plus 1filll\kern\z@} +\makeatother + +% Headers & footers +\usepackage{fancyhdr} +\pagestyle{fancyplain} +\renewcommand{\footrulewidth}{0.4pt} +% +\fancypagestyle{fancyplain}{ +\fancyhf{} +\fancyhead[LE, RO]{\bfseries\thepage} +\fancyhead[LO]{\bfseries\rightmark} +\fancyhead[RE]{\bfseries\leftmark} +\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } +} +% +\fancypagestyle{plain}{ +\fancyhf{} +\fancyfoot[LO, RE]{\bfseries\scriptsize Generated by Doxygen } +\renewcommand{\headrulewidth}{0pt}} +% +\pagestyle{fancyplain} +% +\renewcommand{\chaptermark}[1]{% + \markboth{#1}{}% +} +\renewcommand{\sectionmark}[1]{% + \markright{\thesection\ #1}% +} + +% Indices & bibliography +\usepackage{natbib} +\usepackage[titles]{tocloft} +\setcounter{tocdepth}{3} +\setcounter{secnumdepth}{5} +\makeindex + +\usepackage{newunicodechar} + \newunicodechar{⁻}{${}^{-}$}% Superscript minus + \newunicodechar{²}{${}^{2}$}% Superscript two + \newunicodechar{³}{${}^{3}$}% Superscript three + +% Hyperlinks (required, but should be loaded last) +\ifpdf + \usepackage[pdftex,pagebackref=true]{hyperref} +\else + \ifxetex + \usepackage[pagebackref=true]{hyperref} + \else + \usepackage[ps2pdf,pagebackref=true]{hyperref} + \fi +\fi + +\hypersetup{% + colorlinks=true,% + linkcolor=blue,% + citecolor=blue,% + unicode% +} + +% Custom commands +\newcommand{\clearemptydoublepage}{% + \newpage{\pagestyle{empty}\cleardoublepage}% +} + +\usepackage{caption} +\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top} + +\usepackage{etoc} +\etocsettocstyle{\doxytocparskip}{\doxynormalparskip} +\renewcommand{\numberline}[1]{#1~} +%===== C O N T E N T S ===== + +\begin{document} +\raggedbottom + +% Titlepage & ToC +\pagenumbering{alph} +\begin{titlepage} +\vspace*{7cm} +\begin{center}% +{\Large icub-\/test }\\ +\vspace*{1cm} +{\large Generated by Doxygen 1.9.1}\\ +\end{center} +\end{titlepage} +\clearemptydoublepage +\pagenumbering{roman} +\tableofcontents +\clearemptydoublepage +\pagenumbering{arabic} + +%--- Begin generated contents --- +\chapter{i\+Cub-\/tests main page} +\label{index}\hypertarget{index}{}\input{index} +\chapter{Installation Instructions} +\label{installation} +\input{installation} +\chapter{Writing and Running Tests} +\label{writing-and-running} +\input{writing-and-running} +\chapter{icub-\/tests} +\label{md__home_runner_work_icub_tests_icub_tests_gh_pages_README} +\input{md__home_runner_work_icub_tests_icub_tests_gh_pages_README} +\chapter{i\+Cub cartesian-\/control} +\label{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README} +\input{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_cartesian_control_README} +\chapter{i\+Cub gaze-\/control} +\label{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README} +\input{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_gaze_control_README} +\chapter{i\+Cub models-\/consistency} +\label{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README} +\input{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_models_consistency_README} +\chapter{i\+Cub skin\+Wrapper} +\label{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README} +\input{md__home_runner_work_icub_tests_icub_tests_gh_pages_src_skinWrapperTest_README} +\chapter{Module Index} +\input{modules} +\chapter{Data Structure Index} +\input{annotated} +\chapter{Module Documentation} +\input{group__icub-tests} +\chapter{Data Structure Documentation} +\input{classCameraTest} +\input{classCartesianControlReachingToleranceTest} +\input{classCartesianControlSimpleP2pMovementTest} +\input{classControlModes} +\input{classDemoRedBallTest} +\input{classExampleTest} +\input{classFtSensorTest} +\input{classGazeControlSimpleLookTest} +\input{classImu} +\input{classJointLimits} +\input{classMotorEncodersSignCheck} +\input{classMotorTest} +\input{classMovementReferencesTest} +\input{classOpticalEncodersConsistency} +\input{classOpticalEncodersDrift} +\input{classPositionControlAccuracy} +\input{classPositionControlAccuracyExernalPid} +\input{classPositionDirect} +\input{classSensorsDuplicateReadings} +\input{classSkinWrapperTest} +\input{classTorqueControlAccuracy} +\input{classTorqueControlGravityConsistency} +%--- End generated contents --- + +% Index +\backmatter +\newpage +\phantomsection +\clearemptydoublepage +\addcontentsline{toc}{chapter}{\indexname} +\printindex + +\end{document} diff --git a/doxygen/doc/latex/tabu_doxygen.sty b/doxygen/doc/latex/tabu_doxygen.sty new file mode 100644 index 00000000..60fd7e8d --- /dev/null +++ b/doxygen/doc/latex/tabu_doxygen.sty @@ -0,0 +1,2557 @@ +%% +%% This is file `tabu.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% tabu.dtx (with options: `package') +%% +%% This is a generated file. +%% Copyright (FC) 2010-2011 - lppl +%% +%% tabu : 2011/02/26 v2.8 - tabu : Flexible LaTeX tabulars +%% +%% ********************************************************************************************** +%% \begin{tabu} { preamble } => default target: \linewidth or \linegoal +%% \begin{tabu} to { preamble } => target specified +%% \begin{tabu} spread { preamble } => target relative to the ``natural width'' +%% +%% tabu works in text and in math modes. +%% +%% X columns: automatic width adjustment + horizontal and vertical alignment +%% \begin{tabu} { X[4c] X[1c] X[-2ml] } +%% +%% Horizontal lines and / or leaders: +%% \hline\hline => double horizontal line +%% \firsthline\hline => for nested tabulars +%% \lasthline\hline => for nested tabulars +%% \tabucline[line spec]{column-column} => ``funny'' lines (dash/leader) +%% Automatic lines / leaders : +%% \everyrow{\hline\hline} +%% +%% Vertical lines and / or leaders: +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt blue] } +%% \begin{tabu} { |[3pt red] X[4c] X[1c] X[-2ml] |[3pt on 2pt off 4pt blue] } +%% +%% Fixed vertical spacing adjustment: +%% \extrarowheight= \extrarowdepth= +%% or: \extrarowsep= => may be prefixed by \global +%% +%% Dynamic vertical spacing adjustment: +%% \abovetabulinesep= \belowtabulinesep= +%% or: \tabulinesep= => may be prefixed by \global +%% +%% delarray.sty shortcuts: in math and text modes +%% \begin{tabu} .... \({ preamble }\) +%% +%% Algorithms reports: +%% \tracingtabu=1 \tracingtabu=2 +%% +%% ********************************************************************************************** +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% +%% This work consists of the main source file tabu.dtx +%% and the derived files +%% tabu.sty, tabu.pdf, tabu.ins +%% +%% tabu : Flexible LaTeX tabulars +%% lppl copyright 2010-2011 by FC +%% + +\NeedsTeXFormat{LaTeX2e}[2005/12/01] +\ProvidesPackage{tabu_doxygen}[2011/02/26 v2.8 - flexible LaTeX tabulars (FC), frozen version for doxygen] +\RequirePackage{array}[2008/09/09] +\RequirePackage{varwidth}[2009/03/30] +\AtEndOfPackage{\tabu@AtEnd \let\tabu@AtEnd \@undefined} +\let\tabu@AtEnd\@empty +\def\TMP@EnsureCode#1={% + \edef\tabu@AtEnd{\tabu@AtEnd + \catcode#1 \the\catcode#1}% + \catcode#1=% +}% \TMP@EnsureCode +\TMP@EnsureCode 33 = 12 % ! +\TMP@EnsureCode 58 = 12 % : (for siunitx) +\TMP@EnsureCode124 = 12 % | +\TMP@EnsureCode 36 = 3 % $ = math shift +\TMP@EnsureCode 38 = 4 % & = tab alignment character +\TMP@EnsureCode 32 = 10 % space +\TMP@EnsureCode 94 = 7 % ^ +\TMP@EnsureCode 95 = 8 % _ +%% Constants -------------------------------------------------------- +\newcount \c@taburow \def\thetaburow {\number\c@taburow} +\newcount \tabu@nbcols +\newcount \tabu@cnt +\newcount \tabu@Xcol +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcount \tabu@alloc \tabu@alloc=\m@ne +\newcount \tabu@nested +\def\tabu@alloc@{\global\advance\tabu@alloc \@ne \tabu@nested\tabu@alloc} +\newdimen \tabu@target +\newdimen \tabu@spreadtarget +\newdimen \tabu@naturalX +\newdimen \tabucolX +\let\tabu@DELTA \@tempdimc +\let\tabu@thick \@tempdima +\let\tabu@on \@tempdimb +\let\tabu@off \@tempdimc +\newdimen \tabu@Xsum +\newdimen \extrarowdepth +\newdimen \abovetabulinesep +\newdimen \belowtabulinesep +\newdimen \tabustrutrule \tabustrutrule \z@ +\newtoks \tabu@thebody +\newtoks \tabu@footnotes +\newsavebox \tabu@box +\newsavebox \tabu@arstrutbox +\newsavebox \tabu@hleads +\newsavebox \tabu@vleads +\newif \iftabu@colortbl +\newif \iftabu@siunitx +\newif \iftabu@measuring +\newif \iftabu@spread +\newif \iftabu@negcoef +\newif \iftabu@everyrow +\def\tabu@everyrowtrue {\global\let\iftabu@everyrow \iftrue} +\def\tabu@everyrowfalse{\global\let\iftabu@everyrow \iffalse} +\newif \iftabu@long +\newif \iftabuscantokens +\def\tabu@rescan {\tabu@verbatim \scantokens } +%% Utilities (for internal usage) ----------------------------------- +\def\tabu@gobblespace #1 {#1} +\def\tabu@gobbletoken #1#2{#1} +\def\tabu@gobbleX{\futurelet\@let@token \tabu@gobblex} +\def\tabu@gobblex{\if ^^J\noexpand\@let@token \expandafter\@gobble + \else\ifx \@sptoken\@let@token + \expandafter\tabu@gobblespace\expandafter\tabu@gobbleX + \fi\fi +}% \tabu@gobblex +\def\tabu@X{^^J} +{\obeyspaces +\global\let\tabu@spxiii= % saves an active space (for \ifx) +\gdef\tabu@@spxiii{ }} +\def\tabu@ifenvir {% only for \multicolumn + \expandafter\tabu@if@nvir\csname\@currenvir\endcsname +}% \tabu@ifenvir +\def\tabu@if@nvir #1{\csname @\ifx\tabu#1first\else + \ifx\longtabu#1first\else + second\fi\fi oftwo\endcsname +}% \tabu@ifenvir +\def\tabu@modulo #1#2{\numexpr\ifnum\numexpr#1=\z@ 0\else #1-(#1-(#2-1)/2)/(#2)*(#2)\fi} +{\catcode`\&=3 +\gdef\tabu@strtrim #1{% #1 = control sequence to trim + \ifodd 1\ifx #1\@empty \else \ifx #1\space \else 0\fi \fi + \let\tabu@c@l@r \@empty \let#1\@empty + \else \expandafter \tabu@trimspaces #1\@nnil + \fi +}% \tabu@strtrim +\gdef\tabu@trimspaces #1\@nnil{\let\tabu@c@l@r=#2\tabu@firstspace .#1& }% +\gdef\tabu@firstspace #1#2#3 &{\tabu@lastspace #2#3&} +\gdef\tabu@lastspace #1{\def #3{#1}% + \ifx #3\tabu@c@l@r \def\tabu@c@l@r{\protect\color{#1}}\expandafter\remove@to@nnil \fi + \tabu@trimspaces #1\@nnil} +}% \catcode +\def\tabu@sanitizearg #1#2{{% + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef#2{#1}\tabu@strtrim#2\@onelevel@sanitize#2% + \expandafter}\expandafter\def\expandafter#2\expandafter{#2}% +}% \tabu@sanitizearg +\def\tabu@textbar #1{\begingroup \endlinechar\m@ne \scantokens{\def\:{|}}% + \expandafter\endgroup \expandafter#1\:% !!! semi simple group !!! +}% \tabu@textbar +\def\tabu@everyrow@bgroup{\iftabu@everyrow \begingroup \else \noalign{\ifnum0=`}\fi \fi} +\def\tabu@everyrow@egroup{% + \iftabu@everyrow \expandafter \endgroup \the\toks@ + \else \ifnum0=`{\fi}% + \fi +}% \tabu@everyrow@egroup +\def\tabu@arstrut {\global\setbox\@arstrutbox \hbox{\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \z@}% +}% \tabu@arstrut +\def\tabu@rearstrut {% + \@tempdima \arraystretch\dimexpr\ht\strutbox+\extrarowheight \relax + \@tempdimb \arraystretch\dimexpr\dp\strutbox+\extrarowdepth \relax + \ifodd 1\ifdim \ht\@arstrutbox=\@tempdima + \ifdim \dp\@arstrutbox=\@tempdimb 0 \fi\fi + \tabu@mkarstrut + \fi +}% \tabu@rearstrut +\def\tabu@@DBG #1{\ifdim\tabustrutrule>\z@ \color{#1}\fi} +\def\tabu@DBG@arstrut {\global\setbox\@arstrutbox + \hbox to\z@{\hbox to\z@{\hss + {\tabu@DBG{cyan}\vrule + height \arraystretch \dimexpr\ht\strutbox+\extrarowheight + depth \z@ + width \tabustrutrule}\kern-\tabustrutrule + {\tabu@DBG{pink}\vrule + height \z@ + depth \arraystretch \dimexpr\dp\strutbox+\extrarowdepth + width \tabustrutrule}}}% +}% \tabu@DBG@arstrut +\def\tabu@save@decl{\toks\count@ \expandafter{\the\toks\expandafter\count@ + \@nextchar}}% +\def\tabu@savedecl{\ifcat$\d@llarend\else + \let\save@decl \tabu@save@decl \fi % no inversion of tokens in text mode +}% \tabu@savedecl +\def\tabu@finalstrut #1{\unskip\ifhmode\nobreak\fi\vrule height\z@ depth\z@ width\z@} +\newcommand*\tabuDisableCommands {\g@addto@macro\tabu@trialh@@k } +\let\tabu@trialh@@k \@empty +\def\tabu@nowrite #1#{{\afterassignment}\toks@} +\let\tabu@write\write +\let\tabu@immediate\immediate +\def\tabu@WRITE{\begingroup + \def\immediate\write{\aftergroup\endgroup + \tabu@immediate\tabu@write}% +}% \tabu@WRITE +\expandafter\def\expandafter\tabu@GenericError\expandafter{% + \expandafter\tabu@WRITE\GenericError} +\def\tabu@warn{\tabu@WRITE\PackageWarning{tabu}} +\def\tabu@noxfootnote [#1]{\@gobble} +\def\tabu@nocolor #1#{\@gobble} +\newcommand*\tabu@norowcolor[2][]{} +\def\tabu@maybesiunitx #1{\def\tabu@temp{#1}% + \futurelet\@let@token \tabu@m@ybesiunitx} +\def\tabu@m@ybesiunitx #1{\def\tabu@m@ybesiunitx {% + \ifx #1\@let@token \let\tabu@cellleft \@empty \let\tabu@cellright \@empty \fi + \tabu@temp}% \tabu@m@ybesiunitx +}\expandafter\tabu@m@ybesiunitx \csname siunitx_table_collect_begin:Nn\endcsname +\def\tabu@celllalign@def #1{\def\tabu@celllalign{\tabu@maybesiunitx{#1}}}% +%% Fixed vertical spacing adjustment: \extrarowsep ------------------ +\newcommand*\extrarowsep{\edef\tabu@C@extra{\the\numexpr\tabu@C@extra+1}% + \iftabu@everyrow \aftergroup\tabu@Gextra + \else \aftergroup\tabu@n@Gextra + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@extra} \tabu@extra +}% \extrarowsep +\def\tabu@extra {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setextrasep \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extra +\def\tabu@setextra #1#2{\def\tabu@temp{\tabu@extr@#1#2}\afterassignment\tabu@temp#2} +\def\tabu@extr@ #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setextra\extrarowdepth \extrarowheight}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setextra\extrarowheight \extrarowdepth}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth + \fi \tabu@temp}% +}% \tabu@extr@ +\def\tabu@setextrasep {\extrarowheight=\extrarowdepth + \tabu@Gsave \tabu@G@extra \tabu@C@extra \extrarowheight \extrarowdepth +}% \tabu@setextrasep +\def\tabu@Gextra{\ifx \tabu@G@extra\@empty \else {\tabu@Rextra}\fi} +\def\tabu@n@Gextra{\ifx \tabu@G@extra\@empty \else \noalign{\tabu@Rextra}\fi} +\def\tabu@Rextra{\tabu@Grestore \tabu@G@extra \tabu@C@extra} +\let\tabu@C@extra \z@ +\let\tabu@G@extra \@empty +%% Dynamic vertical spacing adjustment: \tabulinesep ---------------- +\newcommand*\tabulinesep{\edef\tabu@C@linesep{\the\numexpr\tabu@C@linesep+1}% + \iftabu@everyrow \aftergroup\tabu@Glinesep + \else \aftergroup\tabu@n@Glinesep + \fi + \@ifnextchar={\tabu@gobbletoken\tabu@linesep} \tabu@linesep +}% \tabulinesep +\def\tabu@linesep {\@ifnextchar_% + {\tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}} + {\ifx ^\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}}% + \else \let\tabu@temp \@empty + \afterassignment \tabu@setlinesep \abovetabulinesep + \fi \tabu@temp}% +}% \tabu@linesep +\def\tabu@setsep #1#2{\def\tabu@temp{\tabu@sets@p#1#2}\afterassignment\tabu@temp#2} +\def\tabu@sets@p #1#2{\@ifnextchar^% + {\tabu@gobbletoken{\tabu@setsep\belowtabulinesep \abovetabulinesep}} + {\ifx _\@let@token \def\tabu@temp{% + \tabu@gobbletoken{\tabu@setsep\abovetabulinesep \belowtabulinesep}}% + \else \let\tabu@temp \@empty + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep + \fi \tabu@temp}% +}% \tabu@sets@p +\def\tabu@setlinesep {\belowtabulinesep=\abovetabulinesep + \tabu@Gsave \tabu@G@linesep \tabu@C@linesep \abovetabulinesep \belowtabulinesep +}% \tabu@setlinesep +\def\tabu@Glinesep{\ifx \tabu@G@linesep\@empty \else {\tabu@Rlinesep}\fi} +\def\tabu@n@Glinesep{\ifx \tabu@G@linesep\@empty \else \noalign{\tabu@Rlinesep}\fi} +\def\tabu@Rlinesep{\tabu@Grestore \tabu@G@linesep \tabu@C@linesep} +\let\tabu@C@linesep \z@ +\let\tabu@G@linesep \@empty +%% \global\extrarowsep and \global\tabulinesep ------------------- +\def\tabu@Gsave #1#2#3#4{\xdef#1{#1% + \toks#2{\toks\the\currentgrouplevel{\global#3\the#3\global#4\the#4}}}% +}% \tabu@Gsave +\def\tabu@Grestore#1#2{% + \toks#2{}#1\toks\currentgrouplevel\expandafter{\expandafter}\the\toks#2\relax + \ifcat$\the\toks\currentgrouplevel$\else + \global\let#1\@empty \global\let#2\z@ + \the\toks\currentgrouplevel + \fi +}% \tabu@Grestore +%% Setting code for every row --------------------------------------- +\newcommand*\everyrow{\tabu@everyrow@bgroup + \tabu@start \z@ \tabu@stop \z@ \tabu@evrstartstop +}% \everyrow +\def\tabu@evrstartstop {\@ifnextchar^% + {\afterassignment \tabu@evrstartstop \tabu@stop=}% + {\ifx ^\@let@token + \afterassignment\tabu@evrstartstop \tabu@start=% + \else \afterassignment\tabu@everyr@w \toks@ + \fi}% +}% \tabu@evrstartstop +\def\tabu@everyr@w {% + \xdef\tabu@everyrow{% + \noexpand\tabu@everyrowfalse + \let\noalign \relax + \noexpand\tabu@rowfontreset + \iftabu@colortbl \noexpand\tabu@rc@ \fi % \taburowcolors + \let\noexpand\tabu@docline \noexpand\tabu@docline@evr + \the\toks@ + \noexpand\tabu@evrh@@k + \noexpand\tabu@rearstrut + \global\advance\c@taburow \@ne}% + \iftabu@everyrow \toks@\expandafter + {\expandafter\def\expandafter\tabu@evr@L\expandafter{\the\toks@}\ignorespaces}% + \else \xdef\tabu@evr@G{\the\toks@}% + \fi + \tabu@everyrow@egroup +}% \tabu@everyr@w +\def\tabu@evr {\def\tabu@evrh@@k} % for internal use only +\tabu@evr{} +%% line style and leaders ------------------------------------------- +\newcommand*\newtabulinestyle [1]{% + {\@for \@tempa :=#1\do{\expandafter\tabu@newlinestyle \@tempa==\@nil}}% +}% \newtabulinestyle +\def\tabu@newlinestyle #1=#2=#3\@nil{\tabu@getline {#2}% + \tabu@sanitizearg {#1}\@tempa + \ifodd 1\ifx \@tempa\@empty \ifdefined\tabu@linestyle@ 0 \fi\fi + \global\expandafter\let + \csname tabu@linestyle@\@tempa \endcsname =\tabu@thestyle \fi +}% \tabu@newlinestyle +\newcommand*\tabulinestyle [1]{\tabu@everyrow@bgroup \tabu@getline{#1}% + \iftabu@everyrow + \toks@\expandafter{\expandafter \def \expandafter + \tabu@ls@L\expandafter{\tabu@thestyle}\ignorespaces}% + \gdef\tabu@ls@{\tabu@ls@L}% + \else + \global\let\tabu@ls@G \tabu@thestyle + \gdef\tabu@ls@{\tabu@ls@G}% + \fi + \tabu@everyrow@egroup +}% \tabulinestyle +\newcommand*\taburulecolor{\tabu@everyrow@bgroup \tabu@textbar \tabu@rulecolor} +\def\tabu@rulecolor #1{\toks@{}% + \def\tabu@temp #1##1#1{\tabu@ruledrsc{##1}}\@ifnextchar #1% + \tabu@temp + \tabu@rulearc +}% \tabu@rulecolor +\def\tabu@ruledrsc #1{\edef\tabu@temp{#1}\tabu@strtrim\tabu@temp + \ifx \tabu@temp\@empty \def\tabu@temp{\tabu@rule@drsc@ {}{}}% + \else \edef\tabu@temp{\noexpand\tabu@rule@drsc@ {}{\tabu@temp}}% + \fi + \tabu@temp +}% \tabu@ruledrsc@ +\def\tabu@ruledrsc@ #1#{\tabu@rule@drsc@ {#1}} +\def\tabu@rule@drsc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@{\let\CT@drsc@ \relax}% + \else \toks@{\def\CT@drsc@{\color #1{#2}}}% + \fi + \else + \ifx \\#1#2\\\global\let\CT@drsc@ \relax + \else \gdef\CT@drsc@{\color #1{#2}}% + \fi + \fi + \tabu@rulearc +}% \tabu@rule@drsc@ +\def\tabu@rulearc #1#{\tabu@rule@arc@ {#1}} +\def\tabu@rule@arc@ #1#2{% + \iftabu@everyrow + \ifx \\#1#2\\\toks@\expandafter{\the\toks@ \def\CT@arc@{}}% + \else \toks@\expandafter{\the\toks@ \def\CT@arc@{\color #1{#2}}}% + \fi + \toks@\expandafter{\the\toks@ + \let\tabu@arc@L \CT@arc@ + \let\tabu@drsc@L \CT@drsc@ + \ignorespaces}% + \else + \ifx \\#1#2\\\gdef\CT@arc@{}% + \else \gdef\CT@arc@{\color #1{#2}}% + \fi + \global\let\tabu@arc@G \CT@arc@ + \global\let\tabu@drsc@G \CT@drsc@ + \fi + \tabu@everyrow@egroup +}% \tabu@rule@arc@ +\def\taburowcolors {\tabu@everyrow@bgroup \@testopt \tabu@rowcolors 1} +\def\tabu@rowcolors [#1]#2#{\tabu@rowc@lors{#1}{#2}} +\def\tabu@rowc@lors #1#2#3{% + \toks@{}\@defaultunits \count@ =\number0#2\relax \@nnil + \@defaultunits \tabu@start =\number0#1\relax \@nnil + \ifnum \count@<\tw@ \count@=\tw@ \fi + \advance\tabu@start \m@ne + \ifnum \tabu@start<\z@ \tabu@start \z@ \fi + \tabu@rowcolorseries #3\in@..\in@ \@nnil +}% \tabu@rowcolors +\def\tabu@rowcolorseries #1..#2\in@ #3\@nnil {% + \ifx \in@#1\relax + \iftabu@everyrow \toks@{\def\tabu@rc@{}\let\tabu@rc@L \tabu@rc@}% + \else \gdef\tabu@rc@{}\global\let\tabu@rc@G \tabu@rc@ + \fi + \else + \ifx \\#2\\\tabu@rowcolorserieserror \fi + \tabu@sanitizearg{#1}\tabu@temp + \tabu@sanitizearg{#2}\@tempa + \advance\count@ \m@ne + \iftabu@everyrow + \def\tabu@rc@ ##1##2##3##4{\def\tabu@rc@{% + \ifnum ##2=\c@taburow + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{##3}{##4}\fi + \ifnum \c@taburow<##2 \else + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\z@ + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}\fi}% + }\edef\x{\noexpand\tabu@rc@ {\the\count@} + {\the\tabu@start} + {\tabu@temp} + {\@tempa}% + }\x + \toks@\expandafter{\expandafter\def\expandafter\tabu@rc@\expandafter{\tabu@rc@}}% + \toks@\expandafter{\the\toks@ \let\tabu@rc@L \tabu@rc@ \ignorespaces}% + \else % inside \noalign + \definecolorseries{tabu@rcseries@\the\tabu@nested}{rgb}{last}{\tabu@temp}{\@tempa}% + \expandafter\resetcolorseries\expandafter[\the\count@]{tabu@rcseries@\the\tabu@nested}% + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \let\noalign \relax \rowcolor{tabu@rc@\the\tabu@nested}% + \def\tabu@rc@ ##1##2{\gdef\tabu@rc@{% + \ifnum \tabu@modulo {\c@taburow-##2}{##1+1}=\@ne + \resetcolorseries[{##1}]{tabu@rcseries@\the\tabu@nested}\fi + \xglobal\colorlet{tabu@rc@\the\tabu@nested}{tabu@rcseries@\the\tabu@nested!!+}% + \rowcolor{tabu@rc@\the\tabu@nested}}% + }\edef\x{\noexpand\tabu@rc@{\the\count@}{\the\c@taburow}}\x + \global\let\tabu@rc@G \tabu@rc@ + \fi + \fi + \tabu@everyrow@egroup +}% \tabu@rowcolorseries +\tabuDisableCommands {\let\tabu@rc@ \@empty } +\def\tabu@rowcolorserieserror {\PackageError{tabu} + {Invalid syntax for \string\taburowcolors + \MessageBreak Please look at the documentation!}\@ehd +}% \tabu@rowcolorserieserror +\newcommand*\tabureset {% + \tabulinesep=\z@ \extrarowsep=\z@ \extratabsurround=\z@ + \tabulinestyle{}\everyrow{}\taburulecolor||{}\taburowcolors{}% +}% \tabureset +%% Parsing the line styles ------------------------------------------ +\def\tabu@getline #1{\begingroup + \csname \ifcsname if@safe@actives\endcsname % + @safe@activestrue\else + relax\fi \endcsname + \edef\tabu@temp{#1}\tabu@sanitizearg{#1}\@tempa + \let\tabu@thestyle \relax + \ifcsname tabu@linestyle@\@tempa \endcsname + \edef\tabu@thestyle{\endgroup + \def\tabu@thestyle{\expandafter\noexpand + \csname tabu@linestyle@\@tempa\endcsname}% + }\tabu@thestyle + \else \expandafter\tabu@definestyle \tabu@temp \@nil + \fi +}% \tabu@getline +\def\tabu@definestyle #1#2\@nil {\endlinechar \m@ne \makeatletter + \tabu@thick \maxdimen \tabu@on \maxdimen \tabu@off \maxdimen + \let\tabu@c@lon \@undefined \let\tabu@c@loff \@undefined + \ifodd 1\ifcat .#1\else\ifcat\relax #1\else 0\fi\fi % catcode 12 or non expandable cs + \def\tabu@temp{\tabu@getparam{thick}}% + \else \def\tabu@temp{\tabu@getparam{thick}\maxdimen}% + \fi + {% + \let\tabu@ \relax + \def\:{\obeyspaces \tabu@oXIII \tabu@commaXIII \edef\:}% (space active \: happy ;-)) + \scantokens{\:{\tabu@temp #1#2 \tabu@\tabu@}}% + \expandafter}\expandafter + \def\expandafter\:\expandafter{\:}% line spec rewritten now ;-) + \def\;{\def\:}% + \scantokens\expandafter{\expandafter\;\expandafter{\:}}% space is now inactive (catcode 10) + \let\tabu@ \tabu@getcolor \:% all arguments are ready now ;-) + \ifdefined\tabu@c@lon \else \let\tabu@c@lon\@empty \fi + \ifx \tabu@c@lon\@empty \def\tabu@c@lon{\CT@arc@}\fi + \ifdefined\tabu@c@loff \else \let\tabu@c@loff \@empty \fi + \ifdim \tabu@on=\maxdimen \ifdim \tabu@off<\maxdimen + \tabu@on \tabulineon \fi\fi + \ifdim \tabu@off=\maxdimen \ifdim \tabu@on<\maxdimen + \tabu@off \tabulineoff \fi\fi + \ifodd 1\ifdim \tabu@off=\maxdimen \ifdim \tabu@on=\maxdimen 0 \fi\fi + \in@true % + \else \in@false % + \fi + \ifdim\tabu@thick=\maxdimen \def\tabu@thick{\arrayrulewidth}% + \else \edef\tabu@thick{\the\tabu@thick}% + \fi + \edef \tabu@thestyle ##1##2{\endgroup + \def\tabu@thestyle{% + \ifin@ \noexpand\tabu@leadersstyle {\tabu@thick} + {\the\tabu@on}{##1} + {\the\tabu@off}{##2}% + \else \noexpand\tabu@rulesstyle + {##1\vrule width \tabu@thick}% + {##1\leaders \hrule height \tabu@thick \hfil}% + \fi}% + }\expandafter \expandafter + \expandafter \tabu@thestyle \expandafter + \expandafter \expandafter + {\expandafter\tabu@c@lon\expandafter}\expandafter{\tabu@c@loff}% +}% \tabu@definestyle +{\catcode`\O=\active \lccode`\O=`\o \catcode`\,=\active + \lowercase{\gdef\tabu@oXIII {\catcode`\o=\active \let O=\tabu@oxiii}} + \gdef\tabu@commaXIII {\catcode`\,=\active \let ,=\space} +}% \catcode +\def\tabu@oxiii #1{% + \ifcase \ifx n#1\z@ \else + \ifx f#1\@ne\else + \tw@ \fi\fi + \expandafter\tabu@onxiii + \or \expandafter\tabu@ofxiii + \else o% + \fi#1}% +\def\tabu@onxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx \tabu@spxiii#2\@ne\else + \tw@ \fi\fi\fi + \tabu@getparam{on}#2\expandafter\@gobble + \or \expandafter\tabu@onxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}}% +\def\tabu@ofxiii #1#2{% + \ifx #2f\expandafter\tabu@offxiii + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@offxiii #1#2{% + \ifcase \ifx !#2\tw@ \else + \ifcat.\noexpand#2\z@ \else + \ifx\tabu@spxiii#2\@ne \else + \tw@ \fi\fi\fi + \tabu@getparam{off}#2\expandafter\@gobble + \or \expandafter\tabu@offxiii % (space is active) + \else o\expandafter\@firstofone + \fi{#1#2}} +\def\tabu@getparam #1{\tabu@ \csname tabu@#1\endcsname=} +\def\tabu@getcolor #1{% \tabu@ <- \tabu@getcolor after \edef + \ifx \tabu@#1\else % no more spec + \let\tabu@theparam=#1\afterassignment \tabu@getc@l@r #1\fi +}% \tabu@getcolor +\def\tabu@getc@l@r #1\tabu@ {% + \def\tabu@temp{#1}\tabu@strtrim \tabu@temp + \ifx \tabu@temp\@empty + \else%\ifcsname \string\color@\tabu@temp \endcsname % if the color exists + \ifx \tabu@theparam \tabu@off \let\tabu@c@loff \tabu@c@l@r + \else \let\tabu@c@lon \tabu@c@l@r + \fi + %\else \tabu@warncolour{\tabu@temp}% + \fi%\fi + \tabu@ % next spec +}% \tabu@getc@l@r +\def\tabu@warncolour #1{\PackageWarning{tabu} + {Color #1 is not defined. Default color used}% +}% \tabu@warncolour +\def\tabu@leadersstyle #1#2#3#4#5{\def\tabu@leaders{{#1}{#2}{#3}{#4}{#5}}% + \ifx \tabu@leaders\tabu@leaders@G \else + \tabu@LEADERS{#1}{#2}{#3}{#4}{#5}\fi +}% \tabu@leadersstyle +\def\tabu@rulesstyle #1#2{\let\tabu@leaders \@undefined + \gdef\tabu@thevrule{#1}\gdef\tabu@thehrule{#2}% +}% \tabu@rulesstyle +%% The leaders boxes ------------------------------------------------ +\def\tabu@LEADERS #1#2#3#4#5{%% width, dash, dash color, gap, gap color + {\let\color \tabu@color % => during trials -> \color = \tabu@nocolor + {% % but the leaders boxes should have colors ! + \def\@therule{\vrule}\def\@thick{height}\def\@length{width}% + \def\@box{\hbox}\def\@unbox{\unhbox}\def\@elt{\wd}% + \def\@skip{\hskip}\def\@ss{\hss}\def\tabu@leads{\tabu@hleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thehleaders \tabu@theleaders + }% + {% + \def\@therule{\hrule}\def\@thick{width}\def\@length{height}% + \def\@box{\vbox}\def\@unbox{\unvbox}\def\@elt{\ht}% + \def\@skip{\vskip}\def\@ss{\vss}\def\tabu@leads{\tabu@vleads}% + \tabu@l@@d@rs {#1}{#2}{#3}{#4}{#5}% + \global\let\tabu@thevleaders \tabu@theleaders + }% + \gdef\tabu@leaders@G{{#1}{#2}{#3}{#4}{#5}}% + }% +}% \tabu@LEADERS +\def\tabu@therule #1#2{\@therule \@thick#1\@length\dimexpr#2/2 \@depth\z@} +\def\tabu@l@@d@rs #1#2#3#4#5{%% width, dash, dash color, gap, gap color + \global\setbox \tabu@leads=\@box{% + {#3\tabu@therule{#1}{#2}}% + \ifx\\#5\\\@skip#4\else{#5\tabu@therule{#1}{#4*2}}\fi + {#3\tabu@therule{#1}{#2}}}% + \global\setbox\tabu@leads=\@box to\@elt\tabu@leads{\@ss + {#3\tabu@therule{#1}{#2}}\@unbox\tabu@leads}% + \edef\tabu@theleaders ##1{\def\noexpand\tabu@theleaders {% + {##1\tabu@therule{#1}{#2}}% + \xleaders \copy\tabu@leads \@ss + \tabu@therule{0pt}{-#2}{##1\tabu@therule{#1}{#2}}}% + }\tabu@theleaders{#3}% +}% \tabu@l@@d@rs +%% \tabu \endtabu \tabu* \longtabu \endlongtabu \longtabu* ---------- +\newcommand*\tabu {\tabu@longfalse + \ifmmode \def\tabu@ {\array}\def\endtabu {\endarray}% + \else \def\tabu@ {\tabu@tabular}\def\endtabu {\endtabular}\fi + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endtabu*\endcsname{\endtabu}% + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {tabu} +\let\tabu@tabular \tabular % +\expandafter\def\csname tabu*\endcsname{\tabuscantokenstrue \tabu} +\newcommand*\longtabu {\tabu@longtrue + \ifmmode\PackageError{tabu}{longtabu not allowed in math mode}\fi + \def\tabu@{\longtable}\def\endlongtabu{\endlongtable}% + \LTchunksize=\@M + \expandafter\let\csname tabu*\endcsname \tabu + \expandafter\def\csname endlongtabu*\endcsname{\endlongtabu}% + \let\LT@startpbox \tabu@LT@startpbox % \everypar{ array struts } + \tabu@spreadfalse \tabu@negcoeffalse \tabu@settarget +}% {longtabu} +\expandafter\def\csname longtabu*\endcsname{\tabuscantokenstrue \longtabu} +\def\tabu@nolongtabu{\PackageError{tabu} + {longtabu requires the longtable package}\@ehd} +%% Read the target and then : \tabular or \@array ------------------ +\def\tabu@settarget {\futurelet\@let@token \tabu@sett@rget } +\def\tabu@sett@rget {\tabu@target \z@ + \ifcase \ifx \bgroup\@let@token \z@ \else + \ifx \@sptoken\@let@token \@ne \else + \if t\@let@token \tw@ \else + \if s\@let@token \thr@@\else + \z@\fi\fi\fi\fi + \expandafter\tabu@begin + \or \expandafter\tabu@gobblespace\expandafter\tabu@settarget + \or \expandafter\tabu@to + \or \expandafter\tabu@spread + \fi +}% \tabu@sett@rget +\def\tabu@to to{\def\tabu@halignto{to}\tabu@gettarget} +\def\tabu@spread spread{\tabu@spreadtrue\def\tabu@halignto{spread}\tabu@gettarget} +\def\tabu@gettarget {\afterassignment\tabu@linegoaltarget \tabu@target } +\def\tabu@linegoaltarget {\futurelet\tabu@temp \tabu@linegoalt@rget } +\def\tabu@linegoalt@rget {% + \ifx \tabu@temp\LNGL@setlinegoal + \LNGL@setlinegoal \expandafter \@firstoftwo \fi % @gobbles \LNGL@setlinegoal + \tabu@begin +}% \tabu@linegoalt@rget +\def\tabu@begin #1#{% + \iftabu@measuring \expandafter\tabu@nestedmeasure \fi + \ifdim \tabu@target=\z@ \let\tabu@halignto \@empty + \else \edef\tabu@halignto{\tabu@halignto\the\tabu@target}% + \fi + \@testopt \tabu@tabu@ \tabu@aligndefault #1\@nil +}% \tabu@begin +\long\def\tabu@tabu@ [#1]#2\@nil #3{\tabu@setup + \def\tabu@align {#1}\def\tabu@savedpream{\NC@find #3}% + \tabu@ [\tabu@align ]#2{#3\tabu@rewritefirst }% +}% \tabu@tabu@ +\def\tabu@nestedmeasure {% + \ifodd 1\iftabu@spread \else \ifdim\tabu@target=\z@ \else 0 \fi\fi\relax + \tabu@spreadtrue + \else \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}% + \expandafter\tabu@collectbody\expandafter\tabu@quickrule + \expandafter\endgroup + \fi +}% \tabu@nestedmeasure +\def\tabu@quickrule {\indent\vrule height\z@ depth\z@ width\tabu@target} +%% \tabu@setup \tabu@init \tabu@indent +\def\tabu@setup{\tabu@alloc@ + \ifcase \tabu@nested + \ifmmode \else \iftabu@spread\else \ifdim\tabu@target=\z@ + \let\tabu@afterendpar \par + \fi\fi\fi + \def\tabu@aligndefault{c}\tabu@init \tabu@indent + \else % + \def\tabu@aligndefault{t}\let\tabudefaulttarget \linewidth + \fi + \let\tabu@thetarget \tabudefaulttarget \let\tabu@restored \@undefined + \edef\tabu@NC@list{\the\NC@list}\NC@list{\NC@do \tabu@rewritefirst}% + \everycr{}\let\@startpbox \tabu@startpbox % for nested tabu inside longtabu... + \let\@endpbox \tabu@endpbox % idem " " " " " " + \let\@tabarray \tabu@tabarray % idem " " " " " " + \tabu@setcleanup \tabu@setreset +}% \tabu@setup +\def\tabu@init{\tabu@starttimer \tabu@measuringfalse + \edef\tabu@hfuzz {\the\dimexpr\hfuzz+1sp}\global\tabu@footnotes{}% + \let\firsthline \tabu@firsthline \let\lasthline \tabu@lasthline + \let\firstline \tabu@firstline \let\lastline \tabu@lastline + \let\hline \tabu@hline \let\@xhline \tabu@xhline + \let\color \tabu@color \let\@arstrutbox \tabu@arstrutbox + \iftabu@colortbl\else\let\LT@@hline \tabu@LT@@hline \fi + \tabu@trivlist % + \let\@footnotetext \tabu@footnotetext \let\@xfootnotetext \tabu@xfootnotetext + \let\@xfootnote \tabu@xfootnote \let\centering \tabu@centering + \let\raggedright \tabu@raggedright \let\raggedleft \tabu@raggedleft + \let\tabudecimal \tabu@tabudecimal \let\Centering \tabu@Centering + \let\RaggedRight \tabu@RaggedRight \let\RaggedLeft \tabu@RaggedLeft + \let\justifying \tabu@justifying \let\rowfont \tabu@rowfont + \let\fbox \tabu@fbox \let\color@b@x \tabu@color@b@x + \let\tabu@@everycr \everycr \let\tabu@@everypar \everypar + \let\tabu@prepnext@tokORI \prepnext@tok\let\prepnext@tok \tabu@prepnext@tok + \let\tabu@multicolumnORI\multicolumn \let\multicolumn \tabu@multicolumn + \let\tabu@startpbox \@startpbox % for nested tabu inside longtabu pfff !!! + \let\tabu@endpbox \@endpbox % idem " " " " " " " + \let\tabu@tabarray \@tabarray % idem " " " " " " " + \tabu@adl@fix \let\endarray \tabu@endarray % colortbl & arydshln (delarray) + \iftabu@colortbl\CT@everycr\expandafter{\expandafter\iftabu@everyrow \the\CT@everycr \fi}\fi +}% \tabu@init +\def\tabu@indent{% correction for indentation + \ifdim \parindent>\z@\ifx \linewidth\tabudefaulttarget + \everypar\expandafter{% + \the\everypar\everypar\expandafter{\the\everypar}% + \setbox\z@=\lastbox + \ifdim\wd\z@>\z@ \edef\tabu@thetarget + {\the\dimexpr -\wd\z@+\tabudefaulttarget}\fi + \box\z@}% + \fi\fi +}% \tabu@indent +\def\tabu@setcleanup {% saves last global assignments + \ifodd 1\ifmmode \else \iftabu@long \else 0\fi\fi\relax + \def\tabu@aftergroupcleanup{% + \def\tabu@aftergroupcleanup{\aftergroup\tabu@cleanup}}% + \else + \def\tabu@aftergroupcleanup{% + \aftergroup\aftergroup\aftergroup\tabu@cleanup + \let\tabu@aftergroupcleanup \relax}% + \fi + \let\tabu@arc@Gsave \tabu@arc@G + \let\tabu@arc@G \tabu@arc@L % + \let\tabu@drsc@Gsave \tabu@drsc@G + \let\tabu@drsc@G \tabu@drsc@L % + \let\tabu@ls@Gsave \tabu@ls@G + \let\tabu@ls@G \tabu@ls@L % + \let\tabu@rc@Gsave \tabu@rc@G + \let\tabu@rc@G \tabu@rc@L % + \let\tabu@evr@Gsave \tabu@evr@G + \let\tabu@evr@G \tabu@evr@L % + \let\tabu@celllalign@save \tabu@celllalign + \let\tabu@cellralign@save \tabu@cellralign + \let\tabu@cellleft@save \tabu@cellleft + \let\tabu@cellright@save \tabu@cellright + \let\tabu@@celllalign@save \tabu@@celllalign + \let\tabu@@cellralign@save \tabu@@cellralign + \let\tabu@@cellleft@save \tabu@@cellleft + \let\tabu@@cellright@save \tabu@@cellright + \let\tabu@rowfontreset@save \tabu@rowfontreset + \let\tabu@@rowfontreset@save\tabu@@rowfontreset + \let\tabu@rowfontreset \@empty + \edef\tabu@alloc@save {\the\tabu@alloc}% restore at \tabu@reset + \edef\c@taburow@save {\the\c@taburow}% + \edef\tabu@naturalX@save {\the\tabu@naturalX}% + \let\tabu@naturalXmin@save \tabu@naturalXmin + \let\tabu@naturalXmax@save \tabu@naturalXmax + \let\tabu@mkarstrut@save \tabu@mkarstrut + \edef\tabu@clarstrut{% + \extrarowheight \the\dimexpr \ht\@arstrutbox-\ht\strutbox \relax + \extrarowdepth \the\dimexpr \dp\@arstrutbox-\dp\strutbox \relax + \let\noexpand\@arraystretch \@ne \noexpand\tabu@rearstrut}% +}% \tabu@setcleanup +\def\tabu@cleanup {\begingroup + \globaldefs\@ne \tabu@everyrowtrue + \let\tabu@arc@G \tabu@arc@Gsave + \let\CT@arc@ \tabu@arc@G + \let\tabu@drsc@G \tabu@drsc@Gsave + \let\CT@drsc@ \tabu@drsc@G + \let\tabu@ls@G \tabu@ls@Gsave + \let\tabu@ls@ \tabu@ls@G + \let\tabu@rc@G \tabu@rc@Gsave + \let\tabu@rc@ \tabu@rc@G + \let\CT@do@color \relax + \let\tabu@evr@G \tabu@evr@Gsave + \let\tabu@celllalign \tabu@celllalign@save + \let\tabu@cellralign \tabu@cellralign@save + \let\tabu@cellleft \tabu@cellleft@save + \let\tabu@cellright \tabu@cellright@save + \let\tabu@@celllalign \tabu@@celllalign@save + \let\tabu@@cellralign \tabu@@cellralign@save + \let\tabu@@cellleft \tabu@@cellleft@save + \let\tabu@@cellright \tabu@@cellright@save + \let\tabu@rowfontreset \tabu@rowfontreset@save + \let\tabu@@rowfontreset \tabu@@rowfontreset@save + \tabu@naturalX =\tabu@naturalX@save + \let\tabu@naturalXmax \tabu@naturalXmax@save + \let\tabu@naturalXmin \tabu@naturalXmin@save + \let\tabu@mkarstrut \tabu@mkarstrut@save + \c@taburow =\c@taburow@save + \ifcase \tabu@nested \tabu@alloc \m@ne\fi + \endgroup % + \ifcase \tabu@nested + \the\tabu@footnotes \global\tabu@footnotes{}% + \tabu@afterendpar \tabu@elapsedtime + \fi + \tabu@clarstrut + \everyrow\expandafter {\tabu@evr@G}% +}% \tabu@cleanup +\let\tabu@afterendpar \relax +\def\tabu@setreset {% + \edef\tabu@savedparams {% \relax for \tabu@message@save + \ifmmode \col@sep \the\arraycolsep + \else \col@sep \the\tabcolsep \fi \relax + \arrayrulewidth \the\arrayrulewidth \relax + \doublerulesep \the\doublerulesep \relax + \extratabsurround \the\extratabsurround \relax + \extrarowheight \the\extrarowheight \relax + \extrarowdepth \the\extrarowdepth \relax + \abovetabulinesep \the\abovetabulinesep \relax + \belowtabulinesep \the\belowtabulinesep \relax + \def\noexpand\arraystretch{\arraystretch}% + \ifdefined\minrowclearance \minrowclearance\the\minrowclearance\relax\fi}% + \begingroup + \@temptokena\expandafter{\tabu@savedparams}% => only for \savetabu / \usetabu + \ifx \tabu@arc@L\relax \else \tabu@setsave \tabu@arc@L \fi + \ifx \tabu@drsc@L\relax \else \tabu@setsave \tabu@drsc@L \fi + \tabu@setsave \tabu@ls@L \tabu@setsave \tabu@evr@L + \expandafter \endgroup \expandafter + \def\expandafter\tabu@saved@ \expandafter{\the\@temptokena + \let\tabu@arc@G \tabu@arc@L + \let\tabu@drsc@G \tabu@drsc@L + \let\tabu@ls@G \tabu@ls@L + \let\tabu@rc@G \tabu@rc@L + \let\tabu@evr@G \tabu@evr@L}% + \def\tabu@reset{\tabu@savedparams + \tabu@everyrowtrue \c@taburow \z@ + \let\CT@arc@ \tabu@arc@L + \let\CT@drsc@ \tabu@drsc@L + \let\tabu@ls@ \tabu@ls@L + \let\tabu@rc@ \tabu@rc@L + \global\tabu@alloc \tabu@alloc@save + \everyrow\expandafter{\tabu@evr@L}}% +}% \tabu@reset +\def\tabu@setsave #1{\expandafter\tabu@sets@ve #1\@nil{#1}} +\long\def\tabu@sets@ve #1\@nil #2{\@temptokena\expandafter{\the\@temptokena \def#2{#1}}} +%% The Rewriting Process ------------------------------------------- +\def\tabu@newcolumntype #1{% + \expandafter\tabu@new@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@newcolumntype +\def\tabu@new@columntype #1#2#3{% + \def#1##1#3{\NC@{##1}}% + \let#2\relax \newcommand*#2% +}% \tabu@new@columntype +\def\tabu@privatecolumntype #1{% + \expandafter\tabu@private@columntype + \csname NC@find@\string#1\expandafter\endcsname + \csname NC@rewrite@\string#1\expandafter\endcsname + \csname tabu@NC@find@\string#1\expandafter\endcsname + \csname tabu@NC@rewrite@\string#1\endcsname + {#1}% +}% \tabu@privatecolumntype +\def\tabu@private@columntype#1#2#3#4{% + \g@addto@macro\tabu@privatecolumns{\let#1#3\let#2#4}% + \tabu@new@columntype#3#4% +}% \tabu@private@columntype +\let\tabu@privatecolumns \@empty +\newcommand*\tabucolumn [1]{\expandafter \def \expandafter + \tabu@highprioritycolumns\expandafter{\tabu@highprioritycolumns + \NC@do #1}}% +\let\tabu@highprioritycolumns \@empty +%% The | ``column'' : rewriting process -------------------------- +\tabu@privatecolumntype |{\tabu@rewritevline} +\newcommand*\tabu@rewritevline[1][]{\tabu@vlinearg{#1}% + \expandafter \NC@find \tabu@rewritten} +\def\tabu@lines #1{% + \ifx|#1\else \tabu@privatecolumntype #1{\tabu@rewritevline}\fi + \NC@list\expandafter{\the\NC@list \NC@do #1}% +}% \tabu@lines@ +\def\tabu@vlinearg #1{% + \ifx\\#1\\\def\tabu@thestyle {\tabu@ls@}% + \else\tabu@getline {#1}% + \fi + \def\tabu@rewritten ##1{\def\tabu@rewritten{!{##1\tabu@thevline}}% + }\expandafter\tabu@rewritten\expandafter{\tabu@thestyle}% + \expandafter \tabu@keepls \tabu@thestyle \@nil +}% \tabu@vlinearg +\def\tabu@keepls #1\@nil{% + \ifcat $\@cdr #1\@nil $% + \ifx \relax#1\else + \ifx \tabu@ls@#1\else + \let#1\relax + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@savels\noexpand#1}\fi\fi\fi +}% \tabu@keepls +\def\tabu@thevline {\begingroup + \ifdefined\tabu@leaders + \setbox\@tempboxa=\vtop to\dimexpr + \ht\@arstrutbox+\dp\@arstrutbox{{\tabu@thevleaders}}% + \ht\@tempboxa=\ht\@arstrutbox \dp\@tempboxa=\dp\@arstrutbox + \box\@tempboxa + \else + \tabu@thevrule + \fi \endgroup +}% \tabu@thevline +\def\tabu@savels #1{% + \expandafter\let\csname\string#1\endcsname #1% + \expandafter\def\expandafter\tabu@reset\expandafter{\tabu@reset + \tabu@resetls#1}}% +\def\tabu@resetls #1{\expandafter\let\expandafter#1\csname\string#1\endcsname}% +%% \multicolumn inside tabu environment ----------------------------- +\tabu@newcolumntype \tabu@rewritemulticolumn{% + \aftergroup \tabu@endrewritemulticolumn % after \@mkpream group + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \tabu@savedecl + \tabu@privatecolumns + \NC@list\expandafter{\the\expandafter\NC@list \tabu@NC@list}% + \let\tabu@savels \relax + \NC@find +}% \tabu@rewritemulticolumn +\def\tabu@endrewritemulticolumn{\gdef\tabu@mkpreambuffer{}\endgroup} +\def\tabu@multicolumn{\tabu@ifenvir \tabu@multic@lumn \tabu@multicolumnORI} +\long\def\tabu@multic@lumn #1#2#3{\multispan{#1}\begingroup + \tabu@everyrowtrue + \NC@list{\NC@do \tabu@rewritemulticolumn}% + \expandafter\@gobbletwo % gobbles \multispan{#1} + \tabu@multicolumnORI{#1}{\tabu@rewritemulticolumn #2}% + {\iftabuscantokens \tabu@rescan \else \expandafter\@firstofone \fi + {#3}}% +}% \tabu@multic@lumn +%% The X column(s): rewriting process ----------------------------- +\tabu@privatecolumntype X[1][]{\begingroup \tabu@siunitx{\endgroup \tabu@rewriteX {#1}}} +\def\tabu@nosiunitx #1{#1{}{}\expandafter \NC@find \tabu@rewritten } +\def\tabu@siunitx #1{\@ifnextchar \bgroup + {\tabu@rewriteX@Ss{#1}} + {\tabu@nosiunitx{#1}}} +\def\tabu@rewriteX@Ss #1#2{\@temptokena{}% + \@defaultunits \let\tabu@temp =#2\relax\@nnil + \ifodd 1\ifx S\tabu@temp \else \ifx s\tabu@temp \else 0 \fi\fi + \def\NC@find{\def\NC@find >####1####2<####3\relax{#1 {####1}{####3}% + }\expandafter\NC@find \the\@temptokena \relax + }\expandafter\NC@rewrite@S \@gobble #2\relax + \else \tabu@siunitxerror + \fi + \expandafter \NC@find \tabu@rewritten +}% \tabu@rewriteX@Ss +\def\tabu@siunitxerror {\PackageError{tabu}{Not a S nor s column ! + \MessageBreak X column can only embed siunitx S or s columns}\@ehd +}% \tabu@siunitxerror +\def\tabu@rewriteX #1#2#3{\tabu@Xarg {#1}{#2}{#3}% + \iftabu@measuring + \else \tabu@measuringtrue % first X column found in the preamble + \let\@halignto \relax \let\tabu@halignto \relax + \iftabu@spread \tabu@spreadtarget \tabu@target \tabu@target \z@ + \else \tabu@spreadtarget \z@ \fi + \ifdim \tabu@target=\z@ + \setlength\tabu@target \tabu@thetarget + \tabu@message{\tabu@message@defaulttarget}% + \else \tabu@message{\tabu@message@target}\fi + \fi +}% \tabu@rewriteX +\def\tabu@rewriteXrestore #1#2#3{\let\@halignto \relax + \def\tabu@rewritten{l}} +\def\tabu@Xarg #1#2#3{% + \advance\tabu@Xcol \@ne \let\tabu@Xlcr \@empty + \let\tabu@Xdisp \@empty \let\tabu@Xmath \@empty + \ifx\\#1\\% + \def\tabu@rewritten{p}\tabucolX \p@ % + \else + \let\tabu@rewritten \@empty \let\tabu@temp \@empty \tabucolX \z@ + \tabu@Xparse {}#1\relax + \fi + \tabu@Xrewritten{#2}{#3}% +}% \tabu@Xarg +\def\tabu@Xparse #1{\futurelet\@let@token \tabu@Xtest} +\expandafter\def\expandafter\tabu@Xparsespace\space{\tabu@Xparse{}} +\def\tabu@Xtest{% + \ifcase \ifx \relax\@let@token \z@ \else + \if ,\@let@token \m@ne\else + \if p\@let@token 1\else + \if m\@let@token 2\else + \if b\@let@token 3\else + \if l\@let@token 4\else + \if c\@let@token 5\else + \if r\@let@token 6\else + \if j\@let@token 7\else + \if L\@let@token 8\else + \if C\@let@token 9\else + \if R\@let@token 10\else + \if J\@let@token 11\else + \ifx \@sptoken\@let@token 12\else + \if .\@let@token 13\else + \if -\@let@token 13\else + \ifcat $\@let@token 14\else + 15\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \or \tabu@Xtype {p}% + \or \tabu@Xtype {m}% + \or \tabu@Xtype {b}% + \or \tabu@Xalign \raggedright\relax + \or \tabu@Xalign \centering\relax + \or \tabu@Xalign \raggedleft\relax + \or \tabu@Xalign \tabu@justify\relax + \or \tabu@Xalign \RaggedRight\raggedright + \or \tabu@Xalign \Centering\centering + \or \tabu@Xalign \RaggedLeft\raggedleft + \or \tabu@Xalign \justifying\tabu@justify + \or \expandafter \tabu@Xparsespace + \or \expandafter \tabu@Xcoef + \or \expandafter \tabu@Xm@th + \or \tabu@Xcoef{}% + \else\expandafter \tabu@Xparse + \fi +}% \tabu@Xtest +\def\tabu@Xalign #1#2{% + \ifx \tabu@Xlcr\@empty \else \PackageWarning{tabu} + {Duplicate horizontal alignment specification}\fi + \ifdefined#1\def\tabu@Xlcr{#1}\let#1\relax + \else \def\tabu@Xlcr{#2}\let#2\relax\fi + \expandafter\tabu@Xparse +}% \tabu@Xalign +\def\tabu@Xtype #1{% + \ifx \tabu@rewritten\@empty \else \PackageWarning{tabu} + {Duplicate vertical alignment specification}\fi + \def\tabu@rewritten{#1}\expandafter\tabu@Xparse +}% \tabu@Xtype +\def\tabu@Xcoef#1{\edef\tabu@temp{\tabu@temp#1}% + \afterassignment\tabu@Xc@ef \tabu@cnt\number\if-#10\fi +}% \tabu@Xcoef +\def\tabu@Xc@ef{\advance\tabucolX \tabu@temp\the\tabu@cnt\p@ + \tabu@Xparse{}% +}% \tabu@Xc@ef +\def\tabu@Xm@th #1{\futurelet \@let@token \tabu@Xd@sp} +\def\tabu@Xd@sp{\let\tabu@Xmath=$% + \ifx $\@let@token \def\tabu@Xdisp{\displaystyle}% + \expandafter\tabu@Xparse + \else \expandafter\tabu@Xparse\expandafter{\expandafter}% + \fi +}% \tabu@Xd@sp +\def\tabu@Xrewritten {% + \ifx \tabu@rewritten\@empty \def\tabu@rewritten{p}\fi + \ifdim \tabucolX<\z@ \tabu@negcoeftrue + \else\ifdim \tabucolX=\z@ \tabucolX \p@ + \fi\fi + \edef\tabu@temp{{\the\tabu@Xcol}{\tabu@strippt\tabucolX}}% + \edef\tabu@Xcoefs{\tabu@Xcoefs \tabu@ \tabu@temp}% + \edef\tabu@rewritten ##1##2{\def\noexpand\tabu@rewritten{% + >{\tabu@Xlcr \ifx$\tabu@Xmath$\tabu@Xdisp\fi ##1}% + \tabu@rewritten {\tabu@hsize \tabu@temp}% + <{##2\ifx$\tabu@Xmath$\fi}}% + }\tabu@rewritten +}% \tabu@Xrewritten +\def\tabu@hsize #1#2{% + \ifdim #2\p@<\z@ + \ifdim \tabucolX=\maxdimen \tabu@wd{#1}\else + \ifdim \tabu@wd{#1}<-#2\tabucolX \tabu@wd{#1}\else -#2\tabucolX\fi + \fi + \else #2\tabucolX + \fi +}% \tabu@hsize +%% \usetabu and \preamble: rewriting process --------------------- +\tabu@privatecolumntype \usetabu [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\let\tabu@rewriteX \tabu@rewriteXrestore + \csname tabu@saved@\string#1\expandafter\endcsname\expandafter\@ne}% + \fi +}% \NC@rewrite@\usetabu +\tabu@privatecolumntype \preamble [1]{% + \ifx\\#1\\\tabu@saveerr{}\else + \@ifundefined{tabu@saved@\string#1} + {\tabu@saveerr{#1}} + {\csname tabu@saved@\string#1\expandafter\endcsname\expandafter\z@}% + \fi +}% \NC@rewrite@\preamble +%% Controlling the rewriting process ------------------------------- +\tabu@newcolumntype \tabu@rewritefirst{% + \iftabu@long \aftergroup \tabu@longpream % + \else \aftergroup \tabu@pream + \fi + \let\tabu@ \relax \let\tabu@hsize \relax + \let\tabu@Xcoefs \@empty \let\tabu@savels \relax + \tabu@Xcol \z@ \tabu@cnt \tw@ + \gdef\tabu@mkpreambuffer{\tabu@{}}\tabu@measuringfalse + \global\setbox\@arstrutbox \box\@arstrutbox + \NC@list{\NC@do *}\tabu@textbar \tabu@lines + \NC@list\expandafter{\the\NC@list \NC@do X}% + \iftabu@siunitx % + \NC@list\expandafter{\the\NC@list \NC@do S\NC@do s}\fi + \NC@list\expandafter{\the\expandafter\NC@list \tabu@highprioritycolumns}% + \expandafter\def\expandafter\tabu@NC@list\expandafter{% + \the\expandafter\NC@list \tabu@NC@list}% % * | X S + \NC@list\expandafter{\expandafter \NC@do \expandafter\usetabu + \expandafter \NC@do \expandafter\preamble + \the\NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \tabu@savedecl + \tabu@privatecolumns + \edef\tabu@prev{\the\@temptokena}\NC@find \tabu@rewritemiddle +}% NC@rewrite@\tabu@rewritefirst +\tabu@newcolumntype \tabu@rewritemiddle{% + \edef\tabu@temp{\the\@temptokena}\NC@find \tabu@rewritelast +}% \NC@rewrite@\tabu@rewritemiddle +\tabu@newcolumntype \tabu@rewritelast{% + \ifx \tabu@temp\tabu@prev \advance\tabu@cnt \m@ne + \NC@list\expandafter{\tabu@NC@list \NC@do \tabu@rewritemiddle + \NC@do \tabu@rewritelast}% + \else \let\tabu@prev\tabu@temp + \fi + \ifcase \tabu@cnt \expandafter\tabu@endrewrite + \else \expandafter\NC@find \expandafter\tabu@rewritemiddle + \fi +}% \NC@rewrite@\tabu@rewritelast +%% Choosing the strategy -------------------------------------------- +\def\tabu@endrewrite {% + \let\tabu@temp \NC@find + \ifx \@arrayright\relax \let\@arrayright \@empty \fi + \count@=% + \ifx \@finalstrut\tabu@finalstrut \z@ % outer in mode 0 print + \iftabu@measuring + \xdef\tabu@mkpreambuffer{\tabu@mkpreambuffer + \tabu@target \csname tabu@\the\tabu@nested.T\endcsname + \tabucolX \csname tabu@\the\tabu@nested.X\endcsname + \edef\@halignto {\ifx\@arrayright\@empty to\tabu@target\fi}}% + \fi + \else\iftabu@measuring 4 % X columns + \xdef\tabu@mkpreambuffer{\tabu@{\tabu@mkpreambuffer + \tabu@target \the\tabu@target + \tabu@spreadtarget \the\tabu@spreadtarget}% + \def\noexpand\tabu@Xcoefs{\tabu@Xcoefs}% + \edef\tabu@halignto{\ifx \@arrayright\@empty to\tabu@target\fi}}% + \let\tabu@Xcoefs \relax + \else\ifcase\tabu@nested \thr@@ % outer, no X + \global\let\tabu@afterendpar \relax + \else \@ne % inner, no X, outer in mode 1 or 2 + \fi + \ifdefined\tabu@usetabu + \else \ifdim\tabu@target=\z@ + \else \let\tabu@temp \tabu@extracolsep + \fi\fi + \fi + \fi + \xdef\tabu@mkpreambuffer{\count@ \the\count@ \tabu@mkpreambuffer}% + \tabu@temp +}% \tabu@endrewrite +\def\tabu@extracolsep{\@defaultunits \expandafter\let + \expandafter\tabu@temp \expandafter=\the\@temptokena \relax\@nnil + \ifx \tabu@temp\@sptoken + \expandafter\tabu@gobblespace \expandafter\tabu@extracolsep + \else + \edef\tabu@temp{\noexpand\NC@find + \if |\noexpand\tabu@temp @% + \else\if !\noexpand\tabu@temp @% + \else !% + \fi\fi + {\noexpand\extracolsep\noexpand\@flushglue}}% + \fi + \tabu@temp +}% \tabu@extrac@lsep +%% Implementing the strategy ---------------------------------------- +\long\def\tabu@pream #1\@preamble {% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \ifdefined\tabu@usetabu \tabu@usetabu \tabu@target \z@ \fi + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\tabu@aftergroupcleanup}% + \tabu@thebody =\expandafter{\the\expandafter\tabu@thebody + \@preamble}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@pream +\long\def\tabu@longpream #1\LT@bchunk #2\LT@bchunk{% + \let\tabu@ \tabu@@ \tabu@mkpreambuffer \tabu@aftergroupcleanup + \NC@list\expandafter {\tabu@NC@list}% in case of nesting... + \let\tabu@savedpreamble \@preamble + \global\let\tabu@elapsedtime \relax + \tabu@thebody ={#1\LT@bchunk #2\tabu@aftergroupcleanup \LT@bchunk}% + \edef\tabuthepreamble {\the\tabu@thebody}% ( no @ allowed for \scantokens ) + \tabu@select +}% \tabu@longpream +\def\tabu@select {% + \ifnum\tabu@nested>\z@ \tabuscantokensfalse \fi + \ifnum \count@=\@ne \iftabu@measuring \count@=\tw@ \fi\fi + \ifcase \count@ + \global\let\tabu@elapsedtime \relax + \tabu@seteverycr + \expandafter \tabuthepreamble % vertical adjustment (inherited from outer) + \or % exit in vertical measure + struts per cell because no X and outer in mode 3 + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \tabu@seteverycr + \expandafter \tabuthepreamble + \or % exit without measure because no X and outer in mode 4 + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@seteverycr + \expandafter \tabuthepreamble + \else % needs trials + \tabu@evr{}\tabu@celllalign@def{}\let\tabu@cellralign \@empty + \tabu@savecounters + \expandafter \tabu@setstrategy + \fi +}% \tabu@select +\def\tabu@@ {\gdef\tabu@mkpreambuffer} +%% Protections to set up before trials ------------------------------ +\def\tabu@setstrategy {\begingroup % + \tabu@trialh@@k \tabu@cnt \z@ % number of trials + \hbadness \@M \let\hbadness \@tempcnta + \hfuzz \maxdimen \let\hfuzz \@tempdima + \let\write \tabu@nowrite\let\GenericError \tabu@GenericError + \let\savetabu \@gobble \let\tabudefaulttarget \linewidth + \let\@footnotetext \@gobble \let\@xfootnote \tabu@xfootnote + \let\color \tabu@nocolor\let\rowcolor \tabu@norowcolor + \let\tabu@aftergroupcleanup \relax % only after the last trial + \tabu@mkpreambuffer + \ifnum \count@>\thr@@ \let\@halignto \@empty \tabucolX@init + \def\tabu@lasttry{\m@ne\p@}\fi + \begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\iftabuscantokens \endlinechar=10 \obeyspaces \fi % + \tabu@collectbody \tabu@strategy % +}% \tabu@setstrategy +\def\tabu@savecounters{% + \def\@elt ##1{\csname c@##1\endcsname\the\csname c@##1\endcsname}% + \edef\tabu@clckpt {\begingroup \globaldefs=\@ne \cl@@ckpt \endgroup}\let\@elt \relax +}% \tabu@savecounters +\def\tabucolX@init {% \tabucolX <= \tabu@target / (sum coefs > 0) + \dimen@ \z@ \tabu@Xsum \z@ \tabucolX \z@ \let\tabu@ \tabu@Xinit \tabu@Xcoefs + \ifdim \dimen@>\z@ + \@tempdima \dimexpr \tabu@target *\p@/\dimen@ + \tabu@hfuzz\relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \fi +}% \tabucolX@init +\def\tabu@Xinit #1#2{\tabu@Xcol #1 \advance \tabu@Xsum + \ifdim #2\p@>\z@ #2\p@ \advance\dimen@ #2\p@ + \else -#2\p@ \tabu@negcoeftrue + \@tempdima \dimexpr \tabu@target*\p@/\dimexpr-#2\p@\relax \relax + \ifdim \tabucolX<\@tempdima \tabucolX \@tempdima \fi + \tabu@wddef{#1}{0pt}% + \fi +}% \tabu@Xinit +%% Collecting the environment body ---------------------------------- +\long\def\tabu@collectbody #1#2\end #3{% + \edef\tabu@stack{\tabu@pushbegins #2\begin\end\expandafter\@gobble\tabu@stack}% + \ifx \tabu@stack\@empty + \toks@\expandafter{\expandafter\tabu@thebody\expandafter{\the\toks@ #2}% + \def\tabu@end@envir{\end{#3}}% + \iftabuscantokens + \iftabu@long \def\tabu@endenvir {\end{#3}\tabu@gobbleX}% + \else \def\tabu@endenvir {\let\endarray \@empty + \end{#3}\tabu@gobbleX}% + \fi + \else \def\tabu@endenvir {\end{#3}}\fi}% + \let\tabu@collectbody \tabu@endofcollect + \else\def\tabu@temp{#3}% + \ifx \tabu@temp\@empty \toks@\expandafter{\the\toks@ #2\end }% + \else \ifx\tabu@temp\tabu@@spxiii \toks@\expandafter{\the\toks@ #2\end #3}% + \else \ifx\tabu@temp\tabu@X \toks@\expandafter{\the\toks@ #2\end #3}% + \else \toks@\expandafter{\the\toks@ #2\end{#3}}% + \fi\fi\fi + \fi + \tabu@collectbody{#1}% +}% \tabu@collectbody +\long\def\tabu@pushbegins#1\begin#2{\ifx\end#2\else b\expandafter\tabu@pushbegins\fi}% +\def\tabu@endofcollect #1{\ifnum0=`{}\fi + \expandafter\endgroup \the\toks@ #1% +}% \tabu@endofcollect +%% The trials: switching between strategies ------------------------- +\def\tabu@strategy {\relax % stops \count@ assignment ! + \ifcase\count@ % case 0 = print with vertical adjustment (outer is finished) + \expandafter \tabu@endoftrials + \or % case 1 = exit in vertical measure (outer in mode 3) + \expandafter\xdef\csname tabu@\the\tabu@nested.T\endcsname{\the\tabu@target}% + \expandafter\xdef\csname tabu@\the\tabu@nested.X\endcsname{\the\tabucolX}% + \expandafter \tabu@endoftrials + \or % case 2 = exit with a rule replacing the table (outer in mode 4) + \expandafter \tabu@quickend + \or % case 3 = outer is in mode 3 because of no X + \begingroup + \tabu@evr{\tabu@verticalinit}\tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \expandafter \tabu@measuring + \else % case 4 = horizontal measure + \begingroup + \global\let\tabu@elapsedtime \tabu@message@etime + \long\def\multicolumn##1##2##3{\multispan{##1}}% + \let\tabu@startpboxORI \@startpbox + \iftabu@spread + \def\tabu@naturalXmax {\z@}% + \let\tabu@naturalXmin \tabu@naturalXmax + \tabu@evr{\global\tabu@naturalX \z@}% + \let\@startpbox \tabu@startpboxmeasure + \else\iftabu@negcoef + \let\@startpbox \tabu@startpboxmeasure + \else \let\@startpbox \tabu@startpboxquick + \fi\fi + \expandafter \tabu@measuring + \fi +}% \tabu@strategy +\def\tabu@measuring{\expandafter \tabu@trial \expandafter + \count@ \the\count@ \tabu@endtrial +}% \tabu@measuring +\def\tabu@trial{\iftabu@long \tabu@longtrial \else \tabu@shorttrial \fi} +\def\tabu@shorttrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + $\iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \csname tabu@adl@endtrial\endcsname + \endarray}$\egroup % got \tabu@box +}% \tabu@shorttrial +\def\tabu@longtrial {\setbox\tabu@box \hbox\bgroup \tabu@seteverycr + \ifx \tabu@savecounters\relax \else + \let\tabu@savecounters \relax \tabu@clckpt \fi + \iftabuscantokens \tabu@rescan \else \expandafter\@secondoftwo \fi + \expandafter{\expandafter \tabuthepreamble + \the\tabu@thebody + \tabuendlongtrial}\egroup % got \tabu@box +}% \tabu@longtrial +\def\tabuendlongtrial{% no @ allowed for \scantokens + \LT@echunk \global\setbox\@ne \hbox{\unhbox\@ne}\kern\wd\@ne + \LT@get@widths +}% \tabuendlongtrial +\def\tabu@adl@endtrial{% + \crcr \noalign{\global\adl@ncol \tabu@nbcols}}% anything global is crap, junky and fails ! +\def\tabu@seteverycr {\tabu@reset + \everycr \expandafter{\the\everycr \tabu@everycr}% + \let\everycr \tabu@noeverycr % +}% \tabu@seteverycr +\def\tabu@noeverycr{{\aftergroup\tabu@restoreeverycr \afterassignment}\toks@} +\def\tabu@restoreeverycr {\let\everycr \tabu@@everycr} +\def\tabu@everycr {\iftabu@everyrow \noalign{\tabu@everyrow}\fi} +\def\tabu@endoftrials {% + \iftabuscantokens \expandafter\@firstoftwo + \else \expandafter\@secondoftwo + \fi + {\expandafter \tabu@closetrialsgroup \expandafter + \tabu@rescan \expandafter{% + \expandafter\tabuthepreamble + \the\expandafter\tabu@thebody + \iftabu@long \else \endarray \fi}} + {\expandafter\tabu@closetrialsgroup \expandafter + \tabuthepreamble + \the\tabu@thebody}% + \tabu@endenvir % Finish ! +}% \tabu@endoftrials +\def\tabu@closetrialsgroup {% + \toks@\expandafter{\tabu@endenvir}% + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target + \tabu@cnt \the\tabu@cnt + \def\noexpand\tabu@endenvir{\the\toks@}% + %Quid de \@halignto = \tabu@halignto ?? + }% \tabu@bufferX + \tabu@bufferX + \ifcase\tabu@nested % print out (outer in mode 0) + \global\tabu@cnt \tabu@cnt + \tabu@evr{\tabu@verticaldynamicadjustment}% + \tabu@celllalign@def{\everypar{}}\let\tabu@cellralign \@empty + \let\@finalstrut \tabu@finalstrut + \else % vertical measure of nested tabu + \tabu@evr{\tabu@verticalinit}% + \tabu@celllalign@def{\tabu@verticalmeasure}% + \def\tabu@cellralign{\tabu@verticalspacing}% + \fi + \tabu@clckpt \let\@halignto \tabu@halignto + \let\@halignto \@empty + \tabu@seteverycr + \ifdim \tabustrutrule>\z@ \ifnum\tabu@nested=\z@ + \setbox\@arstrutbox \box\voidb@x % force \@arstrutbox to be rebuilt (visible struts) + \fi\fi +}% \tabu@closetrialsgroup +\def\tabu@quickend {\expandafter \endgroup \expandafter + \tabu@target \the\tabu@target \tabu@quickrule + \let\endarray \relax \tabu@endenvir +}% \tabu@quickend +\def\tabu@endtrial {\relax % stops \count@ assignment ! + \ifcase \count@ \tabu@err % case 0 = impossible here + \or \tabu@err % case 1 = impossible here + \or \tabu@err % case 2 = impossible here + \or % case 3 = outer goes into mode 0 + \def\tabu@bufferX{\endgroup}\count@ \z@ + \else % case 4 = outer goes into mode 3 + \iftabu@spread \tabu@spreadarith % inner into mode 1 (outer in mode 3) + \else \tabu@arith % or 2 (outer in mode 4) + \fi + \count@=% + \ifcase\tabu@nested \thr@@ % outer goes into mode 3 + \else\iftabu@measuring \tw@ % outer is in mode 4 + \else \@ne % outer is in mode 3 + \fi\fi + \edef\tabu@bufferX{\endgroup + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% + \fi + \expandafter \tabu@bufferX \expandafter + \count@ \the\count@ \tabu@strategy +}% \tabu@endtrial +\def\tabu@err{\errmessage{(tabu) Internal impossible error! (\count@=\the\count@)}} +%% The algorithms: compute the widths / stop or go on --------------- +\def\tabu@arithnegcoef {% + \@tempdima \z@ \dimen@ \z@ \let\tabu@ \tabu@arith@negcoef \tabu@Xcoefs +}% \tabu@arithnegcoef +\def\tabu@arith@negcoef #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ % saturated by definition + \advance\@tempdima #2\tabucolX + \else + \ifdim -#2\tabucolX <\tabu@wd{#1}% c_i X < natural width <= \tabu@target-> saturated + \advance\dimen@ -#2\p@ + \advance\@tempdima -#2\tabucolX + \else + \advance\@tempdima \tabu@wd{#1}% natural width <= c_i X => neutralised + \ifdim \tabu@wd{#1}<\tabu@target \else % neutralised + \advance\dimen@ -#2\p@ % saturated (natural width = tabu@target) + \fi + \fi + \fi +}% \tabu@arith@negcoef +\def\tabu@givespace #1#2{% here \tabu@DELTA < \z@ + \ifdim \@tempdima=\z@ + \tabu@wddef{#1}{\the\dimexpr -\tabu@DELTA*\p@/\tabu@Xsum}% + \else + \tabu@wddef{#1}{\the\dimexpr \tabu@hsize{#1}{#2} + *(\p@ -\tabu@DELTA*\p@/\@tempdima)/\p@\relax}% + \fi +}% \tabu@givespace +\def\tabu@arith {\advance\tabu@cnt \@ne + \ifnum \tabu@cnt=\@ne \tabu@message{\tabu@titles}\fi + \tabu@arithnegcoef + \@tempdimb \dimexpr \wd\tabu@box -\@tempdima \relax % + \tabu@DELTA = \dimexpr \wd\tabu@box - \tabu@target \relax + \tabu@message{\tabu@message@arith}% + \ifdim \tabu@DELTA <\tabu@hfuzz + \ifdim \tabu@DELTA<\z@ % wd (tabu)<\tabu@target ? + \let\tabu@ \tabu@givespace \tabu@Xcoefs + \advance\@tempdima \@tempdimb \advance\@tempdima -\tabu@DELTA % for message + \else % already converged: nothing to do but nearly impossible... + \fi + \tabucolX \maxdimen + \tabu@measuringfalse + \else % need for narrower X columns + \tabucolX =\dimexpr (\@tempdima -\tabu@DELTA) *\p@/\tabu@Xsum \relax + \tabu@measuringtrue + \@whilesw \iftabu@measuring\fi {% + \advance\tabu@cnt \@ne + \tabu@arithnegcoef + \tabu@DELTA =\dimexpr \@tempdima+\@tempdimb -\tabu@target \relax % always < 0 here + \tabu@message{\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \@tempdima+\@tempdimb { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim -\tabu@DELTA<\tabu@hfuzz \tabu@spaces target ok\else + \tabu@msgalign \dimexpr -\tabu@DELTA *\p@/\dimen@ {}{}{}{}{}\@@ + \fi}% + \ifdim -\tabu@DELTA<\tabu@hfuzz + \advance\@tempdima \@tempdimb % for message + \tabu@measuringfalse + \else + \advance\tabucolX \dimexpr -\tabu@DELTA *\p@/\dimen@ \relax + \fi + }% + \fi + \tabu@message{\tabu@message@reached}% + \edef\tabu@bufferX{\endgroup \tabu@cnt \the\tabu@cnt + \tabucolX \the\tabucolX + \tabu@target \the\tabu@target}% +}% \tabu@arith +\def\tabu@spreadarith {% + \dimen@ \z@ \@tempdima \tabu@naturalXmax \let\tabu@ \tabu@spread@arith \tabu@Xcoefs + \edef\tabu@naturalXmin {\the\dimexpr\tabu@naturalXmin*\dimen@/\p@}% + \@tempdimc =\dimexpr \wd\tabu@box -\tabu@naturalXmax+\tabu@naturalXmin \relax + \iftabu@measuring + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \edef\tabu@bufferX{\endgroup \tabucolX \the\tabucolX \tabu@target\the\tabu@target}% + \else + \tabu@message{\tabu@message@spreadarith}% + \ifdim \dimexpr \@tempdimc+\tabu@spreadtarget >\tabu@target + \tabu@message{(tabu) spread + \ifdim \@tempdimc>\tabu@target useless here: default target used% + \else too large: reduced to fit default target\fi.}% + \else + \tabu@target =\dimexpr \@tempdimc+\tabu@spreadtarget \relax + \tabu@message{(tabu) spread: New target set to \the\tabu@target^^J}% + \fi + \begingroup \let\tabu@wddef \@gobbletwo + \@tempdimb \@tempdima + \tabucolX@init + \tabu@arithnegcoef + \wd\tabu@box =\dimexpr \wd\tabu@box +\@tempdima-\@tempdimb \relax + \expandafter\endgroup \expandafter\tabucolX \the\tabucolX + \tabu@arith + \fi +}% \tabu@spreadarith +\def\tabu@spread@arith #1#2{% + \ifdim #2\p@>\z@ \advance\dimen@ #2\p@ + \else \advance\@tempdima \tabu@wd{#1}\relax + \fi +}% \tabu@spread@arith +%% Reporting in the .log file --------------------------------------- +\def\tabu@message@defaulttarget{% + \ifnum\tabu@nested=\z@^^J(tabu) Default target: + \ifx\tabudefaulttarget\linewidth \string\linewidth + \ifdim \tabu@thetarget=\linewidth \else + -\the\dimexpr\linewidth-\tabu@thetarget\fi = + \else\ifx\tabudefaulttarget\linegoal\string\linegoal= + \fi\fi + \else (tabu) Default target (nested): \fi + \the\tabu@target \on@line + \ifnum\tabu@nested=\z@ , page \the\c@page\fi} +\def\tabu@message@target {^^J(tabu) Target specified: + \the\tabu@target \on@line, page \the\c@page} +\def\tabu@message@arith {\tabu@header + \tabu@msgalign \tabucolX { }{ }{ }{ }{ }\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{ }\@@ + \tabu@msgalign \tabu@target { }{ }{ }{ }{ }\@@ + \tabu@msgalign@PT \dimen@ { }{}{}{}{}{}{}\@@ + \ifdim \tabu@DELTA<\tabu@hfuzz giving space\else + \tabu@msgalign \dimexpr (\@tempdima-\tabu@DELTA) *\p@/\tabu@Xsum -\tabucolX {}{}{}{}{}\@@ + \fi +}% \tabu@message@arith +\def\tabu@message@spreadarith {\tabu@spreadheader + \tabu@msgalign \tabu@spreadtarget { }{ }{ }{ }{}\@@ + \tabu@msgalign \wd\tabu@box { }{ }{ }{ }{}\@@ + \tabu@msgalign -\tabu@naturalXmax { }{}{}{}{}\@@ + \tabu@msgalign \tabu@naturalXmin { }{ }{ }{ }{}\@@ + \tabu@msgalign \ifdim \dimexpr\@tempdimc>\tabu@target \tabu@target + \else \@tempdimc+\tabu@spreadtarget \fi + {}{}{}{}{}\@@} +\def\tabu@message@negcoef #1#2{ + \tabu@spaces\tabu@spaces\space * #1. X[\rem@pt#2]: + \space width = \tabu@wd {#1} + \expandafter\string\csname tabu@\the\tabu@nested.W\number#1\endcsname + \ifdim -\tabu@pt#2\tabucolX<\tabu@target + < \number-\rem@pt#2 X + = \the\dimexpr -\tabu@pt#2\tabucolX \relax + \else + <= \the\tabu@target\space < \number-\rem@pt#2 X\fi} +\def\tabu@message@reached{\tabu@header + ******* Reached Target: + hfuzz = \tabu@hfuzz\on@line\space *******} +\def\tabu@message@etime{\edef\tabu@stoptime{\the\pdfelapsedtime}% + \tabu@message{(tabu)\tabu@spaces Time elapsed during measure: + \the\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax sec + \the\numexpr\numexpr(\tabu@stoptime-\tabu@starttime) + -\numexpr(\tabu@stoptime-\tabu@starttime-32767)/65536\relax*65536\relax + *1000/65536\relax ms \tabu@spaces(\the\tabu@cnt\space + cycle\ifnum\tabu@cnt>\@ne s\fi)^^J^^J}} +\def\tabu@message@verticalsp {% + \ifdim \@tempdima>\tabu@ht + \ifdim \@tempdimb>\tabu@dp + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@ + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J% + \else + \expandafter\expandafter\expandafter\string\tabu@ht = + \tabu@msgalign \@tempdima { }{ }{ }{ }{ }\@@^^J% + \fi + \else\ifdim \@tempdimb>\tabu@dp + \tabu@spaces\tabu@spaces\tabu@spaces + \expandafter\expandafter\expandafter\string\tabu@dp = + \tabu@msgalign \@tempdimb { }{ }{ }{ }{ }\@@^^J\fi + \fi +}% \tabu@message@verticalsp +\edef\tabu@spaces{\@spaces} +\def\tabu@strippt{\expandafter\tabu@pt\the} +{\@makeother\P \@makeother\T\lowercase{\gdef\tabu@pt #1PT{#1}}} +\def\tabu@msgalign{\expandafter\tabu@msg@align\the\dimexpr} +\def\tabu@msgalign@PT{\expandafter\tabu@msg@align\romannumeral-`\0\tabu@strippt} +\def\do #1{% + \def\tabu@msg@align##1.##2##3##4##5##6##7##8##9\@@{% + \ifnum##1<10 #1 #1\else + \ifnum##1<100 #1 \else + \ifnum##1<\@m #1\fi\fi\fi + ##1.##2##3##4##5##6##7##8#1}% + \def\tabu@header{(tabu) \ifnum\tabu@cnt<10 #1\fi\the\tabu@cnt) }% + \def\tabu@titles{\ifnum \tabu@nested=\z@ + (tabu) Try#1 #1 tabu X #1 #1 #1tabu Width #1 #1 Target + #1 #1 #1 Coefs #1 #1 #1 Update^^J\fi}% + \def\tabu@spreadheader{% + (tabu) Try#1 #1 Spread #1 #1 tabu Width #1 #1 #1 Nat. X #1 #1 #1 #1Nat. Min. + #1 New Target^^J% + (tabu) sprd} + \def\tabu@message@save {\begingroup + \def\x ####1{\tabu@msg@align ####1{ }{ }{ }{ }{}\@@} + \def\z ####1{\expandafter\x\expandafter{\romannumeral-`\0\tabu@strippt + \dimexpr####1\p@{ }{ }}}% + \let\color \relax \def\tabu@rulesstyle ####1####2{\detokenize{####1}}% + \let\CT@arc@ \relax \let\@preamble \@gobble + \let\tabu@savedpream \@firstofone + \let\tabu@savedparams \@firstofone + \def\tabu@target ####1\relax {(tabu) target #1 #1 #1 #1 #1 = \x{####1}^^J}% + \def\tabucolX ####1\relax {(tabu) X columns width#1 = \x{####1}^^J}% + \def\tabu@nbcols ####1\relax {(tabu) Number of columns: \z{####1}^^J}% + \def\tabu@aligndefault ####1{(tabu) Default alignment: #1 #1 ####1^^J}% + \def\col@sep ####1\relax {(tabu) column sep #1 #1 #1 = \x{####1}^^J}% + \def\arrayrulewidth ####1\relax{(tabu) arrayrulewidth #1 = \x{####1}}% + \def\doublerulesep ####1\relax { doublerulesep = \x{####1}^^J}% + \def\extratabsurround####1\relax{(tabu) extratabsurround = \x{####1}^^J}% + \def\extrarowheight ####1\relax{(tabu) extrarowheight #1 = \x{####1}}% + \def\extrarowdepth ####1\relax {extrarowdepth = \x{####1}^^J}% + \def\abovetabulinesep####1\relax{(tabu) abovetabulinesep=\x{####1} }% + \def\belowtabulinesep####1\relax{ belowtabulinesep=\x{####1}^^J}% + \def\arraystretch ####1{(tabu) arraystretch #1 #1 = \z{####1}^^J}% + \def\minrowclearance####1\relax{(tabu) minrowclearance #1 = \x{####1}^^J}% + \def\tabu@arc@L ####1{(tabu) taburulecolor #1 #1 = ####1^^J}% + \def\tabu@drsc@L ####1{(tabu) tabudoublerulecolor= ####1^^J}% + \def\tabu@evr@L ####1{(tabu) everyrow #1 #1 #1 #1 = \detokenize{####1}^^J}% + \def\tabu@ls@L ####1{(tabu) line style = \detokenize{####1}^^J}% + \def\NC@find ####1\@nil{(tabu) tabu preamble#1 #1 = \detokenize{####1}^^J}% + \def\tabu@wddef####1####2{(tabu) Natural width ####1 = \x{####2}^^J}% + \let\edef \@gobbletwo \let\def \@empty \let\let \@gobbletwo + \tabu@message{% + (tabu) \string\savetabu{\tabu@temp}: \on@line^^J% + \tabu@usetabu \@nil^^J}% + \endgroup} +}\do{ } +%% Measuring the natural width (varwidth) - store the results ------- +\def\tabu@startpboxmeasure #1{\bgroup % entering \vtop + \edef\tabu@temp{\expandafter\@secondoftwo \ifx\tabu@hsize #1\else\relax\fi}% + \ifodd 1\ifx \tabu@temp\@empty 0 \else % starts with \tabu@hsize ? + \iftabu@spread \else % if spread -> measure + \ifdim \tabu@temp\p@>\z@ 0 \fi\fi\fi% if coef>0 -> do not measure + \let\@startpbox \tabu@startpboxORI % restore immediately (nesting) + \tabu@measuringtrue % for the quick option... + \tabu@Xcol =\expandafter\@firstoftwo\ifx\tabu@hsize #1\fi + \ifdim \tabu@temp\p@>\z@ \ifdim \tabu@temp\tabucolX<\tabu@target + \tabu@target=\tabu@temp\tabucolX \fi\fi + \setbox\tabu@box \hbox \bgroup + \begin{varwidth}\tabu@target + \let\FV@ListProcessLine \tabu@FV@ListProcessLine % \hbox to natural width... + \narrowragged \arraybackslash \parfillskip \@flushglue + \ifdefined\pdfadjustspacing \pdfadjustspacing\z@ \fi + \bgroup \aftergroup\tabu@endpboxmeasure + \ifdefined \cellspacetoplimit \tabu@cellspacepatch \fi + \else \expandafter\@gobble + \tabu@startpboxquick{#1}% \@gobble \bgroup + \fi +}% \tabu@startpboxmeasure +\def\tabu@cellspacepatch{\def\bcolumn##1\@nil{}\let\ecolumn\@empty + \bgroup\color@begingroup} +\def\tabu@endpboxmeasure {% + \@finalstrut \@arstrutbox + \end{varwidth}\egroup % + \ifdim \tabu@temp\p@ <\z@ % neg coef + \ifdim \tabu@wd\tabu@Xcol <\wd\tabu@box + \tabu@wddef\tabu@Xcol {\the\wd\tabu@box}% + \tabu@debug{\tabu@message@endpboxmeasure}% + \fi + \else % spread coef>0 + \global\advance \tabu@naturalX \wd\tabu@box + \@tempdima =\dimexpr \wd\tabu@box *\p@/\dimexpr \tabu@temp\p@\relax \relax + \ifdim \tabu@naturalXmax <\tabu@naturalX + \xdef\tabu@naturalXmax {\the\tabu@naturalX}\fi + \ifdim \tabu@naturalXmin <\@tempdima + \xdef\tabu@naturalXmin {\the\@tempdima}\fi + \fi + \box\tabu@box \egroup % end of \vtop (measure) restore \tabu@target +}% \tabu@endpboxmeasure +\def\tabu@wddef #1{\expandafter\xdef + \csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@wd #1{\csname tabu@\the\tabu@nested.W\number#1\endcsname} +\def\tabu@message@endpboxmeasure{\tabu@spaces\tabu@spaces<-> % <-> save natural wd + \the\tabu@Xcol. X[\tabu@temp]: + target = \the\tabucolX \space + \expandafter\expandafter\expandafter\string\tabu@wd\tabu@Xcol + =\tabu@wd\tabu@Xcol +}% \tabu@message@endpboxmeasure +\def\tabu@startpboxquick {\bgroup + \let\@startpbox \tabu@startpboxORI % restore immediately + \let\tabu \tabu@quick % \begin is expanded before... + \expandafter\@gobble \@startpbox % gobbles \bgroup +}% \tabu@startpboxquick +\def\tabu@quick {\begingroup \iffalse{\fi \ifnum0=`}\fi + \toks@{}\def\tabu@stack{b}\tabu@collectbody \tabu@endquick +}% \tabu@quick +\def\tabu@endquick {% + \ifodd 1\ifx\tabu@end@envir\tabu@endtabu \else + \ifx\tabu@end@envir\tabu@endtabus \else 0\fi\fi\relax + \endgroup + \else \let\endtabu \relax + \tabu@end@envir + \fi +}% \tabu@quick +\def\tabu@endtabu {\end{tabu}} +\def\tabu@endtabus {\end{tabu*}} +%% Measuring the heights and depths - store the results ------------- +\def\tabu@verticalmeasure{\everypar{}% + \ifnum \currentgrouptype>12 % 14=semi-simple, 15=math shift group + \setbox\tabu@box =\hbox\bgroup + \let\tabu@verticalspacing \tabu@verticalsp@lcr + \d@llarbegin % after \hbox ... + \else + \edef\tabu@temp{\ifnum\currentgrouptype=5\vtop + \else\ifnum\currentgrouptype=12\vcenter + \else\vbox\fi\fi}% + \setbox\tabu@box \hbox\bgroup$\tabu@temp \bgroup + \let\tabu@verticalspacing \tabu@verticalsp@pmb + \fi +}% \tabu@verticalmeasure +\def\tabu@verticalsp@lcr{% + \d@llarend \egroup % + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \noindent\vrule height\@tempdima depth\@tempdimb +}% \tabu@verticalsp@lcr +\def\tabu@verticalsp@pmb{% inserts struts as needed + \par \expandafter\egroup + \expandafter$\expandafter + \egroup \expandafter + \@tempdimc \the\prevdepth + \@tempdima \dimexpr \ht\tabu@box+\abovetabulinesep + \@tempdimb \dimexpr \dp\tabu@box+\belowtabulinesep \relax + \ifdim\tabustrutrule>\z@ \tabu@debug{\tabu@message@verticalsp}\fi + \ifdim \tabu@ht<\@tempdima \tabu@htdef{\the\@tempdima}\fi + \ifdim \tabu@dp<\@tempdimb \tabu@dpdef{\the\@tempdimb}\fi + \let\@finalstrut \@gobble + \hrule height\@tempdima depth\@tempdimb width\hsize +%% \box\tabu@box +}% \tabu@verticalsp@pmb + +\def\tabu@verticalinit{% + \ifnum \c@taburow=\z@ \tabu@rearstrut \fi % after \tabu@reset ! + \advance\c@taburow \@ne + \tabu@htdef{\the\ht\@arstrutbox}\tabu@dpdef{\the\dp\@arstrutbox}% + \advance\c@taburow \m@ne +}% \tabu@verticalinit +\def\tabu@htdef {\expandafter\xdef \csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@ht {\csname tabu@\the\tabu@nested.H\the\c@taburow\endcsname} +\def\tabu@dpdef {\expandafter\xdef \csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@dp {\csname tabu@\the\tabu@nested.D\the\c@taburow\endcsname} +\def\tabu@verticaldynamicadjustment {% + \advance\c@taburow \@ne + \extrarowheight \dimexpr\tabu@ht - \ht\strutbox + \extrarowdepth \dimexpr\tabu@dp - \dp\strutbox + \let\arraystretch \@empty + \advance\c@taburow \m@ne +}% \tabu@verticaldynamicadjustment +\def\tabuphantomline{\crcr \noalign{% + {\globaldefs \@ne + \setbox\@arstrutbox \box\voidb@x + \let\tabu@@celllalign \tabu@celllalign + \let\tabu@@cellralign \tabu@cellralign + \let\tabu@@cellleft \tabu@cellleft + \let\tabu@@cellright \tabu@cellright + \let\tabu@@thevline \tabu@thevline + \let\tabu@celllalign \@empty + \let\tabu@cellralign \@empty + \let\tabu@cellright \@empty + \let\tabu@cellleft \@empty + \let\tabu@thevline \relax}% + \edef\tabu@temp{\tabu@multispan \tabu@nbcols{\noindent &}}% + \toks@\expandafter{\tabu@temp \noindent\tabu@everyrowfalse \cr + \noalign{\tabu@rearstrut + {\globaldefs\@ne + \let\tabu@celllalign \tabu@@celllalign + \let\tabu@cellralign \tabu@@cellralign + \let\tabu@cellleft \tabu@@cellleft + \let\tabu@cellright \tabu@@cellright + \let\tabu@thevline \tabu@@thevline}}}% + \expandafter}\the\toks@ +}% \tabuphantomline +%% \firsthline and \lasthline corrections --------------------------- +\def\tabu@firstline {\tabu@hlineAZ \tabu@firsthlinecorrection {}} +\def\tabu@firsthline{\tabu@hlineAZ \tabu@firsthlinecorrection \hline} +\def\tabu@lastline {\tabu@hlineAZ \tabu@lasthlinecorrection {}} +\def\tabu@lasthline {\tabu@hlineAZ \tabu@lasthlinecorrection \hline} +\def\tabu@hline {% replaces \hline if no colortbl (see \AtBeginDocument) + \noalign{\ifnum0=`}\fi + {\CT@arc@\hrule height\arrayrulewidth}% + \futurelet \tabu@temp \tabu@xhline +}% \tabu@hline +\def\tabu@xhline{% + \ifx \tabu@temp \hline + {\ifx \CT@drsc@\relax \vskip + \else\ifx \CT@drsc@\@empty \vskip + \else \CT@drsc@\hrule height + \fi\fi + \doublerulesep}% + \fi + \ifnum0=`{\fi}% +}% \tabu@xhline +\def\tabu@hlineAZ #1#2{\noalign{\ifnum0=`}\fi \dimen@ \z@ \count@ \z@ + \toks@{}\def\tabu@hlinecorrection{#1}\def\tabu@temp{#2}% + \tabu@hlineAZsurround +}% \tabu@hlineAZ +\newcommand*\tabu@hlineAZsurround[1][\extratabsurround]{% + \extratabsurround #1\let\tabucline \tabucline@scan + \let\hline \tabu@hlinescan \let\firsthline \hline + \let\cline \tabu@clinescan \let\lasthline \hline + \expandafter \futurelet \expandafter \tabu@temp + \expandafter \tabu@nexthlineAZ \tabu@temp +}% \tabu@hlineAZsurround +\def\tabu@hlinescan {\tabu@thick \arrayrulewidth \tabu@xhlineAZ \hline} +\def\tabu@clinescan #1{\tabu@thick \arrayrulewidth \tabu@xhlineAZ {\cline{#1}}} +\def\tabucline@scan{\@testopt \tabucline@sc@n {}} +\def\tabucline@sc@n #1[#2]{\tabu@xhlineAZ {\tabucline[{#1}]{#2}}} +\def\tabu@nexthlineAZ{% + \ifx \tabu@temp\hline \else + \ifx \tabu@temp\cline \else + \ifx \tabu@temp\tabucline \else + \tabu@hlinecorrection + \fi\fi\fi +}% \tabu@nexthlineAZ +\def\tabu@xhlineAZ #1{% + \toks@\expandafter{\the\toks@ #1}% + \@tempdimc \tabu@thick % The last line width + \ifcase\count@ \@tempdimb \tabu@thick % The first line width + \else \advance\dimen@ \dimexpr \tabu@thick+\doublerulesep \relax + \fi + \advance\count@ \@ne \futurelet \tabu@temp \tabu@nexthlineAZ +}% \tabu@xhlineAZ +\def\tabu@firsthlinecorrection{% \count@ = number of \hline -1 + \@tempdima \dimexpr \ht\@arstrutbox+\dimen@ + \edef\firsthline{% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + height \the\dimexpr\@tempdima+\extratabsurround + depth \dp\@arstrutbox + width \tabustrutrule}\hss}\cr + \noalign{\vskip -\the\dimexpr \@tempdima+\@tempdimb + +\dp\@arstrutbox \relax}% + \the\toks@ + }\ifnum0=`{\fi + \expandafter}\firsthline % we are then ! +}% \tabu@firsthlinecorrection +\def\tabu@lasthlinecorrection{% + \@tempdima \dimexpr \dp\@arstrutbox+\dimen@+\@tempdimb+\@tempdimc + \edef\lasthline{% + \the\toks@ + \noalign{\vskip -\the\dimexpr\dimen@+\@tempdimb+\dp\@arstrutbox}% + \omit \hbox to\z@{\hss{\noexpand\tabu@DBG{yellow}\vrule + depth \the\dimexpr \dp\@arstrutbox+\@tempdimb+\dimen@ + +\extratabsurround-\@tempdimc + height \z@ + width \tabustrutrule}\hss}\cr + }\ifnum0=`{\fi + \expandafter}\lasthline % we are then ! +}% \tabu@lasthlinecorrection +\def\tabu@LT@@hline{% + \ifx\LT@next\hline + \global\let\LT@next \@gobble + \ifx \CT@drsc@\relax + \gdef\CT@LT@sep{% + \noalign{\penalty-\@medpenalty\vskip\doublerulesep}}% + \else + \gdef\CT@LT@sep{% + \multispan\LT@cols{% + \CT@drsc@\leaders\hrule\@height\doublerulesep\hfill}\cr}% + \fi + \else + \global\let\LT@next\empty + \gdef\CT@LT@sep{% + \noalign{\penalty-\@lowpenalty\vskip-\arrayrulewidth}}% + \fi + \ifnum0=`{\fi}% + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \CT@LT@sep + \multispan\LT@cols + {\CT@arc@\leaders\hrule\@height\arrayrulewidth\hfill}\cr + \noalign{\penalty\@M}% + \LT@next +}% \tabu@LT@@hline +%% Horizontal lines : \tabucline ------------------------------------ +\let\tabu@start \@tempcnta +\let\tabu@stop \@tempcntb +\newcommand*\tabucline{\noalign{\ifnum0=`}\fi \tabu@cline} +\newcommand*\tabu@cline[2][]{\tabu@startstop{#2}% + \ifnum \tabu@stop<\z@ \toks@{}% + \else \tabu@clinearg{#1}\tabu@thestyle + \edef\tabucline{\toks@{% + \ifnum \tabu@start>\z@ \omit + \tabu@multispan\tabu@start {\span\omit}&\fi + \omit \tabu@multispan\tabu@stop {\span\omit}% + \tabu@thehline\cr + }}\tabucline + \tabu@tracinglines{(tabu:tabucline) Style: #1^^J\the\toks@^^J^^J}% + \fi + \futurelet \tabu@temp \tabu@xcline +}% \tabu@cline +\def\tabu@clinearg #1{% + \ifx\\#1\\\let\tabu@thestyle \tabu@ls@ + \else \@defaultunits \expandafter\let\expandafter\@tempa + \romannumeral-`\0#1\relax \@nnil + \ifx \hbox\@tempa \tabu@clinebox{#1}% + \else\ifx \box\@tempa \tabu@clinebox{#1}% + \else\ifx \vbox\@tempa \tabu@clinebox{#1}% + \else\ifx \vtop\@tempa \tabu@clinebox{#1}% + \else\ifx \copy\@tempa \tabu@clinebox{#1}% + \else\ifx \leaders\@tempa \tabu@clineleads{#1}% + \else\ifx \cleaders\@tempa \tabu@clineleads{#1}% + \else\ifx \xleaders\@tempa \tabu@clineleads{#1}% + \else\tabu@getline {#1}% + \fi\fi\fi\fi\fi\fi\fi\fi + \fi +}% \tabu@clinearg +\def\tabu@clinebox #1{\tabu@clineleads{\xleaders#1\hss}} +\def\tabu@clineleads #1{% + \let\tabu@thestyle \relax \let\tabu@leaders \@undefined + \gdef\tabu@thehrule{#1}} +\def\tabu@thehline{\begingroup + \ifdefined\tabu@leaders + \noexpand\tabu@thehleaders + \else \noexpand\tabu@thehrule + \fi \endgroup +}% \tabu@thehline +\def\tabu@xcline{% + \ifx \tabu@temp\tabucline + \toks@\expandafter{\the\toks@ \noalign + {\ifx\CT@drsc@\relax \vskip + \else \CT@drsc@\hrule height + \fi + \doublerulesep}}% + \fi + \tabu@docline +}% \tabu@xcline +\def\tabu@docline {\ifnum0=`{\fi \expandafter}\the\toks@} +\def\tabu@docline@evr {\xdef\tabu@doclineafter{\the\toks@}% + \ifnum0=`{\fi}\aftergroup\tabu@doclineafter} +\def\tabu@multispan #1#2{% + \ifnum\numexpr#1>\@ne #2\expandafter\tabu@multispan + \else \expandafter\@gobbletwo + \fi {#1-1}{#2}% +}% \tabu@multispan +\def\tabu@startstop #1{\tabu@start@stop #1\relax 1-\tabu@nbcols \@nnil} +\def\tabu@start@stop #1-#2\@nnil{% + \@defaultunits \tabu@start\number 0#1\relax \@nnil + \@defaultunits \tabu@stop \number 0#2\relax \@nnil + \tabu@stop \ifnum \tabu@start>\tabu@nbcols \m@ne + \else\ifnum \tabu@stop=\z@ \tabu@nbcols + \else\ifnum \tabu@stop>\tabu@nbcols \tabu@nbcols + \else \tabu@stop + \fi\fi\fi + \advance\tabu@start \m@ne + \ifnum \tabu@start>\z@ \advance\tabu@stop -\tabu@start \fi +}% \tabu@start@stop +%% Numbers: siunitx S columns (and \tabudecimal) ------------------- +\def\tabu@tabudecimal #1{% + \def\tabu@decimal{#1}\@temptokena{}% + \let\tabu@getdecimal@ \tabu@getdecimal@ignorespaces + \tabu@scandecimal +}% \tabu@tabudecimal +\def\tabu@scandecimal{\futurelet \tabu@temp \tabu@getdecimal@} +\def\tabu@skipdecimal#1{#1\tabu@scandecimal} +\def\tabu@getdecimal@ignorespaces{% + \ifcase 0\ifx\tabu@temp\ignorespaces\else + \ifx\tabu@temp\@sptoken1\else + 2\fi\fi\relax + \let\tabu@getdecimal@ \tabu@getdecimal + \expandafter\tabu@skipdecimal + \or \expandafter\tabu@gobblespace\expandafter\tabu@scandecimal + \else \expandafter\tabu@skipdecimal + \fi +}% \tabu@getdecimal@ignorespaces +\def\tabu@get@decimal#1{\@temptokena\expandafter{\the\@temptokena #1}% + \tabu@scandecimal} +\def\do#1{% + \def\tabu@get@decimalspace#1{% + \@temptokena\expandafter{\the\@temptokena #1}\tabu@scandecimal}% +}\do{ } +\let\tabu@@tabudecimal \tabu@tabudecimal +\def\tabu@getdecimal{% + \ifcase 0\ifx 0\tabu@temp\else + \ifx 1\tabu@temp\else + \ifx 2\tabu@temp\else + \ifx 3\tabu@temp\else + \ifx 4\tabu@temp\else + \ifx 5\tabu@temp\else + \ifx 6\tabu@temp\else + \ifx 7\tabu@temp\else + \ifx 8\tabu@temp\else + \ifx 9\tabu@temp\else + \ifx .\tabu@temp\else + \ifx ,\tabu@temp\else + \ifx -\tabu@temp\else + \ifx +\tabu@temp\else + \ifx e\tabu@temp\else + \ifx E\tabu@temp\else + \ifx\tabu@cellleft\tabu@temp1\else + \ifx\ignorespaces\tabu@temp1\else + \ifx\@sptoken\tabu@temp2\else + 3\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\relax + \expandafter\tabu@get@decimal + \or \expandafter\tabu@skipdecimal + \or \expandafter\tabu@get@decimalspace + \else\expandafter\tabu@printdecimal + \fi +}% \tabu@getdecimal +\def\tabu@printdecimal{% + \edef\tabu@temp{\the\@temptokena}% + \ifx\tabu@temp\@empty\else + \ifx\tabu@temp\space\else + \expandafter\tabu@decimal\expandafter{\the\@temptokena}% + \fi\fi +}% \tabu@printdecimal +%% Verbatim inside X columns ---------------------------------------- +\def\tabu@verbatim{% + \let\verb \tabu@verb + \let\FV@DefineCheckEnd \tabu@FV@DefineCheckEnd +}% \tabu@verbatim +\let\tabu@ltx@verb \verb +\def\tabu@verb{\@ifstar {\tabu@ltx@verb*} \tabu@ltx@verb} +\def\tabu@fancyvrb {% + \def\tabu@FV@DefineCheckEnd ##1{% + \def\tabu@FV@DefineCheckEnd{% + ##1% + \let\FV@CheckEnd \tabu@FV@CheckEnd + \let\FV@@CheckEnd \tabu@FV@@CheckEnd + \let\FV@@@CheckEnd \tabu@FV@@@CheckEnd + \edef\FV@EndScanning{% + \def\noexpand\next{\noexpand\end{\FV@EnvironName}}% + \global\let\noexpand\FV@EnvironName\relax + \noexpand\next}% + \xdef\FV@EnvironName{\detokenize\expandafter{\FV@EnvironName}}}% + }\expandafter\tabu@FV@DefineCheckEnd\expandafter{\FV@DefineCheckEnd} +}% \tabu@fancyvrb +\def\tabu@FV@CheckEnd #1{\expandafter\FV@@CheckEnd \detokenize{#1\end{}}\@nil} +\edef\tabu@FV@@@CheckEnd {\detokenize{\end{}}} +\begingroup +\catcode`\[1 \catcode`\]2 +\@makeother\{ \@makeother\} + \edef\x[\endgroup + \def\noexpand\tabu@FV@@CheckEnd ##1\detokenize[\end{]##2\detokenize[}]##3% + ]\x \@nil{\def\@tempa{#2}\def\@tempb{#3}} +\def\tabu@FV@ListProcessLine #1{% + \hbox {%to \hsize{% + \kern\leftmargin + \hbox {%to \linewidth{% + \FV@LeftListNumber + \FV@LeftListFrame + \FancyVerbFormatLine{#1}\hss +%% DG/SR modification begin - Jan. 28, 1998 (for numbers=right add-on) +%% \FV@RightListFrame}% + \FV@RightListFrame + \FV@RightListNumber}% +%% DG/SR modification end + \hss}} +%% \savetabu -------------------------------------------------------- +\newcommand*\savetabu[1]{\noalign{% + \tabu@sanitizearg{#1}\tabu@temp + \ifx \tabu@temp\@empty \tabu@savewarn{}{The tabu will not be saved}\else + \@ifundefined{tabu@saved@\tabu@temp}{}{\tabu@savewarn{#1}{Overwriting}}% + \ifdefined\tabu@restored \expandafter\let + \csname tabu@saved@\tabu@temp \endcsname \tabu@restored + \else {\tabu@save}% + \fi + \fi}% +}% \savetabu +\def\tabu@save {% + \toks0\expandafter{\tabu@saved@}% + \iftabu@negcoef + \let\tabu@wddef \relax \let\tabu@ \tabu@savewd \edef\tabu@savewd{\tabu@Xcoefs}% + \toks0\expandafter{\the\toks\expandafter0\tabu@savewd}\fi + \toks1\expandafter{\tabu@savedpream}% + \toks2\expandafter{\tabu@savedpreamble}% + \let\@preamble \relax + \let\tabu@savedpream \relax \let\tabu@savedparams \relax + \edef\tabu@preamble{% + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \edef\tabu@usetabu{% + \def\@preamble {\noexpand\the\toks2}% + \tabu@target \the\tabu@target \relax + \tabucolX \the\tabucolX \relax + \tabu@nbcols \the\tabu@nbcols \relax + \def\noexpand\tabu@aligndefault{\tabu@align}% + \def\tabu@savedparams {\noexpand\the\toks0}% + \def\tabu@savedpream {\noexpand\the\toks1}}% + \let\tabu@aligndefault \relax \let\@sharp \relax + \edef\@tempa{\noexpand\tabu@s@ved + {\tabu@usetabu} + {\tabu@preamble} + {\the\toks1}}\@tempa + \tabu@message@save +}% \tabu@save +\long\def\tabu@s@ved #1#2#3{% + \def\tabu@usetabu{#1}% + \expandafter\gdef\csname tabu@saved@\tabu@temp\endcsname ##1{% + \ifodd ##1% \usetabu + \tabu@measuringfalse \tabu@spreadfalse % Just in case... + \gdef\tabu@usetabu {% + \ifdim \tabu@target>\z@ \tabu@warn@usetabu \fi + \global\let\tabu@usetabu \@undefined + \def\@halignto {to\tabu@target}% + #1% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \else % \preamble + \gdef\tabu@preamble {% + \global\let\tabu@preamble \@undefined + #2% + \ifx \tabu@align\tabu@aligndefault@text + \ifnum \tabu@nested=\z@ + \let\tabu@align \tabu@aligndefault \fi\fi}% + \fi + #3}% +}% \tabu@s@ved +\def\tabu@aligndefault@text {\tabu@aligndefault}% +\def\tabu@warn@usetabu {\PackageWarning{tabu} + {Specifying a target with \string\usetabu\space is useless + \MessageBreak The target cannot be changed!}} +\def\tabu@savewd #1#2{\ifdim #2\p@<\z@ \tabu@wddef{#1}{\tabu@wd{#1}}\fi} +\def\tabu@savewarn#1#2{\PackageInfo{tabu} + {User-name `#1' already used for \string\savetabu + \MessageBreak #2}}% +\def\tabu@saveerr#1{\PackageError{tabu} + {User-name `#1' is unknown for \string\usetabu + \MessageBreak I cannot restore an unknown preamble!}\@ehd} +%% \rowfont --------------------------------------------------------- +\newskip \tabu@cellskip +\def\tabu@rowfont{\ifdim \baselineskip=\z@\noalign\fi + {\ifnum0=`}\fi \tabu@row@font} +\newcommand*\tabu@row@font[2][]{% + \ifnum7=\currentgrouptype + \global\let\tabu@@cellleft \tabu@cellleft + \global\let\tabu@@cellright \tabu@cellright + \global\let\tabu@@celllalign \tabu@celllalign + \global\let\tabu@@cellralign \tabu@cellralign + \global\let\tabu@@rowfontreset\tabu@rowfontreset + \fi + \global\let\tabu@rowfontreset \tabu@rowfont@reset + \expandafter\gdef\expandafter\tabu@cellleft\expandafter{\tabu@cellleft #2}% + \ifcsname tabu@cell@#1\endcsname % row alignment + \csname tabu@cell@#1\endcsname \fi + \ifnum0=`{\fi}% end of group / noalign group +}% \rowfont +\def\tabu@ifcolorleavevmode #1{\let\color \tabu@leavevmodecolor #1\let\color\tabu@color}% +\def\tabu@rowfont@reset{% + \global\let\tabu@rowfontreset \tabu@@rowfontreset + \global\let\tabu@cellleft \tabu@@cellleft + \global\let\tabu@cellright \tabu@@cellright + \global\let\tabu@cellfont \@empty + \global\let\tabu@celllalign \tabu@@celllalign + \global\let\tabu@cellralign \tabu@@cellralign +}% \tabu@@rowfontreset +\let\tabu@rowfontreset \@empty % overwritten \AtBeginDocument if colortbl +%% \tabu@prepnext@tok ----------------------------------------------- +\newif \iftabu@cellright +\def\tabu@prepnext@tok{% + \ifnum \count@<\z@ % + \@tempcnta \@M % + \tabu@nbcols\z@ + \let\tabu@fornoopORI \@fornoop + \tabu@cellrightfalse + \else + \ifcase \numexpr \count@-\@tempcnta \relax % (case 0): prev. token is left + \advance \tabu@nbcols \@ne + \iftabu@cellright % before-previous token is right and is finished + \tabu@cellrightfalse % + \tabu@righttok + \fi + \tabu@lefttok + \or % (case 1) previous token is right + \tabu@cellrighttrue \let\@fornoop \tabu@lastnoop + \else % special column: do not change the token + \iftabu@cellright % before-previous token is right + \tabu@cellrightfalse + \tabu@righttok + \fi + \fi % \ifcase + \fi + \tabu@prepnext@tokORI +}% \tabu@prepnext@tok +\long\def\tabu@lastnoop#1\@@#2#3{\tabu@lastn@@p #2\@nextchar \in@\in@@} +\def\tabu@lastn@@p #1\@nextchar #2#3\in@@{% + \ifx \in@#2\else + \let\@fornoop \tabu@fornoopORI + \xdef\tabu@mkpreambuffer{\tabu@nbcols\the\tabu@nbcols \tabu@mkpreambuffer}% + \toks0\expandafter{\expandafter\tabu@everyrowtrue \the\toks0}% + \expandafter\prepnext@tok + \fi +}% \tabu@lastnoop +\def\tabu@righttok{% + \advance \count@ \m@ne + \toks\count@\expandafter {\the\toks\count@ \tabu@cellright \tabu@cellralign}% + \advance \count@ \@ne +}% \tabu@righttok +\def\tabu@lefttok{\toks\count@\expandafter{\expandafter\tabu@celllalign + \the\toks\count@ \tabu@cellleft}% after because of $ +}% \tabu@lefttok +%% Neutralisation of glues ------------------------------------------ +\let\tabu@cellleft \@empty +\let\tabu@cellright \@empty +\tabu@celllalign@def{\tabu@cellleft}% +\let\tabu@cellralign \@empty +\def\tabu@cell@align #1#2#3{% + \let\tabu@maybesiunitx \toks@ \tabu@celllalign + \global \expandafter \tabu@celllalign@def \expandafter {\the\toks@ #1}% + \toks@\expandafter{\tabu@cellralign #2}% + \xdef\tabu@cellralign{\the\toks@}% + \toks@\expandafter{\tabu@cellleft #3}% + \xdef\tabu@cellleft{\the\toks@}% +}% \tabu@cell@align +\def\tabu@cell@l{% force alignment to left + \tabu@cell@align + {\tabu@removehfil \raggedright \tabu@cellleft}% left + {\tabu@flush1\tabu@ignorehfil}% right + \raggedright +}% \tabu@cell@l +\def\tabu@cell@c{% force alignment to center + \tabu@cell@align + {\tabu@removehfil \centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \centering +}% \tabu@cell@c +\def\tabu@cell@r{% force alignment to right + \tabu@cell@align + {\tabu@removehfil \raggedleft \tabu@flush1\tabu@cellleft} + \tabu@ignorehfil + \raggedleft +}% \tabu@cell@r +\def\tabu@cell@j{% force justification (for p, m, b columns) + \tabu@cell@align + {\tabu@justify\tabu@cellleft} + {} + \tabu@justify +}% \tabu@cell@j +\def\tabu@justify{% + \leftskip\z@skip \@rightskip\leftskip \rightskip\@rightskip + \parfillskip\@flushglue +}% \tabu@justify +%% ragged2e settings +\def\tabu@cell@L{% force alignment to left (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedRight \tabu@cellleft} + {\tabu@flush 1\tabu@ignorehfil} + \RaggedRight +}% \tabu@cell@L +\def\tabu@cell@C{% force alignment to center (ragged2e) + \tabu@cell@align + {\tabu@removehfil \Centering \tabu@flush{.5}\tabu@cellleft} + {\tabu@flush{.5}\tabu@ignorehfil} + \Centering +}% \tabu@cell@C +\def\tabu@cell@R{% force alignment to right (ragged2e) + \tabu@cell@align + {\tabu@removehfil \RaggedLeft \tabu@flush 1\tabu@cellleft} + \tabu@ignorehfil + \RaggedLeft +}% \tabu@cell@R +\def\tabu@cell@J{% force justification (ragged2e) + \tabu@cell@align + {\justifying \tabu@cellleft} + {} + \justifying +}% \tabu@cell@J +\def\tabu@flush#1{% + \iftabu@colortbl % colortbl uses \hfill rather than \hfil + \hskip \ifnum13<\currentgrouptype \stretch{#1}% + \else \ifdim#1pt<\p@ \tabu@cellskip + \else \stretch{#1} + \fi\fi \relax + \else % array.sty + \ifnum 13<\currentgrouptype + \hfil \hskip1sp \relax \fi + \fi +}% \tabu@flush +\let\tabu@hfil \hfil +\let\tabu@hfill \hfill +\let\tabu@hskip \hskip +\def\tabu@removehfil{% + \iftabu@colortbl + \unkern \tabu@cellskip =\lastskip + \ifnum\gluestretchorder\tabu@cellskip =\tw@ \hskip-\tabu@cellskip + \else \tabu@cellskip \z@skip + \fi + \else + \ifdim\lastskip=1sp\unskip\fi + \ifnum\gluestretchorder\lastskip =\@ne + \hfilneg % \hfilneg for array.sty but not for colortbl... + \fi + \fi +}% \tabu@removehfil +\def\tabu@ignorehfil{\aftergroup \tabu@nohfil} +\def\tabu@nohfil{% \hfil -> do nothing + restore original \hfil + \def\hfil{\let\hfil \tabu@hfil}% local to (alignment template) group +}% \tabu@nohfil +\def\tabu@colortblalignments {% if colortbl + \def\tabu@nohfil{% + \def\hfil {\let\hfil \tabu@hfil}% local to (alignment template) group + \def\hfill {\let\hfill \tabu@hfill}% (colortbl uses \hfill) pfff... + \def\hskip ####1\relax{\let\hskip \tabu@hskip}}% local +}% \tabu@colortblalignments +%% Taking care of footnotes and hyperfootnotes ---------------------- +\long\def\tabu@footnotetext #1{% + \edef\@tempa{\the\tabu@footnotes + \noexpand\footnotetext [\the\csname c@\@mpfn\endcsname]}% + \global\tabu@footnotes\expandafter{\@tempa {#1}}}% +\long\def\tabu@xfootnotetext [#1]#2{% + \global\tabu@footnotes\expandafter{\the\tabu@footnotes + \footnotetext [{#1}]{#2}}} +\let\tabu@xfootnote \@xfootnote +\long\def\tabu@Hy@ftntext{\tabu@Hy@ftntxt {\the \c@footnote }} +\long\def\tabu@Hy@xfootnote [#1]{% + \begingroup + \value\@mpfn #1\relax + \protected@xdef \@thefnmark {\thempfn}% + \endgroup + \@footnotemark \tabu@Hy@ftntxt {#1}% +}% \tabu@Hy@xfootnote +\long\def\tabu@Hy@ftntxt #1#2{% + \edef\@tempa{% + \the\tabu@footnotes + \begingroup + \value\@mpfn #1\relax + \noexpand\protected@xdef\noexpand\@thefnmark {\noexpand\thempfn}% + \expandafter \noexpand \expandafter + \tabu@Hy@footnotetext \expandafter{\Hy@footnote@currentHref}% + }% + \global\tabu@footnotes\expandafter{\@tempa {#2}% + \endgroup}% +}% \tabu@Hy@ftntxt +\long\def\tabu@Hy@footnotetext #1#2{% + \H@@footnotetext{% + \ifHy@nesting + \hyper@@anchor {#1}{#2}% + \else + \Hy@raisedlink{% + \hyper@@anchor {#1}{\relax}% + }% + \def\@currentHref {#1}% + \let\@currentlabelname \@empty + #2% + \fi + }% +}% \tabu@Hy@footnotetext +%% No need for \arraybackslash ! ------------------------------------ +\def\tabu@latextwoe {% +\def\tabu@temp##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@centering \centering \arraybackslash +\tabu@temp \tabu@raggedleft \raggedleft \arraybackslash +\tabu@temp \tabu@raggedright \raggedright \arraybackslash +}% \tabu@latextwoe +\def\tabu@raggedtwoe {% +\def\tabu@temp ##1##2##3{{\toks@\expandafter{##2##3}\xdef##1{\the\toks@}}} +\tabu@temp \tabu@Centering \Centering \arraybackslash +\tabu@temp \tabu@RaggedLeft \RaggedLeft \arraybackslash +\tabu@temp \tabu@RaggedRight \RaggedRight \arraybackslash +\tabu@temp \tabu@justifying \justifying \arraybackslash +}% \tabu@raggedtwoe +\def\tabu@normalcrbackslash{\let\\\@normalcr} +\def\tabu@trivlist{\expandafter\def\expandafter\@trivlist\expandafter{% + \expandafter\tabu@normalcrbackslash \@trivlist}} +%% Utilities: \fbox \fcolorbox and \tabudecimal ------------------- +\def\tabu@fbox {\leavevmode\afterassignment\tabu@beginfbox \setbox\@tempboxa\hbox} +\def\tabu@beginfbox {\bgroup \kern\fboxsep + \bgroup\aftergroup\tabu@endfbox} +\def\tabu@endfbox {\kern\fboxsep\egroup\egroup + \@frameb@x\relax} +\def\tabu@color@b@x #1#2{\leavevmode \bgroup + \def\tabu@docolor@b@x{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}% + \afterassignment\tabu@begincolor@b@x \setbox\z@ \hbox +}% \tabu@color@b@x +\def\tabu@begincolor@b@x {\kern\fboxsep \bgroup + \aftergroup\tabu@endcolor@b@x \set@color} +\def\tabu@endcolor@b@x {\kern\fboxsep \egroup + \dimen@\ht\z@ \advance\dimen@ \fboxsep \ht\z@ \dimen@ + \dimen@\dp\z@ \advance\dimen@ \fboxsep \dp\z@ \dimen@ + \tabu@docolor@b@x \egroup +}% \tabu@endcolor@b@x +%% Corrections (arydshln, delarray, colortbl) ----------------------- +\def\tabu@fix@arrayright {%% \@arrayright is missing from \endarray + \iftabu@colortbl + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \CT@end \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \def\tabu@endarray{% + \crcr \egroup \egroup % + \@arrayright % + \gdef\@preamble{}\CT@end}% + \fi + \else + \ifdefined\adl@array % + \def\tabu@endarray{% + \adl@endarray \egroup \adl@arrayrestore \egroup % + \@arrayright % + \gdef\@preamble{}}% + \else % + \PackageWarning{tabu} + {\string\@arrayright\space is missing from the + \MessageBreak definition of \string\endarray. + \MessageBreak Compatibility with delarray.sty is broken.}% + \fi\fi +}% \tabu@fix@arrayright +\def\tabu@adl@xarraydashrule #1#2#3{% + \ifnum\@lastchclass=\adl@class@start\else + \ifnum\@lastchclass=\@ne\else + \ifnum\@lastchclass=5 \else % @-arg (class 5) and !-arg (class 1) + \adl@leftrulefalse \fi\fi % must be treated the same + \fi + \ifadl@zwvrule\else \ifadl@inactive\else + \@addtopreamble{\vrule\@width\arrayrulewidth + \@height\z@ \@depth\z@}\fi \fi + \ifadl@leftrule + \@addtopreamble{\adl@vlineL{\CT@arc@}{\adl@dashgapcolor}% + {\number#1}#3}% + \else \@addtopreamble{\adl@vlineR{\CT@arc@}{\adl@dashgapcolor}% + {\number#2}#3} + \fi +}% \tabu@adl@xarraydashrule +\def\tabu@adl@act@endpbox {% + \unskip \ifhmode \nobreak \fi \@finalstrut \@arstrutbox + \egroup \egroup + \adl@colhtdp \box\adl@box \hfil +}% \tabu@adl@act@endpbox +\def\tabu@adl@fix {% + \let\adl@xarraydashrule \tabu@adl@xarraydashrule % arydshln + \let\adl@act@endpbox \tabu@adl@act@endpbox % arydshln + \let\adl@act@@endpbox \tabu@adl@act@endpbox % arydshln + \let\@preamerror \@preamerr % arydshln +}% \tabu@adl@fix +%% Correction for longtable' \@startbox definition ------------------ +%% => \everypar is ``missing'' : TeX should be in vertical mode +\def\tabu@LT@startpbox #1{% + \bgroup + \let\@footnotetext\LT@p@ftntext + \setlength\hsize{#1}% + \@arrayparboxrestore + \everypar{% + \vrule \@height \ht\@arstrutbox \@width \z@ + \everypar{}}% +}% \tabu@LT@startpbox +%% \tracingtabu and the package options ------------------ +\DeclareOption{delarray}{\AtEndOfPackage{\RequirePackage{delarray}}} +\DeclareOption{linegoal}{% + \AtEndOfPackage{% + \RequirePackage{linegoal}[2010/12/07]% + \let\tabudefaulttarget \linegoal% \linegoal is \linewidth if not pdfTeX +}} +\DeclareOption{scantokens}{\tabuscantokenstrue} +\DeclareOption{debugshow}{\AtEndOfPackage{\tracingtabu=\tw@}} +\def\tracingtabu {\begingroup\@ifnextchar=% + {\afterassignment\tabu@tracing\count@} + {\afterassignment\tabu@tracing\count@1\relax}} +\def\tabu@tracing{\expandafter\endgroup + \expandafter\tabu@tr@cing \the\count@ \relax +}% \tabu@tracing +\def\tabu@tr@cing #1\relax {% + \ifnum#1>\thr@@ \let\tabu@tracinglines\message + \else \let\tabu@tracinglines\@gobble + \fi + \ifnum#1>\tw@ \let\tabu@DBG \tabu@@DBG + \def\tabu@mkarstrut {\tabu@DBG@arstrut}% + \tabustrutrule 1.5\p@ + \else \let\tabu@DBG \@gobble + \def\tabu@mkarstrut {\tabu@arstrut}% + \tabustrutrule \z@ + \fi + \ifnum#1>\@ne \let\tabu@debug \message + \else \let\tabu@debug \@gobble + \fi + \ifnum#1>\z@ + \let\tabu@message \message + \let\tabu@tracing@save \tabu@message@save + \let\tabu@starttimer \tabu@pdftimer + \else + \let\tabu@message \@gobble + \let\tabu@tracing@save \@gobble + \let\tabu@starttimer \relax + \fi +}% \tabu@tr@cing +%% Setup \AtBeginDocument +\AtBeginDocument{\tabu@AtBeginDocument} +\def\tabu@AtBeginDocument{\let\tabu@AtBeginDocument \@undefined + \ifdefined\arrayrulecolor \tabu@colortbltrue % + \tabu@colortblalignments % different glues are used + \else \tabu@colortblfalse \fi + \ifdefined\CT@arc@ \else \let\CT@arc@ \relax \fi + \ifdefined\CT@drsc@\else \let\CT@drsc@ \relax \fi + \let\tabu@arc@L \CT@arc@ \let\tabu@drsc@L \CT@drsc@ + \ifodd 1\ifcsname siunitx_table_collect_begin:Nn\endcsname % + \expandafter\ifx + \csname siunitx_table_collect_begin:Nn\endcsname\relax 0\fi\fi\relax + \tabu@siunitxtrue + \else \let\tabu@maybesiunitx \@firstofone % + \let\tabu@siunitx \tabu@nosiunitx + \tabu@siunitxfalse + \fi + \ifdefined\adl@array % + \else \let\tabu@adl@fix \relax + \let\tabu@adl@endtrial \@empty \fi + \ifdefined\longtable % + \else \let\longtabu \tabu@nolongtabu \fi + \ifdefined\cellspacetoplimit \tabu@warn@cellspace\fi + \csname\ifcsname ifHy@hyperfootnotes\endcsname % + ifHy@hyperfootnotes\else iffalse\fi\endcsname + \let\tabu@footnotetext \tabu@Hy@ftntext + \let\tabu@xfootnote \tabu@Hy@xfootnote \fi + \ifdefined\FV@DefineCheckEnd% + \tabu@fancyvrb \fi + \ifdefined\color % + \let\tabu@color \color + \def\tabu@leavevmodecolor ##1{% + \def\tabu@leavevmodecolor {\leavevmode ##1}% + }\expandafter\tabu@leavevmodecolor\expandafter{\color}% + \else + \let\tabu@color \tabu@nocolor + \let\tabu@leavevmodecolor \@firstofone \fi + \tabu@latextwoe + \ifdefined\@raggedtwoe@everyselectfont % + \tabu@raggedtwoe + \else + \let\tabu@cell@L \tabu@cell@l + \let\tabu@cell@R \tabu@cell@r + \let\tabu@cell@C \tabu@cell@c + \let\tabu@cell@J \tabu@cell@j \fi + \expandafter\in@ \expandafter\@arrayright \expandafter{\endarray}% + \ifin@ \let\tabu@endarray \endarray + \else \tabu@fix@arrayright \fi% + \everyrow{}% +}% \tabu@AtBeginDocument +\def\tabu@warn@cellspace{% + \PackageWarning{tabu}{% + Package cellspace has some limitations + \MessageBreak And redefines some macros of array.sty. + \MessageBreak Please use \string\tabulinesep\space to control + \MessageBreak vertical spacing of lines inside tabu environment}% +}% \tabu@warn@cellspace +%% tabu Package initialisation +\tabuscantokensfalse +\let\tabu@arc@G \relax +\let\tabu@drsc@G \relax +\let\tabu@evr@G \@empty +\let\tabu@rc@G \@empty +\def\tabu@ls@G {\tabu@linestyle@}% +\let\tabu@@rowfontreset \@empty % +\let\tabu@@celllalign \@empty +\let\tabu@@cellralign \@empty +\let\tabu@@cellleft \@empty +\let\tabu@@cellright \@empty +\def\tabu@naturalXmin {\z@} +\def\tabu@naturalXmax {\z@} +\let\tabu@rowfontreset \@empty +\def\tabulineon {4pt}\let\tabulineoff \tabulineon +\tabu@everyrowtrue +\ifdefined\pdfelapsedtime % + \def\tabu@pdftimer {\xdef\tabu@starttime{\the\pdfelapsedtime}}% +\else \let\tabu@pdftimer \relax \let\tabu@message@etime \relax +\fi +\tracingtabu=\z@ +\newtabulinestyle {=\maxdimen}% creates the 'factory' settings \tabu@linestyle@ +\tabulinestyle{} +\taburowcolors{} +\let\tabudefaulttarget \linewidth +\ProcessOptions* % \ProcessOptions* is quicker ! +\endinput +%% +%% End of file `tabu.sty'. diff --git a/doxygen/doc/latex/writing-and-running.tex b/doxygen/doc/latex/writing-and-running.tex new file mode 100644 index 00000000..21aa0fc6 --- /dev/null +++ b/doxygen/doc/latex/writing-and-running.tex @@ -0,0 +1,256 @@ +\hypertarget{writing-and-running_writing-new-tests}{}\doxysection{Writing a new test}\label{writing-and-running_writing-new-tests} +Create a folder with the name of your test case in the {\ttfamily icub-\/tests/src/} folder to keep your test codes\+: + + +\begin{DoxyCode}{0} +\DoxyCodeLine{\$ mkdir icub-\/tests/src/example-\/test} + +\end{DoxyCode} + + +Create a child test class inherited from the {\ttfamily Yarp\+Test\+Case}\+: + + +\begin{DoxyCodeInclude}{0} +\DoxyCodeLine{\textcolor{comment}{/*}} +\DoxyCodeLine{\textcolor{comment}{ * iCub Robot Unit Tests (Robot Testing Framework)}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * Copyright (C) 2015-\/2019 Istituto Italiano di Tecnologia (IIT)}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * This library is free software; you can redistribute it and/or}} +\DoxyCodeLine{\textcolor{comment}{ * modify it under the terms of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{comment}{ * License as published by the Free Software Foundation; either}} +\DoxyCodeLine{\textcolor{comment}{ * version 2.1 of the License, or (at your option) any later version.}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * This library is distributed in the hope that it will be useful,}} +\DoxyCodeLine{\textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}} +\DoxyCodeLine{\textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU}} +\DoxyCodeLine{\textcolor{comment}{ * Lesser General Public License for more details.}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * You should have received a copy of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{comment}{ * License along with this library; if not, write to the Free Software}} +\DoxyCodeLine{\textcolor{comment}{ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-\/1301 USA}} +\DoxyCodeLine{\textcolor{comment}{ */}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#ifndef \_EXAMPLE\_TEST\_H\_}} +\DoxyCodeLine{\textcolor{preprocessor}{\#define \_EXAMPLE\_TEST\_H\_}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#include }} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keyword}{class }ExampleTest : \textcolor{keyword}{public} yarp::robottestingframework::TestCase \{} +\DoxyCodeLine{\textcolor{keyword}{public}:} +\DoxyCodeLine{ ExampleTest();} +\DoxyCodeLine{ \textcolor{keyword}{virtual} \string~ExampleTest();} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{keyword}{virtual} \textcolor{keywordtype}{bool} setup(yarp::os::Property\& property);} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} tearDown();} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{keyword}{virtual} \textcolor{keywordtype}{void} run();} +\DoxyCodeLine{\};} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#endif }\textcolor{comment}{//\_EXAMPLE\_TEST\_H}} + +\end{DoxyCodeInclude} + + +Implement the test case\+: + + +\begin{DoxyCodeInclude}{0} +\DoxyCodeLine{\textcolor{comment}{/*}} +\DoxyCodeLine{\textcolor{comment}{ * iCub Robot Unit Tests (Robot Testing Framework)}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * Copyright (C) 2015-\/2019 Istituto Italiano di Tecnologia (IIT)}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * This library is free software; you can redistribute it and/or}} +\DoxyCodeLine{\textcolor{comment}{ * modify it under the terms of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{comment}{ * License as published by the Free Software Foundation; either}} +\DoxyCodeLine{\textcolor{comment}{ * version 2.1 of the License, or (at your option) any later version.}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * This library is distributed in the hope that it will be useful,}} +\DoxyCodeLine{\textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}} +\DoxyCodeLine{\textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU}} +\DoxyCodeLine{\textcolor{comment}{ * Lesser General Public License for more details.}} +\DoxyCodeLine{\textcolor{comment}{ *}} +\DoxyCodeLine{\textcolor{comment}{ * You should have received a copy of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{comment}{ * License along with this library; if not, write to the Free Software}} +\DoxyCodeLine{\textcolor{comment}{ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-\/1301 USA}} +\DoxyCodeLine{\textcolor{comment}{ */}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#include "{}ExampleTest.h"{}}} +\DoxyCodeLine{\textcolor{preprocessor}{\#include }} +\DoxyCodeLine{\textcolor{preprocessor}{\#include }} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keyword}{using namespace }std;} +\DoxyCodeLine{\textcolor{keyword}{using namespace }robottestingframework;} +\DoxyCodeLine{\textcolor{keyword}{using namespace }yarp::os;} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{comment}{// prepare the plugin}} +\DoxyCodeLine{ROBOTTESTINGFRAMEWORK\_PREPARE\_PLUGIN(ExampleTest)} +\DoxyCodeLine{} +\DoxyCodeLine{ExampleTest::ExampleTest() : yarp::robottestingframework::TestCase(\textcolor{stringliteral}{"{}ExampleTest"{}}) \{} +\DoxyCodeLine{\}} +\DoxyCodeLine{} +\DoxyCodeLine{ExampleTest::\string~ExampleTest() \{ \}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keywordtype}{bool} ExampleTest::setup(yarp::os::Property \&property) \{} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{comment}{// initialization goes here ...}} +\DoxyCodeLine{ \textcolor{comment}{//updating the test name}} +\DoxyCodeLine{ \textcolor{keywordflow}{if}(property.check(\textcolor{stringliteral}{"{}name"{}}))} +\DoxyCodeLine{ setName(property.find(\textcolor{stringliteral}{"{}name"{}}).asString());} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{keywordtype}{string} example = \textcolor{keyword}{property}.check(\textcolor{stringliteral}{"{}example"{}}, Value(\textcolor{stringliteral}{"{}default value"{}})).asString();} +\DoxyCodeLine{} +\DoxyCodeLine{ ROBOTTESTINGFRAMEWORK\_TEST\_REPORT(Asserter::format(\textcolor{stringliteral}{"{}Use '\%s' for the example param!"{}},} +\DoxyCodeLine{ example.c\_str()));} +\DoxyCodeLine{ \textcolor{keywordflow}{return} \textcolor{keyword}{true};} +\DoxyCodeLine{\}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keywordtype}{void} ExampleTest::tearDown() \{} +\DoxyCodeLine{ \textcolor{comment}{// finalization goes her ...}} +\DoxyCodeLine{\}} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keywordtype}{void} ExampleTest::run() \{} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{keywordtype}{int} a = 5; \textcolor{keywordtype}{int} b = 3;} +\DoxyCodeLine{ ROBOTTESTINGFRAMEWORK\_TEST\_CHECK(ab, \textcolor{stringliteral}{"{}a bigger then b"{}});} +\DoxyCodeLine{ ROBOTTESTINGFRAMEWORK\_TEST\_CHECK(a==b, \textcolor{stringliteral}{"{}a equal to b"{}});} +\DoxyCodeLine{} +\DoxyCodeLine{ \textcolor{comment}{// add more}} +\DoxyCodeLine{ \textcolor{comment}{// ...}} +\DoxyCodeLine{\}} +\DoxyCodeLine{} + +\end{DoxyCodeInclude} + + +Notice\+: The {\ttfamily ROBOTTESTINGFRAMEWORK\+\_\+\+TEST\+\_\+\+CHECK}, {\ttfamily ROBOTTESTINGFRAMEWORK\+\_\+\+TEST\+\_\+\+REPORT} do NOT threw any exception and are used to add failure or report messages to the result collector. Instead, all the macros which include {\ttfamily \+\_\+\+ASSERT\+\_\+} within their names (e.\+g., {\ttfamily ROBOTTESTINGFRAMEWORK\+\_\+\+ASSERT\+\_\+\+FAIL}) throw exceptions which prevent only the current test case (Not the whole test suite) of being proceed. The error/failure messages thrown by the exceptions are caught. (See \href{http://robotology.github.io/robot-testing-framework/documentation/TestAssert_8h.html}{\texttt{ {\itshape Basic Assertion macros}}}). + +The report/assertion macros store the source line number where the check/report or assertion happen. To see them, you can run the test case or suite with {\ttfamily -\/-\/detail} parameter using the {\ttfamily robottestingframework-\/testrunner} (See \href{http://robotology.github.io/robot-testing-framework/documentation/robottestingframework-testrunner.html}{\texttt{ {\itshape Running test case plug-\/ins using robottestingframework-\/testrunner}}}). + +Create a cmake file to build the plug-\/in\+: + + +\begin{DoxyCodeInclude}{0} +\DoxyCodeLine{\textcolor{preprocessor}{\# iCub Robot Unit Tests (Robot Testing Framework)}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\# Copyright (C) 2015-\/2019 Istituto Italiano di Tecnologia (IIT)}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\# This library is free software; you can redistribute it and/or}} +\DoxyCodeLine{\textcolor{preprocessor}{\# modify it under the terms of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{preprocessor}{\# License as published by the Free Software Foundation; either}} +\DoxyCodeLine{\textcolor{preprocessor}{\# version 2.1 of the License, or (at your option) any later version.}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\# This library is distributed in the hope that it will be useful,}} +\DoxyCodeLine{\textcolor{preprocessor}{\# but WITHOUT ANY WARRANTY; without even the implied warranty of}} +\DoxyCodeLine{\textcolor{preprocessor}{\# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU}} +\DoxyCodeLine{\textcolor{preprocessor}{\# Lesser General Public License for more details.}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\# You should have received a copy of the GNU Lesser General Public}} +\DoxyCodeLine{\textcolor{preprocessor}{\# License along with this library; if not, write to the Free Software}} +\DoxyCodeLine{\textcolor{preprocessor}{\# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-\/1301 USA}} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{keywordflow}{if}(NOT DEFINED CMAKE\_MINIMUM\_REQUIRED\_VERSION)} +\DoxyCodeLine{ cmake\_minimum\_required(VERSION 3.5)} +\DoxyCodeLine{endif()} +\DoxyCodeLine{} +\DoxyCodeLine{project(ExampleTest)} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\# add the required cmake packages}} +\DoxyCodeLine{find\_package(RobotTestingFramework 2 COMPONENTS DLL)} +\DoxyCodeLine{find\_package(YARP 3.5.1 COMPONENTS os robottestingframework)} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\# add the source codes to build the plugin library}} +\DoxyCodeLine{add\_library(\$\{PROJECT\_NAME\} MODULE ExampleTest.h} +\DoxyCodeLine{ ExampleTest.cpp)} +\DoxyCodeLine{} +\DoxyCodeLine{\# add required libraries} +\DoxyCodeLine{target\_link\_libraries(\$\{PROJECT\_NAME\} RobotTestingFramework::RTF} +\DoxyCodeLine{ RobotTestingFramework::RTF\_dll} +\DoxyCodeLine{ YARP::YARP\_os} +\DoxyCodeLine{ YARP::YARP\_init} +\DoxyCodeLine{ YARP::YARP\_robottestingframework)} +\DoxyCodeLine{} +\DoxyCodeLine{\# set the installation options} +\DoxyCodeLine{install(TARGETS \$\{PROJECT\_NAME\}} +\DoxyCodeLine{ EXPORT \$\{PROJECT\_NAME\}} +\DoxyCodeLine{ COMPONENT runtime} +\DoxyCodeLine{ LIBRARY DESTINATION lib)} +\DoxyCodeLine{} + +\end{DoxyCodeInclude} + + +Call your cmake file from the {\ttfamily icub-\/test/\+CMake\+Lists.\+txt} to build it along with the other other test plugins. To do that, adds the following line to the {\ttfamily icub-\/test/\+CMake\+Lists.\+txt} + + +\begin{DoxyCode}{0} +\DoxyCodeLine{\textcolor{preprocessor}{\# Build example test}} +\DoxyCodeLine{\textcolor{preprocessor}{add\_subdirectory(src/example-\/test)}} + +\end{DoxyCode} + + +Please check the {\ttfamily icub-\/tests/example} folder for a template for developing tests for the i\+Cub.\hypertarget{writing-and-running_running_single_test_case}{}\doxysection{Running a single test case}\label{writing-and-running_running_single_test_case} +As it is documented here (\href{http://robotology.github.io/robot-testing-framework/documentation/robottestingframework-testrunner.html}{\texttt{ {\itshape Running test case plug-\/ins using robottestingframework-\/testrunner}}}) you can run a single test case or run it with the other tests using a test suite. For example, to run a single test case\+: + + +\begin{DoxyCode}{0} +\DoxyCodeLine{robottestingframework-\/testrunner -\/-\/verbose -\/-\/test plugins/ExampleTest.so -\/-\/param \textcolor{stringliteral}{"{}-\/-\/name MyExampleTest"{}}} + +\end{DoxyCode} + + +Notice that this test require the {\ttfamily yarpserver} to be running and it contains tests that are programmed to succeed and some that are programmed to fail. + +or to run the i\+Cub\+Sim camera test whith the test configuration file\+: + + +\begin{DoxyCode}{0} +\DoxyCodeLine{robottestingframework-\/testrunner -\/-\/verbose -\/-\/test plugins/CameraTest.so -\/-\/param \textcolor{stringliteral}{"{}-\/-\/from camera\_right.ini"{}} -\/-\/environment \textcolor{stringliteral}{"{}-\/-\/robotname icubSim"{}}} + +\end{DoxyCode} + + +This runs the icub\+Sim right-\/camera test with the parameters specified in the {\ttfamily right\+\_\+camera.\+ini} which can be found in {\ttfamily icub-\/tests/suites/contexts/icub\+Sim} folder. This test assumes you are running {\ttfamily yarpserver} and the i\+Cub simulator (i.\+e. {\ttfamily i\+Cub\+\_\+\+SIM}). + +Notice that the environment parameter {\ttfamily -\/-\/robotname icub\+Sim} is used to locate the correct context (for this examples is {\ttfamily icub\+Sim}) and also to update the variables loaded from the {\ttfamily right\+\_\+camera.\+ini} file.\hypertarget{writing-and-running_running_multiple_tests}{}\doxysection{Running multiple tests using a test suite}\label{writing-and-running_running_multiple_tests} +You can update one of the existing suite XML files to add your test case plug-\/in and its parameters or create a new test suite which keeps all the relevant test cases. For example the {\ttfamily basic-\/icub\+Sim.\+xml} test suite keeps the basic tests for cameras and motors\+: + + +\begin{DoxyCode}{0} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{ Testing robot\textcolor{stringliteral}{'s basic features}} +\DoxyCodeLine{\textcolor{stringliteral}{ -\/-\/robotname icubSim}} +\DoxyCodeLine{\textcolor{stringliteral}{ yarpmanager }} +\DoxyCodeLine{\textcolor{stringliteral}{}} +\DoxyCodeLine{\textcolor{stringliteral}{ }} +\DoxyCodeLine{\textcolor{stringliteral}{ CameraTest }} +\DoxyCodeLine{\textcolor{stringliteral}{ CameraTest }} +\DoxyCodeLine{\textcolor{stringliteral}{}} +\DoxyCodeLine{\textcolor{stringliteral}{ }} +\DoxyCodeLine{\textcolor{stringliteral}{ MotorTest }} +\DoxyCodeLine{\textcolor{stringliteral}{ MotorTest }} +\DoxyCodeLine{\textcolor{stringliteral}{}} + +\end{DoxyCode} + + +Then you can run all the test cases from the test suite\+: + + +\begin{DoxyCode}{0} +\DoxyCodeLine{robottestingframework-\/testrunner -\/-\/verbose -\/-\/suite icub-\/tests/suites/basics-\/icubSim.xml} + +\end{DoxyCode} + + +The {\ttfamily robottestingframework-\/testrunner}, first, launches the i\+Cub simulator and then runs all the tests one after each other. After running all the test cases, the {\ttfamily tesrunner} stop the simulator. If the i\+Cub simulator crashes during the test run, the {\ttfamily robottestingframework-\/testrunner} re-\/launchs it and continues running the remaining tests. + +How {\ttfamily robottestingframework-\/testrunner} knows that it should launch the i\+Cub simulator before running the tests? Well, this is indicated by {\ttfamily $<$fixture param=\char`\"{}-\/-\/fixture icubsim-\/fixture.\+xml\char`\"{}$>$ yarpmanager $<$/fixture$>$}. The {\ttfamily robottestingframework-\/testrunner} uses the {\ttfamily yarpmanager} fixture plug-\/in to launch the modules which are listed in the {\ttfamily icubsim-\/fixture.\+xml}. Notice that all the fixture files should be located in the {\ttfamily icub-\/tests/suites/fixtures} folder. \ No newline at end of file diff --git a/index.html b/index.html index e1887f39..50c4c21b 100644 --- a/index.html +++ b/index.html @@ -2,13 +2,13 @@ - + Page Redirection - If you are not redirected automatically, follow the link to the documentation + If you are not redirected automatically, follow the link to the documentation