From a9450e9d4fcb0ff9318605d08aab1baab118e5e9 Mon Sep 17 00:00:00 2001 From: Ugo Pattacini Date: Wed, 10 Jun 2015 12:06:24 +0200 Subject: [PATCH] provided doxygen documentation --- doxygen/doc/html/FastGauss_8cpp.html | 95 + doxygen/doc/html/FastGauss_8cpp_source.html | 426 +++ doxygen/doc/html/FastGauss_8h.html | 92 + doxygen/doc/html/FastGauss_8h_source.html | 131 + doxygen/doc/html/IIRFilt_8cpp_source.html | 211 ++ doxygen/doc/html/IIRFilt_8h.html | 220 ++ doxygen/doc/html/IIRFilt_8h_source.html | 110 + doxygen/doc/html/IIRGausDeriv_8cpp.html | 515 ++++ .../doc/html/IIRGausDeriv_8cpp_source.html | 431 +++ doxygen/doc/html/IIRGausDeriv_8h.html | 532 ++++ doxygen/doc/html/IIRGausDeriv_8h_source.html | 130 + doxygen/doc/html/README_8md_source.html | 73 + doxygen/doc/html/ScaleSpace_8cpp.html | 94 + doxygen/doc/html/ScaleSpace_8cpp_source.html | 179 ++ doxygen/doc/html/ScaleSpace_8h.html | 91 + doxygen/doc/html/ScaleSpace_8h_source.html | 120 + doxygen/doc/html/acquireData_8m_source.html | 195 ++ doxygen/doc/html/annotated.html | 79 + doxygen/doc/html/bc_s.png | Bin 0 -> 676 bytes doxygen/doc/html/bdwn.png | Bin 0 -> 147 bytes doxygen/doc/html/classes.html | 80 + doxygen/doc/html/closed.png | Bin 0 -> 132 bytes .../doc/html/cvfloodfill2_8cpp_source.html | 615 ++++ ...moForceControl_2src_2main_8cpp_source.html | 155 + ...l_2src_2robot__interfaces_8cpp_source.html | 181 ++ ...rol_2src_2robot__interfaces_8h_source.html | 132 + ...ForceImitation_2src_2main_8cpp_source.html | 408 +++ ...n_2src_2robot__interfaces_8cpp_source.html | 217 ++ ...ion_2src_2robot__interfaces_8h_source.html | 141 + .../demoRedBall_2src_2main_8cpp_source.html | 2059 +++++++++++++ .../html/demoYoga_2src_2main_8cpp_source.html | 636 ++++ .../dir_09c3d1dd163a66c44752029483303db0.html | 82 + .../dir_11110cf4ec97ab9f4ccc991ff6fd73d9.html | 91 + .../dir_16f69bce6b508aa996db90e545a71f98.html | 78 + .../dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.html | 78 + .../dir_24edfe2b9091337dacb04c2225681c6a.html | 84 + .../dir_3b22bad5c1bf11cca84db4574fa99c00.html | 80 + .../dir_461bc6e266c40caf4deffca7b613e586.html | 82 + .../dir_46844ca6f7a7f72255313000c6b6b85e.html | 82 + .../dir_5ba73ae6ed0b41c8033623abea2a8464.html | 78 + .../dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.html | 82 + .../dir_61b422eae39885bd24f8acba30ef5313.html | 78 + .../dir_756642fb7df32f4fba8cd8cbf5208191.html | 82 + .../dir_78c59be1348feda52106cbd20414be4b.html | 78 + .../dir_811e15f64083e64bb2a9d8e860a70892.html | 82 + .../dir_9ae835d45530d23e4ddf2ad0cc13b598.html | 78 + .../dir_9f0657da05b23c4879b50332cf355c63.html | 78 + .../dir_b27c00042910d6a487ffb0dd3cd42b7b.html | 78 + .../dir_b73a721c8cbb3e92535cc94daa204a01.html | 86 + .../dir_bed1e4cba671f75d7de20f48ac2e3ab2.html | 78 + .../dir_e598492b3e513106f2ee79440d3c69e6.html | 78 + .../dir_e676cb3644873b6bf7df3036a086e762.html | 84 + .../dir_eb22669ebb55c4a1830d5f6f631ad207.html | 94 + .../dir_ef68c104db6052f7b3e7734a1a1b7a65.html | 82 + 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 + doxygen/doc/html/files.html | 131 + doxygen/doc/html/folderclosed.png | Bin 0 -> 616 bytes doxygen/doc/html/folderopen.png | Bin 0 -> 597 bytes doxygen/doc/html/form_0.png | Bin 0 -> 1118 bytes doxygen/doc/html/form_1.png | Bin 0 -> 467 bytes doxygen/doc/html/form_2.png | Bin 0 -> 472 bytes doxygen/doc/html/form_3.png | Bin 0 -> 483 bytes doxygen/doc/html/form_4.png | Bin 0 -> 237 bytes doxygen/doc/html/form_5.png | Bin 0 -> 407 bytes doxygen/doc/html/formula.repository | 6 + .../generate__shape__model_8py_source.html | 133 + doxygen/doc/html/globals.html | 119 + doxygen/doc/html/globals_func.html | 83 + doxygen/doc/html/globals_vars.html | 108 + doxygen/doc/html/group__app__demoRedBall.html | 104 + .../doc/html/group__demo__applications.html | 91 + doxygen/doc/html/group__demo__modules.html | 91 + .../doc/html/group__icub__pf3dBottomup.html | 87 + .../doc/html/group__icub__pf3dTracker.html | 211 ++ doxygen/doc/html/group__src__demoRedBall.html | 240 ++ doxygen/doc/html/group__src__demoYoga.html | 109 + doxygen/doc/html/index.html | 74 + doxygen/doc/html/jquery.js | 35 + doxygen/doc/html/mainwindow_8cpp_source.html | 604 ++++ doxygen/doc/html/mainwindow_8h_source.html | 175 ++ .../matlab__files_2README_8md_source.html | 73 + ...v_icub-basic-demos_pf3dTracker_README.html | 79 + ...demos_pf3dTracker_matlab_files_README.html | 77 + ...sic-demos_gh-pages_pf3dTracker_README.html | 79 + ...pages_pf3dTracker_matlab_files_README.html | 77 + ...sic_demos_gh_pages_pf3dTracker_README.html | 77 + ...pages_pf3dTracker_matlab_files_README.html | 75 + doxygen/doc/html/menu.js | 51 + doxygen/doc/html/menudata.js | 36 + doxygen/doc/html/modules.html | 85 + 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/open.png | Bin 0 -> 123 bytes doxygen/doc/html/pages.html | 80 + .../pf3dBottomup_2src_2main_8cpp_source.html | 107 + .../doc/html/pf3dBottomup_8cpp_source.html | 559 ++++ .../doc/html/pf3dBottomup_8hpp_source.html | 217 ++ .../doc/html/pf3dTrackerMain_8cpp_source.html | 105 + .../html/pf3dTrackerSupport_8cpp_source.html | 212 ++ .../html/pf3dTrackerSupport_8hpp_source.html | 120 + doxygen/doc/html/pf3dTracker_8cpp_source.html | 2013 +++++++++++++ doxygen/doc/html/pf3dTracker_8hpp_source.html | 293 ++ 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 | 5 + doxygen/doc/html/search/all_2.html | 37 + doxygen/doc/html/search/all_2.js | 19 + doxygen/doc/html/search/all_3.html | 37 + doxygen/doc/html/search/all_3.js | 5 + doxygen/doc/html/search/all_4.html | 37 + doxygen/doc/html/search/all_4.js | 7 + 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 | 5 + 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 | 5 + doxygen/doc/html/search/classes_0.html | 37 + doxygen/doc/html/search/classes_0.js | 4 + doxygen/doc/html/search/close.png | Bin 0 -> 273 bytes doxygen/doc/html/search/close.svg | 31 + doxygen/doc/html/search/files_0.html | 37 + doxygen/doc/html/search/files_0.js | 5 + doxygen/doc/html/search/files_1.html | 37 + doxygen/doc/html/search/files_1.js | 6 + doxygen/doc/html/search/files_2.html | 37 + doxygen/doc/html/search/files_2.js | 5 + doxygen/doc/html/search/functions_0.html | 37 + doxygen/doc/html/search/functions_0.js | 5 + doxygen/doc/html/search/functions_1.html | 37 + doxygen/doc/html/search/functions_1.js | 4 + doxygen/doc/html/search/groups_0.html | 37 + doxygen/doc/html/search/groups_0.js | 7 + doxygen/doc/html/search/groups_1.html | 37 + doxygen/doc/html/search/groups_1.js | 5 + doxygen/doc/html/search/groups_2.html | 37 + doxygen/doc/html/search/groups_2.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 | 4 + 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 | 33 + doxygen/doc/html/search/variables_0.html | 37 + doxygen/doc/html/search/variables_0.js | 15 + doxygen/doc/html/splitbar.png | Bin 0 -> 314 bytes doxygen/doc/html/structLut.html | 101 + 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 + doxygen/doc/html/world_8cpp_source.html | 178 ++ ...rite__initial__ball__points_8m_source.html | 100 + doxygen/doc/latex/FastGauss_8cpp.tex | 28 + doxygen/doc/latex/FastGauss_8h.tex | 25 + doxygen/doc/latex/IIRFilt_8h.tex | 119 + doxygen/doc/latex/IIRGausDeriv_8cpp.tex | 366 +++ doxygen/doc/latex/IIRGausDeriv_8h.tex | 381 +++ doxygen/doc/latex/Makefile | 43 + doxygen/doc/latex/ScaleSpace_8cpp.tex | 25 + doxygen/doc/latex/ScaleSpace_8h.tex | 22 + doxygen/doc/latex/annotated.tex | 4 + .../dir_09c3d1dd163a66c44752029483303db0.tex | 5 + .../dir_11110cf4ec97ab9f4ccc991ff6fd73d9.tex | 11 + .../dir_16f69bce6b508aa996db90e545a71f98.tex | 2 + .../dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.tex | 2 + .../dir_24edfe2b9091337dacb04c2225681c6a.tex | 7 + .../dir_461bc6e266c40caf4deffca7b613e586.tex | 5 + .../dir_46844ca6f7a7f72255313000c6b6b85e.tex | 5 + .../dir_5ba73ae6ed0b41c8033623abea2a8464.tex | 2 + .../dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.tex | 5 + .../dir_61b422eae39885bd24f8acba30ef5313.tex | 2 + .../dir_756642fb7df32f4fba8cd8cbf5208191.tex | 5 + .../dir_78c59be1348feda52106cbd20414be4b.tex | 2 + .../dir_811e15f64083e64bb2a9d8e860a70892.tex | 5 + .../dir_9ae835d45530d23e4ddf2ad0cc13b598.tex | 2 + .../dir_9f0657da05b23c4879b50332cf355c63.tex | 2 + .../dir_b27c00042910d6a487ffb0dd3cd42b7b.tex | 2 + .../dir_b73a721c8cbb3e92535cc94daa204a01.tex | 9 + .../dir_bed1e4cba671f75d7de20f48ac2e3ab2.tex | 2 + .../dir_e598492b3e513106f2ee79440d3c69e6.tex | 2 + .../dir_e676cb3644873b6bf7df3036a086e762.tex | 7 + .../dir_eb22669ebb55c4a1830d5f6f631ad207.tex | 13 + .../dir_ef68c104db6052f7b3e7734a1a1b7a65.tex | 5 + doxygen/doc/latex/doxygen.sty | 576 ++++ doxygen/doc/latex/files.tex | 34 + doxygen/doc/latex/group__app__demoRedBall.tex | 33 + .../doc/latex/group__demo__applications.tex | 22 + doxygen/doc/latex/group__demo__modules.tex | 19 + .../doc/latex/group__icub__pf3dBottomup.tex | 21 + .../doc/latex/group__icub__pf3dTracker.tex | 142 + doxygen/doc/latex/group__src__demoRedBall.tex | 174 ++ doxygen/doc/latex/group__src__demoYoga.tex | 42 + doxygen/doc/latex/longtable_doxygen.sty | 448 +++ doxygen/doc/latex/make.bat | 28 + ...ev_icub-basic-demos_pf3dTracker_README.tex | 3 + ...-demos_pf3dTracker_matlab_files_README.tex | 0 ...asic-demos_gh-pages_pf3dTracker_README.tex | 3 + ...-pages_pf3dTracker_matlab_files_README.tex | 0 ...asic_demos_gh_pages_pf3dTracker_README.tex | 3 + ..._pages_pf3dTracker_matlab_files_README.tex | 0 doxygen/doc/latex/modules.tex | 14 + doxygen/doc/latex/refman.tex | 209 ++ doxygen/doc/latex/structLut.tex | 35 + doxygen/doc/latex/tabu_doxygen.sty | 2557 +++++++++++++++++ doxygen/generate.txt | 1262 ++++++++ doxygen/groups.dox | 25 + index.html | 14 + 226 files changed, 28270 insertions(+) create mode 100644 doxygen/doc/html/FastGauss_8cpp.html create mode 100644 doxygen/doc/html/FastGauss_8cpp_source.html create mode 100644 doxygen/doc/html/FastGauss_8h.html create mode 100644 doxygen/doc/html/FastGauss_8h_source.html create mode 100644 doxygen/doc/html/IIRFilt_8cpp_source.html create mode 100644 doxygen/doc/html/IIRFilt_8h.html create mode 100644 doxygen/doc/html/IIRFilt_8h_source.html create mode 100644 doxygen/doc/html/IIRGausDeriv_8cpp.html create mode 100644 doxygen/doc/html/IIRGausDeriv_8cpp_source.html create mode 100644 doxygen/doc/html/IIRGausDeriv_8h.html create mode 100644 doxygen/doc/html/IIRGausDeriv_8h_source.html create mode 100644 doxygen/doc/html/README_8md_source.html create mode 100644 doxygen/doc/html/ScaleSpace_8cpp.html create mode 100644 doxygen/doc/html/ScaleSpace_8cpp_source.html create mode 100644 doxygen/doc/html/ScaleSpace_8h.html create mode 100644 doxygen/doc/html/ScaleSpace_8h_source.html create mode 100644 doxygen/doc/html/acquireData_8m_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/classes.html create mode 100644 doxygen/doc/html/closed.png create mode 100644 doxygen/doc/html/cvfloodfill2_8cpp_source.html create mode 100644 doxygen/doc/html/demoForceControl_2src_2main_8cpp_source.html create mode 100644 doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8cpp_source.html create mode 100644 doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8h_source.html create mode 100644 doxygen/doc/html/demoForceImitation_2src_2main_8cpp_source.html create mode 100644 doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8cpp_source.html create mode 100644 doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8h_source.html create mode 100644 doxygen/doc/html/demoRedBall_2src_2main_8cpp_source.html create mode 100644 doxygen/doc/html/demoYoga_2src_2main_8cpp_source.html create mode 100644 doxygen/doc/html/dir_09c3d1dd163a66c44752029483303db0.html create mode 100644 doxygen/doc/html/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.html create mode 100644 doxygen/doc/html/dir_16f69bce6b508aa996db90e545a71f98.html create mode 100644 doxygen/doc/html/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.html create mode 100644 doxygen/doc/html/dir_24edfe2b9091337dacb04c2225681c6a.html create mode 100644 doxygen/doc/html/dir_3b22bad5c1bf11cca84db4574fa99c00.html create mode 100644 doxygen/doc/html/dir_461bc6e266c40caf4deffca7b613e586.html create mode 100644 doxygen/doc/html/dir_46844ca6f7a7f72255313000c6b6b85e.html create mode 100644 doxygen/doc/html/dir_5ba73ae6ed0b41c8033623abea2a8464.html create mode 100644 doxygen/doc/html/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.html create mode 100644 doxygen/doc/html/dir_61b422eae39885bd24f8acba30ef5313.html create mode 100644 doxygen/doc/html/dir_756642fb7df32f4fba8cd8cbf5208191.html create mode 100644 doxygen/doc/html/dir_78c59be1348feda52106cbd20414be4b.html create mode 100644 doxygen/doc/html/dir_811e15f64083e64bb2a9d8e860a70892.html create mode 100644 doxygen/doc/html/dir_9ae835d45530d23e4ddf2ad0cc13b598.html create mode 100644 doxygen/doc/html/dir_9f0657da05b23c4879b50332cf355c63.html create mode 100644 doxygen/doc/html/dir_b27c00042910d6a487ffb0dd3cd42b7b.html create mode 100644 doxygen/doc/html/dir_b73a721c8cbb3e92535cc94daa204a01.html create mode 100644 doxygen/doc/html/dir_bed1e4cba671f75d7de20f48ac2e3ab2.html create mode 100644 doxygen/doc/html/dir_e598492b3e513106f2ee79440d3c69e6.html create mode 100644 doxygen/doc/html/dir_e676cb3644873b6bf7df3036a086e762.html create mode 100644 doxygen/doc/html/dir_eb22669ebb55c4a1830d5f6f631ad207.html create mode 100644 doxygen/doc/html/dir_ef68c104db6052f7b3e7734a1a1b7a65.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/files.html create mode 100644 doxygen/doc/html/folderclosed.png create mode 100644 doxygen/doc/html/folderopen.png create mode 100644 doxygen/doc/html/form_0.png create mode 100644 doxygen/doc/html/form_1.png create mode 100644 doxygen/doc/html/form_2.png create mode 100644 doxygen/doc/html/form_3.png create mode 100644 doxygen/doc/html/form_4.png create mode 100644 doxygen/doc/html/form_5.png create mode 100644 doxygen/doc/html/formula.repository create mode 100644 doxygen/doc/html/generate__shape__model_8py_source.html create mode 100644 doxygen/doc/html/globals.html create mode 100644 doxygen/doc/html/globals_func.html create mode 100644 doxygen/doc/html/globals_vars.html create mode 100644 doxygen/doc/html/group__app__demoRedBall.html create mode 100644 doxygen/doc/html/group__demo__applications.html create mode 100644 doxygen/doc/html/group__demo__modules.html create mode 100644 doxygen/doc/html/group__icub__pf3dBottomup.html create mode 100644 doxygen/doc/html/group__icub__pf3dTracker.html create mode 100644 doxygen/doc/html/group__src__demoRedBall.html create mode 100644 doxygen/doc/html/group__src__demoYoga.html create mode 100644 doxygen/doc/html/index.html create mode 100644 doxygen/doc/html/jquery.js create mode 100644 doxygen/doc/html/mainwindow_8cpp_source.html create mode 100644 doxygen/doc/html/mainwindow_8h_source.html create mode 100644 doxygen/doc/html/matlab__files_2README_8md_source.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_README.html create mode 100644 doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html create mode 100644 doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_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/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/open.png create mode 100644 doxygen/doc/html/pages.html create mode 100644 doxygen/doc/html/pf3dBottomup_2src_2main_8cpp_source.html create mode 100644 doxygen/doc/html/pf3dBottomup_8cpp_source.html create mode 100644 doxygen/doc/html/pf3dBottomup_8hpp_source.html create mode 100644 doxygen/doc/html/pf3dTrackerMain_8cpp_source.html create mode 100644 doxygen/doc/html/pf3dTrackerSupport_8cpp_source.html create mode 100644 doxygen/doc/html/pf3dTrackerSupport_8hpp_source.html create mode 100644 doxygen/doc/html/pf3dTracker_8cpp_source.html create mode 100644 doxygen/doc/html/pf3dTracker_8hpp_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/classes_0.html create mode 100644 doxygen/doc/html/search/classes_0.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/files_0.html create mode 100644 doxygen/doc/html/search/files_0.js create mode 100644 doxygen/doc/html/search/files_1.html create mode 100644 doxygen/doc/html/search/files_1.js create mode 100644 doxygen/doc/html/search/files_2.html create mode 100644 doxygen/doc/html/search/files_2.js create mode 100644 doxygen/doc/html/search/functions_0.html create mode 100644 doxygen/doc/html/search/functions_0.js create mode 100644 doxygen/doc/html/search/functions_1.html create mode 100644 doxygen/doc/html/search/functions_1.js 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/groups_1.html create mode 100644 doxygen/doc/html/search/groups_1.js create mode 100644 doxygen/doc/html/search/groups_2.html create mode 100644 doxygen/doc/html/search/groups_2.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/search/variables_0.html create mode 100644 doxygen/doc/html/search/variables_0.js create mode 100644 doxygen/doc/html/splitbar.png create mode 100644 doxygen/doc/html/structLut.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/world_8cpp_source.html create mode 100644 doxygen/doc/html/write__initial__ball__points_8m_source.html create mode 100644 doxygen/doc/latex/FastGauss_8cpp.tex create mode 100644 doxygen/doc/latex/FastGauss_8h.tex create mode 100644 doxygen/doc/latex/IIRFilt_8h.tex create mode 100644 doxygen/doc/latex/IIRGausDeriv_8cpp.tex create mode 100644 doxygen/doc/latex/IIRGausDeriv_8h.tex create mode 100644 doxygen/doc/latex/Makefile create mode 100644 doxygen/doc/latex/ScaleSpace_8cpp.tex create mode 100644 doxygen/doc/latex/ScaleSpace_8h.tex create mode 100644 doxygen/doc/latex/annotated.tex create mode 100644 doxygen/doc/latex/dir_09c3d1dd163a66c44752029483303db0.tex create mode 100644 doxygen/doc/latex/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.tex create mode 100644 doxygen/doc/latex/dir_16f69bce6b508aa996db90e545a71f98.tex create mode 100644 doxygen/doc/latex/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.tex create mode 100644 doxygen/doc/latex/dir_24edfe2b9091337dacb04c2225681c6a.tex create mode 100644 doxygen/doc/latex/dir_461bc6e266c40caf4deffca7b613e586.tex create mode 100644 doxygen/doc/latex/dir_46844ca6f7a7f72255313000c6b6b85e.tex create mode 100644 doxygen/doc/latex/dir_5ba73ae6ed0b41c8033623abea2a8464.tex create mode 100644 doxygen/doc/latex/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.tex create mode 100644 doxygen/doc/latex/dir_61b422eae39885bd24f8acba30ef5313.tex create mode 100644 doxygen/doc/latex/dir_756642fb7df32f4fba8cd8cbf5208191.tex create mode 100644 doxygen/doc/latex/dir_78c59be1348feda52106cbd20414be4b.tex create mode 100644 doxygen/doc/latex/dir_811e15f64083e64bb2a9d8e860a70892.tex create mode 100644 doxygen/doc/latex/dir_9ae835d45530d23e4ddf2ad0cc13b598.tex create mode 100644 doxygen/doc/latex/dir_9f0657da05b23c4879b50332cf355c63.tex create mode 100644 doxygen/doc/latex/dir_b27c00042910d6a487ffb0dd3cd42b7b.tex create mode 100644 doxygen/doc/latex/dir_b73a721c8cbb3e92535cc94daa204a01.tex create mode 100644 doxygen/doc/latex/dir_bed1e4cba671f75d7de20f48ac2e3ab2.tex create mode 100644 doxygen/doc/latex/dir_e598492b3e513106f2ee79440d3c69e6.tex create mode 100644 doxygen/doc/latex/dir_e676cb3644873b6bf7df3036a086e762.tex create mode 100644 doxygen/doc/latex/dir_eb22669ebb55c4a1830d5f6f631ad207.tex create mode 100644 doxygen/doc/latex/dir_ef68c104db6052f7b3e7734a1a1b7a65.tex create mode 100644 doxygen/doc/latex/doxygen.sty create mode 100644 doxygen/doc/latex/files.tex create mode 100644 doxygen/doc/latex/group__app__demoRedBall.tex create mode 100644 doxygen/doc/latex/group__demo__applications.tex create mode 100644 doxygen/doc/latex/group__demo__modules.tex create mode 100644 doxygen/doc/latex/group__icub__pf3dBottomup.tex create mode 100644 doxygen/doc/latex/group__icub__pf3dTracker.tex create mode 100644 doxygen/doc/latex/group__src__demoRedBall.tex create mode 100644 doxygen/doc/latex/group__src__demoYoga.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-basic-demos_pf3dTracker_README.tex create mode 100644 doxygen/doc/latex/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.tex create mode 100644 doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.tex create mode 100644 doxygen/doc/latex/modules.tex create mode 100644 doxygen/doc/latex/refman.tex create mode 100644 doxygen/doc/latex/structLut.tex create mode 100644 doxygen/doc/latex/tabu_doxygen.sty create mode 100644 doxygen/generate.txt create mode 100644 doxygen/groups.dox create mode 100644 index.html diff --git a/doxygen/doc/html/FastGauss_8cpp.html b/doxygen/doc/html/FastGauss_8cpp.html new file mode 100644 index 0000000..ab24f47 --- /dev/null +++ b/doxygen/doc/html/FastGauss_8cpp.html @@ -0,0 +1,95 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/FastGauss.cpp File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FastGauss.cpp File Reference
+
+
+ +

Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. +More...

+
#include <string.h>
+#include <iCub/FastGauss.h>
+#include <iCub/IIRGausDeriv.h>
+#include <iCub/IIRFilt.h>
+
+

Go to the source code of this file.

+

Detailed Description

+

Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.

+
See also
"Fast IIR Isotropic 2-D Complex Gabor Filters With Boundary Initialization", A. Bernardino and J. Santos-Victor, 2006.
+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Released under GNU GPL v2.0
+ +

Definition in file FastGauss.cpp.

+
+ + + + diff --git a/doxygen/doc/html/FastGauss_8cpp_source.html b/doxygen/doc/html/FastGauss_8cpp_source.html new file mode 100644 index 0000000..b499da6 --- /dev/null +++ b/doxygen/doc/html/FastGauss_8cpp_source.html @@ -0,0 +1,426 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/FastGauss.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FastGauss.cpp
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
17 #include <string.h>
+
18 #include <iCub/FastGauss.h>
+
19 #include <iCub/IIRGausDeriv.h>
+
20 #include <iCub/IIRFilt.h>
+
21 
+
22 FastGauss::FastGauss(void)
+
23 {
+
24  //Initialization of constants and variables
+
25  m_i_lines = 0;
+
26  m_i_cols = 0;
+
27  stride = 0;
+
28  m_i_stridepix = 0;
+
29  temp = NULL;
+
30  m_scale = 0;
+
31  filt_poles = NULL;
+
32  filt_coeffs = NULL;
+
33  m_bAllocated = false;
+
34  m_resid_step = NULL;
+
35  m_resid_ic = NULL;
+
36 }
+
37 
+
38 FastGauss::~FastGauss(void)
+
39 {
+
40  FreeResources();
+
41 }
+
42 
+
43 bool FastGauss::IsAllocated()
+
44 {
+
45  return m_bAllocated;
+
46 }
+
47 long FastGauss::GetLines()
+
48 {
+
49  return m_i_lines;
+
50 }
+
51 
+
52 long FastGauss::GetCols()
+
53 {
+
54  return m_i_cols;
+
55 }
+
56 
+
57 
+
58 long FastGauss::GetStridePix()
+
59 {
+
60  return m_i_stridepix;
+
61 }
+
62 
+
63 double FastGauss::GetScale()
+
64 {
+
65  return m_scale;
+
66 }
+
67 
+
68 bool FastGauss::AllocateResources(long lines, long cols, double scale)
+
69 {
+
70  if(IsAllocated())
+
71  FreeResources();
+
72 
+
73  m_i_lines = lines;
+
74  m_i_cols = cols;
+
75 
+
76  if(scale < 0.5)
+
77  {
+
78  throw "Scale values lower than 0.5 are not alowed";
+
79  }
+
80  if(scale > 100)
+
81  {
+
82  throw "Danger: Bad Approximation for scale values higher than 100";
+
83  }
+
84  m_scale = scale;
+
85 
+
86  //allocation of level structures - filter poles, coefficients, residues
+
87  filt_poles = new complex<double>[5]; //max 5 complex poles
+
88  //filt_coeffs = (float*)malloc(6*sizeof(float)); //max 6 coeffs : 1 gain + 5 autoregressive terms
+
89  filt_coeffs = new float[6]; //max 6 coeffs : 1 gain + 5 autoregressive terms
+
90  //m_resid_step = (float*)malloc(3*sizeof(float));
+
91  m_resid_step = new float[3];
+
92  //m_resid_ic = (float*)malloc(9*sizeof(float));
+
93  m_resid_ic = new float[9];
+
94 
+
95  //allocation of image buffers for computations
+
96 
+
97  m_i_stridepix = m_i_cols;
+
98  stride = m_i_cols*4;
+
99  //temp = (float*)malloc(m_i_lines*m_i_cols*sizeof(float));
+
100  temp = new float[m_i_lines*m_i_cols];
+
101 
+
102  //compute filter poles, coefficients and boundary gaussian residues for each scale
+
103  calc_poles(3,m_scale,d0_N3_Linf, filt_poles);
+
104  calc_coeffs(3, filt_poles, filt_coeffs);
+
105  _compute_gauss3_resids(filt_poles, filt_coeffs, m_resid_ic, m_resid_step);
+
106 
+
107  m_bAllocated = true;
+
108  return true;
+
109 }
+
110 
+
111 bool FastGauss::FreeResources()
+
112 {
+
113  m_bAllocated = false;
+
114  if(m_resid_step != NULL)
+
115  {
+
116  //free(m_resid_step);
+
117  delete[] m_resid_step;
+
118  m_resid_step = NULL;
+
119  }
+
120 
+
121  if(m_resid_ic!= NULL)
+
122  {
+
123  //free(m_resid_ic);
+
124  delete[] m_resid_ic;
+
125  m_resid_ic = NULL;
+
126  }
+
127 
+
128  if(filt_coeffs != NULL)
+
129  {
+
130  //free(filt_coeffs);
+
131  delete[] filt_coeffs;
+
132  filt_coeffs = NULL;
+
133  }
+
134  if(filt_poles != NULL)
+
135  {
+
136  delete[] filt_poles;
+
137  filt_poles = NULL;
+
138  }
+
139 
+
140  if(temp != NULL)
+
141  //free(temp);
+
142  delete[] temp;
+
143 
+
144  temp = NULL;
+
145  return true;
+
146 }
+
147 
+
148 void FastGauss::_iir_gaussfilt3_horz(float * in, float * tempbuf, float * out, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step)
+
149 {
+
150 
+
151  float i0[3]; //initial condition vector - to compute
+
152  int i,s,bi,bf;
+
153  float bi_val, bf_val;
+
154  s = stridepix;
+
155  //filtering rows
+
156  for(i = 0; i < height; i++)
+
157  {
+
158  bi = i*s;
+
159  bf = i*s+width-1;
+
160  bi_val = in[bi];
+
161  bf_val = in[bf];
+
162  //causal phase
+
163  //compute forward initial conditions (response to a step of bi_val amplitude)
+
164  compute_step_forward_ic(bi_val, coeffs, i0);
+
165 
+
166  /*mag = b0/(1+a1+a2+a3);
+
167  i0[0] = i0[1] = i0[2] = (float)(mag*bi_val);*/
+
168 
+
169  iir_filt_forward(in+bi,tempbuf,width,coeffs,i0);
+
170  //anticausal phase
+
171  i0[0] = tempbuf[width-1];
+
172  i0[1] = tempbuf[width-2];
+
173  i0[2] = tempbuf[width-3];
+
174 
+
175  compute_natural_backward_ic(resid_ic,i0);
+
176  add_step_backward_ic(resid_step,bf_val,i0);
+
177 
+
178  iir_filt_backward(tempbuf,out+bi,width,coeffs,i0);
+
179  }
+
180 }
+
181 
+
182 void FastGauss::_iir_gaussfilt3_vert(float * inout, float *tempbuf, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step)
+
183 {
+
184 
+
185  //filter coefficients
+
186  float b0 = coeffs[0];
+
187  float a1 = coeffs[1];
+
188  float a2 = coeffs[2];
+
189  float a3 = coeffs[3];
+
190 
+
191  float i0[3]; //initial condition vector - to compute
+
192  int j,s,bi,bf;
+
193  float bi_val, bf_val;
+
194  s = stridepix;
+
195 
+
196  //filtering columns
+
197  for(j = 0; j < width; j++)
+
198  {
+
199  bi = j;
+
200  bf = (height-1)*s+j;
+
201  bi_val = inout[bi];
+
202  bf_val = inout[bf];
+
203  //causal phase
+
204  //compute forward initial conditions (response to a step of bi_val amplitude)
+
205  compute_step_forward_ic(bi_val, coeffs, i0);
+
206 
+
207  /*mag = b0/(1+a1+a2+a3);
+
208  i0[0] = i0[1] = i0[2] = (float)(mag*bi_val);*/
+
209 
+
210  iir_filt_forward(inout+bi,s,tempbuf,height,coeffs,i0);
+
211 
+
212  i0[0] = tempbuf[height-1];
+
213  i0[1] = tempbuf[height-2];
+
214  i0[2] = tempbuf[height-3];
+
215 
+
216  compute_natural_backward_ic(resid_ic,i0);
+
217  add_step_backward_ic(resid_step,bf_val,i0);
+
218 
+
219  iir_filt_backward(tempbuf,inout+bi,s,height,coeffs,i0);
+
220  }
+
221 }
+
222 
+
223 void FastGauss::_iir_gaussfilt3(float * in, float * out, float *tempbuf, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step )
+
224 {
+
225  _iir_gaussfilt3_horz(in, tempbuf, out, width, height, stridepix, coeffs, resid_ic, resid_step);
+
226  _iir_gaussfilt3_vert(out, tempbuf, width, height, stridepix, coeffs, resid_ic, resid_step);
+
227 }
+
228 
+
229 bool FastGauss::GaussFilt(float * in, float * out)
+
230 {
+
231  if(!IsAllocated())
+
232  throw "Resources not allocated";
+
233 
+
234  int i;
+
235 
+
236  //copy image to internal buffer
+
237  for( i = 0; i < m_i_lines; i++ )
+
238  memcpy(in + i*m_i_stridepix, in + m_i_cols*i, m_i_cols*sizeof(float) );
+
239 
+
240  //computing the gaussian filtered image
+
241  _iir_gaussfilt3(in, out, temp, m_i_cols, m_i_lines, m_i_stridepix, filt_coeffs, m_resid_ic, m_resid_step );
+
242 
+
243  return true;
+
244 }
+
245 
+
246 void FastGauss::compute_step_forward_ic(float bord_val, float *coeffs, float *i0)
+
247 {
+
248  //filter coefficients
+
249  float b0 = coeffs[0];
+
250  float a1 = coeffs[1];
+
251  float a2 = coeffs[2];
+
252  float a3 = coeffs[3];
+
253 
+
254  i0[0] = i0[1] = i0[2] = bord_val*b0/(1+a1+a2+a3);
+
255 }
+
256 
+
257 void FastGauss::compute_natural_backward_ic( float *resid_ic, float *init_cond )
+
258 {
+
259  float i0 = init_cond[0];
+
260  float i1 = init_cond[1];
+
261  float i2 = init_cond[2];
+
262 
+
263  init_cond[0]=i0*resid_ic[0]+i1*resid_ic[1]+i2*resid_ic[2];
+
264  init_cond[1]=i0*resid_ic[3]+i1*resid_ic[4]+i2*resid_ic[5];
+
265  init_cond[2]=i0*resid_ic[6]+i1*resid_ic[7]+i2*resid_ic[8];
+
266 }
+
267 
+
268 void FastGauss::add_step_backward_ic( float *resid_step, float val, float *init_cond )
+
269 {
+
270  init_cond[0] += val*resid_step[0];
+
271  init_cond[1] += val*resid_step[1];
+
272  init_cond[2] += val*resid_step[2];
+
273 }
+
274 
+
275 void FastGauss::_compute_gauss3_resids( complex<double> filt_poles[], float *filt_coeffs, float *resid_ic, float *resid_step )
+
276 {
+
277 
+
278  complex <double> p1, p2, p3, _p1, _p2, _p3;
+
279  complex <double> p1_1, p1_2, p1_3, p2_1, p2_2, p2_3, p3_1, p3_2, p3_3;
+
280  double b0, a1, a2, a3;
+
281 
+
282  _p1 = filt_poles[0];
+
283  _p2 = filt_poles[1];
+
284  _p3 = filt_poles[2];
+
285  b0 = filt_coeffs[0];
+
286  a1 = filt_coeffs[1];
+
287  a2 = filt_coeffs[2];
+
288  a3 = filt_coeffs[3];
+
289 
+
290 
+
291  p1 = 1.0/_p1;
+
292  p2 = 1.0/_p2;
+
293  p3 = 1.0/_p3;
+
294  p1_1 = _p1;
+
295  p1_2 = p1_1*_p1;
+
296  p1_3 = p1_2*_p1;
+
297  p2_1 = _p2;
+
298  p2_2 = p2_1*_p2;
+
299  p2_3 = p2_2*_p2;
+
300  p3_1 = _p3;
+
301  p3_2 = p3_1*_p3;
+
302  p3_3 = p3_2*_p3;
+
303 
+
304  complex <double> res1a, res2a, res3a, res1b, res2b, res3b, res1c, res2c, res3c;
+
305  //a3 = -p1*p2*p3
+
306  res1a = b0/a3*p1_3/(1.0-p1_2)/(1.0-p1_1*(p2+p2_1)+p1_2)/(1.0-p1_1*(p3+p3_1)+p1_2);
+
307  res2a = b0/a3*p2_3/(1.0-p2_2)/(1.0-p2_1*(p1+p1_1)+p2_2)/(1.0-p2_1*(p3+p3_1)+p2_2);
+
308  res3a = b0/a3*p3_3/(1.0-p3_2)/(1.0-p3_1*(p2+p2_1)+p3_2)/(1.0-p3_1*(p1+p1_1)+p3_2);
+
309  res1b = p1_1*res1a;
+
310  res2b = p2_1*res2a;
+
311  res3b = p3_1*res3a;
+
312  res1c = p1_2*res1a;
+
313  res2c = p2_2*res2a;
+
314  res3c = p3_2*res3a;
+
315 
+
316  //initial condition residues
+
317  complex<double> r0, r1, r2, r3, r4, r5, r6, r7, r8;
+
318 
+
319  r0 = (-a1*res1a-a2*res1b-a3*res1c);
+
320  r1 = (-a2*res1a-a3*res1b);
+
321  r2 = (-a3*res1a);
+
322  r3 = (-a1*res2a-a2*res2b-a3*res2c);
+
323  r4 = (-a2*res2a-a3*res2b);
+
324  r5 = (-a3*res2a);
+
325  r6 = (-a1*res3a-a2*res3b-a3*res3c);
+
326  r7 = (-a2*res3a-a3*res3b);
+
327  r8 = (-a3*res3a);
+
328 
+
329  resid_ic[0] = (float)real(r0+r3+r6);
+
330  resid_ic[1] = (float)real(r1+r4+r7);
+
331  resid_ic[2] = (float)real(r2+r5+r8);
+
332  resid_ic[3] = (float)real(r0*p1+r3*p2+r6*p3);
+
333  resid_ic[4] = (float)real(r1*p1+r4*p2+r7*p3);
+
334  resid_ic[5] = (float)real(r2*p1+r5*p2+r8*p3);
+
335  resid_ic[6] = (float)real(r0*p1*p1+r3*p2*p2+r6*p3*p3);
+
336  resid_ic[7] = (float)real(r1*p1*p1+r4*p2*p2+r7*p3*p3);
+
337  resid_ic[8] = (float)real(r2*p1*p1+r5*p2*p2+r8*p3*p3);
+
338 
+
339  //step residues
+
340  complex <double> res1, res2, res3, res4;
+
341 
+
342  res1 = b0*res1a/(1.0-_p1);
+
343  res2 = b0*res2a/(1.0-_p2);
+
344  res3 = b0*res3a/(1.0-_p3);
+
345  res4 = b0*b0/(1+a1+a2+a3)/(1+a1+a2+a3);
+
346  resid_step[0] = (float)real(res1+res2+res3+res4);
+
347  resid_step[1] = (float)real(res1*p1+res2*p2+res3*p3+res4);
+
348  resid_step[2] = (float)real(res1*p1*p1+res2*p2*p2+res3*p3*p3+res4);
+
349 }
+
350 
+
351 
+
Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.
+
Functions for generic, 3 tap, iir filtering.
+
void iir_filt_forward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
Functions iir_filt_forward and iir_filt_backward do a 3 tap recursive filtering operation on floating...
Definition: IIRFilt.cpp:19
+
Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2).
+
void calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[])
5 tap second derivative filter with Linf norm approximation
+
void calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs)
Compute the coefficients of the filter for scale s, given the poles at scale 2.
+
const complex< double > d0_N3_Linf[]
5 tap gaussian filter with L2 norm approximation
+
+ + + + diff --git a/doxygen/doc/html/FastGauss_8h.html b/doxygen/doc/html/FastGauss_8h.html new file mode 100644 index 0000000..8d1f63c --- /dev/null +++ b/doxygen/doc/html/FastGauss_8h.html @@ -0,0 +1,92 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/FastGauss.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FastGauss.h File Reference
+
+
+ +

Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. +More...

+
#include <complex>
+
+

Go to the source code of this file.

+

Detailed Description

+

Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.

+
See also
"Fast IIR Isotropic 2-D Complex Gabor Filters With Boundary Initialization", A. Bernardino and J. Santos-Victor, 2006.
+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Released under GNU GPL v2.0
+ +

Definition in file FastGauss.h.

+
+ + + + diff --git a/doxygen/doc/html/FastGauss_8h_source.html b/doxygen/doc/html/FastGauss_8h_source.html new file mode 100644 index 0000000..6f20d27 --- /dev/null +++ b/doxygen/doc/html/FastGauss_8h_source.html @@ -0,0 +1,131 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/FastGauss.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
FastGauss.h
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
18 #ifndef _FASTGAUSS_H_
+
19 #define _FASTGAUSS_H_
+
20 
+
21 #include <complex>
+
22 using namespace std;
+
23 
+
24 
+
25 class FastGauss
+
26 {
+
27 private:
+
28 
+
29  bool m_bAllocated;
+
30  float * temp;
+
31 
+
32 protected:
+
33  long m_i_lines; //image height (pixels)
+
34  long m_i_cols; //image width (pixels)
+
35  long m_i_stridepix; //number of pixels in a line (for data aligment)
+
36  int stride; //number of bytes in a line (for data alignment) : stride = m_i_stridepix*sizeof(float)
+
37  double m_scale; //scale value (in pixels)
+
38  float *filt_coeffs; //filter coefficients (max 6 coeffs : 1 gain + 5 autoregressive coefs)
+
39  complex<double> *filt_poles; //filter poles (max 5 poles)
+
40  float *m_resid_step; //step forced response residuals for a 3 tap gauss filter.
+
41  float *m_resid_ic; //step natural response residuals for a 3 tap gauss filter.
+
42 
+
43 public:
+
44  FastGauss(void);
+
45  virtual ~FastGauss(void);
+
46  long GetLines();
+
47  long GetCols();
+
48  long GetStridePix();
+
49  double GetScale();
+
50  bool GaussFilt(float * in, float * out);
+
51  bool AllocateResources(long lines, long cols, double scale);
+
52  bool FreeResources();
+
53  bool IsAllocated();
+
54 
+
55  void compute_step_forward_ic(float bord_val, float *coeffs, float *i0);
+
56  void compute_natural_backward_ic( float *resid_ic, float *i0 );
+
57  void add_step_backward_ic( float *resid_step, float val, float *i0 );
+
58  void _iir_gaussfilt3_horz(float * in, float *tempbuf, float * out, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step);
+
59  void _iir_gaussfilt3_vert(float * inout, float *tempbuf, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step);
+
60  void _iir_gaussfilt3(float * in, float * out, float *tempbuf, int width, int height, int stridepix, float *coeffs, float *resid_ic, float *resid_step );
+
61  void _compute_gauss3_resids( complex<double> poles[], float *coeffs, float *resid_ic, float *resid_step );
+
62 };
+
63 
+
64 #endif /*_FASTGAUSS_H_*/
+
+ + + + diff --git a/doxygen/doc/html/IIRFilt_8cpp_source.html b/doxygen/doc/html/IIRFilt_8cpp_source.html new file mode 100644 index 0000000..f1c2f13 --- /dev/null +++ b/doxygen/doc/html/IIRFilt_8cpp_source.html @@ -0,0 +1,211 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/IIRFilt.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
IIRFilt.cpp
+
+
+
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
17 #include <iCub/IIRFilt.h>
+
18 
+
19 void iir_filt_forward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
+
20 {
+
21  int j;
+
22  float b0 = coeffs[0];
+
23  float a1 = coeffs[1];
+
24  float a2 = coeffs[2];
+
25  float a3 = coeffs[3];
+
26 
+
27  out[0] = b0*in[0] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
28  out[1*stepout] = b0*in[stepin] - a1*out[0] - a2*i0[0] - a3*i0[1];
+
29  out[2*stepout] = b0*in[2*stepin] - a1*out[stepout] - a2*out[0] - a3*i0[0];
+
30  for(j = 3; j < length; j++)
+
31  out[j*stepout] = b0*in[j*stepin] - a1*out[(j-1)*stepout] - a2*out[(j-2)*stepout] - a3*out[(j-3)*stepout];
+
32 }
+
33 
+
34 
+
35 void iir_filt_backward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
+
36 {
+
37  int j;
+
38  float b0 = coeffs[0];
+
39  float a1 = coeffs[1];
+
40  float a2 = coeffs[2];
+
41  float a3 = coeffs[3];
+
42 
+
43  out[(length-1)*stepout] = b0*in[(length-1)*stepin] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
44  out[(length-2)*stepout] = b0*in[(length-2)*stepin] - a1*out[(length-1)*stepout] - a2*i0[0] - a3*i0[1];
+
45  out[(length-3)*stepout] = b0*in[(length-3)*stepin] - a1*out[(length-2)*stepout] - a2*out[(length-1)*stepout] - a3*i0[0];
+
46  for(j = length-4; j >= 0; j--)
+
47  out[j*stepout] = b0*in[j*stepin] - a1*out[(j+1)*stepout] - a2*out[(j+2)*stepout] - a3*out[(j+3)*stepout];
+
48 }
+
49 
+
50 void iir_filt_forward(float *in, float *out, int length, float *coeffs, float *i0)
+
51 {
+
52  int j;
+
53  float b0 = coeffs[0];
+
54  float a1 = coeffs[1];
+
55  float a2 = coeffs[2];
+
56  float a3 = coeffs[3];
+
57 
+
58  out[0] = b0*in[0] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
59  out[1] = b0*in[1] - a1*out[0] - a2*i0[0] - a3*i0[1];
+
60  out[2] = b0*in[2] - a1*out[1] - a2*out[0] - a3*i0[0];
+
61  for(j = 3; j < length; j++)
+
62  out[j] = b0*in[j] - a1*out[j-1] - a2*out[j-2] - a3*out[j-3];
+
63 }
+
64 
+
65 
+
66 void iir_filt_backward(float *in, float *out, int length, float *coeffs, float *i0)
+
67 {
+
68  int j;
+
69  float b0 = coeffs[0];
+
70  float a1 = coeffs[1];
+
71  float a2 = coeffs[2];
+
72  float a3 = coeffs[3];
+
73 
+
74  out[length-1] = b0*in[length-1] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
75  out[length-2] = b0*in[length-2] - a1*out[length-1] - a2*i0[0] - a3*i0[1];
+
76  out[length-3] = b0*in[length-3] - a1*out[length-2] - a2*out[length-1] - a3*i0[0];
+
77  for(j = length-4; j >= 0; j--)
+
78  out[j] = b0*in[j] - a1*out[j+1] - a2*out[j+2] - a3*out[j+3];
+
79 }
+
80 
+
81 void iir_filt_forward(float *in, float *out, int stepout, int length, float *coeffs, float *i0)
+
82 {
+
83  int j;
+
84  float b0 = coeffs[0];
+
85  float a1 = coeffs[1];
+
86  float a2 = coeffs[2];
+
87  float a3 = coeffs[3];
+
88 
+
89  out[0] = b0*in[0] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
90  out[1*stepout] = b0*in[1] - a1*out[0] - a2*i0[0] - a3*i0[1];
+
91  out[2*stepout] = b0*in[2] - a1*out[stepout] - a2*out[0] - a3*i0[0];
+
92  for(j = 3; j < length; j++)
+
93  out[j*stepout] = b0*in[j] - a1*out[(j-1)*stepout] - a2*out[(j-2)*stepout] - a3*out[(j-3)*stepout];
+
94 }
+
95 
+
96 
+
97 void iir_filt_backward(float *in, float *out, int stepout, int length, float *coeffs, float *i0)
+
98 {
+
99  int j;
+
100  float b0 = coeffs[0];
+
101  float a1 = coeffs[1];
+
102  float a2 = coeffs[2];
+
103  float a3 = coeffs[3];
+
104 
+
105  out[(length-1)*stepout] = b0*in[length-1] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
106  out[(length-2)*stepout] = b0*in[length-2] - a1*out[(length-1)*stepout] - a2*i0[0] - a3*i0[1];
+
107  out[(length-3)*stepout] = b0*in[length-3] - a1*out[(length-2)*stepout] - a2*out[(length-1)*stepout] - a3*i0[0];
+
108  for(j = length-4; j >= 0; j--)
+
109  out[j*stepout] = b0*in[j] - a1*out[(j+1)*stepout] - a2*out[(j+2)*stepout] - a3*out[(j+3)*stepout];
+
110 }
+
111 
+
112 void iir_filt_forward(float *in, int stepin, float *out, int length, float *coeffs, float *i0)
+
113 {
+
114  int j;
+
115  float b0 = coeffs[0];
+
116  float a1 = coeffs[1];
+
117  float a2 = coeffs[2];
+
118  float a3 = coeffs[3];
+
119 
+
120  out[0] = b0*in[0] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
121  out[1] = b0*in[stepin] - a1*out[0] - a2*i0[0] - a3*i0[1];
+
122  out[2] = b0*in[2*stepin] - a1*out[1] - a2*out[0] - a3*i0[0];
+
123  for(j = 3; j < length; j++)
+
124  out[j] = b0*in[j*stepin] - a1*out[j-1] - a2*out[j-2] - a3*out[j-3];
+
125 }
+
126 
+
127 
+
128 void iir_filt_backward(float *in, int stepin, float *out, int length, float *coeffs, float *i0)
+
129 {
+
130  int j;
+
131  float b0 = coeffs[0];
+
132  float a1 = coeffs[1];
+
133  float a2 = coeffs[2];
+
134  float a3 = coeffs[3];
+
135 
+
136  out[length-1] = b0*in[(length-1)*stepin] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
137  out[length-2] = b0*in[(length-2)*stepin] - a1*out[length-1] - a2*i0[0] - a3*i0[1];
+
138  out[length-3] = b0*in[(length-3)*stepin] - a1*out[length-2] - a2*out[length-1] - a3*i0[0];
+
139  for(j = length-4; j >= 0; j--)
+
140  out[j] = b0*in[j*stepin] - a1*out[j+1] - a2*out[j+2] - a3*out[j+3];
+
141 }
+
Functions for generic, 3 tap, iir filtering.
+
void iir_filt_forward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
Functions iir_filt_forward and iir_filt_backward do a 3 tap recursive filtering operation on floating...
Definition: IIRFilt.cpp:19
+
+ + + + diff --git a/doxygen/doc/html/IIRFilt_8h.html b/doxygen/doc/html/IIRFilt_8h.html new file mode 100644 index 0000000..bf89d8d --- /dev/null +++ b/doxygen/doc/html/IIRFilt_8h.html @@ -0,0 +1,220 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/IIRFilt.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
IIRFilt.h File Reference
+
+
+ +

Functions for generic, 3 tap, iir filtering. +More...

+ +

Go to the source code of this file.

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

+Functions

void iir_filt_forward (float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
 Functions iir_filt_forward and iir_filt_backward do a 3 tap recursive filtering operation on floating point buffers. More...
 
+void iir_filt_backward (float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
 
+void iir_filt_forward (float *in, float *out, int length, float *coeffs, float *i0)
 
+void iir_filt_backward (float *in, float *out, int length, float *coeffs, float *i0)
 
+void iir_filt_forward (float *in, float *out, int stepout, int length, float *coeffs, float *i0)
 
+void iir_filt_backward (float *in, float *out, int stepout, int length, float *coeffs, float *i0)
 
+void iir_filt_forward (float *in, int stepin, float *out, int length, float *coeffs, float *i0)
 
+void iir_filt_backward (float *in, int stepin, float *out, int length, float *coeffs, float *i0)
 
+

Detailed Description

+

Functions for generic, 3 tap, iir filtering.

+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Release under GNU GPL v2.0
+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Released under GNU GPL v2.0
+
See also
IIRFilt.h
+ +

Definition in file IIRFilt.h.

+

Function Documentation

+ +

◆ iir_filt_forward()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void iir_filt_forward (float * in,
int stepin,
float * out,
int stepout,
int length,
float * coeffs,
float * i0 
)
+
+ +

Functions iir_filt_forward and iir_filt_backward do a 3 tap recursive filtering operation on floating point buffers.

+

Forward filtering:

+\[ y(t) = b_0 x(t) - a_1 y(t-1) - a_2 y(t-2) - a_3 y(t-3) \] +

+
Parameters
+ + + + + + + + +
inFloating point buffer with the input signal.
stepinSpacing between consecutive input signal samples.
outFloating point buffer to store the computation results.
stepoutSpacing between consecutive output buffer samples.
lengthNumber of samples to process (N)
coeffsFilter coefficients. A length 4 floating point array containing $(b_0, a_1, a_2, a_3)$
i0Filter boundary conditions. A length 3 floating point array containing:
    +
  • in the forward filtering case $(y_{-1}, y_{-2}, y_{-3})$
  • +
  • in the backward filtering case $(y_{N}, y_{N+1}, y_{N+2})$
  • +
+
+
+
+
Note
Several overloads exist for the cases when stepin or stepout parameters are unitary.
+ +

Definition at line 19 of file IIRFilt.cpp.

+
20 {
+
21  int j;
+
22  float b0 = coeffs[0];
+
23  float a1 = coeffs[1];
+
24  float a2 = coeffs[2];
+
25  float a3 = coeffs[3];
+
26 
+
27  out[0] = b0*in[0] - a1*i0[0] - a2*i0[1] - a3*i0[2];
+
28  out[1*stepout] = b0*in[stepin] - a1*out[0] - a2*i0[0] - a3*i0[1];
+
29  out[2*stepout] = b0*in[2*stepin] - a1*out[stepout] - a2*out[0] - a3*i0[0];
+
30  for(j = 3; j < length; j++)
+
31  out[j*stepout] = b0*in[j*stepin] - a1*out[(j-1)*stepout] - a2*out[(j-2)*stepout] - a3*out[(j-3)*stepout];
+
32 }
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/IIRFilt_8h_source.html b/doxygen/doc/html/IIRFilt_8h_source.html new file mode 100644 index 0000000..f131aa7 --- /dev/null +++ b/doxygen/doc/html/IIRFilt_8h_source.html @@ -0,0 +1,110 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/IIRFilt.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
IIRFilt.h
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
16 #ifndef _IIRFILT_H_
+
17 #define _IIRFILT_H_
+
18 
+
19 
+
43 void iir_filt_forward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0);
+
44 
+
45 void iir_filt_backward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0);
+
46 
+
47 void iir_filt_forward(float *in, float *out, int length, float *coeffs, float *i0);
+
48 
+
49 void iir_filt_backward(float *in, float *out, int length, float *coeffs, float *i0);
+
50 
+
51 void iir_filt_forward(float *in, float *out, int stepout, int length, float *coeffs, float *i0);
+
52 
+
53 void iir_filt_backward(float *in, float *out, int stepout, int length, float *coeffs, float *i0);
+
54 
+
55 void iir_filt_forward(float *in, int stepin, float *out, int length, float *coeffs, float *i0);
+
56 
+
57 void iir_filt_backward(float *in, int stepin, float *out, int length, float *coeffs, float *i0);
+
58 
+
59 
+
60 #endif
+
61 
+
62 
+
63 
+
void iir_filt_forward(float *in, int stepin, float *out, int stepout, int length, float *coeffs, float *i0)
Functions iir_filt_forward and iir_filt_backward do a 3 tap recursive filtering operation on floating...
Definition: IIRFilt.cpp:19
+
+ + + + diff --git a/doxygen/doc/html/IIRGausDeriv_8cpp.html b/doxygen/doc/html/IIRGausDeriv_8cpp.html new file mode 100644 index 0000000..144572d --- /dev/null +++ b/doxygen/doc/html/IIRGausDeriv_8cpp.html @@ -0,0 +1,515 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/IIRGausDeriv.cpp File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
IIRGausDeriv.cpp File Reference
+
+
+ +

Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). +More...

+
#include <complex>
+#include <iCub/IIRFilt.h>
+
+

Go to the source code of this file.

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

+Functions

void calc_poles (int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[])
 5 tap second derivative filter with Linf norm approximation More...
 
void calc_coeffs (int taps, const complex< double > poles[], float *coeffs)
 Compute the coefficients of the filter, given its poles. More...
 
void calc_coeffs (int taps, const complex< double > poles[], const double s, float *coeffs)
 Compute the coefficients of the filter for scale s, given the poles at scale 2. More...
 
+ + + +

+Variables

const complex< double > d0_N3_Linf []
 
+

Detailed Description

+

Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2).

+
See also
"Recursive Gaussian Derivative Filters", L.van.Vliet,I.T.Young and P.W.Verbeek, 1998
+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Released under GNU GPL v2.0
+ +

Definition in file IIRGausDeriv.cpp.

+

Function Documentation

+ +

◆ calc_coeffs() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void calc_coeffs (int taps,
const complex< double > poles[],
const double s,
float * coeffs 
)
+
+ +

Compute the coefficients of the filter for scale s, given the poles at scale 2.

+
Parameters
+ + + + + +
tapsNumber of taps (3, 4, or 5)
polesPoles of the scale 2 filter.
scaleRequired filter scale (values between 1 and 100 are OK).
coeffsComputed coefficients $(b_0, a_1, a_2, a_3)$:
    +
  • $ b_0 $ is the gain
  • +
  • $ (a_1, a_2, a_3)$ are the autoregressive coefficients
  • +
+
+
+
+ +

Definition at line 251 of file IIRGausDeriv.cpp.

+
252 {
+
253 
+
254  if((taps < 3)||(taps>5))
+
255  throw "Invalid number of taps in calc_coeffs";
+
256 
+
257  if(coeffs == NULL)
+
258  throw "NULL Pointer argument in calc_coeffs";
+
259 
+
260  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
261  d1_2 = poles[0];
+
262  d2_2 = poles[1];
+
263  d3_2 = poles[2];
+
264  if(taps > 3)
+
265  d4_2 = poles[3];
+
266  else
+
267  d4_2 = 0;
+
268  if(taps > 4)
+
269  d5_2 = poles[4];
+
270  else
+
271  d5_2 = 0;
+
272 
+
273  double q, std, lambda;
+
274  double tol = 0.01;
+
275  complex <double> j(0,1), var;
+
276  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
277  // computing new values for the poles
+
278  q = s/2;
+
279  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
280  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
281  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
282  if( abs(d4_2) != 0 )
+
283  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
284  else
+
285  d4_s = 0;
+
286  if( abs(d5_2) != 0 )
+
287  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
288  else
+
289  d5_s = 0;
+
290  // computing the variance of the new filter
+
291  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
292  std = sqrt(var.real());
+
293  while( fabs(s-std) > tol )
+
294  {
+
295  lambda = s/std;
+
296  q = q*lambda;
+
297  // computing new values for the poles
+
298  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
299  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
300  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
301  if( abs(d4_2) != 0)
+
302  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
303  else
+
304  d4_s = 0;
+
305  if( abs(d5_2) != 0)
+
306  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
307  else
+
308  d5_s = 0;
+
309  // computing the variance of the new filter
+
310  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
311  std = sqrt(var.real());
+
312  }
+
313 
+
314  //computing the filter coeffs
+
315  if( taps == 3 )
+
316  {
+
317  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
318  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
319  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
320  coeffs[3] = (float)real(-b);
+
321  coeffs[4] = 0.0f;
+
322  coeffs[5] = 0.0f;
+
323  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
324  }
+
325  else if(taps == 4)
+
326  {
+
327  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
328  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
329  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
330  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
331  coeffs[4] = (float)real(b);
+
332  coeffs[5] = 0.0f;
+
333  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
334  }
+
335  else if(taps == 5)
+
336  {
+
337  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
338  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
339  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
340  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
341  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
342  coeffs[5] = (float)real(-b);
+
343  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
344  }
+
345 }
+
+
+
+ +

◆ calc_coeffs() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void calc_coeffs (int taps,
const complex< double > poles[],
float * coeffs 
)
+
+ +

Compute the coefficients of the filter, given its poles.

+
Parameters
+ + + + +
tapsNumber of taps (3, 4, or 5)
polesPoles of the filter.
coeffsComputed coefficients $(b_0, a_1, a_2, a_3)$:
    +
  • $ b_0 $ is the gain
  • +
  • $ (a_1, a_2, a_3)$ are the autoregressive coefficients
  • +
+
+
+
+ +

Definition at line 192 of file IIRGausDeriv.cpp.

+
193 {
+
194  if((taps < 3)||(taps>5))
+
195  throw "Invalid number of taps in calc_coeffs";
+
196 
+
197  if(coeffs == NULL)
+
198  throw "NULL Pointer argument in calc_coeffs";
+
199 
+
200  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
201  d1_s = poles[0];
+
202  d2_s = poles[1];
+
203  d3_s = poles[2];
+
204  if(taps > 3)
+
205  d4_s = poles[3];
+
206  else
+
207  d4_s = 0;
+
208  if(taps > 4)
+
209  d5_s = poles[4];
+
210  else
+
211  d5_s = 0;
+
212 
+
213  //computing the filter coeffs
+
214  if( taps == 3 )
+
215  {
+
216  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
217  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
218  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
219  coeffs[3] = (float)real(-b);
+
220  coeffs[4] = 0.0f;
+
221  coeffs[5] = 0.0f;
+
222  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
223  }
+
224  else if(taps == 4)
+
225  {
+
226  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
227  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
228  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
229  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
230  coeffs[4] = (float)real(b);
+
231  coeffs[5] = 0.0f;
+
232  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
233  }
+
234  else if(taps == 5)
+
235  {
+
236  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
237  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
238  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
239  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
240  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
241  coeffs[5] = (float)real(-b);
+
242  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
243  }
+
244 }
+
+
+
+ +

◆ calc_poles()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void calc_poles (int taps,
const double scale,
const complex< double > oldpoles[],
complex< double > newpoles[] 
)
+
+ +

5 tap second derivative filter with Linf norm approximation

+

Compute the poles of the filter for scale s, given the poles at scale 2

Parameters
+ + + + + +
tapsNumber of taps (3, 4, or 5)
scaleRequired filter scale (values between 1 and 100 are OK).
oldpolesPoles of the scale 2 filter.
newpolesPoles of the computed filter
+
+
+ +

Definition at line 121 of file IIRGausDeriv.cpp.

+
122 {
+
123  if((taps < 3)||(taps>5))
+
124  throw "Invalid number of taps in calc_poles";
+
125 
+
126  if(newpoles == NULL)
+
127  throw "NULL Pointer argument in calc_poles";
+
128 
+
129  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
130  d1_2 = oldpoles[0];
+
131  d2_2 = oldpoles[1];
+
132  d3_2 = oldpoles[2];
+
133  if(taps > 3)
+
134  d4_2 = oldpoles[3];
+
135  else
+
136  d4_2 = 0;
+
137  if(taps > 4)
+
138  d5_2 = oldpoles[4];
+
139  else
+
140  d5_2 = 0;
+
141 
+
142  double q, std, lambda;
+
143  double tol = 0.01;
+
144  complex <double> j(0,1), var;
+
145  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
146  // computing new values for the poles
+
147  q = scale/2;
+
148  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
149  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
150  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
151  if( abs(d4_2) != 0 )
+
152  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
153  else
+
154  d4_s = 0;
+
155  if( abs(d5_2) != 0 )
+
156  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
157  else
+
158  d5_s = 0;
+
159  // computing the variance of the new filter
+
160  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
161  std = sqrt(var.real());
+
162  while( fabs(scale-std) > tol )
+
163  {
+
164  lambda = scale/std;
+
165  q = q*lambda;
+
166  // computing new values for the poles
+
167  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
168  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
169  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
170  if( abs(d4_2) != 0)
+
171  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
172  else
+
173  d4_s = 0;
+
174  if( abs(d5_2) != 0)
+
175  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
176  else
+
177  d5_s = 0;
+
178  // computing the variance of the new filter
+
179  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
180  std = sqrt(var.real());
+
181  }
+
182  newpoles[0] = d1_s;
+
183  newpoles[1] = d2_s;
+
184  newpoles[2] = d3_s;
+
185  newpoles[3] = d4_s;
+
186  newpoles[4] = d5_s;
+
187 }
+
+
+
+

Variable Documentation

+ +

◆ d0_N3_Linf

+ +
+
+ + + + + +
+ + + + +
const complex<double> d0_N3_Linf[]
+
+extern
+
+Initial value:
= {
+
complex<double>(1.40098,1.00236),
+
complex<double>(1.40098,-1.00236),
+
complex<double>(1.85132,0),
+
}
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/IIRGausDeriv_8cpp_source.html b/doxygen/doc/html/IIRGausDeriv_8cpp_source.html new file mode 100644 index 0000000..ab78a5e --- /dev/null +++ b/doxygen/doc/html/IIRGausDeriv_8cpp_source.html @@ -0,0 +1,431 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/IIRGausDeriv.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
IIRGausDeriv.cpp
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
18 #include <complex>
+
19 using namespace std;
+
20 
+
21 #include <iCub/IIRFilt.h>
+
22 
+
23 //
+
24 //Values of the pole locations for the iir recursive gaussian derivative filters of scale s = 2.
+
25 //From "Recursive Gaussian Derivative Filters", L.van.Vliet,Ian.T.Young and Piet.W.Verbeek
+
26 //
+
27 
+
28 // d - differentiation order
+
29 // N - number of poles
+
30 // L - approximation norm
+
31 
+
32 static const complex<double> d0_N3_L2[] = {
+
33  complex<double>(1.41650,1.00829),
+
34  complex<double>(1.41650,-1.00829),
+
35  complex<double>(1.86543,0),
+
36 };
+
37 
+
38 static const complex<double> d0_N4_L2[] = {
+
39  complex<double>(1.13228,1.28114),
+
40  complex<double>(1.13228,-1.28114),
+
41  complex<double>(1.78534,0.46763),
+
42  complex<double>(1.78534,-0.46763),
+
43 };
+
44 
+
45 static const complex<double> d0_N5_L2[] = {
+
46  complex<double>(0.86430,1.45389),
+
47  complex<double>(0.86430,-1.45389),
+
48  complex<double>(1.61433,0.83134),
+
49  complex<double>(1.61433,-0.83134),
+
50  complex<double>(1.87504,0),
+
51 };
+
52 
+
53 extern const complex<double> d0_N3_Linf[] = {
+
54  complex<double>(1.40098,1.00236),
+
55  complex<double>(1.40098,-1.00236),
+
56  complex<double>(1.85132,0),
+
57 };
+
58 
+
59 static const complex<double> d0_N4_Linf[] = {
+
60  complex<double>(1.12075,1.27788),
+
61  complex<double>(1.12075,-1.27788),
+
62  complex<double>(1.76952,0.46611),
+
63  complex<double>(1.76952,-0.46611),
+
64 };
+
65 
+
66 static const complex<double> d0_N5_Linf[] = {
+
67  complex<double>(0.85480,1.43749),
+
68  complex<double>(0.85480,-1.43749),
+
69  complex<double>(1.61231,0.82053),
+
70  complex<double>(1.61231,-0.82053),
+
71  complex<double>(1.87415,0)
+
72 };
+
73 
+
74 static const complex<double> d1_N3_Linf[] = {
+
75  complex<double>(1.31553,0.97057),
+
76  complex<double>(1.31553,-0.97057),
+
77  complex<double>(1.77635,0),
+
78 };
+
79 
+
80 static const complex<double> d1_N4_Linf[] = {
+
81  complex<double>(1.04185,1.24034),
+
82  complex<double>(1.04185,-1.24034),
+
83  complex<double>(1.69747,0.44790),
+
84  complex<double>(1.69747,-0.44790),
+
85 
+
86 };
+
87 
+
88 static const complex<double> d1_N5_Linf[] = {
+
89  complex<double>(0.77934,1.41423),
+
90  complex<double>(0.77934,-1.41423),
+
91  complex<double>(1.50941,0.80828),
+
92  complex<double>(1.50941,-0.80828),
+
93  complex<double>(1.77181,0)
+
94 };
+
95 
+
96 
+
97 static const complex<double> d3_N3_Linf[] = {
+
98  complex<double>(1.22886,0.93058),
+
99  complex<double>(1.22886,-0.93058),
+
100  complex<double>(1.70493,0),
+
101 };
+
102 
+
103 static const complex<double> d2_N4_Linf[] = {
+
104  complex<double>(0.94570,1.21064),
+
105  complex<double>(0.94570,-1.21064),
+
106  complex<double>(1.60161,0.42647),
+
107  complex<double>(1.60161,-0.42647),
+
108 };
+
109 
+
110 static const complex<double> d2_N5_Linf[] = {
+
111  complex<double>(0.69843,1.37655),
+
112  complex<double>(0.69843,-1.37655),
+
113  complex<double>(1.42631,0.77399),
+
114  complex<double>(1.42631,-0.77399),
+
115  complex<double>(1.69668,0)
+
116 };
+
117 
+
118 
+
119 
+
120 //compute the poles of the filter for scale s given the poles at scale 2
+
121 void calc_poles(int taps, const double scale, const complex<double> oldpoles[], complex<double> newpoles[])
+
122 {
+
123  if((taps < 3)||(taps>5))
+
124  throw "Invalid number of taps in calc_poles";
+
125 
+
126  if(newpoles == NULL)
+
127  throw "NULL Pointer argument in calc_poles";
+
128 
+
129  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
130  d1_2 = oldpoles[0];
+
131  d2_2 = oldpoles[1];
+
132  d3_2 = oldpoles[2];
+
133  if(taps > 3)
+
134  d4_2 = oldpoles[3];
+
135  else
+
136  d4_2 = 0;
+
137  if(taps > 4)
+
138  d5_2 = oldpoles[4];
+
139  else
+
140  d5_2 = 0;
+
141 
+
142  double q, std, lambda;
+
143  double tol = 0.01;
+
144  complex <double> j(0,1), var;
+
145  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
146  // computing new values for the poles
+
147  q = scale/2;
+
148  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
149  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
150  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
151  if( abs(d4_2) != 0 )
+
152  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
153  else
+
154  d4_s = 0;
+
155  if( abs(d5_2) != 0 )
+
156  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
157  else
+
158  d5_s = 0;
+
159  // computing the variance of the new filter
+
160  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
161  std = sqrt(var.real());
+
162  while( fabs(scale-std) > tol )
+
163  {
+
164  lambda = scale/std;
+
165  q = q*lambda;
+
166  // computing new values for the poles
+
167  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
168  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
169  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
170  if( abs(d4_2) != 0)
+
171  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
172  else
+
173  d4_s = 0;
+
174  if( abs(d5_2) != 0)
+
175  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
176  else
+
177  d5_s = 0;
+
178  // computing the variance of the new filter
+
179  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
180  std = sqrt(var.real());
+
181  }
+
182  newpoles[0] = d1_s;
+
183  newpoles[1] = d2_s;
+
184  newpoles[2] = d3_s;
+
185  newpoles[3] = d4_s;
+
186  newpoles[4] = d5_s;
+
187 }
+
188 
+
189 //compute the coefficients of the filter, given its poles
+
190 //the output is written in array coeffs - the first element is the gain and
+
191 //the remaining elements correspond to the autoregressive coefficients
+
192 void calc_coeffs(int taps, const complex<double> poles[], float *coeffs)
+
193 {
+
194  if((taps < 3)||(taps>5))
+
195  throw "Invalid number of taps in calc_coeffs";
+
196 
+
197  if(coeffs == NULL)
+
198  throw "NULL Pointer argument in calc_coeffs";
+
199 
+
200  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
201  d1_s = poles[0];
+
202  d2_s = poles[1];
+
203  d3_s = poles[2];
+
204  if(taps > 3)
+
205  d4_s = poles[3];
+
206  else
+
207  d4_s = 0;
+
208  if(taps > 4)
+
209  d5_s = poles[4];
+
210  else
+
211  d5_s = 0;
+
212 
+
213  //computing the filter coeffs
+
214  if( taps == 3 )
+
215  {
+
216  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
217  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
218  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
219  coeffs[3] = (float)real(-b);
+
220  coeffs[4] = 0.0f;
+
221  coeffs[5] = 0.0f;
+
222  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
223  }
+
224  else if(taps == 4)
+
225  {
+
226  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
227  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
228  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
229  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
230  coeffs[4] = (float)real(b);
+
231  coeffs[5] = 0.0f;
+
232  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
233  }
+
234  else if(taps == 5)
+
235  {
+
236  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
237  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
238  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
239  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
240  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
241  coeffs[5] = (float)real(-b);
+
242  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
243  }
+
244 }
+
245 
+
246 
+
247 
+
248 //compute the coefficients of the filter for scale s given the poles at scale 2
+
249 //the output is written in array coeffs - the first element is the gain and
+
250 //the remaining elements correspond to the autoregressive coefficients
+
251 void calc_coeffs(int taps, const complex<double> poles[], const double s, float *coeffs)
+
252 {
+
253 
+
254  if((taps < 3)||(taps>5))
+
255  throw "Invalid number of taps in calc_coeffs";
+
256 
+
257  if(coeffs == NULL)
+
258  throw "NULL Pointer argument in calc_coeffs";
+
259 
+
260  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
261  d1_2 = poles[0];
+
262  d2_2 = poles[1];
+
263  d3_2 = poles[2];
+
264  if(taps > 3)
+
265  d4_2 = poles[3];
+
266  else
+
267  d4_2 = 0;
+
268  if(taps > 4)
+
269  d5_2 = poles[4];
+
270  else
+
271  d5_2 = 0;
+
272 
+
273  double q, std, lambda;
+
274  double tol = 0.01;
+
275  complex <double> j(0,1), var;
+
276  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
277  // computing new values for the poles
+
278  q = s/2;
+
279  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
280  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
281  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
282  if( abs(d4_2) != 0 )
+
283  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
284  else
+
285  d4_s = 0;
+
286  if( abs(d5_2) != 0 )
+
287  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
288  else
+
289  d5_s = 0;
+
290  // computing the variance of the new filter
+
291  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
292  std = sqrt(var.real());
+
293  while( fabs(s-std) > tol )
+
294  {
+
295  lambda = s/std;
+
296  q = q*lambda;
+
297  // computing new values for the poles
+
298  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
299  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
300  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
301  if( abs(d4_2) != 0)
+
302  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
303  else
+
304  d4_s = 0;
+
305  if( abs(d5_2) != 0)
+
306  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
307  else
+
308  d5_s = 0;
+
309  // computing the variance of the new filter
+
310  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
311  std = sqrt(var.real());
+
312  }
+
313 
+
314  //computing the filter coeffs
+
315  if( taps == 3 )
+
316  {
+
317  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
318  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
319  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
320  coeffs[3] = (float)real(-b);
+
321  coeffs[4] = 0.0f;
+
322  coeffs[5] = 0.0f;
+
323  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
324  }
+
325  else if(taps == 4)
+
326  {
+
327  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
328  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
329  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
330  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
331  coeffs[4] = (float)real(b);
+
332  coeffs[5] = 0.0f;
+
333  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
334  }
+
335  else if(taps == 5)
+
336  {
+
337  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
338  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
339  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
340  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
341  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
342  coeffs[5] = (float)real(-b);
+
343  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
344  }
+
345 }
+
346 
+
347 
+
348 
+
349 
+
350 
+
Functions for generic, 3 tap, iir filtering.
+
void calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[])
5 tap second derivative filter with Linf norm approximation
+
void calc_coeffs(int taps, const complex< double > poles[], float *coeffs)
Compute the coefficients of the filter, given its poles.
+
const complex< double > d0_N4_L2[]
3 tap gaussian filter with L2 norm approximation
+
const complex< double > d1_N4_Linf[]
3 tap first derivative filter with Linf norm approximation
+
const complex< double > d0_N5_Linf[]
4 tap gaussian filter with Linf norm approximation
+
const complex< double > d0_N4_Linf[]
3 tap gaussian filter with Linf norm approximation
+
const complex< double > d0_N5_L2[]
4 tap gaussian filter with L2 norm approximation
+
const complex< double > d0_N3_Linf[]
5 tap gaussian filter with L2 norm approximation
+
const complex< double > d1_N5_Linf[]
4 tap first derivative filter with Linf norm approximation
+
const complex< double > d2_N5_Linf[]
4 tap second derivative filter with Linf norm approximation
+
const complex< double > d2_N4_Linf[]
3 tap second derivative filter with Linf norm approximation
+
const complex< double > d1_N3_Linf[]
5 tap gaussian filter with Linf norm approximation
+
const complex< double > d0_N3_L2[]
Coefficients for scale = 2 filters.
+
+ + + + diff --git a/doxygen/doc/html/IIRGausDeriv_8h.html b/doxygen/doc/html/IIRGausDeriv_8h.html new file mode 100644 index 0000000..f4fca81 --- /dev/null +++ b/doxygen/doc/html/IIRGausDeriv_8h.html @@ -0,0 +1,532 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/IIRGausDeriv.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+ +
+
IIRGausDeriv.h File Reference
+
+
+ +

Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). +More...

+
#include <complex>
+
+

Go to the source code of this file.

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

+Functions

void calc_poles (int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[])
 5 tap second derivative filter with Linf norm approximation More...
 
void calc_coeffs (int taps, const complex< double > poles[], const double s, float *coeffs)
 Compute the coefficients of the filter for scale s, given the poles at scale 2. More...
 
void calc_coeffs (int taps, const complex< double > poles[], float *coeffs)
 Compute the coefficients of the filter, given its poles. More...
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+Variables

+const complex< double > d0_N3_L2 []
 Coefficients for scale = 2 filters.
 
+const complex< double > d0_N4_L2 []
 3 tap gaussian filter with L2 norm approximation
 
+const complex< double > d0_N5_L2 []
 4 tap gaussian filter with L2 norm approximation
 
+const complex< double > d0_N3_Linf []
 5 tap gaussian filter with L2 norm approximation
 
+const complex< double > d0_N4_Linf []
 3 tap gaussian filter with Linf norm approximation
 
+const complex< double > d0_N5_Linf []
 4 tap gaussian filter with Linf norm approximation
 
+const complex< double > d1_N3_Linf []
 5 tap gaussian filter with Linf norm approximation
 
+const complex< double > d1_N4_Linf []
 3 tap first derivative filter with Linf norm approximation
 
+const complex< double > d1_N5_Linf []
 4 tap first derivative filter with Linf norm approximation
 
+const complex< double > d2_N3_Linf []
 5 tap first derivative filter with Linf norm approximation
 
+const complex< double > d2_N4_Linf []
 3 tap second derivative filter with Linf norm approximation
 
+const complex< double > d2_N5_Linf []
 4 tap second derivative filter with Linf norm approximation
 
+

Detailed Description

+

Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2).

+
See also
From "Recursive Gaussian Derivative Filters", L.van.Vliet,I.T.Young and P.W.Verbeek, 1998
+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Release under GNU GPL v2.0
+ +

Definition in file IIRGausDeriv.h.

+

Function Documentation

+ +

◆ calc_coeffs() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void calc_coeffs (int taps,
const complex< double > poles[],
const double s,
float * coeffs 
)
+
+ +

Compute the coefficients of the filter for scale s, given the poles at scale 2.

+
Parameters
+ + + + + +
tapsNumber of taps (3, 4, or 5)
polesPoles of the scale 2 filter.
scaleRequired filter scale (values between 1 and 100 are OK).
coeffsComputed coefficients $(b_0, a_1, a_2, a_3)$:
    +
  • $ b_0 $ is the gain
  • +
  • $ (a_1, a_2, a_3)$ are the autoregressive coefficients
  • +
+
+
+
+ +

Definition at line 251 of file IIRGausDeriv.cpp.

+
252 {
+
253 
+
254  if((taps < 3)||(taps>5))
+
255  throw "Invalid number of taps in calc_coeffs";
+
256 
+
257  if(coeffs == NULL)
+
258  throw "NULL Pointer argument in calc_coeffs";
+
259 
+
260  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
261  d1_2 = poles[0];
+
262  d2_2 = poles[1];
+
263  d3_2 = poles[2];
+
264  if(taps > 3)
+
265  d4_2 = poles[3];
+
266  else
+
267  d4_2 = 0;
+
268  if(taps > 4)
+
269  d5_2 = poles[4];
+
270  else
+
271  d5_2 = 0;
+
272 
+
273  double q, std, lambda;
+
274  double tol = 0.01;
+
275  complex <double> j(0,1), var;
+
276  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
277  // computing new values for the poles
+
278  q = s/2;
+
279  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
280  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
281  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
282  if( abs(d4_2) != 0 )
+
283  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
284  else
+
285  d4_s = 0;
+
286  if( abs(d5_2) != 0 )
+
287  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
288  else
+
289  d5_s = 0;
+
290  // computing the variance of the new filter
+
291  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
292  std = sqrt(var.real());
+
293  while( fabs(s-std) > tol )
+
294  {
+
295  lambda = s/std;
+
296  q = q*lambda;
+
297  // computing new values for the poles
+
298  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
299  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
300  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
301  if( abs(d4_2) != 0)
+
302  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
303  else
+
304  d4_s = 0;
+
305  if( abs(d5_2) != 0)
+
306  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
307  else
+
308  d5_s = 0;
+
309  // computing the variance of the new filter
+
310  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
311  std = sqrt(var.real());
+
312  }
+
313 
+
314  //computing the filter coeffs
+
315  if( taps == 3 )
+
316  {
+
317  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
318  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
319  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
320  coeffs[3] = (float)real(-b);
+
321  coeffs[4] = 0.0f;
+
322  coeffs[5] = 0.0f;
+
323  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
324  }
+
325  else if(taps == 4)
+
326  {
+
327  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
328  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
329  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
330  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
331  coeffs[4] = (float)real(b);
+
332  coeffs[5] = 0.0f;
+
333  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
334  }
+
335  else if(taps == 5)
+
336  {
+
337  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
338  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
339  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
340  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
341  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
342  coeffs[5] = (float)real(-b);
+
343  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
344  }
+
345 }
+
+
+
+ +

◆ calc_coeffs() [2/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void calc_coeffs (int taps,
const complex< double > poles[],
float * coeffs 
)
+
+ +

Compute the coefficients of the filter, given its poles.

+
Parameters
+ + + + +
tapsNumber of taps (3, 4, or 5)
polesPoles of the filter.
coeffsComputed coefficients $(b_0, a_1, a_2, a_3)$:
    +
  • $ b_0 $ is the gain
  • +
  • $ (a_1, a_2, a_3)$ are the autoregressive coefficients
  • +
+
+
+
+ +

Definition at line 192 of file IIRGausDeriv.cpp.

+
193 {
+
194  if((taps < 3)||(taps>5))
+
195  throw "Invalid number of taps in calc_coeffs";
+
196 
+
197  if(coeffs == NULL)
+
198  throw "NULL Pointer argument in calc_coeffs";
+
199 
+
200  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
201  d1_s = poles[0];
+
202  d2_s = poles[1];
+
203  d3_s = poles[2];
+
204  if(taps > 3)
+
205  d4_s = poles[3];
+
206  else
+
207  d4_s = 0;
+
208  if(taps > 4)
+
209  d5_s = poles[4];
+
210  else
+
211  d5_s = 0;
+
212 
+
213  //computing the filter coeffs
+
214  if( taps == 3 )
+
215  {
+
216  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s;
+
217  coeffs[1] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s));
+
218  coeffs[2] = (float)real(b*(d1_s + d2_s + d3_s));
+
219  coeffs[3] = (float)real(-b);
+
220  coeffs[4] = 0.0f;
+
221  coeffs[5] = 0.0f;
+
222  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];
+
223  }
+
224  else if(taps == 4)
+
225  {
+
226  complex<double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s;
+
227  coeffs[1] = (float)real(-b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s));
+
228  coeffs[2] = (float)real(b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s));
+
229  coeffs[3] = (float)real(-b*(d1_s + d2_s + d3_s + d4_s));
+
230  coeffs[4] = (float)real(b);
+
231  coeffs[5] = 0.0f;
+
232  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];
+
233  }
+
234  else if(taps == 5)
+
235  {
+
236  complex <double> b = complex<double>(1.0,0.0)/d1_s/d2_s/d3_s/d4_s/d5_s;
+
237  coeffs[1] = (float)real(-b*(d4_s*d3_s*d2_s*d1_s + d5_s*d3_s*d2_s*d1_s + d5_s*d4_s*d2_s*d1_s + d5_s*d4_s*d3_s*d1_s + d5_s*d4_s*d3_s*d2_s));
+
238  coeffs[2] = (float)real(b*(d3_s*d2_s*d1_s + d4_s*d2_s*d1_s + d4_s*d3_s*d1_s + d4_s*d3_s*d2_s + d5_s*d2_s*d1_s + d5_s*d3_s*d1_s + d5_s*d3_s*d2_s + d5_s*d4_s*d1_s + d5_s*d4_s*d2_s + d5_s*d4_s*d3_s));
+
239  coeffs[3] = (float)real(-b*(d2_s*d1_s + d3_s*d1_s + d3_s*d2_s + d4_s*d1_s + d4_s*d2_s + d4_s*d3_s + d5_s*d1_s + d5_s*d2_s + d5_s*d3_s + d5_s*d4_s));
+
240  coeffs[4] = (float)real(b*(d1_s + d2_s + d3_s + d4_s + d5_s));
+
241  coeffs[5] = (float)real(-b);
+
242  coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5];
+
243  }
+
244 }
+
+
+
+ +

◆ calc_poles()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void calc_poles (int taps,
const double scale,
const complex< double > oldpoles[],
complex< double > newpoles[] 
)
+
+ +

5 tap second derivative filter with Linf norm approximation

+

Compute the poles of the filter for scale s, given the poles at scale 2

Parameters
+ + + + + +
tapsNumber of taps (3, 4, or 5)
scaleRequired filter scale (values between 1 and 100 are OK).
oldpolesPoles of the scale 2 filter.
newpolesPoles of the computed filter
+
+
+ +

Definition at line 121 of file IIRGausDeriv.cpp.

+
122 {
+
123  if((taps < 3)||(taps>5))
+
124  throw "Invalid number of taps in calc_poles";
+
125 
+
126  if(newpoles == NULL)
+
127  throw "NULL Pointer argument in calc_poles";
+
128 
+
129  complex <double> d1_2, d2_2, d3_2, d4_2, d5_2;
+
130  d1_2 = oldpoles[0];
+
131  d2_2 = oldpoles[1];
+
132  d3_2 = oldpoles[2];
+
133  if(taps > 3)
+
134  d4_2 = oldpoles[3];
+
135  else
+
136  d4_2 = 0;
+
137  if(taps > 4)
+
138  d5_2 = oldpoles[4];
+
139  else
+
140  d5_2 = 0;
+
141 
+
142  double q, std, lambda;
+
143  double tol = 0.01;
+
144  complex <double> j(0,1), var;
+
145  complex <double> d1_s, d2_s, d3_s, d4_s, d5_s;
+
146  // computing new values for the poles
+
147  q = scale/2;
+
148  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
149  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
150  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
151  if( abs(d4_2) != 0 )
+
152  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
153  else
+
154  d4_s = 0;
+
155  if( abs(d5_2) != 0 )
+
156  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
157  else
+
158  d5_s = 0;
+
159  // computing the variance of the new filter
+
160  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
161  std = sqrt(var.real());
+
162  while( fabs(scale-std) > tol )
+
163  {
+
164  lambda = scale/std;
+
165  q = q*lambda;
+
166  // computing new values for the poles
+
167  d1_s = exp(log(abs(d1_2))/q)*exp(j*arg(d1_2)/q);
+
168  d2_s = exp(log(abs(d2_2))/q)*exp(j*arg(d2_2)/q);
+
169  d3_s = exp(log(abs(d3_2))/q)*exp(j*arg(d3_2)/q);
+
170  if( abs(d4_2) != 0)
+
171  d4_s = exp(log(abs(d4_2))/q)*exp(j*arg(d4_2)/q);
+
172  else
+
173  d4_s = 0;
+
174  if( abs(d5_2) != 0)
+
175  d5_s = exp(log(abs(d5_2))/q)*exp(j*arg(d5_2)/q);
+
176  else
+
177  d5_s = 0;
+
178  // computing the variance of the new filter
+
179  var = d1_s*2.0/(d1_s-1.0)/(d1_s-1.0) + d2_s*2.0/(d2_s-1.0)/(d2_s-1.0) + d3_s*2.0/(d3_s-1.0)/(d3_s-1.0)+d4_s*2.0/(d4_s-1.0)/(d4_s-1.0)+d5_s*2.0/(d5_s-1.0)/(d5_s-1.0);
+
180  std = sqrt(var.real());
+
181  }
+
182  newpoles[0] = d1_s;
+
183  newpoles[1] = d2_s;
+
184  newpoles[2] = d3_s;
+
185  newpoles[3] = d4_s;
+
186  newpoles[4] = d5_s;
+
187 }
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/IIRGausDeriv_8h_source.html b/doxygen/doc/html/IIRGausDeriv_8h_source.html new file mode 100644 index 0000000..371ab77 --- /dev/null +++ b/doxygen/doc/html/IIRGausDeriv_8h_source.html @@ -0,0 +1,130 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/IIRGausDeriv.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
IIRGausDeriv.h
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
17 #ifndef _IIRGAUSDERIV_H_
+
18 #define _IIRGAUSDERIV_H_
+
19 
+
20 
+
21 #include <complex>
+
22 using namespace std;
+
23 
+
28 extern const complex<double> d0_N3_L2[];
+
29 extern const complex<double> d0_N4_L2[];
+
30 extern const complex<double> d0_N5_L2[];
+
31 extern const complex<double> d0_N3_Linf[];
+
32 extern const complex<double> d0_N4_Linf[];
+
33 extern const complex<double> d0_N5_Linf[];
+
34 extern const complex<double> d1_N3_Linf[];
+
35 extern const complex<double> d1_N4_Linf[];
+
36 extern const complex<double> d1_N5_Linf[];
+
37 extern const complex<double> d2_N3_Linf[];
+
38 extern const complex<double> d2_N4_Linf[];
+
39 extern const complex<double> d2_N5_Linf[];
+
48 void calc_poles(int taps, const double scale, const complex<double> oldpoles[], complex<double> newpoles[] );
+
49 
+
50 
+
51 
+
52 //compute the coefficients of the filter for scale s given the poles at scale 2
+
53 //the output is written in array coeffs - the first element is the gain and
+
54 //the remaining elements correspond to the autoregressive coefficients
+
65 void calc_coeffs(int taps, const complex<double> poles[], const double s, float *coeffs);
+
66 
+
67 
+
77 void calc_coeffs(int taps, const complex<double> poles[], float *coeffs);
+
78 
+
79 #endif
+
void calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[])
5 tap second derivative filter with Linf norm approximation
+
const complex< double > d0_N4_L2[]
3 tap gaussian filter with L2 norm approximation
+
void calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs)
Compute the coefficients of the filter for scale s, given the poles at scale 2.
+
const complex< double > d1_N4_Linf[]
3 tap first derivative filter with Linf norm approximation
+
const complex< double > d0_N5_Linf[]
4 tap gaussian filter with Linf norm approximation
+
const complex< double > d2_N3_Linf[]
5 tap first derivative filter with Linf norm approximation
+
const complex< double > d0_N4_Linf[]
3 tap gaussian filter with Linf norm approximation
+
const complex< double > d0_N5_L2[]
4 tap gaussian filter with L2 norm approximation
+
const complex< double > d0_N3_Linf[]
5 tap gaussian filter with L2 norm approximation
+
const complex< double > d1_N5_Linf[]
4 tap first derivative filter with Linf norm approximation
+
const complex< double > d2_N5_Linf[]
4 tap second derivative filter with Linf norm approximation
+
const complex< double > d2_N4_Linf[]
3 tap second derivative filter with Linf norm approximation
+
const complex< double > d1_N3_Linf[]
5 tap gaussian filter with Linf norm approximation
+
const complex< double > d0_N3_L2[]
Coefficients for scale = 2 filters.
+
+ + + + diff --git a/doxygen/doc/html/README_8md_source.html b/doxygen/doc/html/README_8md_source.html new file mode 100644 index 0000000..fe30d7c --- /dev/null +++ b/doxygen/doc/html/README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/README.md Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
/home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/README.md
+
+
+
1 # pf3dTracker
2 
3 To find out more on how to run the tracker, please refer to this [wiki page][1] 🌐
4 
5 You can also drop an email to [Matteo Taiana][2] ✉
6 
7 [1]: http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker
8 [2]: mailto:mtaiana@isr.ist.utl.pt
+ + + + diff --git a/doxygen/doc/html/ScaleSpace_8cpp.html b/doxygen/doc/html/ScaleSpace_8cpp.html new file mode 100644 index 0000000..0248bd3 --- /dev/null +++ b/doxygen/doc/html/ScaleSpace_8cpp.html @@ -0,0 +1,94 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/ScaleSpace.cpp File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ScaleSpace.cpp File Reference
+
+
+ +

Implements a Gaussian Scale Space for floating point images. +More...

+
#include <iCub/ScaleSpace.h>
+#include <cstring>
+#include <cstdlib>
+#include <cmath>
+
+

Go to the source code of this file.

+

Detailed Description

+

Implements a Gaussian Scale Space for floating point images.

+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Released under GNU GPL v2.0
+ +

Definition in file ScaleSpace.cpp.

+
+ + + + diff --git a/doxygen/doc/html/ScaleSpace_8cpp_source.html b/doxygen/doc/html/ScaleSpace_8cpp_source.html new file mode 100644 index 0000000..d6d2fbb --- /dev/null +++ b/doxygen/doc/html/ScaleSpace_8cpp_source.html @@ -0,0 +1,179 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/ScaleSpace.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ScaleSpace.cpp
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
17 #include <iCub/ScaleSpace.h>
+
18 
+
19 #include <cstring>
+
20 #include <cstdlib>
+
21 #include <cmath>
+
22 
+
23 ScaleSpace::ScaleSpace()
+
24 {
+
25  _width = _height = _levels = 0;
+
26  _allocated = false;
+
27  _scales = NULL;
+
28  _scalespace = NULL;
+
29  _filters = NULL;
+
30 }
+
31 
+
32 ScaleSpace::~ScaleSpace()
+
33 {
+
34  FreeResources();
+
35 }
+
36 
+
37 bool ScaleSpace::AllocateResources(int lines, int cols, int levels, double *scales)
+
38 {
+
39  int i;
+
40  if(lines < 10) //image too small
+
41  return false;
+
42  if(cols < 10) //image too small
+
43  return false;
+
44  if(levels < 1) //
+
45  return false;
+
46 
+
47  if(_allocated)
+
48  FreeResources();
+
49  _width = cols;
+
50  _height = lines;
+
51  _levels = levels;
+
52 
+
53  _scales = (double*)malloc(_levels*sizeof(double));
+
54  if(scales == 0) return false;
+
55  _scalespace = (float**)malloc(_levels*sizeof(float*));
+
56  if(_scalespace == 0) return false;
+
57  _filters = new FastGauss[levels];
+
58  if(_filters == 0) return false;
+
59  for(i=0; i < levels; i++)
+
60  {
+
61  _scales[i] = scales[i];
+
62  _filters[i].AllocateResources(lines, cols, _scales[i]);
+
63  _scalespace[i] = (float*)malloc(_width*_height*sizeof(float));
+
64  if(_scalespace[i] == 0) return false;
+
65  }
+
66  _allocated = true;
+
67  return true;
+
68 }
+
69 
+
70 bool ScaleSpace::FreeResources()
+
71 {
+
72  int i;
+
73  if(!_allocated)
+
74  return true;
+
75  delete [] _filters;
+
76  free(_scales);
+
77  for(i=0; i < _levels; i++)
+
78  free(_scalespace[i]);
+
79  free(_scalespace);
+
80  _allocated = false;
+
81  return true;
+
82 }
+
83 
+
85 bool ScaleSpace::BuildLevel(int level, float *in)
+
86 {
+
87  if(!_allocated)
+
88  return false;
+
89  if( level < 0 || level >= _levels )
+
90  return false;
+
91  return _filters[level].GaussFilt(in, _scalespace[level]);
+
92 }
+
93 
+
95 bool ScaleSpace::BuildAll(float *in)
+
96 {
+
97  int i;
+
98  bool retval = true;
+
99  if(!_allocated)
+
100  return false;
+
101  for(i = 0; i < _levels; i++)
+
102  retval = (retval && _filters[i].GaussFilt(in, _scalespace[i]));
+
103  return retval;
+
104 }
+
106 float* ScaleSpace::GetLevel(int level)
+
107 {
+
108  if(!_allocated)
+
109  return 0;
+
110  if( level < 0 || level >= _levels )
+
111  return 0;
+
112  return _scalespace[level];
+
113 }
+
Implements a Gaussian Scale Space for floating point images.
+
+ + + + diff --git a/doxygen/doc/html/ScaleSpace_8h.html b/doxygen/doc/html/ScaleSpace_8h.html new file mode 100644 index 0000000..db84e23 --- /dev/null +++ b/doxygen/doc/html/ScaleSpace_8h.html @@ -0,0 +1,91 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/ScaleSpace.h File Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ScaleSpace.h File Reference
+
+
+ +

Implements a Gaussian Scale Space for floating point images. +More...

+
#include <iCub/FastGauss.h>
+
+

Go to the source code of this file.

+

Detailed Description

+

Implements a Gaussian Scale Space for floating point images.

+
Author
Alex Bernardino, ISR-IST
+
Date
2006-2007
+
Note
Release under GNU GPL v2.0
+ +

Definition in file ScaleSpace.h.

+
+ + + + diff --git a/doxygen/doc/html/ScaleSpace_8h_source.html b/doxygen/doc/html/ScaleSpace_8h_source.html new file mode 100644 index 0000000..388a839 --- /dev/null +++ b/doxygen/doc/html/ScaleSpace_8h_source.html @@ -0,0 +1,120 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/ScaleSpace.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
ScaleSpace.h
+
+
+Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
+
2 
+
3 // Copyright: (C) 2006-2007 Alex Bernardino, ISR-IST
+
4 // Authors: Alex Bernardino
+
5 // CopyPolicy: Released under the terms of the GNU GPL v2.0.
+
6 
+
16 #include <iCub/FastGauss.h>
+
17 
+
18 #ifndef _SCALESPACE_H_
+
19 #define _SCALESPACE_H_
+
20 
+
21 class ScaleSpace
+
22 {
+
23 private:
+
24  int _width;
+
25  int _height;
+
26  int _levels;
+
27  double *_scales;
+
28  bool _allocated;
+
29  float **_scalespace;
+
30  FastGauss *_filters;
+
31 public:
+
33  int GetHeigth() {return _height;};
+
34  int GetLines() {return _height;};
+
36  int GetWidth() {return _width;};
+
37  int GetCols() {return _width;};
+
39  int GetLevels() {return _levels;};
+
41  bool IsAllocated() {return _allocated;};
+
42 
+
43  ScaleSpace(void);
+
44  virtual ~ScaleSpace(void);
+
45 
+
47  bool AllocateResources(int lines, int cols, int levels, double *scales );
+
49  bool FreeResources();
+
50 
+
52  bool BuildLevel(int level, float *in);
+
54  bool BuildAll(float *in);
+
56  float* GetLevel(int level);
+
57 };
+
58 
+
59 #endif /*_SCALESPACE_H_*/
+
Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.
+
+ + + + diff --git a/doxygen/doc/html/acquireData_8m_source.html b/doxygen/doc/html/acquireData_8m_source.html new file mode 100644 index 0000000..cc72010 --- /dev/null +++ b/doxygen/doc/html/acquireData_8m_source.html @@ -0,0 +1,195 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/app/scripts/acquireData.m Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
acquireData.m
+
+
+
1 function [in,out]=acquireData(dataLogFileLeft,dataLogFileRight,dataLogFileHead)
+
2 % This function returns the formatted data to learn the network upon.
+
3 % The three input files are the ones logged through yarpdatadumper.
+
4 
+
5 % import raw data from log files
+
6 dataL=dlmread(dataLogFileLeft);
+
7 dataR=dlmread(dataLogFileRight);
+
8 dataH=dlmread(dataLogFileHead);
+
9 
+
10 % remove the first column
+
11 dataL(:,1)=[];
+
12 dataR(:,1)=[];
+
13 dataH(:,1)=[];
+
14 
+
15 % harmonize the starting acquisition time
+
16 t0=min([dataL(1,1) dataR(1,1) dataH(1,1)]);
+
17 dataL(:,1)=dataL(:,1)-t0;
+
18 dataR(:,1)=dataR(:,1)-t0;
+
19 dataH(:,1)=dataH(:,1)-t0;
+
20 
+
21 % remove the likelihood column (not used)
+
22 dataL(:,5)=[];
+
23 dataR(:,5)=[];
+
24 
+
25 % select only the rows corresponding
+
26 % to object in visibility
+
27 dataL=dataL(dataL(:,7)~=0,1:6);
+
28 dataR=dataR(dataR(:,7)~=0,1:6);
+
29 
+
30 % the data format is now as:
+
31 % 1 2 3 4 5 6
+
32 % t x y z u v
+
33 
+
34 % go on with the left/right data synchronization
+
35 % use the left data as pivot
+
36 tL=dataL(:,1);
+
37 tR=dataR(:,1);
+
38 tH=dataH(:,1);
+
39 L=length(tL);
+
40 
+
41 % form input data as:
+
42 % 1 2 3 4 5 6 7
+
43 % tilt pan ver ul vl ur vr
+
44 in=zeros(L,7);
+
45 
+
46 % form the output data as:
+
47 % 1 2 3
+
48 % x y z
+
49 out=dataL(:,2:4);
+
50 
+
51 % fill the input data
+
52 for i=1:L
+
53  [~,jR]=min(abs(tR-tL(i)));
+
54  [~,jH]=min(abs(tH-tL(i)));
+
55  in(i,1:3)=dataH(jH,5:7);
+
56  in(i,4)=dataL(i,5);
+
57  in(i,5)=dataL(i,6);
+
58  in(i,6)=dataR(jR,5);
+
59  in(i,7)=dataR(jR,6);
+
60 end
+
61 
+
62 figure('Color','w');
+
63 global ha;
+
64 
+
65 subplot(521),hold('on'),grid,stairs(in(:,1));
+
66 ha{1}=gca;title('tilt');
+
67 set(zoom,'ActionPostCallback',@mypostcallback);
+
68 set(pan,'ActionPostCallback',@mypostcallback);
+
69 
+
70 subplot(523),hold('on'),grid,stairs(in(:,2));
+
71 ha{2}=gca;title('pan');
+
72 set(zoom,'ActionPostCallback',@mypostcallback);
+
73 set(pan,'ActionPostCallback',@mypostcallback);
+
74 
+
75 subplot(525),hold('on'),grid,stairs(in(:,3));
+
76 ha{3}=gca;title('ver');
+
77 set(zoom,'ActionPostCallback',@mypostcallback);
+
78 set(pan,'ActionPostCallback',@mypostcallback);
+
79 
+
80 subplot(527),hold('on'),grid,stairs(in(:,[4 6]));
+
81 ha{4}=gca;title('[ul ur]');
+
82 set(zoom,'ActionPostCallback',@mypostcallback);
+
83 set(pan,'ActionPostCallback',@mypostcallback);
+
84 
+
85 subplot(529),hold('on'),grid,stairs(in(:,[5 7]));
+
86 ha{5}=gca;title('[vl vr]');
+
87 set(zoom,'ActionPostCallback',@mypostcallback);
+
88 set(pan,'ActionPostCallback',@mypostcallback);
+
89 
+
90 subplot(524),hold('on'),grid,stairs(out(:,1));
+
91 ha{6}=gca;title('eye-x');
+
92 set(zoom,'ActionPostCallback',@mypostcallback);
+
93 set(pan,'ActionPostCallback',@mypostcallback);
+
94 
+
95 subplot(526),hold('on'),grid,stairs(out(:,2));
+
96 ha{7}=gca;title('eye-y');
+
97 set(zoom,'ActionPostCallback',@mypostcallback);
+
98 set(pan,'ActionPostCallback',@mypostcallback);
+
99 
+
100 subplot(528),hold('on'),grid,stairs(out(:,3));
+
101 ha{8}=gca;title('eye-z');
+
102 set(zoom,'ActionPostCallback',@mypostcallback);
+
103 set(pan,'ActionPostCallback',@mypostcallback);
+
104 
+
105 
+
106 %--------------------------------------------------------------------------
+
107 function mypostcallback(obj,evd) %#ok<INUSL>
+
108 
+
109 global ha;
+
110 
+
111 newLim=get(evd.Axes,'XLim');
+
112 
+
113 for i=1:length(ha)
+
114  xlim(ha{i},newLim);
+
115 end
+
116 
+
117 
+
+ + + + diff --git a/doxygen/doc/html/annotated.html b/doxygen/doc/html/annotated.html new file mode 100644 index 0000000..5cf3220 --- /dev/null +++ b/doxygen/doc/html/annotated.html @@ -0,0 +1,79 @@ + + + + + + + +icub-basic-demos: Data Structures + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structures
+
+
+
Here are the data structures with brief descriptions:
+ + +
 CLutCopyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released under the terms of the GNU GPL v2.0
+
+
+ + + + 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-basic-demos: Data Structure Index + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Data Structure Index
+
+
+ +
+
+
L
+
Lut
+
+
+ + + + 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/cvfloodfill2_8cpp_source.html b/doxygen/doc/html/cvfloodfill2_8cpp_source.html new file mode 100644 index 0000000..b9fee9a --- /dev/null +++ b/doxygen/doc/html/cvfloodfill2_8cpp_source.html @@ -0,0 +1,615 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/cvfloodfill2.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
cvfloodfill2.cpp
+
+
+
1 /*M///////////////////////////////////////////////////////////////////////////////////////
+
2 //
+
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
+
4 //
+
5 // By downloading, copying, installing or using the software you agree to this license.
+
6 // If you do not agree to this license, do not download, install,
+
7 // copy or use the software.
+
8 //
+
9 //
+
10 // Intel License Agreement
+
11 // For Open Source Computer Vision Library
+
12 //
+
13 // Copyright (C) 2000, Intel Corporation, all rights reserved.
+
14 // Third party copyrights are property of their respective owners.
+
15 //
+
16 // Redistribution and use in source and binary forms, with or without modification,
+
17 // are permitted provided that the following conditions are met:
+
18 //
+
19 // * Redistribution's of source code must retain the above copyright notice,
+
20 // this list of conditions and the following disclaimer.
+
21 //
+
22 // * Redistribution's in binary form must reproduce the above copyright notice,
+
23 // this list of conditions and the following disclaimer in the documentation
+
24 // and/or other materials provided with the distribution.
+
25 //
+
26 // * The name of Intel Corporation may not be used to endorse or promote products
+
27 // derived from this software without specific prior written permission.
+
28 //
+
29 // This software is provided by the copyright holders and contributors "as is" and
+
30 // any express or implied warranties, including, but not limited to, the implied
+
31 // warranties of merchantability and fitness for a particular purpose are disclaimed.
+
32 // In no event shall the Intel Corporation or contributors be liable for any direct,
+
33 // indirect, incidental, special, exemplary, or consequential damages
+
34 // (including, but not limited to, procurement of substitute goods or services;
+
35 // loss of use, data, or profits; or business interruption) however caused
+
36 // and on any theory of liability, whether in contract, strict liability,
+
37 // or tort (including negligence or otherwise) arising in any way out of
+
38 // the use of this software, even if advised of the possibility of such damage.
+
39 //
+
40 //M*/
+
41 
+
42 /*
+
43  * Notes:
+
44  * This code is part of the OpenCV library, with a couple of changes marked with the comments "//martim".
+
45  * A slight change was made in the threshold criteria of the floodfill algorithm.
+
46  *
+
47  * Author of changes: Martim Brandao
+
48  *
+
49  */
+
50 
+
51 #include <opencv2/opencv.hpp>
+
52 #include <opencv2/core/types_c.h>
+
53 #include <opencv2/imgproc/imgproc_c.h>
+
54 
+
55 #ifndef __BEGIN__
+
56 #define __BEGIN__ __CV_BEGIN__
+
57 #endif
+
58 
+
59 #ifndef __END__
+
60 #define __END__ __CV_END__
+
61 #endif
+
62 
+
63 #ifndef EXIT
+
64 #define EXIT __CV_EXIT__
+
65 #endif
+
66 
+
67 typedef struct CvFFillSegment
+
68 {
+
69  ushort y;
+
70  ushort l;
+
71  ushort r;
+
72  ushort prevl;
+
73  ushort prevr;
+
74  short dir;
+
75 }
+
76 CvFFillSegment;
+
77 
+
78 #define UP 1
+
79 #define DOWN -1
+
80 
+
81 #define ICV_PUSH( Y, L, R, PREV_L, PREV_R, DIR )\
+
82 { \
+
83  tail->y = (ushort)(Y); \
+
84  tail->l = (ushort)(L); \
+
85  tail->r = (ushort)(R); \
+
86  tail->prevl = (ushort)(PREV_L); \
+
87  tail->prevr = (ushort)(PREV_R); \
+
88  tail->dir = (short)(DIR); \
+
89  if( ++tail >= buffer_end ) \
+
90  tail = buffer; \
+
91 }
+
92 
+
93 
+
94 #define ICV_POP( Y, L, R, PREV_L, PREV_R, DIR ) \
+
95 { \
+
96  Y = head->y; \
+
97  L = head->l; \
+
98  R = head->r; \
+
99  PREV_L = head->prevl; \
+
100  PREV_R = head->prevr; \
+
101  DIR = head->dir; \
+
102  if( ++head >= buffer_end ) \
+
103  head = buffer; \
+
104 }
+
105 
+
106 #define DIFF_FLT_C1(p1,p2) (fabs((p1)[0] - (p2)[0] + d_lw[0]) <= interval[0])
+
107 
+
108 static void
+
109 icvFloodFill_Grad_32f_CnIR2( float* pImage, int step, uchar* pMask, int maskStep,
+
110  CvSize /*roi*/, CvPoint seed, float* _newVal, float* _d_lw,
+
111  float* _d_up, CvConnectedComp* region, int flags,
+
112  CvFFillSegment* buffer, int buffer_size, int cn )
+
113 {
+
114  float* img = pImage + (step /= sizeof(float))*seed.y;
+
115  uchar* mask = (pMask += maskStep + 1) + maskStep*seed.y;
+
116  int i, L, R;
+
117  int area = 0;
+
118  double sum[] = {0,0,0}, val0[] = {0,0,0};
+
119  float newVal[] = {0,0,0};
+
120  float d_lw[] = {0,0,0};
+
121  float interval[] = {0,0,0};
+
122  int XMin, XMax, YMin = seed.y, YMax = seed.y;
+
123  int _8_connectivity = (flags & 255) == 8;
+
124  int fixedRange = flags & CV_FLOODFILL_FIXED_RANGE;
+
125  int fillImage = (flags & CV_FLOODFILL_MASK_ONLY) == 0;
+
126  uchar newMaskVal = (uchar)(flags & 0xff00 ? flags >> 8 : 1);
+
127  CvFFillSegment* buffer_end = buffer + buffer_size, *head = buffer, *tail = buffer;
+
128  //-------------------------------------------------------------------martim
+
129  // variance-adaptive threshold
+
130  double varAdaptA=0, varAdaptB=0; //cumulative p(i) and p(i)² where p=pixel value
+
131  double varAdaptN=0; //N(i) where N=number of pixels
+
132  double varAdaptAlpha=0.9; //weight on current threshold (0<alpha<1)
+
133  double varAdaptK=0.5; //sauvola's weight on the standard deviance component (0.2<=k<=0.5)
+
134  double varAdaptKa=1.5; //alex's weight on the standard deviance component (ka~1)
+
135  double varAdapt_aux=0;
+
136  if( cn!=1 ) return;
+
137  //--end
+
138 
+
139  L = R = seed.x;
+
140  if( mask[L] )
+
141  return;
+
142 
+
143  mask[L] = newMaskVal;
+
144 
+
145  for( i = 0; i < cn; i++ )
+
146  {
+
147  newVal[i] = _newVal[i];
+
148  d_lw[i] = 0.5f*(_d_lw[i] - _d_up[i]);
+
149  interval[i] = 0.5f*(_d_lw[i] + _d_up[i]);
+
150  if( fixedRange )
+
151  val0[i] = img[L*cn+i];
+
152  }
+
153 
+
154  if( cn == 1 )
+
155  {
+
156  if( fixedRange )
+
157  {
+
158  while( !mask[R + 1] && DIFF_FLT_C1( img + (R+1), val0 )){
+
159  //-------------------------------------------------------------------martim
+
160  // variance-adaptive threshold
+
161  varAdapt_aux = (img+ R+1)[0];
+
162  varAdaptA += varAdapt_aux;
+
163  varAdaptB += varAdapt_aux*varAdapt_aux;
+
164  varAdaptN++;
+
165  //Sauvola:
+
166  varAdapt_aux = sqrt( varAdaptB/varAdaptN - (varAdaptA*varAdaptA/(varAdaptN*varAdaptN)) );
+
167  varAdapt_aux = val0[0] - (varAdaptA/varAdaptN)*( 1+varAdaptK*((varAdapt_aux/128)-1) );
+
168  interval[0] = (float)(varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux);
+
169  //Alex:
+
170 // varAdapt_aux = val0[0] - (varAdaptA/varAdaptN) + varAdaptKa*varAdapt_aux;
+
171 // interval[0] = varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux;
+
172  mask[++R] = newMaskVal;
+
173  //--end
+
174  }
+
175 
+
176  while( !mask[L - 1] && DIFF_FLT_C1( img + (L-1), val0 )){
+
177  //-------------------------------------------------------------------martim
+
178  // variance-adaptive threshold
+
179  varAdapt_aux = (img+ L-1)[0];
+
180  varAdaptA += varAdapt_aux;
+
181  varAdaptB += varAdapt_aux*varAdapt_aux;
+
182  varAdaptN++;
+
183  //Sauvola:
+
184  varAdapt_aux = sqrt( varAdaptB/varAdaptN - (varAdaptA*varAdaptA/(varAdaptN*varAdaptN)) );
+
185  varAdapt_aux = val0[0] - (varAdaptA/varAdaptN)*( 1+varAdaptK*((varAdapt_aux/128)-1) );
+
186  interval[0] = (float)(varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux);
+
187  //Alex:
+
188 // varAdapt_aux = val0[0] - (varAdaptA/varAdaptN) + varAdaptKa*varAdapt_aux;
+
189 // interval[0] = varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux;
+
190  mask[--L] = newMaskVal;
+
191  //--end
+
192  }
+
193  }
+
194  else
+
195  {
+
196  while( !mask[R + 1] && DIFF_FLT_C1( img + (R+1), img + R ))
+
197  mask[++R] = newMaskVal;
+
198 
+
199  while( !mask[L - 1] && DIFF_FLT_C1( img + (L-1), img + L ))
+
200  mask[--L] = newMaskVal;
+
201  }
+
202  }
+
203 
+
204  XMax = R;
+
205  XMin = L;
+
206  ICV_PUSH( seed.y, L, R, R + 1, R, UP );
+
207 
+
208  while( head != tail )
+
209  {
+
210  int k, YC, PL, PR, dir, curstep;
+
211  ICV_POP( YC, L, R, PL, PR, dir );
+
212 
+
213  int data[][3] =
+
214  {
+
215  {-dir, L - _8_connectivity, R + _8_connectivity},
+
216  {dir, L - _8_connectivity, PL - 1},
+
217  {dir, PR + 1, R + _8_connectivity}
+
218  };
+
219 
+
220  unsigned length = (unsigned)(R-L);
+
221 
+
222  if( region )
+
223  {
+
224  area += (int)length + 1;
+
225 
+
226  if( XMax < R ) XMax = R;
+
227  if( XMin > L ) XMin = L;
+
228  if( YMax < YC ) YMax = YC;
+
229  if( YMin > YC ) YMin = YC;
+
230  }
+
231 
+
232  if( cn == 1 )
+
233  {
+
234  for( k = 0; k < 3; k++ )
+
235  {
+
236  dir = data[k][0];
+
237  curstep = dir * step;
+
238  img = pImage + (YC + dir) * step;
+
239  mask = pMask + (YC + dir) * maskStep;
+
240  int left = data[k][1];
+
241  int right = data[k][2];
+
242 
+
243  if( fixedRange )
+
244  //-------------------------------------------------------------------martim
+
245  // variance-adaptive threshold
+
246  for( i = left; i <= right; i++ )
+
247  {
+
248  if( !mask[i] && DIFF_FLT_C1( img + i, val0 ))
+
249  {
+
250  int j = i;
+
251  mask[i] = newMaskVal;
+
252  while( !mask[--j] && DIFF_FLT_C1( img + j, val0 )){
+
253  mask[j] = newMaskVal;
+
254  varAdapt_aux = (img+j)[0];
+
255  varAdaptA += varAdapt_aux;
+
256  varAdaptB += varAdapt_aux*varAdapt_aux;
+
257  varAdaptN++;
+
258  //Sauvola:
+
259  varAdapt_aux = sqrt( varAdaptB/varAdaptN - (varAdaptA*varAdaptA/(varAdaptN*varAdaptN)) );
+
260  varAdapt_aux = val0[0] - (varAdaptA/varAdaptN)*( 1+varAdaptK*((varAdapt_aux/128)-1) );
+
261  interval[0] = (float)(varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux);
+
262  //Alex:
+
263 // varAdapt_aux = val0[0] - (varAdaptA/varAdaptN) + varAdaptKa*varAdapt_aux;
+
264 // interval[0] = varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux;
+
265  }
+
266 
+
267  while( !mask[++i] && DIFF_FLT_C1( img + i, val0 )){
+
268  mask[i] = newMaskVal;
+
269  varAdapt_aux = (img+i)[0];
+
270  varAdaptA += varAdapt_aux;
+
271  varAdaptB += varAdapt_aux*varAdapt_aux;
+
272  varAdaptN++;
+
273  //Sauvola:
+
274  varAdapt_aux = sqrt( varAdaptB/varAdaptN - (varAdaptA*varAdaptA/(varAdaptN*varAdaptN)) );
+
275  varAdapt_aux = val0[0] - (varAdaptA/varAdaptN)*( 1+varAdaptK*((varAdapt_aux/128)-1) );
+
276  interval[0] = (float)(varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux);
+
277  //Alex:
+
278 // varAdapt_aux = val0[0] - (varAdaptA/varAdaptN) + varAdaptKa*varAdapt_aux;
+
279 // interval[0] = varAdaptAlpha*interval[0] + (1-varAdaptAlpha)*varAdapt_aux;
+
280  }
+
281 
+
282  ICV_PUSH( YC + dir, j+1, i-1, L, R, -dir );
+
283  }
+
284  }
+
285  //--end
+
286  else if( !_8_connectivity )
+
287  for( i = left; i <= right; i++ )
+
288  {
+
289  if( !mask[i] && DIFF_FLT_C1( img + i, img - curstep + i ))
+
290  {
+
291  int j = i;
+
292  mask[i] = newMaskVal;
+
293  while( !mask[--j] && DIFF_FLT_C1( img + j, img + (j+1) ))
+
294  mask[j] = newMaskVal;
+
295 
+
296  while( !mask[++i] &&
+
297  (DIFF_FLT_C1( img + i, img + (i-1) ) ||
+
298  (DIFF_FLT_C1( img + i, img + i - curstep) && i <= R)))
+
299  mask[i] = newMaskVal;
+
300 
+
301  ICV_PUSH( YC + dir, j+1, i-1, L, R, -dir );
+
302  }
+
303  }
+
304  else
+
305  for( i = left; i <= right; i++ )
+
306  {
+
307  int idx;
+
308  float val[1];
+
309 
+
310  if( !mask[i] &&
+
311  (((val[0] = img[i],
+
312  (unsigned)(idx = i-L-1) <= length) &&
+
313  DIFF_FLT_C1( val, img - curstep + (i-1) )) ||
+
314  ((unsigned)(++idx) <= length &&
+
315  DIFF_FLT_C1( val, img - curstep + i )) ||
+
316  ((unsigned)(++idx) <= length &&
+
317  DIFF_FLT_C1( val, img - curstep + (i+1) ))))
+
318  {
+
319  int j = i;
+
320  mask[i] = newMaskVal;
+
321  while( !mask[--j] && DIFF_FLT_C1( img + j, img + (j+1) ))
+
322  mask[j] = newMaskVal;
+
323 
+
324  while( !mask[++i] &&
+
325  ((val[0] = img[i],
+
326  DIFF_FLT_C1( val, img + (i-1) )) ||
+
327  (((unsigned)(idx = i-L-1) <= length &&
+
328  DIFF_FLT_C1( val, img - curstep + (i-1) ))) ||
+
329  ((unsigned)(++idx) <= length &&
+
330  DIFF_FLT_C1( val, img - curstep + i )) ||
+
331  ((unsigned)(++idx) <= length &&
+
332  DIFF_FLT_C1( val, img - curstep + (i+1) ))))
+
333  mask[i] = newMaskVal;
+
334 
+
335  ICV_PUSH( YC + dir, j+1, i-1, L, R, -dir );
+
336  }
+
337  }
+
338  }
+
339 
+
340  img = pImage + YC * step;
+
341  if( fillImage )
+
342  for( i = L; i <= R; i++ )
+
343  img[i] = newVal[0];
+
344  else if( region )
+
345  for( i = L; i <= R; i++ )
+
346  sum[0] += img[i];
+
347  }
+
348  }
+
349 
+
350  if( region )
+
351  {
+
352  region->area = area;
+
353  region->rect.x = XMin;
+
354  region->rect.y = YMin;
+
355  region->rect.width = XMax - XMin + 1;
+
356  region->rect.height = YMax - YMin + 1;
+
357 
+
358  if( fillImage )
+
359  region->value = cvScalar(newVal[0], newVal[1], newVal[2]);
+
360  else
+
361  {
+
362  double iarea = area ? 1./area : 0;
+
363  region->value = cvScalar(sum[0]*iarea, sum[1]*iarea, sum[2]*iarea);
+
364  }
+
365  }
+
366 
+
367 // printf("Tf=%.4f, avg=%.4f, sigma=%.4f\n", interval[0], varAdaptA/varAdaptN, sqrt(varAdaptB/varAdaptN-(varAdaptA*varAdaptA/(varAdaptN*varAdaptN))) );
+
368 // printf("----------end floodfill\n");
+
369 
+
370  return;
+
371 }
+
372 
+
373 typedef void (*CvFloodFillFunc2)(
+
374  void* img, int step, CvSize size, CvPoint seed, void* newval,
+
375  CvConnectedComp* comp, int flags, void* buffer, int buffer_size, int cn );
+
376 
+
377 typedef void (*CvFloodFillGradFunc2)(
+
378  void* img, int step, uchar* mask, int maskStep, CvSize size,
+
379  CvPoint seed, void* newval, void* d_lw, void* d_up, void* ccomp,
+
380  int flags, void* buffer, int buffer_size, int cn );
+
381 
+
382 
+
383 static void icvInitFloodFill( void** ffill_tab, void** ffillgrad_tab )
+
384 {
+
385  ffill_tab[0] = NULL; //(void*)icvFloodFill_8u_CnIR2;
+
386  ffill_tab[1] = NULL; //(void*)icvFloodFill_32f_CnIR2;
+
387 
+
388  ffillgrad_tab[0] = NULL; //(void*)icvFloodFill_Grad_8u_CnIR2;
+
389  ffillgrad_tab[1] = (void*)icvFloodFill_Grad_32f_CnIR2;
+
390 }
+
391 
+
392 
+
393 void
+
394 cvFloodFill2( CvArr* arr, CvPoint seed_point,
+
395  CvScalar newVal, CvScalar lo_diff, CvScalar up_diff,
+
396  CvConnectedComp* comp, int flags, CvArr* maskarr )
+
397 {
+
398  static void* ffill_tab[4];
+
399  static void* ffillgrad_tab[4];
+
400  static int inittab = 0;
+
401 
+
402  CvMat* tempMask = 0;
+
403  CvFFillSegment* buffer = 0;
+
404  CV_FUNCNAME( "cvFloodFill" );
+
405 
+
406  if( comp )
+
407  memset( comp, 0, sizeof(*comp) );
+
408 
+
409  __BEGIN__;
+
410 
+
411  int i, type, depth, cn, is_simple, idx;
+
412  int buffer_size, connectivity = flags & 255;
+
413  double nv_buf[4] = {0,0,0,0};
+
414  union { uchar b[4]; float f[4]; } ld_buf, ud_buf;
+
415  CvMat stub, *img = (CvMat*)arr;
+
416  CvMat maskstub, *mask = (CvMat*)maskarr;
+
417  CvSize size;
+
418 
+
419  if( !inittab )
+
420  {
+
421  icvInitFloodFill( ffill_tab, ffillgrad_tab );
+
422  inittab = 1;
+
423  }
+
424 
+
425  CV_CALL( img = cvGetMat( img, &stub ));
+
426  type = CV_MAT_TYPE( img->type );
+
427  depth = CV_MAT_DEPTH(type);
+
428  cn = CV_MAT_CN(type);
+
429 
+
430  idx = type == CV_8UC1 || type == CV_8UC3 ? 0 :
+
431  type == CV_32FC1 || type == CV_32FC3 ? 1 : -1;
+
432 
+
433  if( idx < 0 )
+
434  CV_ERROR( CV_StsUnsupportedFormat, "" );
+
435 
+
436  if( connectivity == 0 )
+
437  connectivity = 4;
+
438  else if( connectivity != 4 && connectivity != 8 )
+
439  CV_ERROR( CV_StsBadFlag, "Connectivity must be 4, 0(=4) or 8" );
+
440 
+
441  is_simple = mask == 0 && (flags & CV_FLOODFILL_MASK_ONLY) == 0;
+
442 
+
443  for( i = 0; i < cn; i++ )
+
444  {
+
445  if( lo_diff.val[i] < 0 || up_diff.val[i] < 0 )
+
446  CV_ERROR( CV_StsBadArg, "lo_diff and up_diff must be non-negative" );
+
447  is_simple &= fabs(lo_diff.val[i]) < DBL_EPSILON && fabs(up_diff.val[i]) < DBL_EPSILON;
+
448  }
+
449 
+
450  if( (unsigned)seed_point.x >= (unsigned)size.width ||
+
451  (unsigned)seed_point.y >= (unsigned)size.height )
+
452  CV_ERROR( CV_StsOutOfRange, "Seed point is outside of image" );
+
453 
+
454  cvScalarToRawData( &newVal, &nv_buf, type, 0 );
+
455  buffer_size = MAX( size.width, size.height )*2;
+
456  CV_CALL( buffer = (CvFFillSegment*)cvAlloc( buffer_size*sizeof(buffer[0])));
+
457 
+
458  if( is_simple )
+
459  {
+
460  int elem_size = CV_ELEM_SIZE(type);
+
461  const uchar* seed_ptr = img->data.ptr + img->step*seed_point.y + elem_size*seed_point.x;
+
462  CvFloodFillFunc2 func = (CvFloodFillFunc2)ffill_tab[idx];
+
463  if( !func )
+
464  CV_ERROR( CV_StsUnsupportedFormat, "" );
+
465  // check if the new value is different from the current value at the seed point.
+
466  // if they are exactly the same, use the generic version with mask to avoid infinite loops.
+
467  for( i = 0; i < elem_size; i++ )
+
468  if( seed_ptr[i] != ((uchar*)nv_buf)[i] )
+
469  break;
+
470  if( i < elem_size )
+
471  {
+
472  func( img->data.ptr, img->step, size,
+
473  seed_point, &nv_buf, comp, flags,
+
474  buffer, buffer_size, cn );
+
475  EXIT;
+
476  }
+
477  }
+
478 
+
479  {
+
480  CvFloodFillGradFunc2 func = (CvFloodFillGradFunc2)ffillgrad_tab[idx];
+
481  if( !func )
+
482  CV_ERROR( CV_StsUnsupportedFormat, "" );
+
483 
+
484  if( !mask )
+
485  {
+
486  /* created mask will be 8-byte aligned */
+
487  tempMask = cvCreateMat( size.height + 2, (size.width + 9) & -8, CV_8UC1 );
+
488  mask = tempMask;
+
489  }
+
490  else
+
491  {
+
492  CV_CALL( mask = cvGetMat( mask, &maskstub ));
+
493  if( !CV_IS_MASK_ARR( mask ))
+
494  CV_ERROR( CV_StsBadMask, "" );
+
495 
+
496  if( mask->width != size.width + 2 || mask->height != size.height + 2 )
+
497  CV_ERROR( CV_StsUnmatchedSizes, "mask must be 2 pixel wider "
+
498  "and 2 pixel taller than filled image" );
+
499  }
+
500 
+
501  {
+
502  int width = tempMask ? mask->step : size.width + 2;
+
503  uchar* mask_row = mask->data.ptr + mask->step;
+
504  memset( mask_row - mask->step, 1, width );
+
505 
+
506  for( i = 1; i <= size.height; i++, mask_row += mask->step )
+
507  {
+
508  if( tempMask )
+
509  memset( mask_row, 0, width );
+
510  mask_row[0] = mask_row[size.width+1] = (uchar)1;
+
511  }
+
512  memset( mask_row, 1, width );
+
513  }
+
514 
+
515  if( depth == CV_8U )
+
516  for( i = 0; i < cn; i++ )
+
517  {
+
518  ld_buf.b[i] = cv::saturate_cast<uchar>(cvFloor(lo_diff.val[i]));
+
519  ud_buf.b[i] = cv::saturate_cast<uchar>(cvFloor(up_diff.val[i]));
+
520  }
+
521  else
+
522  for( i = 0; i < cn; i++ )
+
523  {
+
524  ld_buf.f[i] = (float)lo_diff.val[i];
+
525  ud_buf.f[i] = (float)up_diff.val[i];
+
526  }
+
527 
+
528  func( img->data.ptr, img->step, mask->data.ptr, mask->step,
+
529  size, seed_point, &nv_buf, ld_buf.f, ud_buf.f,
+
530  comp, flags, buffer, buffer_size, cn );
+
531  }
+
532 
+
533  __END__;
+
534 
+
535  cvFree( &buffer );
+
536  cvReleaseMat( &tempMask );
+
537 }
+
+ + + + diff --git a/doxygen/doc/html/demoForceControl_2src_2main_8cpp_source.html b/doxygen/doc/html/demoForceControl_2src_2main_8cpp_source.html new file mode 100644 index 0000000..664c3ff --- /dev/null +++ b/doxygen/doc/html/demoForceControl_2src_2main_8cpp_source.html @@ -0,0 +1,155 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src/main.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
main.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2016 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #include <yarp/os/all.h>
+
19 #include <yarp/sig/all.h>
+
20 #include <yarp/dev/all.h>
+
21 
+
22 #include <string>
+
23 #include <QApplication>
+
24 #include "mainwindow.h"
+
25 #include "robot_interfaces.h"
+
26 
+
27 using namespace yarp::os;
+
28 using namespace yarp::sig;
+
29 using namespace yarp::dev;
+
30 using namespace std;
+
31 
+
32 int main(int argc, char * argv[])
+
33 {
+
34  QApplication a(argc, argv);
+
35 
+
36  yarp::os::Network yarp;
+
37  if (!yarp.checkNetwork())
+
38  {
+
39  yError("ERROR: check Yarp network.");
+
40  return 0;
+
41  }
+
42 
+
43  yarp::os::ResourceFinder* rf = new ResourceFinder;
+
44  rf->configure(argc, argv);
+
45 
+
46  robot_interfaces *robot;
+
47  robot = new robot_interfaces();
+
48  std::string robot_name = "icub";
+
49 
+
50  if (rf->check("robot"))
+
51  {
+
52  robot_name=rf->find("robot").asString();
+
53  }
+
54 
+
55  if (robot->init(robot_name) == false)
+
56  {
+
57  /*
+
58  yError("Failed to connect to robot");
+
59  delete rf;
+
60  delete robot;
+
61  return 0;
+
62  */
+
63  }
+
64 
+
65  MainWindow w;
+
66  w.init("icub", rf, robot);
+
67  w.show();
+
68 
+
69  int appRet = a.exec();
+
70 
+
71  delete rf;
+
72  delete robot;
+
73 
+
74  return (appRet != 0 ? 1 : 0);
+
75 }
+
76 
+
77 
+
+ + + + diff --git a/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8cpp_source.html b/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8cpp_source.html new file mode 100644 index 0000000..59b3d3a --- /dev/null +++ b/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8cpp_source.html @@ -0,0 +1,181 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src/robot_interfaces.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
robot_interfaces.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #include "robot_interfaces.h"
+
19 #include <string>
+
20 
+
21 using namespace yarp::os;
+
22 using namespace yarp::dev;
+
23 
+
24 robot_interfaces::robot_interfaces()
+
25 {
+
26  for (int i=0; i<5; i++)
+
27  {
+
28  ipos[i]=0;
+
29  itrq[i]=0;
+
30  iimp[i]=0;
+
31  icmd[i]=0;
+
32  ienc[i]=0;
+
33  ipid[i]=0;
+
34  ivel[i]=0;
+
35  iamp[i]=0;
+
36  iint[i]=0;
+
37  dd[i]=0;
+
38  }
+
39 }
+
40 
+
41 robot_interfaces::~robot_interfaces()
+
42 {
+
43  for (int i = 0; i < 5; i++)
+
44  {
+
45  if (dd[i] != 0)
+
46  {
+
47  dd[i]->close();
+
48  delete dd[i];
+
49  dd[i] = 0;
+
50  }
+
51  }
+
52 }
+
53 
+
54 bool robot_interfaces::init(std::string robot)
+
55 {
+
56  std::string part;
+
57  std::string localPort;
+
58  std::string remotePort;
+
59  bool ok = true;
+
60 
+
61  for (int i=0; i<5; i++)
+
62  {
+
63  switch (i)
+
64  {
+
65  case LEFT_ARM: part = "left_arm"; break;
+
66  case RIGHT_ARM: part = "right_arm"; break;
+
67  case LEFT_LEG: part = "left_leg"; break;
+
68  case RIGHT_LEG: part = "right_leg"; break;
+
69  case TORSO: part = "torso"; break;
+
70  }
+
71 
+
72  localPort = "/demoForceControl/" + part;
+
73  remotePort = "/" + robot + "/" + part;
+
74  options[i].put("robot",robot);
+
75  options[i].put("part",part);
+
76  options[i].put("device","remote_controlboard");
+
77  options[i].put("local",localPort);
+
78  options[i].put("remote",remotePort);
+
79 
+
80  dd[i] = new PolyDriver(options[i]);
+
81  if(!dd[i] || !(dd[i]->isValid()))
+
82  {
+
83  yError("Problems instantiating the device driver %d\n", i);
+
84  delete dd[i];
+
85  dd[i] = 0;
+
86  ok = false;
+
87  continue;
+
88  }
+
89 
+
90  ok = ok & dd[i]->view(ipos[i]);
+
91  ok = ok & dd[i]->view(itrq[i]);
+
92  ok = ok & dd[i]->view(iimp[i]);
+
93  ok = ok & dd[i]->view(icmd[i]);
+
94  ok = ok & dd[i]->view(ivel[i]);
+
95  ok = ok & dd[i]->view(ienc[i]);
+
96  ok = ok & dd[i]->view(ipid[i]);
+
97  ok = ok & dd[i]->view(iamp[i]);
+
98  ok = ok & dd[i]->view(iint[i]);
+
99  }
+
100  return ok;
+
101 }
+
102 
+
103 
+
+ + + + diff --git a/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8h_source.html b/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8h_source.html new file mode 100644 index 0000000..9b5b60e --- /dev/null +++ b/doxygen/doc/html/demoForceControl_2src_2robot__interfaces_8h_source.html @@ -0,0 +1,132 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src/robot_interfaces.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
robot_interfaces.h
+
+
+
1 /*
+
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #ifndef ROBOT_INTERFACES_H
+
19 #define ROBOT_INTERFACES_H
+
20 
+
21 #include <yarp/dev/all.h>
+
22 #include <yarp/dev/ControlBoardInterfaces.h>
+
23 #include <string>
+
24 
+
25 #define LEFT_ARM 0
+
26 #define RIGHT_ARM 1
+
27 #define LEFT_LEG 2
+
28 #define RIGHT_LEG 3
+
29 #define TORSO 4
+
30 
+
31 class robot_interfaces
+
32 {
+
33  public:
+
34 
+
35  yarp::dev::IPositionControl *ipos[5];
+
36  yarp::dev::ITorqueControl *itrq[5];
+
37  yarp::dev::IImpedanceControl *iimp[5];
+
38  yarp::dev::IControlMode *icmd[5];
+
39  yarp::dev::IInteractionMode *iint[5];
+
40  yarp::dev::IEncoders *ienc[5];
+
41  yarp::dev::IPidControl *ipid[5];
+
42  yarp::dev::IVelocityControl *ivel[5];
+
43  yarp::dev::IAmplifierControl *iamp[5];
+
44 
+
45  yarp::os::Property options[5];
+
46  yarp::dev::PolyDriver *dd[5];
+
47 
+
48  robot_interfaces();
+
49  ~robot_interfaces();
+
50  bool init(std::string robotName);
+
51 };
+
52 
+
53 #endif
+
54 
+
+ + + + diff --git a/doxygen/doc/html/demoForceImitation_2src_2main_8cpp_source.html b/doxygen/doc/html/demoForceImitation_2src_2main_8cpp_source.html new file mode 100644 index 0000000..2d6cb58 --- /dev/null +++ b/doxygen/doc/html/demoForceImitation_2src_2main_8cpp_source.html @@ -0,0 +1,408 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceImitation/src/main.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
main.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #include <yarp/os/all.h>
+
19 #include <yarp/sig/all.h>
+
20 #include <yarp/dev/all.h>
+
21 #include <iCub/ctrl/math.h>
+
22 #include <iCub/skinDynLib/skinContact.h>
+
23 #include <iCub/skinDynLib/skinContactList.h>
+
24 #include <string>
+
25 
+
26 #include "robot_interfaces.h"
+
27 
+
28 using namespace iCub::skinDynLib;
+
29 using namespace yarp::os;
+
30 using namespace yarp::sig;
+
31 using namespace yarp::dev;
+
32 using namespace std;
+
33 
+
34 #define POS 0
+
35 #define TRQ 1
+
36 
+
37 // robot->icmd[rd->id]->setPositionMode(0);
+
38 
+
39 
+
40 #define jjj 0
+
41 class CtrlThread: public yarp::os::PeriodicThread
+
42 {
+
43  public:
+
44  robot_interfaces *robot;
+
45  bool left_arm_master;
+
46  double encoders_master [16];
+
47  double encoders_slave [16];
+
48  bool autoconnect;
+
49  bool stiff;
+
50  Stamp info;
+
51 
+
52  BufferedPort<iCub::skinDynLib::skinContactList> *port_skin_contacts;
+
53  BufferedPort<Vector> *port_left_arm;
+
54  BufferedPort<Vector> *port_right_arm;
+
55 
+
56 
+
57  CtrlThread(unsigned int _period, ResourceFinder &_rf) :
+
58  PeriodicThread((double)_period/1000.0)
+
59  {
+
60  autoconnect = false;
+
61  robot=0;
+
62  left_arm_master=false;
+
63  port_skin_contacts=0;
+
64  stiff = _rf.check("stiff");
+
65  };
+
66 
+
67  virtual bool threadInit()
+
68  {
+
69  robot=new robot_interfaces(LEFT_ARM, RIGHT_ARM);
+
70  robot->init();
+
71 
+
72  port_skin_contacts = new BufferedPort<skinContactList>;
+
73  port_left_arm = new BufferedPort<Vector>;
+
74  port_right_arm = new BufferedPort<Vector>;
+
75  port_skin_contacts->open("/demoForceImitation/skin_contacts:i");
+
76  port_left_arm->open("/demoForceImitation/left_arm:o");
+
77  port_right_arm->open("/demoForceImitation/right_arm:o");
+
78 
+
79  if (autoconnect)
+
80  {
+
81  Network::connect("/skinManager/skin_events:o","/demoForceImitation/skin_contacs:i","tcp",false);
+
82  }
+
83 
+
84  robot->iimp[LEFT_ARM]->setImpedance(0,0.2,0.02);
+
85  robot->iimp[LEFT_ARM]->setImpedance(1,0.2,0.02);
+
86  robot->iimp[LEFT_ARM]->setImpedance(2,0.2,0.02);
+
87  robot->iimp[LEFT_ARM]->setImpedance(3,0.2,0.02);
+
88  robot->iimp[LEFT_ARM]->setImpedance(4,0.1,0.00);
+
89 
+
90  robot->iimp[RIGHT_ARM]->setImpedance(0,0.2,0.02);
+
91  robot->iimp[RIGHT_ARM]->setImpedance(1,0.2,0.02);
+
92  robot->iimp[RIGHT_ARM]->setImpedance(2,0.2,0.02);
+
93  robot->iimp[RIGHT_ARM]->setImpedance(3,0.2,0.02);
+
94  robot->iimp[RIGHT_ARM]->setImpedance(4,0.1,0.00);
+
95 
+
96  yInfo("Going to home position...");
+
97  for (int i=0; i<5; i++)
+
98  {
+
99  double tmp_pos=0.0;
+
100  robot->ienc[RIGHT_ARM]->getEncoder(i,&tmp_pos);
+
101  robot->icmd[LEFT_ARM]->setControlMode(i, VOCAB_CM_POSITION);
+
102  robot->icmd[RIGHT_ARM]->setControlMode(i, VOCAB_CM_POSITION);
+
103  robot->iint[LEFT_ARM]->setInteractionMode(i,VOCAB_IM_STIFF);
+
104  robot->iint[RIGHT_ARM]->setInteractionMode(i,VOCAB_IM_STIFF);
+
105  robot->ipos[LEFT_ARM]->setRefSpeed(i,10);
+
106  robot->ipos[LEFT_ARM]->positionMove(i,tmp_pos);
+
107  }
+
108  double timeout = 0;
+
109  do
+
110  {
+
111  int ok=0;
+
112  for (int i=0; i<5; i++)
+
113  {
+
114  double tmp_pos_l=0;
+
115  double tmp_pos_r=0;
+
116  robot->ienc[LEFT_ARM]->getEncoder(i,&tmp_pos_l);
+
117  robot->ienc[RIGHT_ARM]->getEncoder(i,&tmp_pos_r);
+
118  if (fabs(tmp_pos_l-tmp_pos_r)<1.0) ok++;
+
119  }
+
120  if (ok==5) break;
+
121  yarp::os::Time::delay(1.0);
+
122  timeout++;
+
123  }
+
124  while (timeout < 10); //10 seconds
+
125  if (timeout >=10)
+
126  {
+
127  yError("Unable to reach safe initial position! Closing module");
+
128  return false;
+
129  }
+
130 
+
131  change_master();
+
132 
+
133  yInfo("Position tracking started");
+
134  return true;
+
135  }
+
136  virtual void run()
+
137  {
+
138  int i_touching_left=0;
+
139  int i_touching_right=0;
+
140  int i_touching_diff=0;
+
141  info.update();
+
142 
+
143  skinContactList *skinContacts = port_skin_contacts->read(false);
+
144  if(skinContacts)
+
145  {
+
146  for(skinContactList::iterator it=skinContacts->begin(); it!=skinContacts->end(); it++){
+
147  if(it->getBodyPart() == LEFT_ARM)
+
148  i_touching_left += it->getActiveTaxels();
+
149  else if(it->getBodyPart() == RIGHT_ARM)
+
150  i_touching_right += it->getActiveTaxels();
+
151  }
+
152  }
+
153  i_touching_diff=i_touching_left-i_touching_right;
+
154 
+
155  if (abs(i_touching_diff)<5)
+
156  {
+
157  yInfo("nothing!\n");
+
158  }
+
159  else
+
160  if (i_touching_left>i_touching_right)
+
161  {
+
162  yInfo("Touching left arm! \n");
+
163  if (!left_arm_master) change_master();
+
164  }
+
165  else
+
166  if (i_touching_right>i_touching_left)
+
167  {
+
168  yInfo("Touching right arm! \n");
+
169  if (left_arm_master) change_master();
+
170  }
+
171 
+
172  if (left_arm_master)
+
173  {
+
174  robot->ienc[LEFT_ARM] ->getEncoders(encoders_master);
+
175  robot->ienc[RIGHT_ARM]->getEncoders(encoders_slave);
+
176  if (port_left_arm->getOutputCount()>0)
+
177  {
+
178  port_left_arm->prepare()= Vector(16,encoders_master);
+
179  port_left_arm->setEnvelope(info);
+
180  port_left_arm->write();
+
181  }
+
182  if (port_right_arm->getOutputCount()>0)
+
183  {
+
184  port_right_arm->prepare()= Vector(16,encoders_slave);
+
185  port_right_arm->setEnvelope(info);
+
186  port_right_arm->write();
+
187  }
+
188 
+
189  for (int i=jjj; i<5; i++)
+
190  {
+
191  robot->idir[RIGHT_ARM]->setPosition(i,encoders_master[i]);
+
192  }
+
193  }
+
194  else
+
195  {
+
196  robot->ienc[RIGHT_ARM]->getEncoders(encoders_master);
+
197  robot->ienc[LEFT_ARM] ->getEncoders(encoders_slave);
+
198  for (int i=jjj; i<5; i++)
+
199  {
+
200  robot->idir[LEFT_ARM]->setPosition(i,encoders_master[i]);
+
201  }
+
202 
+
203  }
+
204  }
+
205 
+
206  void change_master()
+
207  {
+
208  left_arm_master=(!left_arm_master);
+
209  if (left_arm_master)
+
210  {
+
211  for (int i=jjj; i<5; i++)
+
212  {
+
213  robot->icmd[LEFT_ARM]->setControlMode(i, VOCAB_CM_TORQUE);
+
214  robot->icmd[RIGHT_ARM]->setControlMode(i, VOCAB_CM_POSITION_DIRECT);
+
215  if (stiff==false) robot->iint[RIGHT_ARM]->setInteractionMode(i,VOCAB_IM_COMPLIANT);
+
216  else robot->iint[RIGHT_ARM]->setInteractionMode(i,VOCAB_IM_STIFF);
+
217  }
+
218  }
+
219  else
+
220  {
+
221  for (int i=jjj; i<5; i++)
+
222  {
+
223  robot->icmd[LEFT_ARM]->setControlMode(i, VOCAB_CM_POSITION_DIRECT);
+
224  if (stiff==false) robot->iint[LEFT_ARM]->setInteractionMode(i,VOCAB_IM_COMPLIANT);
+
225  else robot->iint[LEFT_ARM]->setInteractionMode(i,VOCAB_IM_STIFF);
+
226  robot->icmd[RIGHT_ARM]->setControlMode(i, VOCAB_CM_TORQUE);
+
227  }
+
228  }
+
229  }
+
230 
+
231  void closePort(Contactable *_port)
+
232  {
+
233  if (_port)
+
234  {
+
235  _port->interrupt();
+
236  _port->close();
+
237 
+
238  delete _port;
+
239  _port = 0;
+
240  }
+
241  }
+
242 
+
243  virtual void threadRelease()
+
244  {
+
245  for (int i=0; i<5; i++)
+
246  {
+
247  robot->icmd[LEFT_ARM] ->setControlMode(i, VOCAB_CM_POSITION);
+
248  robot->icmd[RIGHT_ARM]->setControlMode(i, VOCAB_CM_POSITION);
+
249  robot->iint[LEFT_ARM] ->setInteractionMode(i,VOCAB_IM_STIFF);
+
250  robot->iint[RIGHT_ARM]->setInteractionMode(i,VOCAB_IM_STIFF);
+
251  }
+
252  closePort(port_skin_contacts);
+
253  closePort(port_left_arm);
+
254  closePort(port_right_arm);
+
255  }
+
256 };
+
257 
+
258 
+
259 
+
260 class CtrlModule: public RFModule
+
261 {
+
262  public:
+
263  CtrlThread *control_thr;
+
264  CtrlModule();
+
265 
+
266  virtual bool configure(ResourceFinder &rf)
+
267  {
+
268  int rate = rf.check("period",Value(20)).asInt32();
+
269  control_thr=new CtrlThread(rate,rf);
+
270  if (!control_thr->start())
+
271  {
+
272  delete control_thr;
+
273  return false;
+
274  }
+
275  return true;
+
276  }
+
277 
+
278  virtual double getPeriod() { return 1.0; }
+
279  virtual bool updateModule() { return true; }
+
280  virtual bool close()
+
281  {
+
282  if (control_thr)
+
283  {
+
284  control_thr->stop();
+
285  delete control_thr;
+
286  }
+
287  return true;
+
288  }
+
289  bool respond(const Bottle& command, Bottle& reply)
+
290  {
+
291  yInfo("rpc respond, still to be implemented\n");
+
292  Bottle cmd;
+
293  reply.clear();
+
294 
+
295  return true;
+
296  }
+
297 };
+
298 
+
299 CtrlModule::CtrlModule()
+
300 {
+
301 
+
302 }
+
303 
+
304 int main(int argc, char * argv[])
+
305 {
+
306  ResourceFinder rf;
+
307  rf.configure(argc,argv);
+
308  //rf.setDefaultContext("empty");
+
309  //rf.setDefaultConfigFile("empty");
+
310 
+
311  if (rf.check("help"))
+
312  {
+
313  yInfo("help not yet implemented\n");
+
314  }
+
315 
+
316  //initialize yarp network
+
317  Network yarp;
+
318 
+
319  if (!yarp.checkNetwork())
+
320  {
+
321  yError("Sorry YARP network does not seem to be available, is the yarp server available?\n");
+
322  return 1;
+
323  }
+
324 
+
325  CtrlModule mod;
+
326 
+
327  return mod.runModule(rf);
+
328 }
+
329 
+
330 
+
+ + + + diff --git a/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8cpp_source.html b/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8cpp_source.html new file mode 100644 index 0000000..839bd8d --- /dev/null +++ b/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8cpp_source.html @@ -0,0 +1,217 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceImitation/src/robot_interfaces.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
robot_interfaces.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #include "robot_interfaces.h"
+
19 #include <string>
+
20 
+
21 using namespace yarp::os;
+
22 using namespace yarp::dev;
+
23 using namespace iCub::skinDynLib;
+
24 
+
25 robot_interfaces::robot_interfaces()
+
26 {
+
27  bodyParts.resize(5);
+
28  bodyParts[0] = TORSO;
+
29  bodyParts[1] = LEFT_ARM;
+
30  bodyParts[2] = RIGHT_ARM;
+
31  bodyParts[3] = LEFT_LEG;
+
32  bodyParts[4] = RIGHT_LEG;
+
33 }
+
34 
+
35 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart bp1)
+
36 {
+
37  bodyParts.resize(1);
+
38  bodyParts[0] = bp1;
+
39 }
+
40 
+
41 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2)
+
42 {
+
43  bodyParts.resize(2);
+
44  bodyParts[0] = bp1;
+
45  bodyParts[1] = bp2;
+
46 }
+
47 
+
48 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3)
+
49 {
+
50  bodyParts.resize(3);
+
51  bodyParts[0] = bp1;
+
52  bodyParts[1] = bp2;
+
53  bodyParts[2] = bp3;
+
54 }
+
55 
+
56 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3,
+
57  iCub::skinDynLib::BodyPart bp4)
+
58 {
+
59  bodyParts.resize(4);
+
60  bodyParts[0] = bp1;
+
61  bodyParts[1] = bp2;
+
62  bodyParts[2] = bp3;
+
63  bodyParts[3] = bp4;
+
64 }
+
65 
+
66 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3,
+
67  iCub::skinDynLib::BodyPart bp4, iCub::skinDynLib::BodyPart bp5)
+
68 {
+
69  bodyParts.resize(5);
+
70  bodyParts[0] = bp1;
+
71  bodyParts[1] = bp2;
+
72  bodyParts[2] = bp3;
+
73  bodyParts[3] = bp4;
+
74  bodyParts[4] = bp5;
+
75 }
+
76 
+
77 robot_interfaces::robot_interfaces(iCub::skinDynLib::BodyPart *bps, int size)
+
78 {
+
79  bodyParts.resize(size);
+
80  for(int i=0; i<size; i++)
+
81  bodyParts[i] = bps[i];
+
82 }
+
83 
+
84 bool robot_interfaces::init()
+
85 {
+
86  std::string part;
+
87  std::string robot;
+
88  std::string localPort;
+
89  std::string remotePort;
+
90 
+
91  robot = "icub";
+
92  BodyPart i;
+
93  bool ok = true;
+
94  for (unsigned int iii=0; iii<bodyParts.size(); iii++)
+
95  {
+
96  i = bodyParts[iii];
+
97 
+
98  ipos[i]=0;
+
99  itrq[i]=0;
+
100  iimp[i]=0;
+
101  icmd[i]=0;
+
102  ienc[i]=0;
+
103  ipid[i]=0;
+
104  ivel[i]=0;
+
105  iamp[i]=0;
+
106  iint[i]=0;
+
107  idir[i]=0;
+
108  dd[i]=0;
+
109 
+
110  part = BodyPart_s[i];
+
111  localPort = "/demoForceControl/" + part;
+
112  remotePort = "/" + robot + "/" + part;
+
113  options[i].put("robot",robot);
+
114  options[i].put("part",part);
+
115  options[i].put("device","remote_controlboard");
+
116  options[i].put("local",localPort);
+
117  options[i].put("remote",remotePort);
+
118 
+
119  dd[i] = new PolyDriver(options[i]);
+
120  if(!dd[i] || !(dd[i]->isValid()))
+
121  {
+
122  yError("Problems instantiating the device driver %s\n", part.c_str());
+
123  }
+
124 
+
125  ok = ok & dd[i]->view(ipos[i]);
+
126  ok = ok & dd[i]->view(itrq[i]);
+
127  ok = ok & dd[i]->view(iimp[i]);
+
128  ok = ok & dd[i]->view(icmd[i]);
+
129  ok = ok & dd[i]->view(ivel[i]);
+
130  ok = ok & dd[i]->view(ienc[i]);
+
131  ok = ok & dd[i]->view(ipid[i]);
+
132  ok = ok & dd[i]->view(iamp[i]);
+
133  ok = ok & dd[i]->view(iint[i]);
+
134  ok = ok & dd[i]->view(idir[i]);
+
135  }
+
136  return ok;
+
137 }
+
138 
+
139 
+
+ + + + diff --git a/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8h_source.html b/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8h_source.html new file mode 100644 index 0000000..8f2fda9 --- /dev/null +++ b/doxygen/doc/html/demoForceImitation_2src_2robot__interfaces_8h_source.html @@ -0,0 +1,141 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceImitation/src/robot_interfaces.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
robot_interfaces.h
+
+
+
1 /*
+
2  * Copyright (C) 2011 Department of Robotics Brain and Cognitive Sciences - Istituto Italiano di Tecnologia
+
3  * Author: Marco Randazzo
+
4  * email: marco.randazzo@iit.it
+
5  * Permission is granted to copy, distribute, and/or modify this program
+
6  * under the terms of the GNU General Public License, version 2 or any
+
7  * later version published by the Free Software Foundation.
+
8  *
+
9  * A copy of the license can be found at
+
10  * http://www.robotcub.org/icub/license/gpl.txt
+
11  *
+
12  * This program is distributed in the hope that it will be useful, but
+
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
15  * Public License for more details
+
16 */
+
17 
+
18 #ifndef ROBOT_INTERFACES_H
+
19 #define ROBOT_INTERFACES_H
+
20 
+
21 #include <yarp/dev/all.h>
+
22 #include <yarp/dev/ControlBoardInterfaces.h>
+
23 #include <iCub/skinDynLib/common.h>
+
24 #include <map>
+
25 #include <vector>
+
26 
+
27 class robot_interfaces
+
28 {
+
29  public:
+
30 
+
31  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IPositionControl*> ipos;
+
32  std::map<iCub::skinDynLib::BodyPart, yarp::dev::ITorqueControl*> itrq;
+
33  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IImpedanceControl*> iimp;
+
34  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IControlMode*> icmd;
+
35  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IInteractionMode*> iint;
+
36  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IEncoders*> ienc;
+
37  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IPidControl*> ipid;
+
38  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IPositionDirect*> idir;
+
39  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IVelocityControl*> ivel;
+
40  std::map<iCub::skinDynLib::BodyPart, yarp::dev::IAmplifierControl*> iamp;
+
41 
+
42  std::map<iCub::skinDynLib::BodyPart, yarp::os::Property> options;
+
43  std::map<iCub::skinDynLib::BodyPart, yarp::dev::PolyDriver*> dd;
+
44 
+
45  // *** CONSTRUCTORS ***
+
49  robot_interfaces();
+
50  robot_interfaces(iCub::skinDynLib::BodyPart bp1);
+
51  robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2);
+
52  robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3);
+
53  robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3,
+
54  iCub::skinDynLib::BodyPart bp4);
+
55  robot_interfaces(iCub::skinDynLib::BodyPart bp1, iCub::skinDynLib::BodyPart bp2, iCub::skinDynLib::BodyPart bp3,
+
56  iCub::skinDynLib::BodyPart bp4, iCub::skinDynLib::BodyPart bp5);
+
57  robot_interfaces(iCub::skinDynLib::BodyPart *bps, int size);
+
58 
+
59  bool init();
+
60 
+
61 private:
+
62  std::vector<iCub::skinDynLib::BodyPart> bodyParts; // list of the body parts for which the interfaces are open
+
63 };
+
64 
+
65 #endif
+
66 
+
+ + + + diff --git a/doxygen/doc/html/demoRedBall_2src_2main_8cpp_source.html b/doxygen/doc/html/demoRedBall_2src_2main_8cpp_source.html new file mode 100644 index 0000000..87dfdad --- /dev/null +++ b/doxygen/doc/html/demoRedBall_2src_2main_8cpp_source.html @@ -0,0 +1,2059 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/src/main.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
main.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
+
3  * Author: Ugo Pattacini
+
4  * email: ugo.pattacini@iit.it
+
5  * website: www.robotcub.org
+
6  * Permission is granted to copy, distribute, and/or modify this program
+
7  * under the terms of the GNU General Public License, version 2 or any
+
8  * later version published by the Free Software Foundation.
+
9  *
+
10  * A copy of the license can be found at
+
11  * http://www.robotcub.org/icub/license/gpl.txt
+
12  *
+
13  * This program is distributed in the hope that it will be useful, but
+
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
16  * Public License for more details
+
17 */
+
18 
+
244 #include <string>
+
245 #include <cmath>
+
246 #include <vector>
+
247 #include <algorithm>
+
248 
+
249 #include <yarp/os/all.h>
+
250 #include <yarp/dev/all.h>
+
251 #include <yarp/sig/Vector.h>
+
252 #include <yarp/math/Math.h>
+
253 #include <yarp/math/Rand.h>
+
254 
+
255 #include <iCub/ctrl/neuralNetworks.h>
+
256 #include <iCub/iKin/iKinFwd.h>
+
257 
+
258 #define DEFAULT_THR_PER 20
+
259 
+
260 #define NOARM 0
+
261 #define LEFTARM 1
+
262 #define RIGHTARM 2
+
263 #define USEDARM 3
+
264 
+
265 #define OPENHAND 0
+
266 #define CLOSEHAND 1
+
267 
+
268 #define FACE_HAPPY ("hap")
+
269 #define FACE_SAD ("sad")
+
270 #define FACE_ANGRY ("ang")
+
271 #define FACE_SHY ("shy")
+
272 #define FACE_EVIL ("evi")
+
273 #define FACE_CUNNING ("cun")
+
274 #define FACE_SURPRISED ("sur")
+
275 
+
276 #define STATE_IDLE 0
+
277 #define STATE_REACH 1
+
278 #define STATE_CHECKMOTIONDONE 2
+
279 #define STATE_RELEASE 3
+
280 #define STATE_WAIT 4
+
281 
+
282 using namespace std;
+
283 using namespace yarp::os;
+
284 using namespace yarp::sig;
+
285 using namespace yarp::dev;
+
286 using namespace yarp::math;
+
287 using namespace iCub::ctrl;
+
288 using namespace iCub::iKin;
+
289 
+
290 
+
291 class Predictor
+
292 {
+
293 protected:
+
294  ff2LayNN_tansig_purelin net;
+
295 
+
296 public:
+
297  bool configure(Property &options)
+
298  {
+
299  if (net.configure(options))
+
300  {
+
301  net.printStructure();
+
302  return true;
+
303  }
+
304  else
+
305  return false;
+
306  }
+
307 
+
308  Vector predict(const Vector &head, Bottle *imdLeft, Bottle *imdRight)
+
309  {
+
310  Bottle *firstBlobLeft=imdLeft->get(0).asList();
+
311  Bottle *firstBlobRight=imdRight->get(0).asList();
+
312 
+
313  Vector in(7);
+
314  in[0]=head[3]; // tilt
+
315  in[1]=head[4]; // pan
+
316  in[2]=head[5]; // ver
+
317  in[3]=firstBlobLeft->get(0).asFloat64(); // ul
+
318  in[4]=firstBlobLeft->get(1).asFloat64(); // vl
+
319  in[5]=firstBlobRight->get(0).asFloat64(); // ur
+
320  in[6]=firstBlobRight->get(1).asFloat64(); // vr
+
321 
+
322  return net.predict(in);
+
323  }
+
324 };
+
325 
+
326 
+
327 class managerThread : public PeriodicThread
+
328 {
+
329 protected:
+
330  ResourceFinder &rf;
+
331 
+
332  string name;
+
333  string robot;
+
334  string eyeUsed;
+
335 
+
336  std::vector<string> speech_grasp;
+
337  std::vector<string> speech_reach;
+
338  std::vector<string> speech_idle;
+
339 
+
340  bool useSpeech;
+
341  bool useLeftArm;
+
342  bool useRightArm;
+
343  bool useTorso;
+
344  int armSel;
+
345  bool simulation;
+
346  bool go;
+
347 
+
348  PolyDriver *drvTorso, *drvHead, *drvLeftArm, *drvRightArm;
+
349  PolyDriver *drvCartLeftArm, *drvCartRightArm;
+
350  PolyDriver *drvGazeCtrl;
+
351 
+
352  IEncoders *encTorso;
+
353  IEncoders *encHead;
+
354  IControlMode *modeTorso;
+
355  IPositionControl *posTorso;
+
356  IEncoders *encArm;
+
357  IControlMode *modeArm;
+
358  IPositionControl *posArm;
+
359  ICartesianControl *cartArm;
+
360  IGazeControl *gazeCtrl;
+
361 
+
362  BufferedPort<Bottle> inportTrackTarget;
+
363  BufferedPort<Bottle> inportIMDTargetLeft;
+
364  BufferedPort<Bottle> inportIMDTargetRight;
+
365  Port outportGui;
+
366  Port outportCmdFace;
+
367  Port outportSpeech;
+
368 
+
369  RpcClient breatherHrpc;
+
370  RpcClient breatherLArpc;
+
371  RpcClient breatherRArpc;
+
372  RpcClient blinkerrpc;
+
373  RpcClient lookSkinrpc;
+
374  BufferedPort<Bottle> gazeboMoverPort;
+
375 
+
376  Vector leftArmReachOffs;
+
377  Vector leftArmGraspOffs;
+
378  Vector leftArmHandOrien;
+
379  Vector leftArmJointsStiffness;
+
380  Vector leftArmJointsDamping;
+
381 
+
382  Vector rightArmReachOffs;
+
383  Vector rightArmGraspOffs;
+
384  Vector rightArmHandOrien;
+
385  Vector rightArmJointsStiffness;
+
386  Vector rightArmJointsDamping;
+
387 
+
388  Vector *armReachOffs;
+
389  Vector *armGraspOffs;
+
390  Vector *armHandOrien;
+
391 
+
392  Vector homePoss, homeVels;
+
393 
+
394  Predictor pred;
+
395  bool useNetwork;
+
396  bool wentHome;
+
397  bool leftGraspEnable;
+
398  bool rightGraspEnable;
+
399  bool leftArmImpVelMode;
+
400  bool rightArmImpVelMode;
+
401 
+
402  double trajTime;
+
403  double reachTol;
+
404  double idleTimer, idleTmo;
+
405  double hystThres;
+
406  double sphereRadius, sphereTmo;
+
407  double releaseTmo;
+
408 
+
409  double latchTimer;
+
410  Vector sphereCenter;
+
411 
+
412  Vector openHandPoss, closeHandPoss;
+
413  Vector handVels;
+
414 
+
415  Vector targetPos;
+
416  Vector torso;
+
417  Vector head;
+
418 
+
419  Matrix R,Rx,Ry,Rz;
+
420 
+
421  int state;
+
422  bool state_breathers;
+
423  int startup_context_id_left;
+
424  int startup_context_id_right;
+
425  int startup_context_id_gaze;
+
426 
+
427  void breathersHandler(const bool sw)
+
428  {
+
429  Bottle msg,reply;
+
430  msg.addString(sw?"start":"stop");
+
431 
+
432  if (breatherHrpc.getOutputCount()>0)
+
433  {
+
434  breatherHrpc.write(msg);
+
435  }
+
436 
+
437  if (breatherLArpc.getOutputCount()>0)
+
438  {
+
439  breatherLArpc.write(msg);
+
440  }
+
441 
+
442  if (breatherRArpc.getOutputCount()>0)
+
443  {
+
444  breatherRArpc.write(msg);
+
445  }
+
446 
+
447  if (blinkerrpc.getOutputCount()>0)
+
448  {
+
449  blinkerrpc.write(msg);
+
450  }
+
451 
+
452  if (lookSkinrpc.getOutputCount()>0)
+
453  {
+
454  lookSkinrpc.write(msg);
+
455  }
+
456 
+
457  state_breathers = !sw;
+
458  }
+
459 
+
460  void sendSpeak(const string &txt)
+
461  {
+
462  if (outportSpeech.getOutputCount()>0)
+
463  {
+
464  Bottle msg,reply;
+
465  msg.addString(txt);
+
466  outportSpeech.write(msg);
+
467  }
+
468  }
+
469 
+
470  void getTorsoOptions(Bottle &b, const char *type, const int i, Vector &sw, Matrix &lim)
+
471  {
+
472  if (b.check(type))
+
473  {
+
474  Bottle &grp=b.findGroup(type);
+
475  sw[i]=grp.get(1).asString()=="on"?1.0:0.0;
+
476 
+
477  if (grp.check("min","Getting minimum value"))
+
478  {
+
479  lim(i,0)=1.0;
+
480  lim(i,1)=grp.find("min").asFloat64();
+
481  }
+
482 
+
483  if (grp.check("max","Getting maximum value"))
+
484  {
+
485  lim(i,2)=1.0;
+
486  lim(i,3)=grp.find("max").asFloat64();
+
487  }
+
488  }
+
489  }
+
490 
+
491  void getArmOptions(Bottle &b, bool &graspEnable, Vector &reachOffs,
+
492  Vector &graspOffs, Vector &orien, bool &impVelMode,
+
493  Vector &impStiff, Vector &impDamp)
+
494  {
+
495  graspEnable=b.check("grasp_enable",Value("on"),"Getting arm grasp mode").asString()=="on"?true:false;
+
496 
+
497  if (b.check("reach_offset","Getting reaching offset"))
+
498  {
+
499  Bottle &grp=b.findGroup("reach_offset");
+
500  int sz=grp.size()-1;
+
501  int len=sz>3?3:sz;
+
502 
+
503  for (int i=0; i<len; i++)
+
504  reachOffs[i]=grp.get(1+i).asFloat64();
+
505  }
+
506 
+
507  if (b.check("grasp_offset","Getting grasping offset"))
+
508  {
+
509  Bottle &grp=b.findGroup("grasp_offset");
+
510  int sz=grp.size()-1;
+
511  int len=sz>3?3:sz;
+
512 
+
513  for (int i=0; i<len; i++)
+
514  graspOffs[i]=grp.get(1+i).asFloat64();
+
515  }
+
516 
+
517  if (b.check("hand_orientation","Getting hand orientation"))
+
518  {
+
519  Bottle &grp=b.findGroup("hand_orientation");
+
520  int sz=grp.size()-1;
+
521  int len=sz>4?4:sz;
+
522 
+
523  for (int i=0; i<len; i++)
+
524  orien[i]=grp.get(1+i).asFloat64();
+
525  }
+
526 
+
527  impVelMode=b.check("impedance_velocity_mode",Value("off"),"Getting arm impedance-velocity-mode").asString()=="on"?true:false;
+
528 
+
529  if (b.check("impedance_stiffness","Getting joints stiffness"))
+
530  {
+
531  Bottle &grp=b.findGroup("impedance_stiffness");
+
532  size_t sz=grp.size()-1;
+
533  size_t len=sz>impStiff.length()?impStiff.length():sz;
+
534 
+
535  for (size_t i=0; i<len; i++)
+
536  impStiff[i]=grp.get(1+i).asFloat64();
+
537  }
+
538 
+
539  if (b.check("impedance_damping","Getting joints damping"))
+
540  {
+
541  Bottle &grp=b.findGroup("impedance_damping");
+
542  size_t sz=grp.size()-1;
+
543  size_t len=sz>impDamp.length()?impDamp.length():sz;
+
544 
+
545  for (size_t i=0; i<len; i++)
+
546  impDamp[i]=grp.get(1+i).asFloat64();
+
547  }
+
548  }
+
549 
+
550  bool getHomeOptions(Bottle &b, Vector &poss, Vector &vels)
+
551  {
+
552  bool ret = true;
+
553  if (b.check("poss","Getting home poss"))
+
554  {
+
555  Bottle &grp=b.findGroup("poss");
+
556  int sz=grp.size()-1;
+
557  int len=sz>7?7:sz;
+
558 
+
559  for (int i=0; i<len; i++)
+
560  poss[i]=grp.get(1+i).asFloat64();
+
561  }
+
562  else
+
563  {
+
564  yError("Missing 'poss' parameter");
+
565  ret = false;
+
566  }
+
567 
+
568  if (b.check("vels","Getting home vels"))
+
569  {
+
570  Bottle &grp=b.findGroup("vels");
+
571  int sz=grp.size()-1;
+
572  int len=sz>7?7:sz;
+
573 
+
574  for (int i=0; i<len; i++)
+
575  vels[i]=grp.get(1+i).asFloat64();
+
576  }
+
577  else
+
578  {
+
579  yError("Missing 'vels' parameter");
+
580  ret = false;
+
581  }
+
582  return ret;
+
583  }
+
584 
+
585  bool getGraspOptions(Bottle &b, Vector &openPoss, Vector &closePoss, Vector &vels)
+
586  {
+
587  bool ret = true;
+
588  if (b.check("open_hand","Getting openHand poss"))
+
589  {
+
590  Bottle &grp=b.findGroup("open_hand");
+
591  int sz=grp.size()-1;
+
592  int len=sz>9?9:sz;
+
593 
+
594  for (int i=0; i<len; i++)
+
595  openPoss[i]=grp.get(1+i).asFloat64();
+
596  }
+
597  else
+
598  {
+
599  yError("Missing 'open_hand' parameter");
+
600  ret = false;
+
601  }
+
602 
+
603  if (b.check("close_hand","Getting closeHand poss"))
+
604  {
+
605  Bottle &grp=b.findGroup("close_hand");
+
606  int sz=grp.size()-1;
+
607  int len=sz>9?9:sz;
+
608 
+
609  for (int i=0; i<len; i++)
+
610  closePoss[i]=grp.get(1+i).asFloat64();
+
611  }
+
612  else
+
613  {
+
614  yError("Missing 'close_hand' parameter");
+
615  ret = false;
+
616  }
+
617 
+
618  if (b.check("vels_hand","Getting hand vels"))
+
619  {
+
620  Bottle &grp=b.findGroup("vels_hand");
+
621  int sz=grp.size()-1;
+
622  int len=sz>9?9:sz;
+
623 
+
624  for (int i=0; i<len; i++)
+
625  vels[i]=grp.get(1+i).asFloat64();
+
626  }
+
627  else
+
628  {
+
629  yError("Missing 'vels_hand' parameter");
+
630  ret = false;
+
631  }
+
632  return ret;
+
633  }
+
634 
+
635  void getSpeechOptions(Bottle &b, std::vector<string> &grasp,
+
636  std::vector<string> &reach, std::vector<string> &idle)
+
637  {
+
638  Bottle &bSpeechGrasp=b.findGroup("speech_grasp");
+
639  for (int i=1; i<bSpeechGrasp.size(); i++)
+
640  {
+
641  std::string str = bSpeechGrasp.get(i).asList()->toString();
+
642  str.erase(std::remove(str.begin(), str.end(), '\"'), str.end());
+
643  grasp.push_back(str);
+
644  }
+
645 
+
646  Bottle &bSpeechReach=b.findGroup("speech_reach");
+
647  for (int i=1; i<bSpeechReach.size(); i++)
+
648  {
+
649  std::string str = bSpeechReach.get(i).asList()->toString();
+
650  str.erase(std::remove(str.begin(), str.end(), '\"'), str.end());
+
651  reach.push_back(str);
+
652  }
+
653 
+
654  Bottle &bSpeechIdle=b.findGroup("speech_idle");
+
655  for (int i=1; i<bSpeechIdle.size(); i++)
+
656  {
+
657  std::string str = bSpeechIdle.get(i).asList()->toString();
+
658  str.erase(std::remove(str.begin(), str.end(), '\"'), str.end());
+
659  idle.push_back(str);
+
660  }
+
661  }
+
662 
+
663  void initCartesianCtrl(const Vector &sw, const Matrix &lim, const int sel=USEDARM)
+
664  {
+
665  ICartesianControl *icart=cartArm;
+
666  Vector dof;
+
667  string type;
+
668 
+
669  if (sel==LEFTARM)
+
670  {
+
671  if (useLeftArm)
+
672  {
+
673  drvCartLeftArm->view(icart);
+
674  icart->storeContext(&startup_context_id_left);
+
675  icart->restoreContext(0);
+
676  }
+
677  else
+
678  return;
+
679 
+
680  type="left_arm";
+
681  }
+
682  else if (sel==RIGHTARM)
+
683  {
+
684  if (useRightArm)
+
685  {
+
686  drvCartRightArm->view(icart);
+
687  icart->storeContext(&startup_context_id_right);
+
688  icart->restoreContext(0);
+
689  }
+
690  else
+
691  return;
+
692 
+
693  type="right_arm";
+
694  }
+
695  else if (armSel!=NOARM)
+
696  type=armSel==LEFTARM?"left_arm":"right_arm";
+
697  else
+
698  return;
+
699 
+
700  yInfo("*** Initializing %s controller ...",type.c_str());
+
701 
+
702  icart->setTrackingMode(false);
+
703  icart->setTrajTime(trajTime);
+
704  icart->setInTargetTol(reachTol);
+
705  icart->getDOF(dof);
+
706 
+
707  Bottle info;
+
708  icart->getInfo(info);
+
709  auto hwver=iKinLimbVersion(info.find("arm_version").asString());
+
710 
+
711  if (useTorso)
+
712  {
+
713  Vector sw_ = sw;
+
714  Matrix lim_=lim;
+
715  if (hwver>=iKinLimbVersion("3.0"))
+
716  {
+
717  sw_[0]=sw[1];
+
718  sw_[1]=sw[0];
+
719 
+
720  lim_.setSubrow(lim.getRow(1),0,0);
+
721  lim_.setSubrow(lim.getRow(0),1,0);
+
722  }
+
723 
+
724  for (size_t j=0; j<sw_.length(); j++)
+
725  {
+
726  dof[j]=sw_[j];
+
727  if ((sw_[j]!=0.0) && ((lim_(j,0)!=0.0) || (lim_(j,2)!=0.0)))
+
728  {
+
729  double min, max;
+
730  icart->getLimits(j,&min,&max);
+
731 
+
732  if (lim_(j,0)!=0.0)
+
733  min=lim_(j,1);
+
734 
+
735  if (lim_(j,2)!=0.0)
+
736  max=lim_(j,3);
+
737 
+
738  bool ok=icart->setLimits(j,min,max);
+
739  yInfo("jnt #%d in [%g, %g] deg => %s",(int)j,min,max,ok?"ok":"failed");
+
740  }
+
741  }
+
742  }
+
743  // there exist robots w/o torso, hence equipped w/ only 7 DOFs
+
744  else if (dof.size()>7)
+
745  {
+
746  dof[0]=dof[1]=dof[2]=0.0;
+
747  yInfo("Disabled torso joints");
+
748  }
+
749 
+
750  icart->setDOF(dof,dof);
+
751  yInfo("DOF=(%s)",dof.toString(0,1).c_str());
+
752  }
+
753 
+
754  void getSensorData()
+
755  {
+
756  bool newTarget=false;
+
757  if (useTorso)
+
758  if (encTorso->getEncoders(torso.data()))
+
759  R=rotx(torso[1])*roty(-torso[2])*rotz(-torso[0]);
+
760  encHead->getEncoders(head.data());
+
761 
+
762  if (useNetwork)
+
763  {
+
764  Bottle *imdTargetLeft=inportIMDTargetLeft.read(false);
+
765  Bottle *imdTargetRight=inportIMDTargetRight.read(false);
+
766 
+
767  if ((imdTargetLeft!=NULL) && (imdTargetRight!=NULL))
+
768  {
+
769  Vector x,o;
+
770  if (eyeUsed=="left")
+
771  gazeCtrl->getLeftEyePose(x,o);
+
772  else
+
773  gazeCtrl->getRightEyePose(x,o);
+
774 
+
775  Matrix T=axis2dcm(o);
+
776  T.setSubcol(x,0,3);
+
777 
+
778  Vector netout=pred.predict(head,imdTargetLeft,imdTargetRight);
+
779  netout.push_back(1.0);
+
780  targetPos=(T*netout).subVector(0,2);
+
781  newTarget=true;
+
782  }
+
783  }
+
784  else if (Bottle *targetPosNew=inportTrackTarget.read(false))
+
785  {
+
786  if (targetPosNew->size()>6)
+
787  {
+
788  if (targetPosNew->get(6).asFloat64()==1.0)
+
789  {
+
790  Vector fp(4);
+
791  fp[0]=targetPosNew->get(0).asFloat64();
+
792  fp[1]=targetPosNew->get(1).asFloat64();
+
793  fp[2]=targetPosNew->get(2).asFloat64();
+
794  fp[3]=1.0;
+
795 
+
796  if ((isnan(fp[0])==0) && (isnan(fp[1])==0) && (isnan(fp[2])==0))
+
797  {
+
798  Vector x,o;
+
799  if (eyeUsed=="left")
+
800  gazeCtrl->getLeftEyePose(x,o);
+
801  else
+
802  gazeCtrl->getRightEyePose(x,o);
+
803 
+
804  Matrix T=axis2dcm(o);
+
805  T.setSubcol(x,0,3);
+
806 
+
807  targetPos=T*fp;
+
808  targetPos.pop_back();
+
809  newTarget=true;
+
810  }
+
811  }
+
812  }
+
813  }
+
814 
+
815  if (newTarget)
+
816  {
+
817  idleTimer=Time::now();
+
818 
+
819  if (state==STATE_IDLE)
+
820  {
+
821  resetTargetBall();
+
822  breathersHandler(false);
+
823  yInfo("--- Got target => REACHING");
+
824 
+
825  wentHome=false;
+
826  state=STATE_REACH;
+
827  if(useSpeech) sendSpeak(speech_reach[(int)Rand::scalar(0,speech_reach.size()-1e-3)]);
+
828  }
+
829  }
+
830  else if (((state==STATE_IDLE) || (state==STATE_REACH)) &&
+
831  ((Time::now()-idleTimer)>idleTmo) && !wentHome && !simulation)
+
832  {
+
833  yInfo("--- Target timeout => IDLE");
+
834 
+
835  stopControl();
+
836  steerTorsoToHome();
+
837  steerHeadToHome();
+
838  steerArmToHome(LEFTARM);
+
839  steerArmToHome(RIGHTARM);
+
840 
+
841  wentHome=true;
+
842  deleteGuiTarget();
+
843  if(useSpeech) sendSpeak(speech_idle[(int)Rand::scalar(0,speech_idle.size()-1e-3)]);
+
844  state=STATE_IDLE;
+
845  }
+
846  }
+
847 
+
848  void doIdle()
+
849  {
+
850  if (state==STATE_IDLE)
+
851  {
+
852  if (state_breathers)
+
853  if (checkForHomePos())
+
854  breathersHandler(true);
+
855  }
+
856  }
+
857 
+
858  bool checkForHomePos()
+
859  {
+
860  IEncoders *iencsLA;
+
861  IEncoders *iencsRA;
+
862  if (useLeftArm) drvLeftArm->view(iencsLA);
+
863  if (useRightArm) drvRightArm->view(iencsRA);
+
864 
+
865  if (breatherHrpc.getOutputCount()>0)
+
866  {
+
867  bool done;
+
868  gazeCtrl->checkMotionDone(&done);
+
869  if (!done)
+
870  return false;
+
871  }
+
872 
+
873  int axes;
+
874  Vector encs;
+
875 
+
876  if (useLeftArm && breatherLArpc.getOutputCount()>0)
+
877  {
+
878  iencsLA->getAxes(&axes);
+
879  encs.resize(axes,0.0);
+
880  iencsLA->getEncoders(encs.data());
+
881  if (norm(encs.subVector(0,homePoss.length()-1)-homePoss)>4.0)
+
882  return false;
+
883  }
+
884 
+
885  if (useRightArm && breatherRArpc.getOutputCount()>0)
+
886  {
+
887  iencsRA->getAxes(&axes);
+
888  encs.resize(axes,0.0);
+
889  iencsRA->getEncoders(encs.data());
+
890  if (norm(encs.subVector(0,homePoss.length()-1)-homePoss)>4.0)
+
891  return false;
+
892  }
+
893 
+
894  return true;
+
895  }
+
896 
+
897  void commandHead()
+
898  {
+
899  if (state!=STATE_IDLE)
+
900  {
+
901  gazeCtrl->lookAtFixationPoint(targetPos);
+
902 
+
903  if (outportGui.getOutputCount()>0)
+
904  {
+
905  Bottle obj;
+
906  obj.addString("object");
+
907  obj.addString("ball");
+
908 
+
909  // size
+
910  obj.addFloat64(50.0);
+
911  obj.addFloat64(50.0);
+
912  obj.addFloat64(50.0);
+
913 
+
914  // positions
+
915  obj.addFloat64(1000.0*targetPos[0]);
+
916  obj.addFloat64(1000.0*targetPos[1]);
+
917  obj.addFloat64(1000.0*targetPos[2]);
+
918 
+
919  // orientation
+
920  obj.addFloat64(0.0);
+
921  obj.addFloat64(0.0);
+
922  obj.addFloat64(0.0);
+
923 
+
924  // color
+
925  obj.addInt32(255);
+
926  obj.addInt32(0);
+
927  obj.addInt32(0);
+
928 
+
929  // transparency
+
930  obj.addFloat64(1.0);
+
931 
+
932  outportGui.write(obj);
+
933  }
+
934  }
+
935  }
+
936 
+
937  void steerHeadToHome()
+
938  {
+
939  Vector homeHead(3);
+
940 
+
941  homeHead[0]=-1.0;
+
942  homeHead[1]=0.0;
+
943  homeHead[2]=0.3;
+
944 
+
945  yInfo("*** Homing head");
+
946 
+
947  gazeCtrl->lookAtFixationPoint(homeHead);
+
948  }
+
949 
+
950  void steerTorsoToHome()
+
951  {
+
952  if (!useTorso)
+
953  return;
+
954 
+
955  Vector homeTorso(3);
+
956  homeTorso.zero();
+
957 
+
958  Vector velTorso(3);
+
959  velTorso=10.0;
+
960 
+
961  yInfo("*** Homing torso");
+
962 
+
963  vector<int> modes(3,VOCAB_CM_POSITION);
+
964  modeTorso->setControlModes(modes.data());
+
965 
+
966  posTorso->setRefSpeeds(velTorso.data());
+
967  posTorso->positionMove(homeTorso.data());
+
968  }
+
969 
+
970  void checkTorsoHome(const double timeout=10.0)
+
971  {
+
972  if (!useTorso)
+
973  return;
+
974 
+
975  yInfo("*** Checking torso home position... ");
+
976 
+
977  bool done=false;
+
978  double t0=Time::now();
+
979  while (!done && (Time::now()-t0<timeout))
+
980  {
+
981  posTorso->checkMotionDone(&done);
+
982  Time::delay(0.1);
+
983  }
+
984 
+
985  yInfo("*** done");
+
986  }
+
987 
+
988  void steerArmToHome(const int sel=USEDARM)
+
989  {
+
990  IControlMode *imode=modeArm;
+
991  IPositionControl *ipos=posArm;
+
992  string type;
+
993 
+
994  if (sel==LEFTARM)
+
995  {
+
996  if (useLeftArm)
+
997  {
+
998  drvLeftArm->view(imode);
+
999  drvLeftArm->view(ipos);
+
1000  }
+
1001  else
+
1002  return;
+
1003 
+
1004  type="left_arm";
+
1005  }
+
1006  else if (sel==RIGHTARM)
+
1007  {
+
1008  if (useRightArm)
+
1009  {
+
1010  drvRightArm->view(imode);
+
1011  drvRightArm->view(ipos);
+
1012  }
+
1013  else
+
1014  return;
+
1015 
+
1016  type="right_arm";
+
1017  }
+
1018  else if (armSel!=NOARM)
+
1019  type=armSel==LEFTARM?"left_arm":"right_arm";
+
1020  else
+
1021  return;
+
1022 
+
1023  yInfo("*** Homing %s",type.c_str());
+
1024  for (size_t j=0; j<homeVels.length(); j++)
+
1025  imode->setControlMode(j,VOCAB_CM_POSITION);
+
1026 
+
1027  for (size_t j=0; j<homeVels.length(); j++)
+
1028  {
+
1029  ipos->setRefSpeed(j,homeVels[j]);
+
1030  ipos->positionMove(j,homePoss[j]);
+
1031  }
+
1032 
+
1033  openHand(sel);
+
1034  }
+
1035 
+
1036  void checkArmHome(const int sel=USEDARM, const double timeout=10.0)
+
1037  {
+
1038  IPositionControl *ipos=posArm;
+
1039  string type;
+
1040 
+
1041  if (sel==LEFTARM)
+
1042  {
+
1043  if (useLeftArm)
+
1044  drvLeftArm->view(ipos);
+
1045  else
+
1046  return;
+
1047 
+
1048  type="left_arm";
+
1049  }
+
1050  else if (sel==RIGHTARM)
+
1051  {
+
1052  if (useRightArm)
+
1053  drvRightArm->view(ipos);
+
1054  else
+
1055  return;
+
1056 
+
1057  type="right_arm";
+
1058  }
+
1059  else if (armSel!=NOARM)
+
1060  type=armSel==LEFTARM?"left_arm":"right_arm";
+
1061  else
+
1062  return;
+
1063 
+
1064  yInfo("*** Checking %s home position... ",type.c_str());
+
1065 
+
1066  bool done=false;
+
1067  double t0=Time::now();
+
1068  while (!done && (Time::now()-t0<timeout))
+
1069  {
+
1070  ipos->checkMotionDone(&done);
+
1071  Time::delay(0.1);
+
1072  }
+
1073 
+
1074  yInfo("*** done");
+
1075  }
+
1076 
+
1077  void stopArmJoints(const int sel=USEDARM)
+
1078  {
+
1079  IEncoders *ienc=encArm;
+
1080  IControlMode *imode=modeArm;
+
1081  IPositionControl *ipos=posArm;
+
1082  string type;
+
1083 
+
1084  if (sel==LEFTARM)
+
1085  {
+
1086  if (useLeftArm)
+
1087  {
+
1088  drvLeftArm->view(ienc);
+
1089  drvLeftArm->view(imode);
+
1090  drvLeftArm->view(ipos);
+
1091  }
+
1092  else
+
1093  return;
+
1094 
+
1095  type="left_arm";
+
1096  }
+
1097  else if (sel==RIGHTARM)
+
1098  {
+
1099  if (useRightArm)
+
1100  {
+
1101  drvRightArm->view(ienc);
+
1102  drvRightArm->view(imode);
+
1103  drvRightArm->view(ipos);
+
1104  }
+
1105  else
+
1106  return;
+
1107 
+
1108  type="right_arm";
+
1109  }
+
1110  else if (armSel!=NOARM)
+
1111  type=armSel==LEFTARM?"left_arm":"right_arm";
+
1112  else
+
1113  return;
+
1114 
+
1115  yInfo("*** Stopping %s joints",type.c_str());
+
1116  for (size_t j=0; j<homeVels.length(); j++)
+
1117  imode->setControlMode(j,VOCAB_CM_POSITION);
+
1118 
+
1119  for (size_t j=0; j<homeVels.length(); j++)
+
1120  {
+
1121  double fb;
+
1122  ienc->getEncoder(j,&fb);
+
1123  ipos->positionMove(j,fb);
+
1124  }
+
1125  }
+
1126 
+
1127  void moveHand(const int action, const int sel=USEDARM)
+
1128  {
+
1129  IControlMode *imode=modeArm;
+
1130  IPositionControl *ipos=posArm;
+
1131  Vector *poss=NULL;
+
1132  string actionStr, type;
+
1133 
+
1134  switch (action)
+
1135  {
+
1136  case OPENHAND:
+
1137  poss=&openHandPoss;
+
1138  actionStr="Opening";
+
1139  break;
+
1140 
+
1141  case CLOSEHAND:
+
1142  poss=&closeHandPoss;
+
1143  actionStr="Closing";
+
1144  break;
+
1145 
+
1146  default:
+
1147  return;
+
1148  }
+
1149 
+
1150  if (sel==LEFTARM)
+
1151  {
+
1152  drvLeftArm->view(imode);
+
1153  drvLeftArm->view(ipos);
+
1154  type="left_hand";
+
1155  }
+
1156  else if (sel==RIGHTARM)
+
1157  {
+
1158  drvRightArm->view(imode);
+
1159  drvRightArm->view(ipos);
+
1160  type="right_hand";
+
1161  }
+
1162  else
+
1163  type=armSel==LEFTARM?"left_hand":"right_hand";
+
1164 
+
1165  yInfo("*** %s %s",actionStr.c_str(),type.c_str());
+
1166  for (size_t j=0; j<handVels.length(); j++)
+
1167  imode->setControlMode(homeVels.length()+j,VOCAB_CM_POSITION);
+
1168 
+
1169  for (size_t j=0; j<handVels.length(); j++)
+
1170  {
+
1171  int k=homeVels.length()+j;
+
1172  ipos->setRefSpeed(k,handVels[j]);
+
1173  ipos->positionMove(k,(*poss)[j]);
+
1174  }
+
1175  }
+
1176 
+
1177  void openHand(const int sel=USEDARM)
+
1178  {
+
1179  moveHand(OPENHAND,sel);
+
1180  }
+
1181 
+
1182  void closeHand(const int sel=USEDARM)
+
1183  {
+
1184  moveHand(CLOSEHAND,sel);
+
1185  }
+
1186 
+
1187  void selectArm()
+
1188  {
+
1189  if (useLeftArm && useRightArm)
+
1190  {
+
1191  if (state==STATE_REACH)
+
1192  {
+
1193  // handle the hysteresis thresholds
+
1194  if ((armSel==LEFTARM) && (targetPos[1]>hystThres) ||
+
1195  (armSel==RIGHTARM) && (targetPos[1]<-hystThres))
+
1196  {
+
1197  yInfo("*** Change arm event triggered");
+
1198  state=STATE_CHECKMOTIONDONE;
+
1199  latchTimer=Time::now();
+
1200  }
+
1201  }
+
1202  else if (state==STATE_CHECKMOTIONDONE)
+
1203  {
+
1204  bool done;
+
1205  cartArm->checkMotionDone(&done);
+
1206  if (!done)
+
1207  {
+
1208  if (Time::now()-latchTimer>3.0*trajTime)
+
1209  {
+
1210  yInfo("--- Timeout elapsed => FORCE STOP and CHANGE ARM");
+
1211  done=true;
+
1212  }
+
1213  }
+
1214 
+
1215  if (done)
+
1216  {
+
1217  stopControl();
+
1218  steerArmToHome();
+
1219 
+
1220  // swap interfaces
+
1221  if (armSel==RIGHTARM)
+
1222  {
+
1223  armSel=LEFTARM;
+
1224 
+
1225  drvLeftArm->view(encArm);
+
1226  drvLeftArm->view(modeArm);
+
1227  drvLeftArm->view(posArm);
+
1228  drvCartLeftArm->view(cartArm);
+
1229  armReachOffs=&leftArmReachOffs;
+
1230  armGraspOffs=&leftArmGraspOffs;
+
1231  armHandOrien=&leftArmHandOrien;
+
1232  }
+
1233  else
+
1234  {
+
1235  armSel=RIGHTARM;
+
1236 
+
1237  drvRightArm->view(encArm);
+
1238  drvRightArm->view(modeArm);
+
1239  drvRightArm->view(posArm);
+
1240  drvCartRightArm->view(cartArm);
+
1241  armReachOffs=&rightArmReachOffs;
+
1242  armGraspOffs=&rightArmGraspOffs;
+
1243  armHandOrien=&rightArmHandOrien;
+
1244  }
+
1245 
+
1246  yInfo("*** Using %s",armSel==LEFTARM?"left_arm":"right_arm");
+
1247  stopArmJoints();
+
1248  state=STATE_REACH;
+
1249  }
+
1250  }
+
1251  }
+
1252  }
+
1253 
+
1254  void doReach()
+
1255  {
+
1256  if (useLeftArm || useRightArm)
+
1257  {
+
1258  if (state==STATE_REACH)
+
1259  {
+
1260  Vector x=R.transposed()*(targetPos+*armReachOffs);
+
1261  limitRange(x);
+
1262  x=R*x;
+
1263 
+
1264  cartArm->goToPoseSync(x,*armHandOrien);
+
1265  }
+
1266  }
+
1267  }
+
1268 
+
1269  void doGrasp()
+
1270  {
+
1271  if (useLeftArm || useRightArm)
+
1272  {
+
1273  if (state==STATE_REACH)
+
1274  {
+
1275  if (checkTargetForGrasp() && checkArmForGrasp())
+
1276  {
+
1277  Vector x=R.transposed()*(targetPos+*armGraspOffs);
+
1278  limitRange(x);
+
1279  x=R*x;
+
1280 
+
1281  yInfo("--- Hand in position AND Target still => GRASPING");
+
1282  yInfo("--- Target in %s",targetPos.toString().c_str());
+
1283  yInfo("*** Grasping x=%s",x.toString().c_str());
+
1284 
+
1285  //speak something
+
1286  if(useSpeech) sendSpeak(speech_grasp[(int)Rand::scalar(0,speech_grasp.size()-1e-3)]);
+
1287 
+
1288  cartArm->goToPoseSync(x,*armHandOrien);
+
1289  closeHand();
+
1290 
+
1291  latchTimer=Time::now();
+
1292  state=STATE_RELEASE;
+
1293  }
+
1294  }
+
1295  }
+
1296 
+
1297 
+
1298  }
+
1299 
+
1300  void doRelease()
+
1301  {
+
1302  if (useLeftArm || useRightArm)
+
1303  {
+
1304  if (state==STATE_RELEASE)
+
1305  {
+
1306  if ((Time::now()-latchTimer)>releaseTmo)
+
1307  {
+
1308  yInfo("--- Timeout elapsed => RELEASING");
+
1309 
+
1310  openHand();
+
1311 
+
1312  latchTimer=Time::now();
+
1313  state=STATE_WAIT;
+
1314  }
+
1315  }
+
1316  }
+
1317  }
+
1318 
+
1319  void doWait()
+
1320  {
+
1321  if (useLeftArm || useRightArm)
+
1322  {
+
1323  if (state==STATE_WAIT)
+
1324  {
+
1325  if ((Time::now()-latchTimer)>idleTmo)
+
1326  {
+
1327  yInfo("--- Timeout elapsed => IDLING");
+
1328  deleteGuiTarget();
+
1329  state=STATE_IDLE;
+
1330  }
+
1331  }
+
1332  }
+
1333  }
+
1334 
+
1335  void commandFace()
+
1336  {
+
1337  if (state==STATE_IDLE)
+
1338  setFace(state_breathers?FACE_SHY:FACE_HAPPY);
+
1339  else if (state==STATE_REACH)
+
1340  {
+
1341  if (useLeftArm || useRightArm)
+
1342  {
+
1343  if (checkArmForGrasp())
+
1344  setFace(FACE_EVIL);
+
1345  else
+
1346  setFace(FACE_ANGRY);
+
1347  }
+
1348  else
+
1349  setFace(FACE_EVIL);
+
1350  }
+
1351  else if (state==STATE_WAIT)
+
1352  setFace(FACE_HAPPY);
+
1353  }
+
1354 
+
1355  bool checkArmForGrasp()
+
1356  {
+
1357  Vector x,o;
+
1358  cartArm->getPose(x,o);
+
1359 
+
1360  // true if arm has reached the position
+
1361  if (norm(targetPos+*armReachOffs-x)<sphereRadius)
+
1362  return true;
+
1363  else
+
1364  return false;
+
1365  }
+
1366 
+
1367  bool checkTargetForGrasp()
+
1368  {
+
1369  const double t=Time::now();
+
1370 
+
1371  // false if target is considered to be still moving
+
1372  if (norm(targetPos-sphereCenter)>sphereRadius)
+
1373  {
+
1374  resetTargetBall();
+
1375  return false;
+
1376  }
+
1377  else if ((t-latchTimer<sphereTmo) || (t-idleTimer>1.0))
+
1378  return false;
+
1379  else
+
1380  return true;
+
1381  }
+
1382 
+
1383  void resetTargetBall()
+
1384  {
+
1385  latchTimer=Time::now();
+
1386  sphereCenter=targetPos;
+
1387  }
+
1388 
+
1389  void stopControl()
+
1390  {
+
1391  if (useLeftArm || useRightArm)
+
1392  {
+
1393  yInfo("stopping control");
+
1394  cartArm->stopControl();
+
1395  Time::delay(0.1);
+
1396  }
+
1397  }
+
1398 
+
1399  void setFace(const string &type)
+
1400  {
+
1401  Bottle in, out;
+
1402 
+
1403  out.addVocab32("set");
+
1404  out.addVocab32("mou");
+
1405  out.addVocab32(type);
+
1406  outportCmdFace.write(out,in);
+
1407 
+
1408  out.clear();
+
1409 
+
1410  out.addVocab32("set");
+
1411  out.addVocab32("leb");
+
1412  out.addVocab32(type);
+
1413  outportCmdFace.write(out,in);
+
1414 
+
1415  out.clear();
+
1416 
+
1417  out.addVocab32("set");
+
1418  out.addVocab32("reb");
+
1419  out.addVocab32(type);
+
1420  outportCmdFace.write(out,in);
+
1421  }
+
1422 
+
1423  void limitRange(Vector &x)
+
1424  {
+
1425  x[0]=x[0]>-0.1 ? -0.1 : x[0];
+
1426  }
+
1427 
+
1428  Matrix &rotx(const double theta)
+
1429  {
+
1430  double t=CTRL_DEG2RAD*theta;
+
1431  double c=cos(t);
+
1432  double s=sin(t);
+
1433 
+
1434  Rx(1,1)=Rx(2,2)=c;
+
1435  Rx(1,2)=-s;
+
1436  Rx(2,1)=s;
+
1437 
+
1438  return Rx;
+
1439  }
+
1440 
+
1441  Matrix &roty(const double theta)
+
1442  {
+
1443  double t=CTRL_DEG2RAD*theta;
+
1444  double c=cos(t);
+
1445  double s=sin(t);
+
1446 
+
1447  Ry(0,0)=Ry(2,2)=c;
+
1448  Ry(0,2)=s;
+
1449  Ry(2,0)=-s;
+
1450 
+
1451  return Ry;
+
1452  }
+
1453 
+
1454  Matrix &rotz(const double theta)
+
1455  {
+
1456  double t=CTRL_DEG2RAD*theta;
+
1457  double c=cos(t);
+
1458  double s=sin(t);
+
1459 
+
1460  Rz(0,0)=Rz(1,1)=c;
+
1461  Rz(0,1)=-s;
+
1462  Rz(1,0)=s;
+
1463 
+
1464  return Rz;
+
1465  }
+
1466 
+
1467  void deleteGuiTarget()
+
1468  {
+
1469  if (outportGui.getOutputCount()>0)
+
1470  {
+
1471  Bottle obj;
+
1472  obj.addString("delete");
+
1473  obj.addString("ball");
+
1474  outportGui.write(obj);
+
1475  }
+
1476  }
+
1477 
+
1478  void close()
+
1479  {
+
1480  delete drvTorso;
+
1481  delete drvHead;
+
1482  delete drvLeftArm;
+
1483  delete drvRightArm;
+
1484  delete drvCartLeftArm;
+
1485  delete drvCartRightArm;
+
1486  delete drvGazeCtrl;
+
1487 
+
1488  inportTrackTarget.interrupt();
+
1489  inportTrackTarget.close();
+
1490 
+
1491  inportIMDTargetLeft.interrupt();
+
1492  inportIMDTargetLeft.close();
+
1493 
+
1494  inportIMDTargetRight.interrupt();
+
1495  inportIMDTargetRight.close();
+
1496 
+
1497  setFace(FACE_HAPPY);
+
1498  outportCmdFace.interrupt();
+
1499  outportCmdFace.close();
+
1500 
+
1501  deleteGuiTarget();
+
1502  outportGui.interrupt();
+
1503  outportGui.close();
+
1504 
+
1505  outportSpeech.interrupt();
+
1506  outportSpeech.close();
+
1507 
+
1508  breatherHrpc.close();
+
1509  breatherLArpc.close();
+
1510  breatherRArpc.close();
+
1511  blinkerrpc.close();
+
1512  lookSkinrpc.close();
+
1513  if (simulation)
+
1514  {
+
1515  gazeboMoverPort.interrupt();
+
1516  gazeboMoverPort.close();
+
1517  }
+
1518  }
+
1519 
+
1520 public:
+
1521  managerThread(const string &_name, ResourceFinder &_rf) :
+
1522  PeriodicThread((double)DEFAULT_THR_PER/1000.0), name(_name), rf(_rf)
+
1523  {
+
1524  drvTorso=drvHead=drvLeftArm=drvRightArm=NULL;
+
1525  drvCartLeftArm=drvCartRightArm=NULL;
+
1526  drvGazeCtrl=NULL;
+
1527  }
+
1528 
+
1529  bool threadInit()
+
1530  {
+
1531  // general part
+
1532  Bottle &bGeneral=rf.findGroup("general");
+
1533  bGeneral.setMonitor(rf.getMonitor());
+
1534  robot=bGeneral.check("robot",Value("icub"),"Getting robot name").asString();
+
1535  useLeftArm=bGeneral.check("left_arm",Value("on"),"Getting left arm use flag").asString()=="on"?true:false;
+
1536  useRightArm=bGeneral.check("right_arm",Value("on"),"Getting right arm use flag").asString()=="on"?true:false;
+
1537  useTorso=bGeneral.check("torso",Value("on"),"Getting torso use flag").asString()=="on"?true:false;
+
1538  useSpeech=bGeneral.check("speech",Value("on"),"Getting speech use flag").asString()=="on"?true:false;
+
1539  useNetwork=bGeneral.check("use_network",Value("off"),"Getting network enable").asString()=="on"?true:false;
+
1540  simulation=bGeneral.check("simulation",Value("off"),"Getting simulation enable").asString()=="on"?true:false;
+
1541  trajTime=bGeneral.check("traj_time",Value(2.0),"Getting trajectory time").asFloat64();
+
1542  reachTol=bGeneral.check("reach_tol",Value(0.01),"Getting reaching tolerance").asFloat64();
+
1543  eyeUsed=bGeneral.check("eye",Value("left"),"Getting the used eye").asString();
+
1544  idleTmo=bGeneral.check("idle_tmo",Value(1e10),"Getting idle timeout").asFloat64();
+
1545  setPeriod((double)bGeneral.check("thread_period",Value(DEFAULT_THR_PER),"Getting thread period [ms]").asInt32()/1000.0);
+
1546 
+
1547  if (!useTorso)
+
1548  {
+
1549  yWarning("Part \"torso\" is not employed!");
+
1550  }
+
1551 
+
1552  // torso part
+
1553  Bottle &bTorso=rf.findGroup("torso");
+
1554  bTorso.setMonitor(rf.getMonitor());
+
1555 
+
1556  Vector torsoSwitch(3); torsoSwitch.zero();
+
1557  Matrix torsoLimits(3,4); torsoLimits.zero();
+
1558 
+
1559  getTorsoOptions(bTorso,"pitch",0,torsoSwitch,torsoLimits);
+
1560  getTorsoOptions(bTorso,"roll",1,torsoSwitch,torsoLimits);
+
1561  getTorsoOptions(bTorso,"yaw",2,torsoSwitch,torsoLimits);
+
1562 
+
1563  // arm parts
+
1564  Bottle &bLeftArm=rf.findGroup("left_arm");
+
1565  Bottle &bRightArm=rf.findGroup("right_arm");
+
1566  bLeftArm.setMonitor(rf.getMonitor());
+
1567  bRightArm.setMonitor(rf.getMonitor());
+
1568 
+
1569  leftArmReachOffs.resize(3,0.0);
+
1570  leftArmGraspOffs.resize(3,0.0);
+
1571  leftArmHandOrien.resize(4,0.0);
+
1572  leftArmJointsStiffness.resize(5,0.0);
+
1573  leftArmJointsDamping.resize(5,0.0);
+
1574  rightArmReachOffs.resize(3,0.0);
+
1575  rightArmGraspOffs.resize(3,0.0);
+
1576  rightArmHandOrien.resize(4,0.0);
+
1577  rightArmJointsStiffness.resize(5,0.0);
+
1578  rightArmJointsDamping.resize(5,0.0);
+
1579 
+
1580  getArmOptions(bLeftArm,leftGraspEnable,leftArmReachOffs,leftArmGraspOffs,
+
1581  leftArmHandOrien,leftArmImpVelMode,leftArmJointsStiffness,leftArmJointsDamping);
+
1582  getArmOptions(bRightArm,rightGraspEnable,rightArmReachOffs,rightArmGraspOffs,
+
1583  rightArmHandOrien,rightArmImpVelMode,rightArmJointsStiffness,rightArmJointsDamping);
+
1584 
+
1585  // home part
+
1586  Bottle &bHome=rf.findGroup("home_arm");
+
1587  bHome.setMonitor(rf.getMonitor());
+
1588  homePoss.resize(7,0.0); homeVels.resize(7,0.0);
+
1589  if (!getHomeOptions(bHome, homePoss, homeVels)) { yError ("Error in parameters section 'home_arm'"); return false; }
+
1590 
+
1591  // arm_selection part
+
1592  Bottle &bArmSel=rf.findGroup("arm_selection");
+
1593  bArmSel.setMonitor(rf.getMonitor());
+
1594  hystThres=bArmSel.check("hysteresis_thres",Value(0.0),"Getting hysteresis threshold").asFloat64();
+
1595 
+
1596  // grasp part
+
1597  Bottle &bGrasp=rf.findGroup("grasp");
+
1598  bGrasp.setMonitor(rf.getMonitor());
+
1599  sphereRadius=bGrasp.check("sphere_radius",Value(0.0),"Getting sphere radius").asFloat64();
+
1600  sphereTmo=bGrasp.check("sphere_tmo",Value(0.0),"Getting sphere timeout").asFloat64();
+
1601  releaseTmo=bGrasp.check("release_tmo",Value(0.0),"Getting release timeout").asFloat64();
+
1602 
+
1603  openHandPoss.resize(9,0.0); closeHandPoss.resize(9,0.0);
+
1604  handVels.resize(9,0.0);
+
1605 
+
1606  if(!getGraspOptions(bGrasp, openHandPoss, closeHandPoss, handVels)) { yError ("Error in parameters section 'grasp'"); return false; }
+
1607 
+
1608  // init network
+
1609  if (useNetwork)
+
1610  {
+
1611  Property options;
+
1612  options.fromConfigFile(rf.findFile(bGeneral.check("network",Value("network.ini"),
+
1613  "Getting network data").asString()));
+
1614 
+
1615  if (!pred.configure(options))
+
1616  return false;
+
1617  }
+
1618 
+
1619  // open ports
+
1620  inportTrackTarget.open(name+"/trackTarget:i");
+
1621  inportIMDTargetLeft.open(name+"/imdTargetLeft:i");
+
1622  inportIMDTargetRight.open(name+"/imdTargetRight:i");
+
1623  outportCmdFace.open(name+"/cmdFace:rpc");
+
1624  outportGui.open(name+"/gui:o");
+
1625  outportSpeech.open(name+"/speech:o");
+
1626  breatherHrpc.open(name+"/breather/head:rpc");
+
1627  breatherLArpc.open(name+"/breather/left_arm:rpc");
+
1628  breatherRArpc.open(name+"/breather/right_arm:rpc");
+
1629  blinkerrpc.open(name+"/blinker:rpc");
+
1630  lookSkinrpc.open(name+"/lookSkin:rpc");
+
1631  if (simulation)
+
1632  {
+
1633  go=false;
+
1634  gazeboMoverPort.open(name+"/gazebo:o");
+
1635  if (!Network::connect(gazeboMoverPort.getName(),"/red-ball/mover:i"))
+
1636  {
+
1637  yError()<<"Unable to connect to the redball mover!";
+
1638  gazeboMoverPort.interrupt();
+
1639  gazeboMoverPort.close();
+
1640  return false;
+
1641  }
+
1642  }
+
1643  else
+
1644  {
+
1645  go=true;
+
1646  }
+
1647 
+
1648  string fwslash="/";
+
1649 
+
1650  // open remote_controlboard drivers
+
1651  Property optTorso("(device remote_controlboard)");
+
1652  Property optHead("(device remote_controlboard)");
+
1653  Property optLeftArm("(device remote_controlboard)");
+
1654  Property optRightArm("(device remote_controlboard)");
+
1655 
+
1656  optTorso.put("remote",fwslash+robot+"/torso");
+
1657  optTorso.put("local",name+"/torso");
+
1658 
+
1659  optHead.put("remote",fwslash+robot+"/head");
+
1660  optHead.put("local",name+"/head");
+
1661 
+
1662  optLeftArm.put("remote",fwslash+robot+"/left_arm");
+
1663  optLeftArm.put("local",name+"/left_arm");
+
1664 
+
1665  optRightArm.put("remote",fwslash+robot+"/right_arm");
+
1666  optRightArm.put("local",name+"/right_arm");
+
1667 
+
1668  if (useTorso)
+
1669  {
+
1670  drvTorso=new PolyDriver;
+
1671  if (!drvTorso->open(optTorso))
+
1672  {
+
1673  close();
+
1674  return false;
+
1675  }
+
1676  }
+
1677 
+
1678  drvHead=new PolyDriver;
+
1679  if (!drvHead->open(optHead))
+
1680  {
+
1681  close();
+
1682  return false;
+
1683  }
+
1684 
+
1685  if (useLeftArm)
+
1686  {
+
1687  drvLeftArm=new PolyDriver;
+
1688  if (!drvLeftArm->open(optLeftArm))
+
1689  {
+
1690  close();
+
1691  return false;
+
1692  }
+
1693  }
+
1694 
+
1695  if (useRightArm)
+
1696  {
+
1697  drvRightArm=new PolyDriver;
+
1698  if (!drvRightArm->open(optRightArm))
+
1699  {
+
1700  close();
+
1701  return false;
+
1702  }
+
1703  }
+
1704 
+
1705  // open cartesiancontrollerclient and gazecontrollerclient drivers
+
1706  Property optCartLeftArm("(device cartesiancontrollerclient)");
+
1707  Property optCartRightArm("(device cartesiancontrollerclient)");
+
1708  Property optGazeCtrl("(device gazecontrollerclient)");
+
1709 
+
1710  optCartLeftArm.put("remote",fwslash+robot+"/cartesianController/left_arm");
+
1711  optCartLeftArm.put("local",name+"/left_arm/cartesian");
+
1712 
+
1713  optCartRightArm.put("remote",fwslash+robot+"/cartesianController/right_arm");
+
1714  optCartRightArm.put("local",name+"/right_arm/cartesian");
+
1715 
+
1716  optGazeCtrl.put("remote","/iKinGazeCtrl");
+
1717  optGazeCtrl.put("local",name+"/gaze");
+
1718 
+
1719  if (useLeftArm)
+
1720  {
+
1721  drvCartLeftArm=new PolyDriver;
+
1722  if (!drvCartLeftArm->open(optCartLeftArm))
+
1723  {
+
1724  close();
+
1725  return false;
+
1726  }
+
1727 
+
1728  if (leftArmImpVelMode)
+
1729  {
+
1730  IInteractionMode *imode;
+
1731  IImpedanceControl *iimp;
+
1732 
+
1733  drvLeftArm->view(imode);
+
1734  drvLeftArm->view(iimp);
+
1735 
+
1736  int len=leftArmJointsStiffness.length()<leftArmJointsDamping.length()?
+
1737  leftArmJointsStiffness.length():leftArmJointsDamping.length();
+
1738 
+
1739  for (int j=0; j<len; j++)
+
1740  {
+
1741  iimp->setImpedance(j,leftArmJointsStiffness[j],leftArmJointsDamping[j]);
+
1742  imode->setInteractionMode(j,VOCAB_IM_COMPLIANT);
+
1743  }
+
1744  }
+
1745  }
+
1746 
+
1747  if (useRightArm)
+
1748  {
+
1749  drvCartRightArm=new PolyDriver;
+
1750  if (!drvCartRightArm->open(optCartRightArm))
+
1751  {
+
1752  close();
+
1753  return false;
+
1754  }
+
1755 
+
1756  if (rightArmImpVelMode)
+
1757  {
+
1758  IInteractionMode *imode;
+
1759  IImpedanceControl *iimp;
+
1760 
+
1761  drvRightArm->view(imode);
+
1762  drvRightArm->view(iimp);
+
1763 
+
1764  int len=rightArmJointsStiffness.length()<rightArmJointsDamping.length()?
+
1765  rightArmJointsStiffness.length():rightArmJointsDamping.length();
+
1766 
+
1767  for (int j=0; j<len; j++)
+
1768  {
+
1769  iimp->setImpedance(j,rightArmJointsStiffness[j],rightArmJointsDamping[j]);
+
1770  imode->setInteractionMode(j,VOCAB_IM_COMPLIANT);
+
1771  }
+
1772  }
+
1773  }
+
1774 
+
1775  drvGazeCtrl=new PolyDriver;
+
1776  if (!drvGazeCtrl->open(optGazeCtrl))
+
1777  {
+
1778  close();
+
1779  return false;
+
1780  }
+
1781 
+
1782  // open views
+
1783  if (useTorso)
+
1784  {
+
1785  drvTorso->view(modeTorso);
+
1786  drvTorso->view(encTorso);
+
1787  drvTorso->view(posTorso);
+
1788  }
+
1789  else
+
1790  {
+
1791  modeTorso=NULL;
+
1792  encTorso=NULL;
+
1793  posTorso=NULL;
+
1794  }
+
1795 
+
1796  drvHead->view(encHead);
+
1797  drvGazeCtrl->view(gazeCtrl);
+
1798 
+
1799  gazeCtrl->storeContext(&startup_context_id_gaze);
+
1800  gazeCtrl->restoreContext(0);
+
1801  gazeCtrl->blockNeckRoll(0.0);
+
1802  gazeCtrl->setSaccadesActivationAngle(20.0);
+
1803  gazeCtrl->setSaccadesInhibitionPeriod(1.0);
+
1804 
+
1805  if (useLeftArm)
+
1806  {
+
1807  drvLeftArm->view(encArm);
+
1808  drvLeftArm->view(modeArm);
+
1809  drvLeftArm->view(posArm);
+
1810  drvCartLeftArm->view(cartArm);
+
1811  armReachOffs=&leftArmReachOffs;
+
1812  armGraspOffs=&leftArmGraspOffs;
+
1813  armHandOrien=&leftArmHandOrien;
+
1814  armSel=LEFTARM;
+
1815  }
+
1816  else if (useRightArm)
+
1817  {
+
1818  drvRightArm->view(encArm);
+
1819  drvRightArm->view(modeArm);
+
1820  drvRightArm->view(posArm);
+
1821  drvCartRightArm->view(cartArm);
+
1822  armReachOffs=&rightArmReachOffs;
+
1823  armGraspOffs=&rightArmGraspOffs;
+
1824  armHandOrien=&rightArmHandOrien;
+
1825  armSel=RIGHTARM;
+
1826  }
+
1827  else
+
1828  {
+
1829  encArm=NULL;
+
1830  modeArm=NULL;
+
1831  posArm=NULL;
+
1832  cartArm=NULL;
+
1833  armReachOffs=NULL;
+
1834  armGraspOffs=NULL;
+
1835  armHandOrien=NULL;
+
1836  armSel=NOARM;
+
1837  }
+
1838 
+
1839  // init
+
1840  if (useTorso)
+
1841  {
+
1842  int torsoAxes;
+
1843  encTorso->getAxes(&torsoAxes);
+
1844  torso.resize(torsoAxes,0.0);
+
1845  }
+
1846 
+
1847  int headAxes;
+
1848  encHead->getAxes(&headAxes);
+
1849  head.resize(headAxes,0.0);
+
1850 
+
1851  targetPos.resize(3,0.0);
+
1852  R=Rx=Ry=Rz=eye(3,3);
+
1853 
+
1854  if (useLeftArm)
+
1855  {
+
1856  initCartesianCtrl(torsoSwitch,torsoLimits,LEFTARM);
+
1857  }
+
1858  if (useRightArm)
+
1859  {
+
1860  initCartesianCtrl(torsoSwitch,torsoLimits,RIGHTARM);
+
1861  }
+
1862 
+
1863  // steer the robot to the initial configuration
+
1864  stopControl();
+
1865  steerTorsoToHome();
+
1866  steerHeadToHome();
+
1867  steerArmToHome(LEFTARM);
+
1868  steerArmToHome(RIGHTARM);
+
1869 
+
1870  idleTimer=Time::now();
+
1871 
+
1872  wentHome=false;
+
1873  state=STATE_IDLE;
+
1874  state_breathers=true;
+
1875 
+
1876  // populate the speech strings
+
1877  if (useSpeech)
+
1878  {
+
1879  Rand::init();
+
1880  Bottle &bSpeech=rf.findGroup("speech");
+
1881  if (bSpeech.size()>0)
+
1882  {
+
1883  getSpeechOptions(bSpeech,speech_grasp,speech_reach,speech_idle);
+
1884  }
+
1885  else
+
1886  {
+
1887  yWarning("no speech group has been found even though speech flag option was true!");
+
1888  yWarning("setting speech flag option to false.");
+
1889  useSpeech = false;
+
1890  }
+
1891  }
+
1892 
+
1893  return true;
+
1894  }
+
1895 
+
1896  bool updateBall(const double &x, const double &y, const double &z)
+
1897  {
+
1898  if (simulation)
+
1899  {
+
1900  if (gazeboMoverPort.getOutputCount() > 0)
+
1901  {
+
1902  Bottle pose;
+
1903  pose.addFloat64(x);
+
1904  pose.addFloat64(y);
+
1905  pose.addFloat64(z);
+
1906  gazeboMoverPort.prepare() = pose;
+
1907  gazeboMoverPort.writeStrict();
+
1908  return true;
+
1909  }
+
1910 
+
1911  }
+
1912  return false;
+
1913  }
+
1914 
+
1915  void startDemo(const Vector& lookat)
+
1916  {
+
1917  if (lookat.length() == 3)
+
1918  {
+
1919  gazeCtrl->lookAtAbsAnglesSync(lookat);
+
1920  gazeCtrl->waitMotionDone(.1, 5.);
+
1921  }
+
1922  go=true;
+
1923  }
+
1924 
+
1925  void stopDemo()
+
1926  {
+
1927  go=false;
+
1928  stopControl();
+
1929  Time::delay(1.0);
+
1930  steerTorsoToHome();
+
1931  steerHeadToHome();
+
1932  steerArmToHome(LEFTARM);
+
1933  steerArmToHome(RIGHTARM);
+
1934  wentHome=true;
+
1935  deleteGuiTarget();
+
1936  if(useSpeech) sendSpeak(speech_idle[(int)Rand::scalar(0,speech_idle.size()-1e-3)]);
+
1937  state=STATE_IDLE;
+
1938  }
+
1939 
+
1940  void run()
+
1941  {
+
1942  if (go)
+
1943  {
+
1944  getSensorData();
+
1945  doIdle();
+
1946  commandHead();
+
1947  selectArm();
+
1948  doReach();
+
1949  if (((armSel==LEFTARM) && leftGraspEnable) ||
+
1950  ((armSel==RIGHTARM) && rightGraspEnable))
+
1951  {
+
1952  doGrasp();
+
1953  doRelease();
+
1954  doWait();
+
1955  }
+
1956 
+
1957  commandFace();
+
1958  }
+
1959  }
+
1960 
+
1961  void threadRelease()
+
1962  {
+
1963  stopControl();
+
1964  steerTorsoToHome();
+
1965  steerHeadToHome();
+
1966  steerArmToHome(LEFTARM);
+
1967  steerArmToHome(RIGHTARM);
+
1968 
+
1969  checkTorsoHome(3.0);
+
1970  checkArmHome(LEFTARM,3.0);
+
1971  checkArmHome(RIGHTARM,3.0);
+
1972 
+
1973  if (useLeftArm)
+
1974  {
+
1975  ICartesianControl *icart;
+
1976  drvCartLeftArm->view(icart);
+
1977  icart->restoreContext(startup_context_id_left);
+
1978 
+
1979  if (leftArmImpVelMode)
+
1980  {
+
1981  IInteractionMode *imode;
+
1982  drvLeftArm->view(imode);
+
1983 
+
1984  int len=leftArmJointsStiffness.length()<leftArmJointsDamping.length()?
+
1985  leftArmJointsStiffness.length():leftArmJointsDamping.length();
+
1986 
+
1987  for (int j=0; j<len; j++)
+
1988  imode->setInteractionMode(j,VOCAB_IM_STIFF);
+
1989  }
+
1990  }
+
1991 
+
1992  if (useRightArm)
+
1993  {
+
1994  ICartesianControl *icart;
+
1995  drvCartRightArm->view(icart);
+
1996  icart->restoreContext(startup_context_id_right);
+
1997 
+
1998  if (rightArmImpVelMode)
+
1999  {
+
2000  IInteractionMode *imode;
+
2001  drvRightArm->view(imode);
+
2002 
+
2003  int len=rightArmJointsStiffness.length()<rightArmJointsDamping.length()?
+
2004  rightArmJointsStiffness.length():rightArmJointsDamping.length();
+
2005 
+
2006  for (int j=0; j<len; j++)
+
2007  imode->setInteractionMode(j,VOCAB_IM_STIFF);
+
2008  }
+
2009  }
+
2010 
+
2011  gazeCtrl->restoreContext(startup_context_id_gaze);
+
2012 
+
2013  close();
+
2014  }
+
2015 };
+
2016 
+
2017 
+
2018 class managerModule: public RFModule
+
2019 {
+
2020 protected:
+
2021  managerThread *thr;
+
2022  Port rpcPort;
+
2023 
+
2024 public:
+
2025  managerModule() { }
+
2026 
+
2027  bool configure(ResourceFinder &rf)
+
2028  {
+
2029  thr=new managerThread(getName(),rf);
+
2030  if (!thr->start())
+
2031  {
+
2032  delete thr;
+
2033  return false;
+
2034  }
+
2035 
+
2036  rpcPort.open(getName("/rpc"));
+
2037  attach(rpcPort);
+
2038 
+
2039  return true;
+
2040  }
+
2041 
+
2042  bool close()
+
2043  {
+
2044  rpcPort.interrupt();
+
2045  rpcPort.close();
+
2046 
+
2047  thr->stop();
+
2048  delete thr;
+
2049 
+
2050  return true;
+
2051  }
+
2052 
+
2053  bool respond(const Bottle& cmd, Bottle& reply) override
+
2054  {
+
2055  if (cmd.get(0).asString() == "update_pose")
+
2056  {
+
2057  if (cmd.size()<4)
+
2058  {
+
2059  yError() << "Requires x y z";
+
2060  reply.addVocab32("fail");
+
2061  return false;
+
2062  }
+
2063  double x=cmd.get(1).asFloat64();
+
2064  double y=cmd.get(2).asFloat64();
+
2065  double z=cmd.get(3).asFloat64();
+
2066  bool ok=thr->updateBall(x,y,z);
+
2067  if (ok)
+
2068  {
+
2069  reply.addVocab32("ok");
+
2070  }
+
2071  else
+
2072  {
+
2073  reply.addVocab32("fail");
+
2074  }
+
2075  }
+
2076  if (cmd.get(0).asString() == "start")
+
2077  {
+
2078  Vector lookat;
+
2079  if (cmd.size() >=4)
+
2080  {
+
2081  lookat.resize(3);
+
2082  lookat[0]=cmd.get(1).asFloat64();
+
2083  lookat[1]=cmd.get(2).asFloat64();
+
2084  lookat[2]=cmd.get(3).asFloat64();
+
2085  }
+
2086  thr->startDemo(lookat);
+
2087  reply.addVocab32("ok");
+
2088  }
+
2089  if (cmd.get(0).asString() == "stop")
+
2090  {
+
2091  thr->stopDemo();
+
2092  reply.addVocab32("ok");
+
2093  }
+
2094  return true;
+
2095  }
+
2096 
+
2097  double getPeriod() { return 1.0; }
+
2098  bool updateModule() { return true; }
+
2099 };
+
2100 
+
2101 
+
2102 class myReport : public SearchMonitor
+
2103 {
+
2104 protected:
+
2105  Property comment, fallback, present, actual, reported;
+
2106  Bottle order;
+
2107 
+
2108 public:
+
2109  void report(const SearchReport& report, const char *context)
+
2110  {
+
2111  string ctx=context;
+
2112  string key=report.key;
+
2113  string prefix="";
+
2114 
+
2115  prefix=ctx;
+
2116  prefix+=".";
+
2117 
+
2118  key=prefix+key;
+
2119  if (key.substr(0,1)==".")
+
2120  key = key.substr(1,key.length());
+
2121 
+
2122  if (!present.check(key))
+
2123  {
+
2124  present.put(key,"present");
+
2125  order.addString(key);
+
2126  }
+
2127 
+
2128  if (report.isFound)
+
2129  actual.put(key,report.value);
+
2130 
+
2131  if (report.isComment==true)
+
2132  {
+
2133  comment.put(key,report.value);
+
2134  return;
+
2135  }
+
2136 
+
2137  if (report.isDefault==true)
+
2138  {
+
2139  fallback.put(key,report.value);
+
2140  return;
+
2141  }
+
2142 
+
2143  if (comment.check(key))
+
2144  {
+
2145  if (!reported.check(key))
+
2146  {
+
2147  if (report.isFound)
+
2148  {
+
2149  string hasValue=report.value;
+
2150  if (hasValue.length()>35)
+
2151  hasValue=hasValue.substr(0,30)+" ...";
+
2152 
+
2153  yInfo("Checking \"%s\": = %s (%s)",key.c_str(),
+
2154  hasValue.c_str(),comment.check(key.c_str(),Value("")).toString().c_str());
+
2155  }
+
2156  else
+
2157  {
+
2158  reported.put(key,1);
+
2159  bool hasDefault=fallback.check(key);
+
2160  string defString="";
+
2161 
+
2162  if (hasDefault)
+
2163  {
+
2164  defString+=" ";
+
2165  defString+="(default ";
+
2166  string theDefault=fallback.find(key).toString();
+
2167 
+
2168  if (theDefault=="")
+
2169  defString+="is blank";
+
2170  else
+
2171  defString+=theDefault;
+
2172 
+
2173  defString+=")";
+
2174  }
+
2175 
+
2176  yInfo("Checking \"%s\": %s%s",key.c_str(),
+
2177  comment.check(key.c_str(),Value("")).toString().c_str(),defString.c_str());
+
2178  }
+
2179  }
+
2180  }
+
2181  }
+
2182 };
+
2183 
+
2184 
+
2185 int main(int argc, char *argv[])
+
2186 {
+
2187  Network yarp;
+
2188  if (!yarp.checkNetwork())
+
2189  {
+
2190  yError("YARP server not available!");
+
2191  return 1;
+
2192  }
+
2193 
+
2194  myReport rep;
+
2195 
+
2196  ResourceFinder rf;
+
2197  rf.setMonitor(&rep);
+
2198  rf.setDefaultContext("demoRedBall");
+
2199  rf.setDefaultConfigFile("config.ini");
+
2200  rf.configure(argc,argv);
+
2201 
+
2202  managerModule mod;
+
2203  mod.setName("/demoRedBall");
+
2204 
+
2205  return mod.runModule(rf);
+
2206 }
+
+ + + + diff --git a/doxygen/doc/html/demoYoga_2src_2main_8cpp_source.html b/doxygen/doc/html/demoYoga_2src_2main_8cpp_source.html new file mode 100644 index 0000000..3d32ab6 --- /dev/null +++ b/doxygen/doc/html/demoYoga_2src_2main_8cpp_source.html @@ -0,0 +1,636 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoYoga/src/main.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
main.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
+
3  * Author: Lorenzo Natale
+
4  * email: lorenzo.natale@iit.it
+
5  * website: www.robotcub.org
+
6  * Permission is granted to copy, distribute, and/or modify this program
+
7  * under the terms of the GNU General Public License, version 2 or any
+
8  * later version published by the Free Software Foundation.
+
9  *
+
10  * A copy of the license can be found at
+
11  * http://www.robotcub.org/icub/license/gpl.txt
+
12  *
+
13  * This program is distributed in the hope that it will be useful, but
+
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
+
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+
16  * Public License for more details
+
17 */
+
18 
+
71 #include <list>
+
72 #include <map>
+
73 #include <vector>
+
74 #include <string>
+
75 #include <iostream>
+
76 #include <fstream>
+
77 #include <cmath>
+
78 
+
79 #include <yarp/os/BufferedPort.h>
+
80 #include <yarp/os/Time.h>
+
81 #include <yarp/os/Network.h>
+
82 #include <yarp/os/PeriodicThread.h>
+
83 #include <yarp/os/Thread.h>
+
84 #include <yarp/os/Property.h>
+
85 #include <yarp/os/Vocab.h>
+
86 #include <yarp/os/Log.h>
+
87 #include <yarp/os/LogStream.h>
+
88 #include <yarp/os/Terminator.h>
+
89 #include <yarp/dev/ControlBoardInterfaces.h>
+
90 #include <yarp/dev/PolyDriver.h>
+
91 #include <yarp/sig/Vector.h>
+
92 #include <yarp/os/ResourceFinder.h>
+
93 
+
94 using namespace std;
+
95 using namespace yarp::dev;
+
96 using namespace yarp::os;
+
97 using namespace yarp::sig;
+
98 
+
99 const int FIXED_TIME_MOVE=5;
+
100 const int SAMPLER_RATE=100;
+
102 
+
103 struct LimbInterfaces
+
104 {
+
105  PolyDriver *dd;
+
106  IPositionControl *ipos;
+
107  IEncoders *ienc;
+
108  Vector encoders;
+
109  Vector speed;
+
110  Vector cmd;
+
111  bool *md;
+
112  int nj;
+
113  LimbInterfaces() : dd(0), ipos(0), ienc(0), md(0)
+
114  { }
+
115 
+
116  ~LimbInterfaces()
+
117  {
+
118  if (!md)
+
119  delete[] md;
+
120  }
+
121 
+
122  void resize(int n)
+
123  {
+
124  nj=n;
+
125  cmd.resize(nj);
+
126  encoders.resize(nj);
+
127  speed.resize(nj);
+
128  md=new bool[nj];
+
129  }
+
130 
+
131 };
+
132 
+
133 typedef std::list<Vector> PositionList;
+
134 typedef PositionList::iterator PositionListIterator;
+
135 typedef std::vector<PositionList> RobotSequence;
+
136 typedef std::vector<LimbInterfaces> RobotInterfaces;
+
137 typedef RobotInterfaces::iterator RobotInterfacesIterator;
+
138 
+
139 uint8_t LIMBS = 6;
+
140 
+
141 enum Index
+
142 {
+
143  RIGHTARM=0,
+
144  LEFTARM=1,
+
145  HEAD=2,
+
146  TORSO=3,
+
147  RIGHTLEG=4,
+
148  LEFTLEG=5};
+
149 
+
150 class DemoSequences
+
151 {
+
152 public:
+
153  std::vector<std::string> tags;
+
154  RobotSequence sequences;
+
155 
+
156  DemoSequences(const std::vector<std::string> &t)
+
157  {
+
158  tags=t;
+
159  sequences.resize(LIMBS);
+
160  }
+
161 
+
162  bool fromFile(const char *filename)
+
163  {
+
164  Property config;
+
165  config.fromConfigFile(filename);
+
166  bool ret=true;
+
167 
+
168  for (int k=0; k<LIMBS; k++)
+
169  {
+
170  Bottle seqFile=config.findGroup(tags[k].c_str());
+
171  int length=(seqFile.findGroup("DIMENSIONS").find("numberOfPoses")).asInt32();
+
172  int nj=seqFile.findGroup("DIMENSIONS").find("numberOfJoints").asInt32();
+
173  for (int ii=0; ii<length; ii++)
+
174  {
+
175  char tmp[80];
+
176  if (seqFile.findGroup("REORDER").isNull())
+
177  sprintf(tmp,"POSITION%d",ii);
+
178  else
+
179  sprintf(tmp,"POSITION%d",seqFile.findGroup("REORDER").findGroup("order").get(ii+1).asInt32());
+
180  Bottle &xtmp=seqFile.findGroup(tmp).findGroup("jointPositions");
+
181  Vector vect;
+
182  vect.resize(nj);
+
183  if (nj!=xtmp.size()-1)
+
184  yWarning("**** WARNING: mismatch of sizes in the input file! nj=%d, xtmp=%d \n",nj,xtmp.size());
+
185  for (int l=0; l<xtmp.size()-1; l++)
+
186  vect[l]=xtmp.get(l+1).asFloat64();
+
187  sequences[k].push_back(vect);
+
188  }
+
189  }
+
190 
+
191  return ret;
+
192  }
+
193 
+
194  void dump()
+
195  {
+
196  for (int l=0; l<LIMBS; l++)
+
197  {
+
198  yInfo("Sequence for %s:",tags[l].c_str());
+
199 
+
200  int s=sequences[l].size();
+
201  PositionListIterator it=sequences[l].begin();
+
202  while (it!=sequences[l].end())
+
203  {
+
204  Vector &v=(*it);
+
205  yInfo("%s",v.toString().c_str());
+
206  it++;
+
207  }
+
208 
+
209  yInfo("-----");
+
210  }
+
211  }
+
212 };
+
213 
+
214 class Robot
+
215 {
+
216 public:
+
217 
+
218  std::vector<std::string> tags;
+
219  std::vector<Property> options;
+
220  RobotInterfaces interfaces;
+
221 
+
222  Robot()
+
223  {
+
224  tags.resize(LIMBS);
+
225  options.resize(LIMBS);
+
226  interfaces.resize(LIMBS);
+
227  }
+
228 
+
229  ~Robot()
+
230  {
+
231  RobotInterfacesIterator it;
+
232  for (it=interfaces.begin(); it!=interfaces.end(); it++)
+
233  {
+
234  if ((*it).dd!=0)
+
235  {
+
236  (*it).dd->close();
+
237  delete (*it).dd;
+
238  }
+
239  }
+
240  }
+
241 
+
242  bool createDevices()
+
243  {
+
244  bool success=true;
+
245  for (int k=0; k<LIMBS; k++)
+
246  {
+
247  LimbInterfaces tmp;
+
248  tmp.dd=new PolyDriver;
+
249  tmp.dd->open(options[k]);
+
250  if (!tmp.dd->isValid())
+
251  {
+
252  yError("Error opening %s",tags[k].c_str());
+
253  return false;
+
254  }
+
255 
+
256  bool ret=true;
+
257  ret=ret && tmp.dd->view(tmp.ipos);
+
258  ret=ret && tmp.dd->view(tmp.ienc);
+
259 
+
260  interfaces[k]=tmp;
+
261  success=success && ret;
+
262  }
+
263  return success;
+
264  }
+
265 };
+
266 
+
267 class RobotMover : public PeriodicThread
+
268 {
+
269 private:
+
270  RobotSequence sequences;
+
271  bool sequencesF;
+
272 
+
273  bool motion_done;
+
274  int nJoints;
+
275 
+
276  int count;
+
277  Robot *robot;
+
278  bool done;
+
279 
+
280  bool verbose;
+
281 
+
282  PositionListIterator *its;
+
283  PositionListIterator *itends;
+
284  double motionTime;
+
285  bool spoke;
+
286 public:
+
287  RobotMover(Robot *r, int rate) : PeriodicThread((double)rate/1000.0)
+
288  {
+
289  sequencesF=false;
+
290  robot=r;
+
291  verbose=false;
+
292  its=new PositionListIterator[LIMBS];
+
293  itends=new PositionListIterator[LIMBS];
+
294  motionTime=FIXED_TIME_MOVE;
+
295  spoke=false;
+
296  }
+
297 
+
298  ~RobotMover()
+
299  {
+
300  delete[] its;
+
301  delete[] itends;
+
302  }
+
303 
+
304  void setVerbose(bool f)
+
305  { verbose=f; }
+
306 
+
307  void waitMotion(double dT, bool checkDone=false)
+
308  {
+
309  bool done=false;
+
310  Time::delay(dT);
+
311  if (checkDone)
+
312  {
+
313  double acc=0;
+
314  while (!done)
+
315  {
+
316  done=true;
+
317  for (int k=0; k<LIMBS; k++)
+
318  {
+
319  bool d=true;
+
320  bool *tmp=robot->interfaces[k].md;
+
321  for (int j=0; j<robot->interfaces[k].nj; j++)
+
322  {
+
323  //robot->interfaces[k].ipos->checkMotionDone(j, tmp);
+
324  *tmp=true;
+
325  done=done && (*tmp);
+
326  tmp++;
+
327  }
+
328 
+
329  Time::delay(0.05);
+
330  acc+=0.05;
+
331  }
+
332  Time::delay(0.1);
+
333  acc+=0.1;
+
334 
+
335  if (acc>2)
+
336  done=true;
+
337  }
+
338 
+
339  for (int k=0; k<LIMBS; k++)
+
340  {
+
341  bool d=true;
+
342  yInfo("%s dumping MotionDone:",robot->tags[k].c_str());
+
343  for (int j=0; j<robot->interfaces[k].nj; j++)
+
344  yInfo("%s",robot->interfaces[k].md[j]?"true":"false");
+
345  }
+
346  }
+
347  }
+
348 
+
349  void computeSpeed(double dT)
+
350  {
+
351  if (dT<=0)
+
352  return;
+
353 
+
354  for (int l=0; l<LIMBS; l++)
+
355  {
+
356  int nj=robot->interfaces[l].nj;
+
357  Vector &encs=robot->interfaces[l].encoders;
+
358  Vector &sp=robot->interfaces[l].speed;
+
359  Vector &cmd=robot->interfaces[l].cmd;
+
360 
+
361  for (int j=0; j<nj; j++)
+
362  {
+
363  double dp=fabs(encs[j]-cmd[j]);
+
364  double tmp=dp/dT;
+
365  if (tmp<0.1)
+
366  tmp=0.1;
+
367 
+
368  sp[j]=tmp;
+
369  }
+
370  }
+
371  }
+
372 
+
373  void resetSequence()
+
374  {
+
375  for (int l=0; l<LIMBS; l++)
+
376  {
+
377  its[l]=sequences[l].begin();
+
378  itends[l]=sequences[l].end();
+
379  }
+
380  }
+
381 
+
382  bool threadInit()
+
383  {
+
384  yInfo("Starting controller...");
+
385  if (!sequencesF)
+
386  {
+
387  yError("sequences not set, returning false");
+
388  return false;
+
389  }
+
390 
+
391  resetSequence();
+
392  for (int l=0; l<LIMBS; l++)
+
393  {
+
394  int nj;
+
395  robot->interfaces[l].ipos->getAxes(&nj);
+
396  robot->interfaces[l].resize(nj);
+
397  robot->interfaces[l].speed=0;
+
398  robot->interfaces[l].encoders=0;
+
399  robot->interfaces[l].cmd=0;
+
400  }
+
401 
+
402  done=false;
+
403  return true;
+
404  }
+
405 
+
406  void run()
+
407  {
+
408  yInfo("Running...");
+
409  spoke=false;
+
410  if (!done)
+
411  {
+
412  for (int l=0; l<LIMBS; l++)
+
413  {
+
414  Vector &p=*(its[l]);
+
415  while (!robot->interfaces[l].ienc->getEncoders(robot->interfaces[l].encoders.data()))
+
416  {
+
417  if (!spoke)
+
418  {
+
419  yDebug("Waiting for encoders!\n");
+
420  spoke=true;
+
421  }
+
422 
+
423  }
+
424  robot->interfaces[l].cmd=p;
+
425  its[l]++;
+
426  }
+
427 
+
428  computeSpeed(motionTime);
+
429 
+
430  for (int l=0; l<LIMBS; l++)
+
431  {
+
432  robot->interfaces[l].ipos->setRefSpeeds(robot->interfaces[l].speed.data());
+
433  robot->interfaces[l].ipos->positionMove(robot->interfaces[l].cmd.data());
+
434 
+
435  if (verbose)
+
436  {
+
437  yInfo("%s",robot->tags[l].c_str());
+
438  yInfo("going to: %s ",robot->interfaces[l].cmd.toString().c_str());
+
439  yInfo("speed: %s ",robot->interfaces[l].speed.toString().c_str());
+
440  yInfo("-------");
+
441  }
+
442  }
+
443 
+
444  //wait a bit less, adjustment
+
445  waitMotion(motionTime);
+
446  }
+
447 
+
448  if (its[0]==itends[0])
+
449  {
+
450  static int count=1;
+
451  resetSequence();
+
452  yInfo("Sequence %d completed",count);
+
453  count++;
+
454  //done=true;
+
455  }
+
456  }
+
457 
+
458  void setTime(double dT)
+
459  {
+
460  motionTime=dT;
+
461  }
+
462 
+
463  void waitDone()
+
464  {
+
465  while (!done)
+
466  Time::delay(0.5);
+
467  }
+
468 
+
469  void suspend()
+
470  {
+
471 
+
472  }
+
473 
+
474  void resume()
+
475  {
+
476 
+
477  }
+
478 
+
479  void threadRelease()
+
480  {
+
481  yInfo("Stopping controller...");
+
482  }
+
483 
+
484  void setSequences(const RobotSequence &seq)
+
485  {
+
486  sequences=seq;
+
487  sequencesF=true;
+
488  }
+
489 };
+
490 
+
491 
+
492 int main(int argc, char *argv[])
+
493 {
+
494  Network yarp;
+
495  // pick up name of main configuration file
+
496 
+
497  // find configuration file via ResourceFinder if needed
+
498  // This is trivial if full path has already been provided,
+
499  // but less trivial if just a filename has been given.
+
500  // There is also the possibility of user overrides in
+
501  // standardized forms not anticipated in this program.
+
502  ResourceFinder finder;
+
503  bool no_legs{ false };
+
504  finder.setDefaultContext("demoYoga");
+
505  finder.configure(argc,argv);
+
506  finder.setDefault("positions","yoga.ini");
+
507  finder.setDefault("robot","icub");
+
508  std::string inifile=finder.findFile("positions").c_str();
+
509  std::string robotName=finder.find("robot").asString().c_str();
+
510 
+
511  bool verbose=finder.check("verbose");
+
512  bool diagnostic=finder.check("diagnostic");
+
513  no_legs = finder.check("no_legs");
+
514  if (no_legs)
+
515  LIMBS = 4;
+
516 
+
517  if (inifile=="")
+
518  {
+
519  yError("No position file specified");
+
520  return 1;
+
521  }
+
522  else
+
523  {
+
524  yInfo("Reading positions file from %s",inifile.c_str());
+
525  }
+
526 
+
527  std::string prefix=string("/")+robotName+"/";
+
528 
+
529  Robot icub;
+
530 
+
531  icub.options[0].put("device","remote_controlboard");
+
532  icub.options[0].put("local",(prefix+"demoYoga/right_arm/client").c_str());
+
533  icub.options[0].put("remote",(prefix+"right_arm").c_str());
+
534  icub.tags[0]="RIGHTARM";
+
535 
+
536  icub.options[1].put("device","remote_controlboard");
+
537  icub.options[1].put("local",(prefix+"demoYoga/left_arm/client").c_str());
+
538  icub.options[1].put("remote",(prefix+"left_arm").c_str());
+
539  icub.tags[1]="LEFTARM";
+
540 
+
541  icub.options[2].put("device","remote_controlboard");
+
542  icub.options[2].put("local",(prefix+"demoYoga/head/client").c_str());
+
543  icub.options[2].put("remote",(prefix+"head").c_str());
+
544  icub.tags[2]="HEAD";
+
545 
+
546  icub.options[3].put("device","remote_controlboard");
+
547  icub.options[3].put("local",(prefix+"demoYoga/torso/client").c_str());
+
548  icub.options[3].put("remote",(prefix+"torso").c_str());
+
549  icub.tags[3]="TORSO";
+
550 
+
551  if (!no_legs) {
+
552  icub.options[4].put("device", "remote_controlboard");
+
553  icub.options[4].put("local", (prefix + "demoYoga/right_leg/client").c_str());
+
554  icub.options[4].put("remote", (prefix + "right_leg").c_str());
+
555  icub.tags[4] = "RIGHTLEG";
+
556 
+
557  icub.options[5].put("device", "remote_controlboard");
+
558  icub.options[5].put("local", (prefix + "demoYoga/left_leg/client").c_str());
+
559  icub.options[5].put("remote", (prefix + "left_leg").c_str());
+
560  icub.tags[5] = "LEFTLEG";
+
561  }
+
562 
+
563  if (diagnostic)
+
564  {
+
565  for (int k=0; k<LIMBS; k++)
+
566  icub.options[k].put("diagnostic","");
+
567  }
+
568 
+
569  DemoSequences *sequences=new DemoSequences(icub.tags);
+
570 
+
571  sequences->fromFile(inifile.c_str());
+
572  if (verbose)
+
573  sequences->dump();
+
574 
+
575  Property op;
+
576  op.fromConfigFile(inifile.c_str());
+
577  double dT=-1;
+
578  if (op.check("time"))
+
579  dT=op.find("time").asFloat64();
+
580 
+
581  if (!icub.createDevices())
+
582  {
+
583  yError("Error creating devices, check parameters");
+
584  return 1;
+
585  }
+
586 
+
587  RobotMover *robot_mover=new RobotMover(&icub,SAMPLER_RATE);
+
588  robot_mover->setVerbose(verbose);
+
589  robot_mover->setSequences(sequences->sequences);
+
590  if (dT>0)
+
591  {
+
592  yInfo("Setting time to %g",dT);
+
593  robot_mover->setTime(dT);
+
594  }
+
595 
+
596  robot_mover->start();
+
597 
+
598  std::string reply;
+
599  while (reply!="quit")
+
600  {
+
601  std::cin>>reply;
+
602  }
+
603 
+
604  yInfo("Received a quit message");
+
605  robot_mover->stop();
+
606 
+
607  delete robot_mover;
+
608  delete sequences;
+
609 
+
610  return 0;
+
611 }
+
+ + + + diff --git a/doxygen/doc/html/dir_09c3d1dd163a66c44752029483303db0.html b/doxygen/doc/html/dir_09c3d1dd163a66c44752029483303db0.html new file mode 100644 index 0000000..8a55a9a --- /dev/null +++ b/doxygen/doc/html/dir_09c3d1dd163a66c44752029483303db0.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/app Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
app Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.html b/doxygen/doc/html/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.html new file mode 100644 index 0000000..6475dc4 --- /dev/null +++ b/doxygen/doc/html/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.html @@ -0,0 +1,91 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+ + + + + + + + + + + +

+Files

file  FastGauss.cpp [code]
 Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.
 
file  IIRGausDeriv.cpp [code]
 Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2).
 
file  ScaleSpace.cpp [code]
 Implements a Gaussian Scale Space for floating point images.
 
+
+ + + + diff --git a/doxygen/doc/html/dir_16f69bce6b508aa996db90e545a71f98.html b/doxygen/doc/html/dir_16f69bce6b508aa996db90e545a71f98.html new file mode 100644 index 0000000..8fc81a6 --- /dev/null +++ b/doxygen/doc/html/dir_16f69bce6b508aa996db90e545a71f98.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.html b/doxygen/doc/html/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.html new file mode 100644 index 0000000..acdc7e4 --- /dev/null +++ b/doxygen/doc/html/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_24edfe2b9091337dacb04c2225681c6a.html b/doxygen/doc/html/dir_24edfe2b9091337dacb04c2225681c6a.html new file mode 100644 index 0000000..0e91df7 --- /dev/null +++ b/doxygen/doc/html/dir_24edfe2b9091337dacb04c2225681c6a.html @@ -0,0 +1,84 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
demoRedBall Directory Reference
+
+
+ + + + +

+Directories

directory  app
 
+
+ + + + diff --git a/doxygen/doc/html/dir_3b22bad5c1bf11cca84db4574fa99c00.html b/doxygen/doc/html/dir_3b22bad5c1bf11cca84db4574fa99c00.html new file mode 100644 index 0000000..a07a078 --- /dev/null +++ b/doxygen/doc/html/dir_3b22bad5c1bf11cca84db4574fa99c00.html @@ -0,0 +1,80 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/gazebo Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
gazebo Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_461bc6e266c40caf4deffca7b613e586.html b/doxygen/doc/html/dir_461bc6e266c40caf4deffca7b613e586.html new file mode 100644 index 0000000..395a049 --- /dev/null +++ b/doxygen/doc/html/dir_461bc6e266c40caf4deffca7b613e586.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
include Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_46844ca6f7a7f72255313000c6b6b85e.html b/doxygen/doc/html/dir_46844ca6f7a7f72255313000c6b6b85e.html new file mode 100644 index 0000000..e6525a9 --- /dev/null +++ b/doxygen/doc/html/dir_46844ca6f7a7f72255313000c6b6b85e.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/include Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
include Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_5ba73ae6ed0b41c8033623abea2a8464.html b/doxygen/doc/html/dir_5ba73ae6ed0b41c8033623abea2a8464.html new file mode 100644 index 0000000..a238463 --- /dev/null +++ b/doxygen/doc/html/dir_5ba73ae6ed0b41c8033623abea2a8464.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/include/iCub Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
iCub Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.html b/doxygen/doc/html/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.html new file mode 100644 index 0000000..f79b840 --- /dev/null +++ b/doxygen/doc/html/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceImitation Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
demoForceImitation Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_61b422eae39885bd24f8acba30ef5313.html b/doxygen/doc/html/dir_61b422eae39885bd24f8acba30ef5313.html new file mode 100644 index 0000000..f0091cc --- /dev/null +++ b/doxygen/doc/html/dir_61b422eae39885bd24f8acba30ef5313.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/app/conf/models Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
models Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_756642fb7df32f4fba8cd8cbf5208191.html b/doxygen/doc/html/dir_756642fb7df32f4fba8cd8cbf5208191.html new file mode 100644 index 0000000..8c54171 --- /dev/null +++ b/doxygen/doc/html/dir_756642fb7df32f4fba8cd8cbf5208191.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/app/conf Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
conf Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_78c59be1348feda52106cbd20414be4b.html b/doxygen/doc/html/dir_78c59be1348feda52106cbd20414be4b.html new file mode 100644 index 0000000..47106cd --- /dev/null +++ b/doxygen/doc/html/dir_78c59be1348feda52106cbd20414be4b.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/app/scripts Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
scripts Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_811e15f64083e64bb2a9d8e860a70892.html b/doxygen/doc/html/dir_811e15f64083e64bb2a9d8e860a70892.html new file mode 100644 index 0000000..7e3a017 --- /dev/null +++ b/doxygen/doc/html/dir_811e15f64083e64bb2a9d8e860a70892.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
demoForceControl Directory Reference
+
+
+ + +

+Directories

+
+ + + + diff --git a/doxygen/doc/html/dir_9ae835d45530d23e4ddf2ad0cc13b598.html b/doxygen/doc/html/dir_9ae835d45530d23e4ddf2ad0cc13b598.html new file mode 100644 index 0000000..829827d --- /dev/null +++ b/doxygen/doc/html/dir_9ae835d45530d23e4ddf2ad0cc13b598.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceImitation/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_9f0657da05b23c4879b50332cf355c63.html b/doxygen/doc/html/dir_9f0657da05b23c4879b50332cf355c63.html new file mode 100644 index 0000000..b26dc90 --- /dev/null +++ b/doxygen/doc/html/dir_9f0657da05b23c4879b50332cf355c63.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/app Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
app Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_b27c00042910d6a487ffb0dd3cd42b7b.html b/doxygen/doc/html/dir_b27c00042910d6a487ffb0dd3cd42b7b.html new file mode 100644 index 0000000..f8f2170 --- /dev/null +++ b/doxygen/doc/html/dir_b27c00042910d6a487ffb0dd3cd42b7b.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoYoga/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_b73a721c8cbb3e92535cc94daa204a01.html b/doxygen/doc/html/dir_b73a721c8cbb3e92535cc94daa204a01.html new file mode 100644 index 0000000..0ece9cb --- /dev/null +++ b/doxygen/doc/html/dir_b73a721c8cbb3e92535cc94daa204a01.html @@ -0,0 +1,86 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
pf3dTracker Directory Reference
+
+
+ + + + + + +

+Directories

directory  app
 
directory  include
 
+
+ + + + diff --git a/doxygen/doc/html/dir_bed1e4cba671f75d7de20f48ac2e3ab2.html b/doxygen/doc/html/dir_bed1e4cba671f75d7de20f48ac2e3ab2.html new file mode 100644 index 0000000..7e73a0c --- /dev/null +++ b/doxygen/doc/html/dir_bed1e4cba671f75d7de20f48ac2e3ab2.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/matlab_files Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
matlab_files Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_e598492b3e513106f2ee79440d3c69e6.html b/doxygen/doc/html/dir_e598492b3e513106f2ee79440d3c69e6.html new file mode 100644 index 0000000..c22df3b --- /dev/null +++ b/doxygen/doc/html/dir_e598492b3e513106f2ee79440d3c69e6.html @@ -0,0 +1,78 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/src Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
src Directory Reference
+
+
+
+ + + + diff --git a/doxygen/doc/html/dir_e676cb3644873b6bf7df3036a086e762.html b/doxygen/doc/html/dir_e676cb3644873b6bf7df3036a086e762.html new file mode 100644 index 0000000..d1cda19 --- /dev/null +++ b/doxygen/doc/html/dir_e676cb3644873b6bf7df3036a086e762.html @@ -0,0 +1,84 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
pf3dBottomup Directory Reference
+
+
+ + + + +

+Directories

directory  include
 
+
+ + + + diff --git a/doxygen/doc/html/dir_eb22669ebb55c4a1830d5f6f631ad207.html b/doxygen/doc/html/dir_eb22669ebb55c4a1830d5f6f631ad207.html new file mode 100644 index 0000000..882338e --- /dev/null +++ b/doxygen/doc/html/dir_eb22669ebb55c4a1830d5f6f631ad207.html @@ -0,0 +1,94 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
iCub Directory Reference
+
+
+ + + + + + + + + + + + + + +

+Files

file  FastGauss.h [code]
 Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions.
 
file  IIRFilt.h [code]
 Functions for generic, 3 tap, iir filtering.
 
file  IIRGausDeriv.h [code]
 Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2).
 
file  ScaleSpace.h [code]
 Implements a Gaussian Scale Space for floating point images.
 
+
+ + + + diff --git a/doxygen/doc/html/dir_ef68c104db6052f7b3e7734a1a1b7a65.html b/doxygen/doc/html/dir_ef68c104db6052f7b3e7734a1a1b7a65.html new file mode 100644 index 0000000..96e144d --- /dev/null +++ b/doxygen/doc/html/dir_ef68c104db6052f7b3e7734a1a1b7a65.html @@ -0,0 +1,82 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoYoga Directory Reference + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
demoYoga Directory Reference
+
+
+ + +

+Directories

+
+ + + + 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 0000000..ffbff02 --- /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 0000000..d42dad5 --- /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 0000000..88f2c27 --- /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-basic-demos: File List + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
File List
+
+
+
Here is a list of all documented files with brief descriptions:
+
[detail level 12345]
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  demoForceControl
  src
 main.cpp
 mainwindow.cpp
 mainwindow.h
 robot_interfaces.cpp
 robot_interfaces.h
  demoForceImitation
  src
 main.cpp
 robot_interfaces.cpp
 robot_interfaces.h
  demoRedBall
  app
  scripts
 acquireData.m
  src
 main.cpp
 world.cpp
  demoYoga
  src
 main.cpp
  pf3dBottomup
  include
  iCub
 FastGauss.hImplements 3 Tap IIR Gaussian Filtering with Boundary Conditions
 IIRFilt.hFunctions for generic, 3 tap, iir filtering
 IIRGausDeriv.hCoefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2)
 pf3dBottomup.hpp
 ScaleSpace.hImplements a Gaussian Scale Space for floating point images
  src
 cvfloodfill2.cpp
 FastGauss.cppImplements 3 Tap IIR Gaussian Filtering with Boundary Conditions
 IIRFilt.cpp
 IIRGausDeriv.cppCoefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2)
 main.cpp
 pf3dBottomup.cpp
 ScaleSpace.cppImplements a Gaussian Scale Space for floating point images
  pf3dTracker
  app
  conf
  models
 generate_shape_model.py
  include
  iCub
 pf3dTracker.hpp
 pf3dTrackerSupport.hpp
  matlab_files
 write_initial_ball_points.m
  src
 pf3dTracker.cpp
 pf3dTrackerMain.cpp
 pf3dTrackerSupport.cpp
+
+
+ + + + 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/form_0.png b/doxygen/doc/html/form_0.png new file mode 100644 index 0000000000000000000000000000000000000000..8d55327b4eaa06aa4a62b26b76ba45dd8b3c72d6 GIT binary patch literal 1118 zcmV-k1flzhP)E}Haz&CRosliz8BobBi3eO;uCsTKu=LO(w zUt<8yR{W3}#9Iaz)%c^df^*T@X^DhI-Clp44vu4J2(=ToMZ4_qLQ!$mQ-^+5rpWIRuj*4|)Q8$HO(m{mb*(;4^|@10^&va$?VT)#K};=ag<2jF z2kfa|?#*eMT_hX4T1L`DHuZ<~oTinOetXv9ht0=hnEGyR#Q@KDtc=ePQ86WE^DFnJ zdRDShqYqVM*_EBrSX3K>)%9kl&AV}eagyrxm=pHLSK#@UBfQAHm;zTy)`B+RVS64U zD=j+qKHAkG*kbb%6VmpqSAz3JCvXy#D%S_Ef7k}*(fgIG)0!Hq==f`YOR89Ys>U?Qj)@ki7A*qa-6?wv*y%$Bu=Do`=dsVv@3_&^tv{Yhl-4sWH`#3|_m{8Zp zA&zQv&*Xk8&Ze8!ze4d_%btC-oX9$^6-9~m(rXy38I|8N?mOiz@p1O=WF6OxD5HJy zqda2YX^)$??+}$^v3fR2(wf?(*mr(?Z!5$0th*@jTx{D}k~7$;6?1$hKSc57#Z1vh zsQc+_^E}?QVXse1Od&eo%INaYHv@*UmPVoveEbiyUwIEef||JWZ3l_z-Ul_;^=0L?g$- zyPliqFsZb68s}*;;?)NLC!2{&QcUQj`y=)xGiIG!z%r@OZCVaJ$F94j)y2ZS24XLCqI#<03RUK-y`#fmwWF2hY-QM44 z7(p?5jm`shfdY83TD_xpcp}c#`j{Mh!vnmU3e1NC_$kJ8FV~yhVD;Mhh;q^uL+c9@+$nnrCr^fy%CfA~QQ0wYrJpk~|oKb+Q z+3Zzc^qL1wYqJ9m0^4s{fESCMm2tri(6A@Ghu=oSHD*ylh07*qoM6N<$g0Y|ox&QzG literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/form_1.png b/doxygen/doc/html/form_1.png new file mode 100644 index 0000000000000000000000000000000000000000..822821fe065bf3ba452b5c307d40cd1878be57d2 GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0vp^AS}Sa3?w%t-8cuN3<7*YT!A!6Aj)2b8>m5`B*-tA zLC+&LzoCELnw>{4-F^Ax|Ely2?->{vojhF}Ln;{G&OKPwqQKLl&d3<}J<-d(vx_!@WymL!6chgeIlNH<-g3mm++m>tL_wM1l6JjCWDVy*7 zQxTm~>h$ZoVuW`1_Us~ql(W}1vwP+*-_(2NyXMloRE3-KR_*$kr*_YbF>AM}1JbUzy?w-`V!LIL3(1}~qKkr((R66L)KJ6!k9bfWJ zN-^Evdr3Ls?~!vs*}Z(~nj*0;KkaPPxykwv4JZ&M>8CPeD=R>FVdQ&MBb@0D~C5(f|Me literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/form_2.png b/doxygen/doc/html/form_2.png new file mode 100644 index 0000000000000000000000000000000000000000..c49e43617be891374ed6c48d695931d29fc18b06 GIT binary patch literal 472 zcmeAS@N?(olHy`uVBq!ia0vp^;Xo|F!3-oryoI}fltF+`h%1mL2}Ie;a04|6lmz(& zGw6B5<~Q`uTeI`%rMoY`{9l#6;XMNbqr0bzV@L(#+gQg*M-(`6T$v3|{`h}iZ$V&s zdY1prH;r0GevH26FJu}1%~xlrI1w!2-pBA^%6szy4TcXh_;-BLh&}qcMPHtqQJSHq z;>4`)wl0x}Grwp(h4*)L_$pmgol{;uR?KQ%aM&(pLRw)`_O*n9 zv^Se)Ouob1vw~4y^wwLB_Q1V`f1it9f26i(_Nf_19cODt<=3xMYIgY6d0XLL*ZqQ* zYj3e0`|ZhhjUpjr{TrPw4)@8bB7AL literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/form_3.png b/doxygen/doc/html/form_3.png new file mode 100644 index 0000000000000000000000000000000000000000..be199fbd0d62bcdd5ab8af59e3006a7df6c2a804 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0vp^X+SK%!3-oXSN-Y%QU(D&A+A80BoJjU!wu9RP!i-9 z%%JBHo8QnsZ_Uo5m+rp&@_$wOhW88%j6t3*jv*C{Z|C~XZdTxFX@4)W^xyyb-IJF@ ze7_myANNg3^l)|?=f-q~ANk762XvK}eBa~Bup|9Sta=HD#mE@1zh8k0{Q-7^qs$3|2X-7!k&KbYDI_J4w_TPEMYSXP( zJV=Q@9 z!RPfQ_wTcgPbp+nOy4MWV}gl?vhvCvi9;g3)3raXlAC=( z>CnuRF$VVz73QsYEtX_DjjQtVbA_@KJN0x@)$Dor-)P4g%;a`E6FQq$mQz=B^|kVX zxvmBAUnH&;%eZWwzfN4GZ0!e2<6{?men0O#7OcN4YxjpPX)V_)KXzBA-@SWDQ@BU7 p-QKjV|H|?6%nWw@!Nm5`B*-tA zLC+&LzoCELnw>{4-F^Ax|Ely2?}2hLo-U3d6^w7^Hu4@;;9)s0G5bXBp?|lpX?oo$ zX}`YsIZNGoh7aW~ji3H8oic3rl+%Clzopr0IKUvGynhq literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/form_5.png b/doxygen/doc/html/form_5.png new file mode 100644 index 0000000000000000000000000000000000000000..1fabf0d291ea5d50771dafd392ae57ef4e211d1f GIT binary patch literal 407 zcmeAS@N?(olHy`uVBq!ia0vp^4nQox!3-oPT6RhUDT4r?5LX~g5{R;w;Rb3DC<*cl zX3+D9&2Q+Rw`S+jOLt#>`M)ZC!+Qn>MmA3u$B+ufw{sn*wJ7koXis8j?!EJW+vFo1 zJ=WEx((^BH9Q6;nP|fgzznAer?&RtSGlq)WFVg#@8202(O1`kq%VEB4-R|#^LW~jd zf_0nzudv%#Wuf|T!xS-((-~p0yOuk-J`b_Y_L$~*HBVqghPc1fxd&(do>C5Joy@+M zK`fQS!#tyhGvn2!Rnm*&^xC!5cbGB6HEA97-oo zo}{|aDS3KDTdR6ZLQ7`65k5F;t*G0!eD)2Cw~EImZSz*I`{*~-YT-*w1)jMpANOxbs?yQN58WFqIwXGxL3?!J+x8X&>9rH Mp00i_>zopr0430s9RL6T literal 0 HcmV?d00001 diff --git a/doxygen/doc/html/formula.repository b/doxygen/doc/html/formula.repository new file mode 100644 index 0000000..53a2821 --- /dev/null +++ b/doxygen/doc/html/formula.repository @@ -0,0 +1,6 @@ +\_form#0:\[ y(t) = b_0 x(t) - a_1 y(t-1) - a_2 y(t-2) - a_3 y(t-3) \] +\_form#1:$(b_0, a_1, a_2, a_3)$ +\_form#2:$(y_{-1}, y_{-2}, y_{-3})$ +\_form#3:$(y_{N}, y_{N+1}, y_{N+2})$ +\_form#4:$ b_0 $ +\_form#5:$ (a_1, a_2, a_3)$ diff --git a/doxygen/doc/html/generate__shape__model_8py_source.html b/doxygen/doc/html/generate__shape__model_8py_source.html new file mode 100644 index 0000000..558dbba --- /dev/null +++ b/doxygen/doc/html/generate__shape__model_8py_source.html @@ -0,0 +1,133 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/app/conf/models/generate_shape_model.py Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
generate_shape_model.py
+
+
+
1 # Copyright: (C) 2019 iCub Tech Facility - Istituto Italiano di Tecnologia
+
2 # Authors: Ugo Pattacini <ugo.pattacini@iit.it>
+
3 # CopyPolicy: Released under the terms of the GNU GPL v3.0.
+
4 
+
5 # This script generates the ball shape model
+
6 # composed of initial estimates of its radius
+
7 
+
8 import argparse
+
9 import math
+
10 
+
11 parser = argparse.ArgumentParser()
+
12 parser.add_argument("-r", "--radius", type=float,
+
13  help="ball radius in millimeters (default: 30)", default=30)
+
14 parser.add_argument("-p", "--percentage", type=float,
+
15  help="percentage in [0, 100] for inner and outer radii (default: 20)", default=20)
+
16 parser.add_argument("-n", "--points", type=int,
+
17  help="number of points generated (default: 50)", default=50)
+
18 parser.add_argument("-f", "--file", type=str,
+
19  help="name of the generated file (default: shape_model.csv)", default='shape_model.csv')
+
20 args = parser.parse_args()
+
21 
+
22 print('using:')
+
23 print('radius = {} [mm]'.format(args.radius))
+
24 print('percentage = {} [%]'.format(args.percentage))
+
25 print('points = {}'.format(args.points))
+
26 print('file = "{}"'.format(args.file))
+
27 
+
28 R_i = (1.0 - (args.percentage / 100.0)) * args.radius
+
29 R_o = (1.0 + (args.percentage / 100.0)) * args.radius
+
30 
+
31 x = []
+
32 y = []
+
33 z = []
+
34 t = 0.0
+
35 t_delta = (2.0 * math.pi) / args.points
+
36 for i in range(args.points):
+
37  x.append(0.0)
+
38  y.append(math.sin(t))
+
39  z.append(math.cos(t))
+
40  t += t_delta
+
41 
+
42 fout = open(args.file, "w")
+
43 for i in range(args.points):
+
44  fout.write('{0:.3f}\n'.format(x[i]))
+
45 for i in range(args.points):
+
46  fout.write('{0:.3f}\n'.format(x[i]))
+
47 for i in range(args.points):
+
48  fout.write('{0:.3f}\n'.format(R_i * y[i]))
+
49 for i in range(args.points):
+
50  fout.write('{0:.3f}\n'.format(R_o * y[i]))
+
51 for i in range(args.points):
+
52  fout.write('{0:.3f}\n'.format(R_i * z[i]))
+
53 for i in range(args.points):
+
54  fout.write('{0:.3f}\n'.format(R_o * z[i]))
+
55 fout.close()
+
+ + + + diff --git a/doxygen/doc/html/globals.html b/doxygen/doc/html/globals.html new file mode 100644 index 0000000..e43b290 --- /dev/null +++ b/doxygen/doc/html/globals.html @@ -0,0 +1,119 @@ + + + + + + + +icub-basic-demos: Globals + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
Here is a list of all documented functions, variables, defines, enums, and typedefs with links to the documentation:
+
+ + + + diff --git a/doxygen/doc/html/globals_func.html b/doxygen/doc/html/globals_func.html new file mode 100644 index 0000000..f2bbacc --- /dev/null +++ b/doxygen/doc/html/globals_func.html @@ -0,0 +1,83 @@ + + + + + + + +icub-basic-demos: Globals + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/doxygen/doc/html/globals_vars.html b/doxygen/doc/html/globals_vars.html new file mode 100644 index 0000000..f216777 --- /dev/null +++ b/doxygen/doc/html/globals_vars.html @@ -0,0 +1,108 @@ + + + + + + + +icub-basic-demos: Globals + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+ + + + diff --git a/doxygen/doc/html/group__app__demoRedBall.html b/doxygen/doc/html/group__app__demoRedBall.html new file mode 100644 index 0000000..9f68678 --- /dev/null +++ b/doxygen/doc/html/group__app__demoRedBall.html @@ -0,0 +1,104 @@ + + + + + + + +icub-basic-demos: Red-Ball Demo + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
Red-Ball Demo
+
+
+ +

The Red-Ball Demo application developed by IIT and ISR. +

+

The Red-Ball Demo application developed by IIT and ISR.

+

+Description

+

This application launches all the required modules in order to detect and track the 3-d position of a target within the image plane applying the particle filter algorithm along with the controllers to move the head accordingly and both arms to reach for the object and eventually grasp it.

+

A second mode is also available that allows to track a moving target relying on stereo vision which needs to be calibrated in advance using a feed-forward neural network.

+

+Dependencies

+

Assumes that robotInterface (with ICartesianControl interface implemented) and iKinGazeCtrl are running.

+

+Instantiated Modules

+
    +
  • pf3dTracker
  • +
  • motionCUT
  • +
  • demoRedBall
  • +
+

+Configuration Files

+

The file ./conf/config.ini contains the initialization parameters for the demoGraspManager module. The file ./conf/network.ini contains the network weights.

+

+How to run the Application

+

Customize the file ./app/scripts/*.template for your specific platform before launching them.

+
    +
  • ./scripts/demoRedBall.xml.template: detection done via particle filter.
  • +
  • ./scripts/demoRedBall_Stereo.xml.template: detection done with stero.
  • +
  • ./scripts/demoRedBall_Impedance.xml.template: as demoGrasp.xml.template but with impedance control enabled.
  • +
+
Note
To enable/disable arms refer to the options available within the config.ini file.
+
+ + + + diff --git a/doxygen/doc/html/group__demo__applications.html b/doxygen/doc/html/group__demo__applications.html new file mode 100644 index 0000000..5f4b8dc --- /dev/null +++ b/doxygen/doc/html/group__demo__applications.html @@ -0,0 +1,91 @@ + + + + + + + +icub-basic-demos: Demo Applications + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Demo Applications
+
+
+ +

The app directory stores directories which group sets of configuration files and scripts to run a certain group of modules together. +More...

+ + + + + +

+Modules

 Red-Ball Demo
 The Red-Ball Demo application developed by IIT and ISR.
 
+

Detailed Description

+

The app directory stores directories which group sets of configuration files and scripts to run a certain group of modules together.

+

Each one of them is what we call an application. In other words, an application is an instantiation of a set of modules that run at the same time.

+

Documentation for each application goes in each directory.

+

Ideally these directories will contain only scripts and ini/txt files. Use src to store source code.

+
+ + + + diff --git a/doxygen/doc/html/group__demo__modules.html b/doxygen/doc/html/group__demo__modules.html new file mode 100644 index 0000000..d4ff91c --- /dev/null +++ b/doxygen/doc/html/group__demo__modules.html @@ -0,0 +1,91 @@ + + + + + + + +icub-basic-demos: Demo Modules + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+ +
+
Demo Modules
+
+
+ +

This is a list of modules composing the demos. +More...

+ + + + + + + + +

+Modules

 demoRedBall
 The manager module for the Red-Ball Demo developed by IIT and ISR.
 
 demoYoga
 Demo for moving the robot joints in a coordinated fashion.
 
+

Detailed Description

+

This is a list of modules composing the demos.

+
+ + + + diff --git a/doxygen/doc/html/group__icub__pf3dBottomup.html b/doxygen/doc/html/group__icub__pf3dBottomup.html new file mode 100644 index 0000000..25c2659 --- /dev/null +++ b/doxygen/doc/html/group__icub__pf3dBottomup.html @@ -0,0 +1,87 @@ + + + + + + + +icub-basic-demos: pf3dBottomup + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
pf3dBottomup
+
+
+ +

<> +

+

<>

+

A bottom-up approach for generating particles for the pf3dTracker module

+

Copyright (C) 2010 RobotCub Consortium

+

Author: Martim Brandao

+

Note: Should you use or reference my work on your own research, please let me know (mbrandao AT isr.ist.utl.pt)

+

Image sequence as input, N particles (3D position of balls) as output.

+

CopyPolicy: Released under the terms of the GNU GPL v2.0.

+

+Description

+

For an explanation on how to configure the tracker and bottom up modules, how to connect them, how to run them through the application manager, etc., please have a look at this page.

+
+ + + + diff --git a/doxygen/doc/html/group__icub__pf3dTracker.html b/doxygen/doc/html/group__icub__pf3dTracker.html new file mode 100644 index 0000000..2601f6e --- /dev/null +++ b/doxygen/doc/html/group__icub__pf3dTracker.html @@ -0,0 +1,211 @@ + + + + + + + +icub-basic-demos: pf3dTracker + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
pf3dTracker
+
+
+ +

<> +

+

<>

+

A robust and real-time 3D ball tracker.

+

Copyright (C) 2009 RobotCub Consortium

+

Author: Matteo Taiana, homepage.

+

CopyPolicy: Released under the terms of the GNU GPL v2.0.

+

+Description

+

This module implements a model-based object tracker: it estimates the 3D position of a ball given a sequence of images. One estimate is computed for each input image. The tracker outputs a flag that is set to 1 when the module is confident that it is tracking a ball, when the flag is set to 0 the tracker still computes a 3D estimate, but that is meaningless. After 5 frames with confidence under the threshold, the tracker estimate is reset. The module is meant to work together with pf3dBottomup, which is a 3D ball detector, but can also work on its own.

+

For an explanation on how to configure the tracker and bottom up modules, how to connect them, how to run them through the application manager, etc., please have a look at this page.

+

The algorithm is described in the paper: "Tracking objects with generic calibrated sensors: an algorithm based on color and 3D shape features", please cite it if you use the tracker in your research.

+

You can watch a video of the tracker in action here.

+

+Libraries

+
    +
  • YARP libraries.
  • +
  • OpenCv
  • +
+

+Parameters

+

Configuration is done through an initialization file (See for instance icub-main/app/pf3dTracker/conf/pf3dTracker.ini) Here is an example, with comments:

####################################
+
#configuration file for pf3dTracker#
+
####################################
+
+
+
#############
+
#module name#
+
#############
+
name /pf3dTracker
+
+
#############################
+
#parameters of the algorithm#
+
#############################
+
nParticles 900
+
#nParticles number of particles used
+
accelStDev 30
+
#accelStDev standard deviation of the acceleration noise
+
insideOutsideDiffWeight 1.5
+
#insideOutsideDiffWeight inside-outside difference weight for the likelihood function
+
colorTransfPolicy 1
+
#colorTransfPolicy [0=transform the whole image | 1=only transform the pixels you need]
+
+
+
#########################
+
#port names and function#
+
#########################
+
inputVideoPort /pf3dTracker/video:i
+
#inputVideoPort receives images from the grabber or the rectifying program.
+
outputVideoPort /pf3dTracker/video:o
+
#outputVideoPort produces images in which the contour of the estimated ball is highlighted.
+
outputDataPort /pf3dTracker/data:o
+
#outputDataPort produces a stream of data in the format: X, Y, Z [meters], likelihood, U, V [pixels], seeing_object.
+
inputParticlePort /pf3dTracker/particles:i
+
#inputParticlePort receives hypotheses on the position of the ball from the bottom up module
+
outputParticlePort /pf3dTracker/particles:o
+
#outputParticlePort produces data for the plotter. it is usually not active for performance reasons.
+
outputAttentionPort /pf3dTracker/attention:o
+
#outputAttentionPort produces data for the attention system, in terms of a peak of saliency.
+
+
+
#################################
+
#projection model and parameters#
+
#################################
+
#projectionModel, only the perspective one was implemented so far.
+
projectionModel perspective
+
+
cameraContext cameraCalibration
+
cameraFile icubEyes.ini
+
cameraGroup CAMERA_CALIBRATION_LEFT
+
+
#######################
+
#tracked object models#
+
#######################
+
#trackedObjectType, only sphere was implemented so far.
+
trackedObjectType sphere
+
trackedObjectColorTemplate models/red_smiley_2009_07_02.bmp
+
trackedObjectShapeTemplate models/initial_ball_points_smiley_31mm_20percent.csv
+
+
motionModelMatrix models/motion_model_matrix.csv
+
trackedObjectTemp current_histogram.csv
+
+
+
#######################
+
#initialization method#
+
#######################
+
#initialization method, only 3dEstimate was implemented so far.
+
initializationMethod 3dEstimate
+
#initial position [meters]
+
initialX 0
+
initialY 0
+
initialZ 0.5
+
+
+
####################
+
#visualization mode#
+
####################
+
#circleVisualizationMode [0=inner and outer circle | 1=one circle with the correct radius]
+
#default 0. only applies to the sphere.
+
circleVisualizationMode 1
+
+
+
#################################
+
#likelihood and reset condition #
+
#################################
+
#the tracker produces a value of likelihood at each time step.
+
#this value can be used to infer if the object it is tracking is the correct one.
+
#
+
#if likelihood<=this value for 5 consecutive frames, the tracker
+
#assumes it's not seeing the right object and is reinitialized.
+
#
+
likelihoodThreshold 0.005
+

+Ports Accessed

+

The tracker need to be connected to a port that streams images, at the very least, in order to work.

+

+Ports Created

+
    +
  • /pf3dTracker/video:i receives the image stream given which the ball has to be tracked.
  • +
  • /pf3dTracker/video:o produces images in which the contour of the estimated ball is highlighted. When the tracker is confident that it's tracking a ball, it draws the contour in green, when it is not confident (it's looking for a ball, but does not yet have a good estimate), it draws the contour in yellow.
  • +
  • /pf3dTracker/data:o produces a stream of data in the format: X, Y, Z [meters], likelihood, U, V [pixels], seeing_object.
    + X, Y and Z are the estimated coordinates of the tracked ball in the eye reference frame (they can be transformed to the root reference frame by module eye2RootFrameTransformer. The likelihood value indicates how confident the tracker is that the object it's tracking is the right ball (the lower the likelihood, the lower the confidence, but beware that even a perfect match will result in a value pretty far from 1). U and V are the estimated coordinates of the centre of the ball in the image plane, U is horizontal and V vertical, the origin is on the top left corner of the image. Seeing_object is a flag, it is set 1 when the likelihood is higher than a threshold specified in the initialization file, it is set to 0 otherwise. When the tracker experiences 5 consecutive images with seeing_object==0, the estimate is reset. This prevents the tracker from getting stuck on an unlikely target.
  • +
  • /pf3dTracker/particles:i receives hypotheses on 3D poses of a ball, normally produced by the pf3dBottomup detection module. If the tracker does not receive anything on this port, it behaves normally, i.e., it needs more time to find a ball and start tracking it, after initialization.
  • +
  • /pf3dTracker/particles:o produces data for the plotter. it is usually not active for performance reasons.
  • +
  • /pf3dTracker/attention:o produces data for the attention system, in terms of a peak of saliency.
  • +
+

+Input Data Files

+

The tracker requires three input files: an image file used to build the colour model of the tracked ball, a file defining the motion model applied to the estimate of the ball between frames, and a shape model for the ball, defining its size and the distance between inner and outer contours (see the paper cited in the description section). For more detail on these files, please have a look at the parameters section.

+

+Output Data Files

+

The module produces one output file that is only useful for debugging (current_histogram.csv) and can be configured to save the images it produces to files, but this is not recommended: use yarpdatadumper instead.

+

+Tested OS

+

Ubuntu Linux, Windows

+
Author
Matteo Taiana, homepage.
+
+ + + + diff --git a/doxygen/doc/html/group__src__demoRedBall.html b/doxygen/doc/html/group__src__demoRedBall.html new file mode 100644 index 0000000..ecbb98e --- /dev/null +++ b/doxygen/doc/html/group__src__demoRedBall.html @@ -0,0 +1,240 @@ + + + + + + + +icub-basic-demos: demoRedBall + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
demoRedBall
+
+
+ +

The manager module for the Red-Ball Demo developed by IIT and ISR. +

+

The manager module for the Red-Ball Demo developed by IIT and ISR.

+

Copyright (C) 2010 RobotCub Consortium Author: Ugo Pattacini, Alessandro Roncone

+

CopyPolicy: Released under the terms of the GNU GPL v2.0.

+

+Description

+

This module collects the 3-d object positions estimated by the particle filter and sends data to the head and arm controllers in order to gaze at the target, reach for it and eventually grasp it. It relies on the YARP ICartesianControl interface to control both arms and on the YARP IGazeControl interface to control the gaze.

+

Furthermore, there exists a second modality that enables to estimate the 3-d object position using stereo vision that needs to be calibrated in advance relying on a feed-forward neural network.

+

Finally, a simulation modality is available to run the demo within gazebo.

+

+Libraries

+
    +
  • ctrlLib.
  • +
  • iKin.
  • +
  • YARP libraries.
  • +
+

+Parameters

+

None.

+

+Ports Accessed

+

The robot interface is assumed to be operative; in particular, the ICartesianControl interface must be available. The iKinGazeCtrl must be running.

+

In order to run the demo in simulation, such modules can be run with --context gazeboCartesianControl. A template is also available in the folder app/scripts/demoRedBall_gazebo.xml.template.

+

+Ports Created

+
    +
  • /demoRedBall/trackTarget:i receives the 3-d position to track.
  • +
  • /demoRedBall/imdTargetLeft:i receives the blobs list as produced by the motionCUT module for the left eye.
  • +
  • /demoRedBall/imdTargetRight:i receives the blobs list as produced by the motionCUT module for the right eye.
  • +
  • /demoRedBall/cmdFace:o sends out commands to the face expression high level interface in order to give an emotional representation of the current robot state.
  • +
  • /demoRedBall/speech:o sends a set of predefined sentences in order for an eventual TTS module to use them during the demo. This feature successfully works with the iSpeak module. The set of predefined sentences to be spoken is defined via .ini file.
  • +
  • /demoRedBall/breather/head:rpc interfaces with the head breather (if available) and disables/enables it according when needed
  • +
  • /demoRedBall/breather/left_arm:rpc interfaces with the left arm breather (if available) and disables/enables it according when needed
  • +
  • /demoRedBall/breather/right_arm:rpc interfaces with the right arm breather (if available) and disables/enables it according when needed
  • +
  • /demoRedBall/blinker:rpc interfaces with the iCubBlinker module (if available) and disables/enables it according when needed
  • +
  • /demoRedBall/lookSkin:rpc interfaces with the lookSkin module (if available) and disables/enables it according when needed
  • +
  • /demoRedBall/gui:o sends out info to update target within the icub_gui
  • +
  • /demoRedBall/gazebo:o interfaces with the ball model in gazebo
  • +
  • /demoRedBall/rpc remote procedure call. Recognized remote commands: -'quit' quit the module
  • +
+

+Input Data Files

+

None.

+

+Output Data Files

+

None.

+

+Configuration Files

+

The configuration file passed through the option –from should look like as follows:

[general]
+
// the robot name to connect to
+
robot icub
+
// the thread period [ms]
+
thread_period 30
+
// left arm switch
+
left_arm on
+
// right arm switch
+
right_arm on
+
// arm trajectory execution time [s]
+
traj_time 2.0
+
// reaching tolerance [m]
+
reach_tol 0.01
+
// eye used
+
eye left
+
// homes limbs if target detection timeout expires [s]
+
idle_tmo 5.0
+
// enable the use of stereo vision calibrated by NN
+
use_network off
+
// NN configuration file
+
network network.ini
+
// enable the use of speech
+
speech on
+
// enable the simulation
+
simulation off
+
+
[torso]
+
// joint switch (min **) (max **) [deg]; 'min', 'max' optional
+
pitch on (max 30.0)
+
roll off
+
yaw on
+
+
[left_arm]
+
// enable/disable the grasp
+
grasp_enable on
+
// the offset [m] to be added to the desired position
+
reach_offset 0.0 -0.15 -0.05
+
// the offset [m] for grasping
+
grasp_offset 0.0 0.0 -0.05
+
// hand orientation to be kept [axis-angle rep.]
+
hand_orientation 0.064485 0.707066 0.704201 3.140572
+
// enable impedance velocity mode
+
impedance_velocity_mode off
+
impedance_stiffness 0.5 0.5 0.5 0.2 0.1
+
impedance_damping 60.0 60.0 60.0 20.0 0.0
+
+
[right_arm]
+
grasp_enable on
+
reach_offset 0.0 0.15 -0.05
+
grasp_offset 0.0 0.0 -0.05
+
hand_orientation -0.012968 -0.721210 0.692595 2.917075
+
impedance_velocity_mode off
+
impedance_stiffness 0.5 0.5 0.5 0.2 0.1
+
impedance_damping 60.0 60.0 60.0 20.0 0.0
+
[home_arm]
+
// home position [deg]
+
poss -30.0 30.0 0.0 45.0 0.0 0.0 0.0
+
// velocities to reach home positions [deg/s]
+
vels 10.0 10.0 10.0 10.0 10.0 10.0 10.0
+
+
[arm_selection]
+
// hysteresis range added around plane y=0 [m]
+
hysteresis_thres 0.1
+
+
[grasp]
+
// ball radius [m] for still target detection
+
sphere_radius 0.05
+
// timeout [s] for still target detection
+
sphere_tmo 3.0
+
// timeout [s] to open hand after closure
+
release_tmo 3.0
+
// open hand positions [deg]
+
open_hand 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+
// close hand positions [deg]
+
close_hand 0.0 80.0 12.0 18.0 27.0 50.0 20.0 50.0 135.0
+
// velocities to reach hand positions [deg/s]
+
vels_hand 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0
+
+
[include speech "speech_English.ini"]
+

The latter inclusion is the .ini file needed for the predefined set of sentences to be spoken. The speech during the red ball demo is divided into three states:

    +
  • [speech_reach] -> it is used when the robot "sees" the ball, and is trying to reach it
  • +
  • [speech_grasp] -> is performed after the grasping action (regardless of its success/failure)
  • +
  • [speech_idle] -> is used after the red ball is pulled away from the robot's sight For each of these states, there is a group in the .ini file. Each line is a sentence that will be spoken by the robot according to its state. Add as many sentences (i.e. lines) as you'd like to these groups: they will be chosen randomly by the manager at runtime. The speech file should look as follows:
    [speech_reach]
    +
    "Oh.! There it is!!"
    +
    "Stay still, otherwise I can't catch it!"
    +
    "Give me the red ball!"
    +
    "Red ball is my precious... Give it to me!"
    +
    "Wait!! I want that ball!"
    +
    +
    [speech_grasp]
    +
    "Thank you dear"
    +
    "Did I take it?"
    +
    "I like playing with the red ball!"
    +
    "Yippi ka yeah!"
    +
    +
    [speech_idle]
    +
    "Oh no! I want to play with the red ball again!"
    +
    "I want the red ball to be my wife"
    +
    "Playing with the red ball makes me happy, let's do it again."
    +
    "I don't feel tired, let's play again."
    +
    "Oh my Gosh!! Where's the red ball??"
    +
  • +
+

+Available commands

+

To run the demo in gazebo, the following commands can be used:

+
    +
  • start [azi ele ver]: to start the demo; optionally, one can provide the position where the robot initially needs to gaze at.
  • +
  • stop: to stop the demo
  • +
  • update_pose dx dy dz: to update the ball position with respect to the initial position defined in the world.
  • +
+

Note that on the real robot the demo automatically starts.

+

+Tested OS

+

Windows, Linux

+
Author
Ugo Pattacini, Alessandro Roncone
+
+ + + + diff --git a/doxygen/doc/html/group__src__demoYoga.html b/doxygen/doc/html/group__src__demoYoga.html new file mode 100644 index 0000000..6b050d9 --- /dev/null +++ b/doxygen/doc/html/group__src__demoYoga.html @@ -0,0 +1,109 @@ + + + + + + + +icub-basic-demos: demoYoga + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
demoYoga
+
+
+ +

Demo for moving the robot joints in a coordinated fashion. +

+

Demo for moving the robot joints in a coordinated fashion.

+

+Description

+

This modules move the robot into a series of positions. Repeat forever or until quit (whichever comes first).

+

+Libraries

+

YARP libraries.

+

+Parameters

+

–robot robotname –positions filename.txt

+

Optionally: –verbose: print sequence of positions and speeds

+

+Ports Accessed

+

Access robotInterface ports.

+

+Ports Created

+

Creates remote_controlboard for each of the robot parts.

+

+Configuration Files

+

The module requires a sequence of positions: –positions.

+

The file consists in a few sections:

time 2
+

specifies the time between two movements.

+

Follows a file for each robot parts. The file contains the list of positions to cycle.

RIGHTARM right_arm.ini
+
LEFTARM left_arm.ini
+
RIGHTLEG right_leg.ini
+
LEFTLEG left_leg.ini
+
HEAD head.ini
+
TORSO torso.ini
+

+Tested OS

+

Linux and Windows.

+
Author
Lorenzo Natale
+
+ + + + diff --git a/doxygen/doc/html/index.html b/doxygen/doc/html/index.html new file mode 100644 index 0000000..6ee2666 --- /dev/null +++ b/doxygen/doc/html/index.html @@ -0,0 +1,74 @@ + + + + + + + +icub-basic-demos: Main Page + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
icub-basic-demos Documentation
+
+
+
+ + + + diff --git a/doxygen/doc/html/jquery.js b/doxygen/doc/html/jquery.js new file mode 100644 index 0000000..103c32d --- /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/mainwindow_8cpp_source.html b/doxygen/doc/html/mainwindow_8cpp_source.html new file mode 100644 index 0000000..fed215e --- /dev/null +++ b/doxygen/doc/html/mainwindow_8cpp_source.html @@ -0,0 +1,604 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src/mainwindow.cpp Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mainwindow.cpp
+
+
+
1 /*
+
2  * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
+
3  * Copyright (C) 2016 iCub Facility - Istituto Italiano di Tecnologia
+
4  * Author: Marco Randazzo <marco.randazzo@iit.it>
+
5  * CopyPolicy: Released under the terms of the GPLv2 or later, see GPL.TXT
+
6  */
+
7 
+
8 
+
9 #include "mainwindow.h"
+
10 #include "ui_mainwindow.h"
+
11 
+
12 #include <QToolBar>
+
13 #include <QDebug>
+
14 #include <QHBoxLayout>
+
15 #include <QScrollArea>
+
16 #include <QFont>
+
17 #include <QFontMetrics>
+
18 #include <QMessageBox>
+
19 #include <QSettings>
+
20 #include <QFileDialog>
+
21 #include <string>
+
22 #include "robot_interfaces.h"
+
23 #include <yarp/os/LogStream.h>
+
24 #include <yarp/dev/all.h>
+
25 
+
26 using namespace std;
+
27 using namespace yarp::dev;
+
28 
+
29 MainWindow::MainWindow(QWidget *parent) :
+
30  QMainWindow(parent), ui(new Ui::MainWindow)
+
31 {
+
32  m_robot = 0;
+
33  ui->setupUi(this);
+
34 
+
35  connect(ui->radioButton, SIGNAL(clicked()), this, SLOT(Radio1Selected()));
+
36  connect(ui->radioButton_2, SIGNAL(clicked()), this, SLOT(Radio2Selected()));
+
37  connect(ui->radioButton_3, SIGNAL(clicked()), this, SLOT(Radio3Selected()));
+
38  connect(ui->radioButton_4, SIGNAL(clicked()), this, SLOT(Radio4Selected()));
+
39  connect(ui->radioButton_5, SIGNAL(clicked()), this, SLOT(Radio5Selected()));
+
40  connect(ui->radioButton_6, SIGNAL(clicked()), this, SLOT(Radio6Selected()));
+
41  connect(ui->radioButton_7, SIGNAL(clicked()), this, SLOT(Radio7Selected()));
+
42  connect(ui->radioButton_8, SIGNAL(clicked()), this, SLOT(Radio8Selected()));
+
43  connect(ui->radioButton_9, SIGNAL(clicked()), this, SLOT(Radio9Selected()));
+
44  connect(ui->radioButton_10, SIGNAL(clicked()), this, SLOT(Radio10Selected()));
+
45  connect(ui->radioButton_11, SIGNAL(clicked()), this, SLOT(Radio11Selected()));
+
46  connect(ui->radioButton_12, SIGNAL(clicked()), this, SLOT(Radio12Selected()));
+
47  connect(ui->radioButton_13, SIGNAL(clicked()), this, SLOT(Radio13Selected()));
+
48  connect(ui->radioButton_14, SIGNAL(clicked()), this, SLOT(Radio14Selected()));
+
49  connect(ui->radioButton_15, SIGNAL(clicked()), this, SLOT(Radio15Selected()));
+
50  connect(ui->radioButton_16, SIGNAL(clicked()), this, SLOT(Radio16Selected()));
+
51  connect(ui->radioButton_17, SIGNAL(clicked()), this, SLOT(Radio17Selected()));
+
52  connect(ui->radioButton_18, SIGNAL(clicked()), this, SLOT(Radio18Selected()));
+
53  connect(ui->radioButton_19, SIGNAL(clicked()), this, SLOT(Radio19Selected()));
+
54  connect(ui->radioButton_20, SIGNAL(clicked()), this, SLOT(Radio20Selected()));
+
55  connect(ui->radioButton_21, SIGNAL(clicked()), this, SLOT(Radio21Selected()));
+
56  connect(ui->radioButton_22, SIGNAL(clicked()), this, SLOT(Radio22Selected()));
+
57  connect(ui->radioButton_23, SIGNAL(clicked()), this, SLOT(Radio23Selected()));
+
58  connect(ui->radioButton_24, SIGNAL(clicked()), this, SLOT(Radio24Selected()));
+
59  connect(ui->radioButton_25, SIGNAL(clicked()), this, SLOT(Radio25Selected()));
+
60 
+
61  QLocale::setDefault(QLocale::C);
+
62  setWindowTitle("demoForceControl");
+
63 }
+
64 
+
65 MainWindow::~MainWindow()
+
66 {
+
67  delete ui;
+
68 }
+
69 
+
70 void MainWindow::disable_left_arm()
+
71 {
+
72  ui->radioButton->setDisabled(true);
+
73  ui->radioButton_2->setDisabled(true);
+
74  ui->radioButton_3->setDisabled(true);
+
75  ui->radioButton_4->setDisabled(true);
+
76  ui->radioButton_5->setDisabled(true);
+
77 }
+
78 
+
79 void MainWindow::disable_right_arm()
+
80 {
+
81  ui->radioButton_6->setDisabled(true);
+
82  ui->radioButton_7->setDisabled(true);
+
83  ui->radioButton_8->setDisabled(true);
+
84  ui->radioButton_9->setDisabled(true);
+
85  ui->radioButton_10->setDisabled(true);
+
86 }
+
87 
+
88 void MainWindow::disable_left_leg()
+
89 {
+
90  ui->radioButton_11->setDisabled(true);
+
91  ui->radioButton_12->setDisabled(true);
+
92  ui->radioButton_13->setDisabled(true);
+
93  ui->radioButton_14->setDisabled(true);
+
94  ui->radioButton_15->setDisabled(true);
+
95 }
+
96 
+
97 void MainWindow::disable_right_leg()
+
98 {
+
99  ui->radioButton_16->setDisabled(true);
+
100  ui->radioButton_17->setDisabled(true);
+
101  ui->radioButton_18->setDisabled(true);
+
102  ui->radioButton_19->setDisabled(true);
+
103  ui->radioButton_20->setDisabled(true);
+
104 }
+
105 
+
106 void MainWindow::disable_torso()
+
107 {
+
108  ui->radioButton_21->setDisabled(true);
+
109  ui->radioButton_22->setDisabled(true);
+
110  ui->radioButton_23->setDisabled(true);
+
111  ui->radioButton_24->setDisabled(true);
+
112  ui->radioButton_25->setDisabled(true);
+
113 }
+
114 
+
115 bool MainWindow::slot_changed_trq(int kk)
+
116 {
+
117  if (kk<0 || kk >= 5 || !m_robot->icmd[kk])
+
118  {
+
119  yError() << "Critical fail";
+
120  return false;
+
121  }
+
122 
+
123  switch (kk)
+
124  {
+
125  case LEFT_ARM:
+
126  case RIGHT_ARM:
+
127  m_robot->iimp[kk]->setImpedance(0, 0.0, 0.0);
+
128  m_robot->iimp[kk]->setImpedance(1, 0.0, 0.0);
+
129  m_robot->iimp[kk]->setImpedance(2, 0.0, 0.0);
+
130  m_robot->iimp[kk]->setImpedance(3, 0.0, 0.0);
+
131  m_robot->iimp[kk]->setImpedance(4, 0.0, 0.0);
+
132  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_TORQUE);
+
133  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_TORQUE);
+
134  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_TORQUE);
+
135  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_TORQUE);
+
136  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_TORQUE);
+
137  break;
+
138  case LEFT_LEG:
+
139  case RIGHT_LEG:
+
140  m_robot->iimp[kk]->setImpedance(0, 0.0, 0.0);
+
141  m_robot->iimp[kk]->setImpedance(1, 0.0, 0.0);
+
142  m_robot->iimp[kk]->setImpedance(2, 0.0, 0.0);
+
143  m_robot->iimp[kk]->setImpedance(3, 0.0, 0.0);
+
144  m_robot->iimp[kk]->setImpedance(4, 0.0, 0.0);
+
145  m_robot->iimp[kk]->setImpedance(5, 0.0, 0.0);
+
146  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_TORQUE);
+
147  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_TORQUE);
+
148  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_TORQUE);
+
149  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_TORQUE);
+
150  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_TORQUE);
+
151  m_robot->icmd[kk]->setControlMode(5,VOCAB_CM_TORQUE);
+
152  break;
+
153  case TORSO:
+
154  m_robot->iimp[kk]->setImpedance(0, 0.0, 0.0);
+
155  m_robot->iimp[kk]->setImpedance(1, 0.0, 0.0);
+
156  m_robot->iimp[kk]->setImpedance(2, 0.1, 0.0);
+
157  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_TORQUE);
+
158  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_TORQUE);
+
159  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
160  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
161  break;
+
162  }
+
163  update_labels();
+
164  return true;
+
165 }
+
166 
+
167 bool MainWindow::slot_changed_imp_soft(int kk)
+
168 {
+
169  if (kk<0 || kk >= 5 || !m_robot->icmd[kk])
+
170  {
+
171  yError() << "Critical fail";
+
172  return false;
+
173  }
+
174 
+
175  switch (kk)
+
176  {
+
177  case LEFT_ARM:
+
178  case RIGHT_ARM:
+
179  m_robot->iimp[kk]->setImpedance(0,0.2,0.0);
+
180  m_robot->iimp[kk]->setImpedance(1,0.2,0.0);
+
181  m_robot->iimp[kk]->setImpedance(2,0.2,0.0);
+
182  m_robot->iimp[kk]->setImpedance(3,0.2,0.0);
+
183  m_robot->iimp[kk]->setImpedance(4,0.1,0.0);
+
184  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
185  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
186  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
187  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
188  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
189  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
190  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
191  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
192  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
193  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
194  break;
+
195  case LEFT_LEG:
+
196  case RIGHT_LEG:
+
197  m_robot->iimp[kk]->setImpedance(0,0.3,0.0);
+
198  m_robot->iimp[kk]->setImpedance(1,0.3,0.0);
+
199  m_robot->iimp[kk]->setImpedance(2,0.2,0.0);
+
200  m_robot->iimp[kk]->setImpedance(3,0.2,0.0);
+
201  m_robot->iimp[kk]->setImpedance(4,0.2,0.0);
+
202  m_robot->iimp[kk]->setImpedance(5,0.2,0.0);
+
203  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
204  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
205  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
206  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
207  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
208  m_robot->icmd[kk]->setControlMode(5,VOCAB_CM_POSITION);
+
209  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
210  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
211  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
212  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
213  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
214  m_robot->iint[kk]->setInteractionMode(5, VOCAB_IM_COMPLIANT);
+
215  break;
+
216  case TORSO:
+
217  m_robot->iimp[kk]->setImpedance(0,0.1,0.0);
+
218  m_robot->iimp[kk]->setImpedance(1,0.1,0.0);
+
219  m_robot->iimp[kk]->setImpedance(2,0.1,0.0);
+
220  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
221  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
222  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
223  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
224  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
225  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
226  break;
+
227  }
+
228 
+
229  update_labels();
+
230  return true;
+
231 }
+
232 
+
233 
+
234 bool MainWindow::slot_changed_imp_medium(int kk)
+
235 {
+
236  if (kk<0 || kk >= 5 || !m_robot->icmd[kk])
+
237  {
+
238  yError() << "Critical fail";
+
239  return false;
+
240  }
+
241 
+
242  switch (kk)
+
243  {
+
244  case LEFT_ARM:
+
245  case RIGHT_ARM:
+
246  m_robot->iimp[kk]->setImpedance(0,0.4,0.03);
+
247  m_robot->iimp[kk]->setImpedance(1,0.4,0.03);
+
248  m_robot->iimp[kk]->setImpedance(2,0.4,0.03);
+
249  m_robot->iimp[kk]->setImpedance(3,0.2,0.01);
+
250  m_robot->iimp[kk]->setImpedance(4,0.2,0.00);
+
251  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
252  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
253  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
254  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
255  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
256  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
257  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
258  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
259  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
260  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
261  break;
+
262  case LEFT_LEG:
+
263  case RIGHT_LEG:
+
264  m_robot->iimp[kk]->setImpedance(0,0.6,0.01);
+
265  m_robot->iimp[kk]->setImpedance(1,0.6,0.01);
+
266  m_robot->iimp[kk]->setImpedance(2,0.4,0.01);
+
267  m_robot->iimp[kk]->setImpedance(3,0.4,0.01);
+
268  m_robot->iimp[kk]->setImpedance(4,0.4,0.01);
+
269  m_robot->iimp[kk]->setImpedance(5,0.4,0.01);
+
270  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
271  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
272  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
273  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
274  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
275  m_robot->icmd[kk]->setControlMode(5,VOCAB_CM_POSITION);
+
276  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
277  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
278  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
279  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
280  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
281  m_robot->iint[kk]->setInteractionMode(5, VOCAB_IM_COMPLIANT);
+
282  break;
+
283  case TORSO:
+
284  m_robot->iimp[kk]->setImpedance(0,0.3,0.0);
+
285  m_robot->iimp[kk]->setImpedance(1,0.3,0.0);
+
286  m_robot->iimp[kk]->setImpedance(2,0.3,0.0);
+
287  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
288  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
289  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
290  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
291  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
292  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
293  break;
+
294  }
+
295 
+
296  update_labels();
+
297  return true;
+
298 }
+
299 
+
300 
+
301 
+
302 bool MainWindow::slot_changed_imp_hard(int kk)
+
303 {
+
304  if (kk<0 || kk >= 5 || !m_robot->icmd[kk])
+
305  {
+
306  yError() << "Critical fail";
+
307  return false;
+
308  }
+
309 
+
310  switch (kk)
+
311  {
+
312  case LEFT_ARM:
+
313  case RIGHT_ARM:
+
314  m_robot->iimp[kk]->setImpedance(0,0.6,0.06);
+
315  m_robot->iimp[kk]->setImpedance(1,0.6,0.06);
+
316  m_robot->iimp[kk]->setImpedance(2,0.6,0.06);
+
317  m_robot->iimp[kk]->setImpedance(3,0.3,0.02);
+
318  m_robot->iimp[kk]->setImpedance(4,0.2,0.00);
+
319  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
320  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
321  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
322  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
323  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
324  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
325  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
326  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
327  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
328  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
329  break;
+
330  case LEFT_LEG:
+
331  case RIGHT_LEG:
+
332  m_robot->iimp[kk]->setImpedance(0,1.0,0.02);
+
333  m_robot->iimp[kk]->setImpedance(1,1.0,0.02);
+
334  m_robot->iimp[kk]->setImpedance(2,0.7,0.02);
+
335  m_robot->iimp[kk]->setImpedance(3,0.6,0.02);
+
336  m_robot->iimp[kk]->setImpedance(4,0.6,0.02);
+
337  m_robot->iimp[kk]->setImpedance(5,0.6,0.02);
+
338  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
339  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
340  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
341  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
342  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
343  m_robot->icmd[kk]->setControlMode(5,VOCAB_CM_POSITION);
+
344  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
345  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
346  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
347  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_COMPLIANT);
+
348  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_COMPLIANT);
+
349  m_robot->iint[kk]->setInteractionMode(5, VOCAB_IM_COMPLIANT);
+
350  break;
+
351  case TORSO:
+
352  m_robot->iimp[kk]->setImpedance(0,0.7,0.015);
+
353  m_robot->iimp[kk]->setImpedance(1,0.7,0.015);
+
354  m_robot->iimp[kk]->setImpedance(2,0.7,0.015);
+
355  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
356  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
357  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
358  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_COMPLIANT);
+
359  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_COMPLIANT);
+
360  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_COMPLIANT);
+
361  break;
+
362  }
+
363 
+
364  update_labels();
+
365  return true;
+
366 }
+
367 
+
368 bool MainWindow::slot_changed_pos(int kk)
+
369 {
+
370  if (kk<0 || kk>=5 || !m_robot->icmd[kk])
+
371  {
+
372  yError() << "Critical fail";
+
373  return false;
+
374  }
+
375 
+
376  switch (kk)
+
377  {
+
378  case LEFT_ARM:
+
379  case RIGHT_ARM:
+
380  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
381  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
382  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
383  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
384  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
385  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_STIFF);
+
386  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_STIFF);
+
387  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_STIFF);
+
388  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_STIFF);
+
389  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_STIFF);
+
390  break;
+
391  case LEFT_LEG:
+
392  case RIGHT_LEG:
+
393  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
394  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
395  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
396  m_robot->icmd[kk]->setControlMode(3,VOCAB_CM_POSITION);
+
397  m_robot->icmd[kk]->setControlMode(4,VOCAB_CM_POSITION);
+
398  m_robot->icmd[kk]->setControlMode(5,VOCAB_CM_POSITION);
+
399  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_STIFF);
+
400  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_STIFF);
+
401  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_STIFF);
+
402  m_robot->iint[kk]->setInteractionMode(3, VOCAB_IM_STIFF);
+
403  m_robot->iint[kk]->setInteractionMode(4, VOCAB_IM_STIFF);
+
404  m_robot->iint[kk]->setInteractionMode(5, VOCAB_IM_STIFF);
+
405  break;
+
406  case TORSO:
+
407  m_robot->icmd[kk]->setControlMode(0,VOCAB_CM_POSITION);
+
408  m_robot->icmd[kk]->setControlMode(1,VOCAB_CM_POSITION);
+
409  m_robot->icmd[kk]->setControlMode(2,VOCAB_CM_POSITION);
+
410  m_robot->iint[kk]->setInteractionMode(0, VOCAB_IM_STIFF);
+
411  m_robot->iint[kk]->setInteractionMode(1, VOCAB_IM_STIFF);
+
412  m_robot->iint[kk]->setInteractionMode(2, VOCAB_IM_STIFF);
+
413  break;
+
414  default:
+
415  yError() << "Critical error";
+
416  return false;
+
417  break;
+
418  }
+
419 
+
420  update_labels();
+
421  return true;
+
422 }
+
423 
+
424 bool MainWindow::init(QString robotName, ResourceFinder *finder, robot_interfaces *robot)
+
425 {
+
426  m_robot = robot;
+
427 
+
428  if (m_robot->dd[LEFT_ARM] == 0)
+
429  {
+
430  disable_left_arm();
+
431  }
+
432  else
+
433  {
+
434  ui->radioButton->setChecked(true);
+
435  slot_changed_pos(LEFT_ARM);
+
436  }
+
437 
+
438  if (m_robot->dd[RIGHT_ARM] == 0)
+
439  {
+
440  disable_right_arm();
+
441  }
+
442  else
+
443  {
+
444  ui->radioButton_6->setChecked(true);
+
445  slot_changed_pos(RIGHT_ARM);
+
446  }
+
447 
+
448  if (m_robot->dd[LEFT_LEG] == 0)
+
449  {
+
450  disable_left_leg();
+
451  }
+
452  else
+
453  {
+
454  ui->radioButton_11->setChecked(true);
+
455  slot_changed_pos(LEFT_LEG);
+
456  }
+
457 
+
458  if (m_robot->dd[RIGHT_LEG] == 0)
+
459  {
+
460  disable_right_leg();
+
461  }
+
462  else
+
463  {
+
464  ui->radioButton_16->setChecked(true);
+
465  slot_changed_pos(RIGHT_LEG);
+
466  }
+
467 
+
468  if (m_robot->dd[TORSO] == 0)
+
469  {
+
470  disable_torso();
+
471  }
+
472  else
+
473  {
+
474  ui->radioButton_21->setChecked(true);
+
475  slot_changed_pos(TORSO);
+
476  }
+
477 
+
478  return true;
+
479 }
+
480 
+
481 void MainWindow::closeEvent(QCloseEvent *event)
+
482 {
+
483  this->setVisible(false);
+
484  QMainWindow::closeEvent(event);
+
485 }
+
486 
+
487 void MainWindow::update_labels()
+
488 {
+
489  QLabel* ql[5];
+
490  ql[0] = ui->label1;
+
491  ql[1] = ui->label2;
+
492  ql[2] = ui->label3;
+
493  ql[3] = ui->label4;
+
494  ql[4] = ui->label5;
+
495 
+
496  char buff[255];
+
497  for (int i = 0; i<5; i++)
+
498  {
+
499  int jmax = 0;
+
500  std::string txt;
+
501  switch (i)
+
502  {
+
503  case LEFT_ARM:
+
504  case RIGHT_ARM:
+
505  jmax = 5;
+
506  break;
+
507  case LEFT_LEG:
+
508  case RIGHT_LEG:
+
509  jmax = 6;
+
510  break;
+
511  case TORSO:
+
512  jmax = 3;
+
513  break;
+
514  }
+
515  for (int j = 0; j<jmax; j++)
+
516  {
+
517  double stiff = 0;
+
518  double damp = 0;
+
519  sprintf(buff, "\n \nJ%d:\n", j); txt += std::string(buff);
+
520  if (m_robot->iimp[i]) m_robot->iimp[i]->getImpedance(j, &stiff, &damp);
+
521  sprintf(buff, "stiff: %3.3f Nm/deg \n", stiff); txt += std::string(buff);
+
522  sprintf(buff, "damp: %3.3f Nm/(deg/s) \n", damp); txt += std::string(buff);
+
523  }
+
524  ql[i]->setText(QString(txt.c_str()));
+
525  }
+
526 }
+
+ + + + diff --git a/doxygen/doc/html/mainwindow_8h_source.html b/doxygen/doc/html/mainwindow_8h_source.html new file mode 100644 index 0000000..a13d03b --- /dev/null +++ b/doxygen/doc/html/mainwindow_8h_source.html @@ -0,0 +1,175 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoForceControl/src/mainwindow.h Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ + +
+
+
+
mainwindow.h
+
+
+
1 /*
+
2  * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
+
3  * Copyright (C) 2016 iCub Facility - Istituto Italiano di Tecnologia
+
4  * Author: Marco Randazzo <marco.randazzo@iit.it>
+
5  * CopyPolicy: Released under the terms of the GPLv2 or later, see GPL.TXT
+
6  */
+
7 
+
8 
+
9 #ifndef MAINWINDOW_H
+
10 #define MAINWINDOW_H
+
11 
+
12 #include <yarp/os/ResourceFinder.h>
+
13 
+
14 #include <QMainWindow>
+
15 #include <QResizeEvent>
+
16 #include <QLabel>
+
17 #include <QTimer>
+
18 #include <QAction>
+
19 #include <QMutex>
+
20 #include <QTreeWidget>
+
21 #include "robot_interfaces.h"
+
22 
+
23 namespace Ui {
+
24 class MainWindow;
+
25 }
+
26 
+
27 using namespace yarp::os;
+
28 class MainWindow : public QMainWindow
+
29 {
+
30  Q_OBJECT
+
31 
+
32 public:
+
33  explicit MainWindow(QWidget *parent = 0);
+
34  bool init(QString robotName, ResourceFinder *finder, robot_interfaces *robot);
+
35  bool slot_changed_pos(int kk);
+
36  bool slot_changed_trq(int kk);
+
37  bool slot_changed_imp_soft (int kk);
+
38  bool slot_changed_imp_medium(int kk);
+
39  bool slot_changed_imp_hard(int kk);
+
40  void disable_left_arm();
+
41  void disable_left_leg();
+
42  void disable_right_arm();
+
43  void disable_right_leg();
+
44  void disable_torso();
+
45 
+
46  ~MainWindow();
+
47  void update_labels();
+
48 
+
49 protected:
+
50  void closeEvent(QCloseEvent *event);
+
51 private:
+
52  Ui::MainWindow *ui;
+
53  robot_interfaces *m_robot;
+
54 
+
55 private:
+
56 
+
57 private slots:
+
58  void Radio1Selected() { slot_changed_pos(LEFT_ARM); }
+
59  void Radio2Selected() { slot_changed_trq(LEFT_ARM); }
+
60  void Radio3Selected() { slot_changed_imp_soft(LEFT_ARM); }
+
61  void Radio4Selected() { slot_changed_imp_medium(LEFT_ARM); }
+
62  void Radio5Selected() { slot_changed_imp_hard(LEFT_ARM); }
+
63  void Radio6Selected() { slot_changed_pos(RIGHT_ARM); }
+
64  void Radio7Selected() { slot_changed_trq(RIGHT_ARM); }
+
65  void Radio8Selected() { slot_changed_imp_soft(RIGHT_ARM); }
+
66  void Radio9Selected() { slot_changed_imp_medium(RIGHT_ARM); }
+
67  void Radio10Selected() { slot_changed_imp_hard(RIGHT_ARM); }
+
68  void Radio11Selected() { slot_changed_pos(LEFT_LEG); }
+
69  void Radio12Selected() { slot_changed_trq(LEFT_LEG); }
+
70  void Radio13Selected() { slot_changed_imp_soft(LEFT_LEG); }
+
71  void Radio14Selected() { slot_changed_imp_medium(LEFT_LEG); }
+
72  void Radio15Selected() { slot_changed_imp_hard(LEFT_LEG); }
+
73  void Radio16Selected() { slot_changed_pos(RIGHT_LEG); }
+
74  void Radio17Selected() { slot_changed_trq(RIGHT_LEG); }
+
75  void Radio18Selected() { slot_changed_imp_soft(RIGHT_LEG); }
+
76  void Radio19Selected() { slot_changed_imp_medium(RIGHT_LEG); }
+
77  void Radio20Selected() { slot_changed_imp_hard(RIGHT_LEG); }
+
78  void Radio21Selected() { slot_changed_pos(TORSO); }
+
79  void Radio22Selected() { slot_changed_trq(TORSO); }
+
80  void Radio23Selected() { slot_changed_imp_soft(TORSO); }
+
81  void Radio24Selected() { slot_changed_imp_medium(TORSO); }
+
82  void Radio25Selected() { slot_changed_imp_hard(TORSO); }
+
83 signals:
+
84 
+
85 };
+
86 
+
87 class ModesTreeWidget : public QTreeWidget
+
88 {
+
89  Q_OBJECT
+
90 
+
91 public:
+
92  ModesTreeWidget(QWidget * parent = 0);
+
93 
+
94 
+
95 };
+
96 
+
97 #endif // MAINWINDOW_H
+
+ + + + diff --git a/doxygen/doc/html/matlab__files_2README_8md_source.html b/doxygen/doc/html/matlab__files_2README_8md_source.html new file mode 100644 index 0000000..4709256 --- /dev/null +++ b/doxygen/doc/html/matlab__files_2README_8md_source.html @@ -0,0 +1,73 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/matlab_files/README.md Source File + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + +
+ +
+
+ + +
+ +
+ +
+
+
/home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/matlab_files/README.md
+
+
+
1 #### :warning: This method has been superseded by [generate_shape_model.py](../app/conf/models/generate_shape_model.py).
2 
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_README.html b/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_README.html new file mode 100644 index 0000000..1665257 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_README.html @@ -0,0 +1,79 @@ + + + + + + + +icub-basic-demos: pf3dTracker + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
pf3dTracker
+
+
+

To find out more on how to run the tracker, please refer to this wiki page 🌐

+

You can also drop an email to Matteo Taiana

+
+
+ + + + diff --git a/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.html b/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.html new file mode 100644 index 0000000..cf231d4 --- /dev/null +++ b/doxygen/doc/html/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.html @@ -0,0 +1,77 @@ + + + + + + + +icub-basic-demos: :warning: This method has been superseded by <a href="../app/conf/models/generate_shape_model.py">generate_shape_model.py</a>. + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
:warning: This method has been superseded by generate_shape_model.py.
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.html b/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.html new file mode 100644 index 0000000..1665257 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.html @@ -0,0 +1,79 @@ + + + + + + + +icub-basic-demos: pf3dTracker + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
pf3dTracker
+
+
+

To find out more on how to run the tracker, please refer to this wiki page 🌐

+

You can also drop an email to Matteo Taiana

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.html b/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.html new file mode 100644 index 0000000..cf231d4 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.html @@ -0,0 +1,77 @@ + + + + + + + +icub-basic-demos: :warning: This method has been superseded by <a href="../app/conf/models/generate_shape_model.py">generate_shape_model.py</a>. + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
:warning: This method has been superseded by generate_shape_model.py.
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html b/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html new file mode 100644 index 0000000..b782622 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html @@ -0,0 +1,77 @@ + + + + + + + +icub-basic-demos: pf3dTracker + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
pf3dTracker
+
+
+

To find out more on how to run the tracker, please refer to this wiki page 🌐

+

You can also drop an email to Matteo Taiana

+
+
+ + + + diff --git a/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.html b/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.html new file mode 100644 index 0000000..ebe3305 --- /dev/null +++ b/doxygen/doc/html/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.html @@ -0,0 +1,75 @@ + + + + + + + +icub-basic-demos: :warning: This method has been superseded by <a href="../app/conf/models/generate_shape_model.py">generate_shape_model.py</a>. + + + + + + + + + +
+
+ + + + + + +
+
icub-basic-demos +
+
+
+ + + + + + + + +
+
+ + +
+ +
+ +
+
+
+
:warning: This method has been superseded by generate_shape_model.py.
+
+
+
+
+ + + + diff --git a/doxygen/doc/html/menu.js b/doxygen/doc/html/menu.js new file mode 100644 index 0000000..2fe2214 --- /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 0000000..19c5682 --- /dev/null +++ b/doxygen/doc/html/menudata.js @@ -0,0 +1,36 @@ +/* + @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"}, +{text:"Globals",url:"globals.html",children:[ +{text:"All",url:"globals.html"}, +{text:"Functions",url:"globals_func.html"}, +{text:"Variables",url:"globals_vars.html"}]}]}]} diff --git a/doxygen/doc/html/modules.html b/doxygen/doc/html/modules.html new file mode 100644 index 0000000..d8daeab --- /dev/null +++ b/doxygen/doc/html/modules.html @@ -0,0 +1,85 @@ + + + + + + + +icub-basic-demos: Modules + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Modules
    +
    +
    +
    Here is a list of all modules:
    +
    [detail level 12]
    + + + + + + + +
     Demo ModulesThis is a list of modules composing the demos
     demoRedBallThe manager module for the Red-Ball Demo developed by IIT and ISR
     demoYogaDemo for moving the robot joints in a coordinated fashion
     Demo ApplicationsThe app directory stores directories which group sets of configuration files and scripts to run a certain group of modules together
     Red-Ball DemoThe Red-Ball Demo application developed by IIT and ISR
     pf3dTracker<>
     pf3dBottomup<>
    +
    +
    + + + + 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@0HFXL1|%O$WD@{VPM$7~Ar*{o?;hlAFyLXmaDC0y znK1_#cQqJWPES%4Uujug^TE?jMft$}Eq^WaR~)%f)vSNs&gek&x%A9X9sM + + + + + + +icub-basic-demos: Related Pages + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    Related Pages
    +
    + + + + + diff --git a/doxygen/doc/html/pf3dBottomup_2src_2main_8cpp_source.html b/doxygen/doc/html/pf3dBottomup_2src_2main_8cpp_source.html new file mode 100644 index 0000000..32e4f4d --- /dev/null +++ b/doxygen/doc/html/pf3dBottomup_2src_2main_8cpp_source.html @@ -0,0 +1,107 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/main.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    main.cpp
    +
    +
    +
    1 
    +
    22 // yarp
    +
    23 #include <yarp/os/Network.h>
    +
    24 
    +
    25 // iCub
    +
    26 #include <iCub/pf3dBottomup.hpp>
    +
    27 
    +
    28 using namespace std;
    +
    29 using namespace yarp::os;
    +
    30 
    +
    31 int main(int argc, char *argv[])
    +
    32 {
    +
    33  Network yarp;
    +
    34  if (!yarp::os::Network::checkNetwork())
    +
    35  {
    +
    36  yError("YARP server not available!");
    +
    37  return 1;
    +
    38  }
    +
    39 
    +
    40  ResourceFinder rf;
    +
    41  rf.setDefaultContext("pf3dBottomup");
    +
    42  rf.setDefaultConfigFile("pf3dBottomup.ini");
    +
    43  rf.configure(argc, argv);
    +
    44 
    +
    45  pf3dBottomup bottomup;
    +
    46  bottomup.setName("/pf3dBottomup");
    +
    47  return bottomup.runModule(rf);
    +
    48 }
    +
    49 
    +
    + + + + diff --git a/doxygen/doc/html/pf3dBottomup_8cpp_source.html b/doxygen/doc/html/pf3dBottomup_8cpp_source.html new file mode 100644 index 0000000..e543307 --- /dev/null +++ b/doxygen/doc/html/pf3dBottomup_8cpp_source.html @@ -0,0 +1,559 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/src/pf3dBottomup.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dBottomup.cpp
    +
    +
    +
    1 /*
    +
    2  * A bottom-up approach for generating particles for the "pf3dTracker" module
    +
    3  *
    +
    4  * Copyright (C) 2010 RobotCub Consortium
    +
    5  *
    +
    6  * Author: Martim Brandao
    +
    7  * Note: Should you use or reference my work on your own research, please let me know (mbrandao _AT_ isr.ist.utl.pt)
    +
    8  *
    +
    9  * Image sequence as input, N particles (3D position of balls) as output.
    +
    10  *
    +
    11  * CopyPolicy: Released under the terms of the GNU GPL v2.0.
    +
    12  *
    +
    13  */
    +
    14 
    +
    15 #include <yarp/cv/Cv.h>
    +
    16 #include <iCub/pf3dBottomup.hpp>
    +
    17 
    +
    18 #include <iostream>
    +
    19 #include <iomanip>
    +
    20 #include <fstream>
    +
    21 #include <sstream>
    +
    22 #include <ctime>
    +
    23 #include <utility>
    +
    24 
    +
    25 //member that is repeatedly called by YARP, to give this object the chance to do something.
    +
    26 //should this function return "false", the object would be terminated.
    +
    27 //I already have one image, when I get here (I either acquire it in the initialization method or in the end of this same method).
    +
    28 bool pf3dBottomup::updateModule()
    +
    29 {
    +
    30  if(_doneInitializing)
    +
    31  {
    +
    32  CvMemStorage* storage = cvCreateMemStorage(0);
    +
    33  CvSeq* contours = 0;
    +
    34  double raio=0.03;
    +
    35  int num_detected_objects;
    +
    36 
    +
    37  if(_blur>0) cvSmooth(image,image, CV_GAUSSIAN, 0, 0, _blur, 0);
    +
    38  cvCvtColor(image, hsv, CV_BGR2HSV );
    +
    39 
    +
    40  cvInRangeS(hsv, cvScalar(0,_maskSmin,MIN(_maskVmin,_maskVmax),0),
    +
    41  cvScalar(181,256,MAX(_maskVmin,_maskVmax),0), mask); //update mask
    +
    42  cvSplit(hsv, hue, sat, val, 0 );
    +
    43 
    +
    44  // Histogram Backprojection
    +
    45  cvCalcBackProject(&hue, backproject, _object_model.hist);
    +
    46  cvAnd(backproject, mask, backproject, 0);
    +
    47 
    +
    48  // Bottom-up detection algorithm...
    +
    49 
    +
    50  //cvThreshold(backproject, backproject, 40, 0, CV_THRESH_TOZERO );
    +
    51 
    +
    52  // Normalize backprojection to global max
    +
    53  normalize_to_global_max(backproject);
    +
    54 
    +
    55  // Build scale-space
    +
    56  cvConvert(backproject, infloat);
    +
    57  ss.BuildAll((float*)infloat->imageData);
    +
    58 
    +
    59  // Segmentation (localmaxima + floodfill)
    +
    60  scale_space_segmentation(backproject, &ss, backprojectmask2);
    +
    61 
    +
    62  // 3D Localization
    +
    63  cvSetImageROI(backprojectmask2, cvRect(1,1,image->width,image->height));
    +
    64  num_detected_objects = object_localization_simple(backprojectmask2, &_object_model, &_camera);
    +
    65  //object_localization(backprojectmask2, _object_model, _camera);
    +
    66  cvResetImageROI(backprojectmask2);
    +
    67 
    +
    68  // Output particles
    +
    69  if(num_detected_objects>0){
    +
    70  Bottle& particleOutput=_outputParticlePort.prepare(); int count;
    +
    71  particleOutput.clear();
    +
    72  particleOutput.addInt32(_nParticles);
    +
    73  for(count=0;count<_nParticles;count++)
    +
    74  {
    +
    75  particleOutput.addFloat64((double)cvmGet(_object_model.particles,0,count));
    +
    76  particleOutput.addFloat64((double)cvmGet(_object_model.particles,1,count));
    +
    77  particleOutput.addFloat64((double)cvmGet(_object_model.particles,2,count));
    +
    78  }
    +
    79  //particleOutput.addInt32(num_detected_objects);
    +
    80  _outputParticlePort.write();
    +
    81  }
    +
    82 
    +
    83  // acquire a new image
    +
    84  _yarpImage = _inputVideoPort.read(); //read one image from the buffer.
    +
    85  //temporary cheating (resize to 640x480)
    +
    86  cv::Mat imageMat=cv::cvarrToMat(image);
    +
    87  cv::resize(yarp::cv::toCvMat(*_yarpImage),imageMat,imageMat.size());
    +
    88  //--end
    +
    89  cvCvtColor(image, image, CV_RGB2BGR);
    +
    90  }
    +
    91 
    +
    92  return true; //continue. //in this case it means everything is fine.
    +
    93 }
    +
    94 
    +
    95 
    +
    96 //------------------------------------------------------------------------------------------------------------
    +
    97 
    +
    98 
    +
    99 //member function that set the object up.
    +
    100 bool pf3dBottomup::configure(ResourceFinder &rf)
    +
    101 {
    +
    102  _doneInitializing=false;
    +
    103 
    +
    104  string trackedObjectColorTemplate;
    +
    105 
    +
    106  //***********************************
    +
    107  //Read options from the command line.
    +
    108  //***********************************
    +
    109  _inputVideoPortName = rf.check("inputVideoPort",
    +
    110  Value("/pf3dBottomup/video:i"),
    +
    111  "Input video port (string)").asString();
    +
    112  _outputParticlePortName = rf.check("outputParticlePort",
    +
    113  Value("/pf3dBottomup/particles:o"),
    +
    114  "Output particle port (string)").asString();
    +
    115 
    +
    116  _inputVideoPort.open(_inputVideoPortName);
    +
    117  _outputParticlePort.open(_outputParticlePortName);
    +
    118 
    +
    119  _nParticles = rf.check("nParticles",
    +
    120  Value("100"),
    +
    121  "Number of particles used in the tracker (int)").asInt32();
    +
    122  _calibrationImageWidth = rf.check("w",
    +
    123  Value(640),
    +
    124  "Image width (int)").asInt32();
    +
    125  _calibrationImageHeight = rf.check("h",
    +
    126  Value(480),
    +
    127  "Image height (int)").asInt32();
    +
    128  _camera.fx = rf.check("perspectiveFx",
    +
    129  Value(1),
    +
    130  "Focal distance * kx (double)").asFloat64();
    +
    131  _camera.fy = rf.check("perspectiveFy",
    +
    132  Value(1),
    +
    133  "Focal distance * ky (double)").asFloat64();
    +
    134  _camera.cx = rf.check("perspectiveCx",
    +
    135  Value(1),
    +
    136  "X position of the projection center, in pixels (double)").asFloat64();
    +
    137  _camera.cy = rf.check("perspectiveCy",
    +
    138  Value(1),
    +
    139  "Y position of the projection center, in pixels (double)").asFloat64();
    +
    140  _scaleSpaceLevels = rf.check("scaleSpaceLevels",
    +
    141  Value(3),
    +
    142  "Number of levels on the scale space (int)").asInt32();
    +
    143  _maskVmin = rf.check("maskVmin",
    +
    144  Value(15),
    +
    145  "Minimum acceptable image value (int)").asInt32();
    +
    146  _maskVmax = rf.check("maskVmax",
    +
    147  Value(255),
    +
    148  "Maximum acceptable image value (int)").asInt32();
    +
    149  _maskSmin = rf.check("maskSmin",
    +
    150  Value(70),
    +
    151  "Minimum acceptable image saturation (int)").asInt32();
    +
    152  _blur = rf.check("Blur",
    +
    153  Value(0),
    +
    154  "Blur variance applied to the input image (int)").asInt32();
    +
    155  _object_model.raio_esfera = rf.check("sphereRadius",
    +
    156  Value(0.03),
    +
    157  "Radius of the sphere in case that is our object (double)").asFloat64();
    +
    158 
    +
    159  trackedObjectColorTemplate = rf.findFile("trackedObjectColorTemplate");
    +
    160  if(trackedObjectColorTemplate==""){
    +
    161  cout<<"Couldnt find color model specified in pf3dBottomup.ini\n";
    +
    162  return false;
    +
    163  }
    +
    164 
    +
    165  // object model
    +
    166  calc_hist_from_model_2D(trackedObjectColorTemplate, &_object_model.hist, _maskVmin, _maskVmax);
    +
    167  _object_model.particles = cvCreateMat(3,_nParticles,CV_32FC1);
    +
    168 
    +
    169  // camera model
    +
    170  _camera.fov = 2*atan(_calibrationImageHeight/(2*_camera.fy))*180/PI; //field of view in degrees
    +
    171  _camera.aspect = _calibrationImageWidth/(double)_calibrationImageHeight * (_camera.fy/_camera.fx); //aspect ratio
    +
    172  _camera.znear = 0.01; //Z near
    +
    173  _camera.zfar = 1000; //Z far
    +
    174 
    +
    175  // scale space
    +
    176  _scaleSpaceLevels=3;
    +
    177  _scaleSpaceScales[0]=16.0 * _calibrationImageWidth/640;
    +
    178  _scaleSpaceScales[1]= 8.0 * _calibrationImageWidth/640;
    +
    179  _scaleSpaceScales[2]= 4.0 * _calibrationImageWidth/640;
    +
    180  ss.AllocateResources(_calibrationImageHeight, _calibrationImageWidth, _scaleSpaceLevels, _scaleSpaceScales);
    +
    181 
    +
    182  // read one image from the stream
    +
    183  _yarpImage = _inputVideoPort.read();
    +
    184  image = cvCreateImage(cvSize(_calibrationImageWidth, _calibrationImageHeight), 8, 3);
    +
    185  cv::cvtColor(yarp::cv::toCvMat(*_yarpImage),cv::cvarrToMat(image),CV_RGB2BGR);
    +
    186 
    +
    187  // allocate all images
    +
    188  infloat = cvCreateImage( cvGetSize(image), IPL_DEPTH_32F, 1);
    +
    189  hsv = cvCreateImage( cvGetSize(image), 8, 3 );
    +
    190  hue = cvCreateImage( cvGetSize(image), 8, 1 );
    +
    191  sat = cvCreateImage( cvGetSize(image), 8, 1 );
    +
    192  val = cvCreateImage( cvGetSize(image), 8, 1 );
    +
    193  mask = cvCreateImage( cvGetSize(image), 8, 1 );
    +
    194  backproject = cvCreateImage( cvGetSize(image), 8, 1 );
    +
    195  backprojectmask2 = cvCreateImage( cvSize(image->width+2,image->height+2), 8, 1 );
    +
    196 
    +
    197  // done
    +
    198  _doneInitializing=true;
    +
    199 
    +
    200  return true;
    +
    201 }
    +
    202 
    +
    203 
    +
    204 //member that closes the object.
    +
    205 bool pf3dBottomup::close()
    +
    206 {
    +
    207  // ports
    +
    208  _inputVideoPort.close();
    +
    209  _outputParticlePort.close();
    +
    210 
    +
    211  //resources
    +
    212  ss.FreeResources();
    +
    213  cvReleaseMat(&_object_model.particles);
    +
    214  cvReleaseImage(&image);
    +
    215  cvReleaseImage(&infloat);
    +
    216  cvReleaseImage(&hsv);
    +
    217  cvReleaseImage(&hue);
    +
    218  cvReleaseImage(&sat);
    +
    219  cvReleaseImage(&val);
    +
    220  cvReleaseImage(&mask);
    +
    221  cvReleaseImage(&backproject);
    +
    222  cvReleaseImage(&backprojectmask2);
    +
    223 
    +
    224  return true;
    +
    225 }
    +
    226 
    +
    227 
    +
    228 //member that closes the object.
    +
    229 bool pf3dBottomup::interruptModule()
    +
    230 {
    +
    231  //ports
    +
    232  _inputVideoPort.interrupt();
    +
    233  _outputParticlePort.interrupt();
    +
    234 
    +
    235  return true;
    +
    236 }
    +
    237 
    +
    238 
    +
    239 //constructor
    +
    240 pf3dBottomup::pf3dBottomup()
    +
    241 {
    +
    242 }
    +
    243 
    +
    244 
    +
    245 //destructor
    +
    246 pf3dBottomup::~pf3dBottomup()
    +
    247 {
    +
    248  cout<<"oh my god! they killed kenny! you bastards!\n";
    +
    249 }
    +
    250 
    +
    251 
    +
    252 
    +
    253 //------------------------------------------------------------------------------------------------------------
    +
    254 //
    +
    255 // Segmentation and localization functions
    +
    256 //
    +
    257 //------------------------------------------------------------------------------------------------------------
    +
    258 
    +
    259 
    +
    260 
    +
    261 //compute histogram from color template
    +
    262 void pf3dBottomup::calc_hist_from_model_2D(string file, CvHistogram **objhist, int _vmin, int _vmax)
    +
    263 {
    +
    264  float max_val = 0.f;
    +
    265  float bins[35][10], *curbin;
    +
    266  int i, j;
    +
    267  float kernFactor=0.1F;
    +
    268  IplImage *histmodel = 0, *histmask = 0, *histhue = 0, *histsat = 0, *histval = 0;
    +
    269  CvHistogram *hist;
    +
    270 
    +
    271  int dims[] = {35, 10};
    +
    272  float cbRanges[] = {0, 180};
    +
    273  float crRanges[] = {0, 255};
    +
    274  float* ranges[] = {cbRanges, crRanges};
    +
    275  IplImage* imgs[] = {0, 0};
    +
    276 
    +
    277  auto histMat = cv::imread(file);
    +
    278  histmodel = cvCreateImage(cvSize(histMat.cols,histMat.rows),histMat.depth(),histMat.channels());
    +
    279  IplImage ipltemp;
    +
    280  cvInitImageHeader(&ipltemp, cvSize(histMat.cols, histMat.rows), cvIplDepth(histMat.flags), histMat.channels());
    +
    281  cvSetData(&ipltemp, histMat.data, (int)histMat.step[0]);
    +
    282  histmodel = &ipltemp;
    +
    283  cvCvtColor(histmodel, histmodel, CV_BGR2HSV);
    +
    284  histmask = cvCreateImage(cvGetSize(histmodel), 8, 1);
    +
    285  histhue = cvCreateImage(cvGetSize(histmodel), 8, 1);
    +
    286  histsat = cvCreateImage(cvGetSize(histmodel), 8, 1);
    +
    287  histval = cvCreateImage(cvGetSize(histmodel), 8, 1);
    +
    288  cvInRangeS(histmodel, cvScalar(0,70,MIN(_vmin,_vmax),0),cvScalar(181,256,MAX(_vmin,_vmax),0), histmask);
    +
    289  cvSplit(histmodel, histhue, histsat, histval, 0);
    +
    290 
    +
    291  imgs[0]=histhue; imgs[1]=histsat;
    +
    292  hist = cvCreateHist(2, dims, CV_HIST_ARRAY, ranges, CV_HIST_UNIFORM);
    +
    293 
    +
    294  cvCalcHist((IplImage **)imgs, hist, 0, histmask);
    +
    295 
    +
    296  //martim: add some variance to the histogram
    +
    297  for(i=0;i<dims[0];i++)
    +
    298  for(j=0;j<dims[1];j++)
    +
    299  bins[i][j]=0;
    +
    300  for(i=0;i<dims[0];i++)
    +
    301  for(j=0;j<dims[1];j++){
    +
    302  bins[i][j]+=(float)((1+kernFactor)*cvGetReal2D(hist->bins,i,j));
    +
    303  //hue e' circular
    +
    304  if(i>0) bins[i-1][j]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    305  else bins[dims[0]-1][j]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    306  if(i<dims[0]-1) bins[i+1][j]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    307  else bins[0][j]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    308  //saturacao nao e' circular
    +
    309  if(j>0) bins[i][j-1]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    310  if(j<dims[1]-1) bins[i][j+1]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    311  if(j>1) bins[i][j-2]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    312  if(j<dims[1]-2) bins[i][j+2]+=(float)(kernFactor*cvGetReal2D(hist->bins,i,j));
    +
    313  }
    +
    314  for(i=0;i<dims[0];i++)
    +
    315  for(j=0;j<dims[1];j++){
    +
    316  curbin = (float*)cvPtr2D(hist->bins, i, j);
    +
    317  (*curbin) = bins[i][j];
    +
    318  }
    +
    319  //--end
    +
    320 
    +
    321  cvGetMinMaxHistValue( hist, 0, &max_val, 0, 0 );
    +
    322  //cvNormalizeHist(hist, 2500); //tolerancia. 1000 durante o dia (pouca variabilidade); 10000 durante a noite
    +
    323  cvConvertScale( hist->bins, hist->bins, max_val ? 255. / max_val : 0., 0 );
    +
    324 
    +
    325  *objhist = hist;
    +
    326  cvReleaseImage(&histmask);
    +
    327  cvReleaseImage(&histhue);
    +
    328 }
    +
    329 
    +
    330 //normalize grayscale image so that its global max becomes = 255
    +
    331 void pf3dBottomup::normalize_to_global_max(IplImage *img)
    +
    332 {
    +
    333  int i,j;
    +
    334  int step;
    +
    335  uchar *data;
    +
    336  int pmax=0, max=0;
    +
    337  int M=255;
    +
    338  int px1=0,numpx1=0,px2=0,numpx2=0;
    +
    339 
    +
    340  step = img->widthStep/sizeof(uchar);
    +
    341  data = (uchar *)img->imageData;
    +
    342 
    +
    343  //find global maximum
    +
    344  for(i=0 ; i<img->height ; i++)
    +
    345  for(j=0 ; j<img->width ; j++)
    +
    346  if(data[i*step+j] > max){ pmax=i*step+j; max=data[pmax]; }
    +
    347  //max must be big enough
    +
    348  if(max > 50){
    +
    349  //normalize
    +
    350  for(i=0 ; i<img->height ; i++)
    +
    351  for(j=0 ; j<img->width ; j++)
    +
    352  data[i*step+j] = ((data[i*step+j]*M)/max);
    +
    353  }
    +
    354 }
    +
    355 
    +
    356 //segmentation algorithm (local maxima followed by kind of floodfill) on all scale-space levels, joined in one resulting grayscale img
    +
    357 void pf3dBottomup::scale_space_segmentation(IplImage *img, ScaleSpace *ss, IplImage *result)
    +
    358 {
    +
    359  int pmax=0;
    +
    360  int l,i,j,si,sj,aux;
    +
    361  int r=1;
    +
    362  IplImage *outgray, *outfloat, *floodmask;
    +
    363  float *data;
    +
    364  int step;
    +
    365  uchar *maxdata;
    +
    366  int maxstep;
    +
    367 
    +
    368  step = img->widthStep/sizeof(uchar);
    +
    369 
    +
    370  outgray = cvCreateImage(cvGetSize(img), 8, 1);
    +
    371  outfloat = cvCreateImage(cvGetSize(img), IPL_DEPTH_32F, 1);
    +
    372  floodmask = cvCreateImage(cvGetSize(result), 8, 1 );
    +
    373 
    +
    374  cvZero(result);
    +
    375 
    +
    376  // For each level... do segmentation
    +
    377  for(l=0 ; l < ss->GetLevels() ; l++){
    +
    378  int thres = 128; //maximos so acima deste valor...
    +
    379  int max = 0;
    +
    380  cvZero(floodmask);
    +
    381 
    +
    382  outfloat->imageData = (char*)(ss->GetLevel(l));
    +
    383 
    +
    384  //aux
    +
    385  cvConvert(outfloat, outgray);
    +
    386  data = (float *)outfloat->imageData;
    +
    387  step = outfloat->widthStep/sizeof(float);
    +
    388  maxdata = (uchar *)outgray->imageData;
    +
    389  maxstep = outgray->widthStep/sizeof(uchar);
    +
    390 
    +
    391  //localmaxima v2
    +
    392  for(i=r;i<img->height-r;i++){
    +
    393  for(j=r;j<img->width-r;j++){
    +
    394  //maximos so a partir de threshold. todo: T depende da variancia!
    +
    395  if(data[i*step+j] < thres){ maxdata[i*maxstep+j]=0; continue; }
    +
    396 
    +
    397  //3x3 window
    +
    398  for(si=i-r,aux=0 ; si<=i+r && !aux ; si++)
    +
    399  for(sj=j-r ; sj<=j+r ; sj++)
    +
    400  if(!(si==i && sj==j) && data[i*step+j] <= data[si*step+sj]){
    +
    401  maxdata[i*maxstep+j]=0; aux=1; break;
    +
    402  }
    +
    403 
    +
    404  //em cada maximo: FloodFill
    +
    405  if(!aux){
    +
    406  float T=80; //data[i*step+j]*0.8;
    +
    407  cvFloodFill2(outfloat, cvPoint(j,i), cvScalar(255),
    +
    408  cvScalar(T), cvScalar(T), NULL,
    +
    409  4+(255<<8)+CV_FLOODFILL_MASK_ONLY+CV_FLOODFILL_FIXED_RANGE, floodmask);
    +
    410  }
    +
    411  }
    +
    412  }
    +
    413  cvOr(floodmask, result, result, 0);
    +
    414  //--end
    +
    415  }
    +
    416 
    +
    417  cvReleaseImage(&floodmask);
    +
    418  cvReleaseImage(&outfloat);
    +
    419  cvReleaseImage(&outgray);
    +
    420 }
    +
    421 
    +
    422 //guess 3D position of object from segmentation (assuming it is a ball). returns number of objects
    +
    423 int pf3dBottomup::object_localization_simple(IplImage *segm, ObjectModel *model, CameraModel *camera)
    +
    424 {
    +
    425  CvMemStorage* storage = cvCreateMemStorage(0);
    +
    426  CvSeq* contours = 0;
    +
    427  CvMoments moments;
    +
    428  CvPoint center;
    +
    429  double raio=0.03;
    +
    430  double m00,m01,m10,area;
    +
    431  double fx,fy,cx,cy;
    +
    432  int i,j,count=0;
    +
    433 
    +
    434  fx=camera->fx; fy=camera->fy; cx=camera->cx; cy=camera->cy;
    +
    435  raio = model->raio_esfera;
    +
    436 
    +
    437  //careful! "segm" image will change...
    +
    438  cvFindContours( segm, storage, &contours, sizeof(CvContour), CV_RETR_CCOMP, CV_CHAIN_APPROX_SIMPLE, cvPoint(0,0) );
    +
    439 
    +
    440  while(contours)
    +
    441  {
    +
    442  area = fabs(cvContourArea( contours, CV_WHOLE_SEQ ));
    +
    443  if(area>300.0 * segm->width/640){ //threshold area ---> depends on image size....
    +
    444  double uu,vv,raiopx,xx,yy,zz;
    +
    445 
    +
    446  cvMoments(contours,&moments,0);
    +
    447  m00 = cvGetSpatialMoment( &moments, 0, 0);
    +
    448  m10 = cvGetSpatialMoment( &moments, 1, 0);
    +
    449  m01 = cvGetSpatialMoment( &moments, 0, 1);
    +
    450  uu = m10/m00;
    +
    451  vv = m01/m00;
    +
    452  center = cvPoint((int)uu, (int)vv);
    +
    453  raiopx = sqrt(1.0*area/PI);
    +
    454  zz = raio/( ((uu+raiopx-cx)/fx)-((uu-cx)/fx) ); //usar eixo vv tb? media
    +
    455  xx = zz*(uu-cx)/fx;
    +
    456  yy = zz*(vv-cy)/fy;
    +
    457 
    +
    458  cvmSet(model->particles,0,count, xx*1000);
    +
    459  cvmSet(model->particles,1,count, yy*1000);
    +
    460  cvmSet(model->particles,2,count, zz*1000);
    +
    461 
    +
    462  count++;
    +
    463  }
    +
    464  contours = contours->h_next;
    +
    465  }
    +
    466 
    +
    467  // generate particles (fill the rest of particle vector with scattered versions of the measured ones)
    +
    468  for(i=0 , j=count ; i<count ; i++)
    +
    469  for( ; j<count+(i+1)*(_nParticles-count)/count ; j++){
    +
    470  cvmSet(model->particles,0,j, cvmGet(model->particles,0,i)+SCATTER(30));
    +
    471  cvmSet(model->particles,1,j, cvmGet(model->particles,1,i)+SCATTER(30));
    +
    472  cvmSet(model->particles,2,j, cvmGet(model->particles,2,i)+SCATTER(50));
    +
    473  }
    +
    474 
    +
    475  cvReleaseMemStorage( &storage );
    +
    476 
    +
    477  return count;
    +
    478 }
    +
    479 
    +
    480 
    +
    481 
    +
    + + + + diff --git a/doxygen/doc/html/pf3dBottomup_8hpp_source.html b/doxygen/doc/html/pf3dBottomup_8hpp_source.html new file mode 100644 index 0000000..ac86a9c --- /dev/null +++ b/doxygen/doc/html/pf3dBottomup_8hpp_source.html @@ -0,0 +1,217 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dBottomup/include/iCub/pf3dBottomup.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dBottomup.hpp
    +
    +
    +
    1 /*
    +
    2  * A bottom-up approach for generating particles for the "pf3dTracker" module
    +
    3  *
    +
    4  * Copyright (C) 2010 RobotCub Consortium
    +
    5  *
    +
    6  * Author: Martim Brandao
    +
    7  * Note: Should you use or reference my work on your own research, please let me know (mbrandao _AT_ isr.ist.utl.pt)
    +
    8  *
    +
    9  * Image sequence as input, N particles (3D position of balls) as output.
    +
    10  *
    +
    11  * CopyPolicy: Released under the terms of the GNU GPL v2.0.
    +
    12  *
    +
    13  */
    +
    14 
    +
    15 #include <iostream>
    +
    16 #include <string>
    +
    17 #include <sstream>
    +
    18 #include <yarp/os/all.h>
    +
    19 #include <yarp/sig/all.h>
    +
    20 #include <iCub/ScaleSpace.h>
    +
    21 
    +
    22 #ifdef _CH_
    +
    23 #pragma package <opencv>
    +
    24 #endif
    +
    25 #ifndef _EiC
    +
    26 #include <opencv2/opencv.hpp>
    +
    27 #include <opencv2/core/types_c.h>
    +
    28 #include <opencv2/imgproc/imgproc_c.h>
    +
    29 #endif
    +
    30 
    +
    31 // my definitions
    +
    32 #define PI 3.1415926535897932384626433832795
    +
    33 #define SCATTER(s) ( (s*(double)rand()/(double)RAND_MAX)-0.5*s )
    +
    34 
    +
    35 using namespace std;
    +
    36 using namespace yarp::os;
    +
    37 using namespace yarp::sig;
    +
    38 
    +
    39 // module
    +
    40 class pf3dBottomup : public RFModule
    +
    41 {
    +
    42 
    +
    43 private:
    +
    44 
    +
    45 
    +
    46 // my definitions
    +
    47 typedef struct MbMoments
    +
    48 {
    +
    49  double m00, m10, m01;
    +
    50  double m[12];
    +
    51 }MbMoments;
    +
    52 
    +
    53 typedef struct CameraModel
    +
    54 {
    +
    55  double fx;
    +
    56  double fy;
    +
    57  double cx;
    +
    58  double cy;
    +
    59  double fov;
    +
    60  double aspect;
    +
    61  double znear;
    +
    62  double zfar;
    +
    63 }CameraModel;
    +
    64 
    +
    65 typedef struct ObjectModel
    +
    66 {
    +
    67 /*
    +
    68  static const int QUANT_A=12; //this should be made variable... (dynamic init.)
    +
    69  static const int NUM_MOM=12; //this should be made variable... (dynamic init.)
    +
    70  static const int NUM_POSES=1008; //this should be made variable... (dynamic init.)
    +
    71  double data[NUM_POSES][7+NUM_MOM];
    +
    72  double moment_variance[NUM_MOM];
    +
    73  double prob[NUM_POSES];
    +
    74  double prob_acum[NUM_POSES];
    +
    75  float prob_particles[NUM_POSES];
    +
    76 */
    +
    77  double raio_esfera;
    +
    78  CvHistogram *hist;
    +
    79  CvMat *particles;
    +
    80 }ObjectModel;
    +
    81 
    +
    82 
    +
    83 // parameters set during initialization.
    +
    84 string _inputVideoPortName;
    +
    85 BufferedPort<ImageOf<PixelRgb> > _inputVideoPort;
    +
    86 string _outputParticlePortName;
    +
    87 BufferedPort<Bottle> _outputParticlePort;
    +
    88 
    +
    89 double _perspectiveFx;
    +
    90 double _perspectiveFy;
    +
    91 double _perspectiveCx;
    +
    92 double _perspectiveCy;
    +
    93 int _calibrationImageWidth;
    +
    94 int _calibrationImageHeight;
    +
    95 bool _doneInitializing;
    +
    96 
    +
    97 int _nParticles;
    +
    98 
    +
    99 ImageOf<PixelRgb> *_yarpImage;
    +
    100 
    +
    101 
    +
    102 // my parameters
    +
    103 int _maskVmin, _maskVmax, _maskSmin, _blur;
    +
    104 int _scaleSpaceLevels;
    +
    105 double _scaleSpaceScales[3];
    +
    106 
    +
    107 
    +
    108 // global instances
    +
    109 CameraModel _camera;
    +
    110 ObjectModel _object_model;
    +
    111 
    +
    112 ScaleSpace ss;
    +
    113 IplImage *image, *infloat, *hsv, *hue, *sat, *val, *mask, *backproject, *backprojectmask2;
    +
    114 
    +
    115 
    +
    116 void calc_hist_from_model_2D(string file, CvHistogram **objhist, int _vmin, int _vmax);
    +
    117 void normalize_to_global_max(IplImage *img);
    +
    118 void scale_space_segmentation(IplImage *img, ScaleSpace *ss, IplImage *result);
    +
    119 int object_localization_simple(IplImage *segm, ObjectModel *model, CameraModel *camera);
    +
    120 
    +
    121 
    +
    122 public:
    +
    123 
    +
    124 pf3dBottomup(); //constructor
    +
    125 ~pf3dBottomup(); //destructor
    +
    126 
    +
    127 virtual bool configure(ResourceFinder &rf); //member to set the object up.
    +
    128 virtual bool close(); //member to close the object.
    +
    129 virtual bool interruptModule(); //member to close the object.
    +
    130 virtual bool updateModule(); //member that is repeatedly called by YARP
    +
    131 
    +
    132 };
    +
    133 
    +
    134 
    +
    135 // changed functions
    +
    136 void cvFloodFill2( CvArr* arr, CvPoint seed_point, CvScalar newVal, CvScalar lo_diff, CvScalar up_diff, CvConnectedComp* comp, int flags, CvArr* maskarr );
    +
    137 
    +
    138 
    +
    Implements a Gaussian Scale Space for floating point images.
    +
    + + + + diff --git a/doxygen/doc/html/pf3dTrackerMain_8cpp_source.html b/doxygen/doc/html/pf3dTrackerMain_8cpp_source.html new file mode 100644 index 0000000..7725a90 --- /dev/null +++ b/doxygen/doc/html/pf3dTrackerMain_8cpp_source.html @@ -0,0 +1,105 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/src/pf3dTrackerMain.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dTrackerMain.cpp
    +
    +
    +
    1 
    +
    160 #include <yarp/os/Network.h>
    +
    161 #include <yarp/os/Log.h>
    +
    162 #include <yarp/os/RFModule.h>
    +
    163 
    +
    164 #include <iCub/pf3dTracker.hpp>
    +
    165 
    +
    166 using namespace std;
    +
    167 using namespace yarp::os;
    +
    168 
    +
    169 int main(int argc, char *argv[])
    +
    170 {
    +
    171  Network yarp;
    +
    172  if (!yarp::os::Network::checkNetwork())
    +
    173  {
    +
    174  yError("YARP server not available!");
    +
    175  return 1;
    +
    176  }
    +
    177 
    +
    178  ResourceFinder rf;
    +
    179  rf.setDefaultContext("pf3dTracker"); // overridden by --context
    +
    180  rf.setDefaultConfigFile("pf3dTracker.ini"); // overridden by --from
    +
    181  rf.configure(argc, argv);
    +
    182 
    +
    183  PF3DTracker tracker; //instantiate the tracker.
    +
    184  return tracker.runModule(rf); //execute the tracker.
    +
    185 }
    +
    + + + + diff --git a/doxygen/doc/html/pf3dTrackerSupport_8cpp_source.html b/doxygen/doc/html/pf3dTrackerSupport_8cpp_source.html new file mode 100644 index 0000000..5693c87 --- /dev/null +++ b/doxygen/doc/html/pf3dTrackerSupport_8cpp_source.html @@ -0,0 +1,212 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/src/pf3dTrackerSupport.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dTrackerSupport.cpp
    +
    +
    +
    1 
    +
    14 #include <iostream>
    +
    15 #include <iCub/pf3dTrackerSupport.hpp>
    +
    16 
    +
    17 using namespace std;
    +
    18 
    +
    19 void rgbToYuvBin(int &R, int &G, int &B, int &YBin, int &UBin, int &VBin)
    +
    20 {
    +
    21  //I copied the transformation from the wikipedia. WARNING ??? !!!
    +
    22  float Y, U, V;
    +
    23  Y= 0.299F *(float)R +0.587F * (float)G + 0.114F *(float)B;
    +
    24  U= -0.147F*float(R) -0.289F*float(G) +0.436F*float(B); //-255*436<U<255*436
    +
    25  U+=0.436F*255.0F; //0<U<255*2*0.436
    +
    26  U=U/(2.0F*0.436F);//0<U<255
    +
    27  V= ((0.615F*float(R) -0.515F*float(G)+0.100F*float(B)+0.615F*255.0F)/(2.0F*0.615F+0.1F));
    +
    28 
    +
    29  YBin=(int)Y/ 64; //I want Y to vary between 0 and 3.
    +
    30  UBin=(int)U/ 32; //I want U to vary between 0 and 7.
    +
    31  VBin=(int)V/ 32; //I want V to vary between 0 and 7.
    +
    32 
    +
    33  if(YBin<0||YBin>3)
    +
    34  yWarning()<<"something's wrong with Y: "<<YBin<<" "<<Y;
    +
    35  if(UBin<0||UBin>7)
    +
    36  yWarning()<<"something's wrong with U: "<<UBin<<" "<<U;
    +
    37  if(VBin<0||VBin>7)
    +
    38  yWarning()<<"something's wrong with V: "<<VBin<<" "<<V<<" R= "<<R<<" G= "<<G<<" B= "<<B;
    +
    39 }
    +
    40 
    +
    41 void rgbToYuvBinImage(IplImage *image,IplImage* transformedImage)
    +
    42 {
    +
    43  int a1,a2,r,g,b, s,t,u;
    +
    44  for(a1=0;a1<transformedImage->width;a1++)
    +
    45  for(a2=0;a2<transformedImage->height;a2++)
    +
    46  {
    +
    47  r=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+0]);
    +
    48  g=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+1]);
    +
    49  b=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+2]);
    +
    50  rgbToYuvBin(r,g,b, s,t,u);
    +
    51  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+0])=s;
    +
    52  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+1])=t;
    +
    53  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+2])=u;
    +
    54  //yuvBinsImage[a1][a2][0], yuvBinsImage[a1][a2][1], yuvBinsImage[a1][a2][2]);
    +
    55  }
    +
    56 }
    +
    57 
    +
    58 void setPixel(int u, int v, int r, int g, int b, IplImage *image)
    +
    59 {
    +
    60  //std::cout<<"u= "<<u<<" v= "<<v<<std::endl;
    +
    61  if(u>-1&&u<image->width && v>-1&&v<image->height)
    +
    62  {
    +
    63  (((uchar*)(image->imageData + image->widthStep*v))[u*3+0])=r;
    +
    64  (((uchar*)(image->imageData + image->widthStep*v))[u*3+1])=g;
    +
    65  (((uchar*)(image->imageData + image->widthStep*v))[u*3+2])=b;
    +
    66  }
    +
    67 }
    +
    68 
    +
    69 void fillLut(Lut *lut)
    +
    70 {
    +
    71  int r,g,b, y,u,v;
    +
    72  int index;
    +
    73  for(r=0;r<256;r++)
    +
    74  for(g=0;g<256;g++)
    +
    75  for(b=0;b<256;b++)
    +
    76  {
    +
    77  rgbToYuvBin(r,g,b, y,u,v);
    +
    78  index=r*65536+g*256+b;
    +
    79  lut[index].y=y;
    +
    80  lut[index].u=u;
    +
    81  lut[index].v=v;
    +
    82  }
    +
    83 }
    +
    84 
    +
    85 void rgbToYuvBinMatLut(const cv::Mat& image, cv::Mat& transformedImage, Lut *lut)
    +
    86 {
    +
    87  int a1,a2,r,g,b;
    +
    88  int index;
    +
    89 
    +
    90  for(a1=0;a1<image.cols;a1++)
    +
    91  for(a2=0;a2<image.rows;a2++)
    +
    92  {
    +
    93  r=(((uchar*)(image.data + image.step*a2))[a1*3+0]);
    +
    94  g=(((uchar*)(image.data + image.step*a2))[a1*3+1]);
    +
    95  b=(((uchar*)(image.data + image.step*a2))[a1*3+2]);
    +
    96  index=r*65536+g*256+b;
    +
    97  (((uchar*)(transformedImage.data + transformedImage.step*a2))[a1*3+0])=lut[index].y;
    +
    98  (((uchar*)(transformedImage.data + transformedImage.step*a2))[a1*3+1])=lut[index].u;
    +
    99  (((uchar*)(transformedImage.data + transformedImage.step*a2))[a1*3+2])=lut[index].v;
    +
    100  //rgbToYuvBin(r,g,b, yuvBinsImage[a1][a2][0], yuvBinsImage[a1][a2][1], yuvBinsImage[a1][a2][2]);
    +
    101  }
    +
    102 
    +
    103 }
    +
    104 
    +
    105 void rgbToYuvBinImageLut(IplImage *image,IplImage *transformedImage, Lut *lut)
    +
    106 {
    +
    107  int a1,a2,r,g,b;
    +
    108  int index;
    +
    109 
    +
    110  for(a1=0;a1<image->width;a1++)
    +
    111  for(a2=0;a2<image->height;a2++)
    +
    112  {
    +
    113  r=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+0]);
    +
    114  g=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+1]);
    +
    115  b=(((uchar*)(image->imageData + image->widthStep*a2))[a1*3+2]);
    +
    116  index=r*65536+g*256+b;
    +
    117  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+0])=lut[index].y;
    +
    118  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+1])=lut[index].u;
    +
    119  (((uchar*)(transformedImage->imageData + transformedImage->widthStep*a2))[a1*3+2])=lut[index].v;
    +
    120  //rgbToYuvBin(r,g,b, yuvBinsImage[a1][a2][0], yuvBinsImage[a1][a2][1], yuvBinsImage[a1][a2][2]);
    +
    121  }
    +
    122 
    +
    123 }
    +
    124 
    +
    125 void rgbToYuvBinLut(int &R, int &G, int &B, int &YBin, int &UBin, int &VBin, Lut *lut)
    +
    126 {
    +
    127  //I copied the transformation from the wikipedia. WARNING ??? !!!
    +
    128  float Y, U, V;
    +
    129  Y= 0.299F *(float)R +0.587F * (float)G + 0.114F *(float)B;
    +
    130  U= -0.147F*float(R) -0.289F*float(G) +0.436F*float(B); //-255*436<U<255*436
    +
    131  U+=0.436F*255.0F; //0<U<255*2*0.436
    +
    132  U=U/(2.0F*0.436F);//0<U<255
    +
    133  V= ((0.615F*float(R) -0.515F*float(G)+0.100F*float(B)+0.615F*255.0F)/(2.0F*0.615F+0.1F));
    +
    134 
    +
    135  YBin=(int)Y/ 64; //I want Y to vary between 0 and 3.
    +
    136  UBin=(int)U/ 32; //I want U to vary between 0 and 7.
    +
    137  VBin=(int)V/ 32; //I want V to vary between 0 and 7.
    +
    138 
    +
    139  if(YBin<0||YBin>3)
    +
    140  yWarning()<<"something's wrong with Y: "<<YBin<<" "<<Y;
    +
    141  if(UBin<0||UBin>7)
    +
    142  yWarning()<<"something's wrong with U: "<<UBin<<" "<<U;
    +
    143  if(VBin<0||VBin>7)
    +
    144  yWarning()<<"something's wrong with V: "<<VBin<<" "<<V<<" R= "<<R<<" G= "<<G<<" B= "<<B;
    +
    145 }
    +
    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released un...
    +
    + + + + diff --git a/doxygen/doc/html/pf3dTrackerSupport_8hpp_source.html b/doxygen/doc/html/pf3dTrackerSupport_8hpp_source.html new file mode 100644 index 0000000..16c941a --- /dev/null +++ b/doxygen/doc/html/pf3dTrackerSupport_8hpp_source.html @@ -0,0 +1,120 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/include/iCub/pf3dTrackerSupport.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dTrackerSupport.hpp
    +
    +
    +
    1 
    +
    7 #ifndef _PF3DTRACKERSUPPORT_
    +
    8 #define _PF3DTRACKERSUPPORT_
    +
    9 
    +
    10 #include <ctime>
    +
    11 #include <fstream>
    +
    12 #include <iomanip>
    +
    13 #include <iostream>
    +
    14 #include <sstream>
    +
    15 #include <string>
    +
    16 
    +
    17 #include <yarp/os/LogStream.h>
    +
    18 
    +
    19 #ifdef _CH_
    +
    20 #pragma package <opencv>
    +
    21 #endif
    +
    22 #ifndef _EiC
    +
    23 #include <opencv2/opencv.hpp>
    +
    24 #include <opencv2/highgui/highgui.hpp>
    +
    25 #include <opencv2/core/types_c.h>
    +
    26 #endif
    +
    27 
    +
    28 struct Lut
    +
    29 {
    +
    30  int y;
    +
    31  int u;
    +
    32  int v;
    +
    33 };
    +
    34 
    +
    35 void rgbToYuvBin(int &R, int &G, int &B, int &YBin, int &UBin, int &VBin);
    +
    36 
    +
    37 void rgbToYuvBinImage(IplImage *image,IplImage *yuvBinsImage);
    +
    38 
    +
    39 void rgbToYuvBinMatLut(const cv::Mat& image, cv::Mat& yuvBinsImage, Lut *lut);
    +
    40 void rgbToYuvBinImageLut(IplImage *image,IplImage *yuvBinsImage, Lut *lut);
    +
    41 
    +
    42 void setPixel(int u, int v, int r, int g, int b, IplImage *image);
    +
    43 
    +
    44 void fillLut(Lut *lut);
    +
    45 
    +
    46 #endif /* _PF3DTRACKERSUPPORT_ */
    +
    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released un...
    +
    + + + + diff --git a/doxygen/doc/html/pf3dTracker_8cpp_source.html b/doxygen/doc/html/pf3dTracker_8cpp_source.html new file mode 100644 index 0000000..9254213 --- /dev/null +++ b/doxygen/doc/html/pf3dTracker_8cpp_source.html @@ -0,0 +1,2013 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/src/pf3dTracker.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dTracker.cpp
    +
    +
    +
    1 
    +
    14 // NOTES:
    +
    15 // distances are trated as in millimeters inside the program, but they are converted to meters when communicating to the outside.
    +
    16 // likelihood is normalized only when communicated to the outside.
    +
    17 
    +
    18 // TODO
    +
    19 //
    +
    20 // 0. make things compile and build.
    +
    21 //
    +
    22 // 1. test that the function that computes the histogram from the RGB image works.
    +
    23 //
    +
    24 // 1. check that things behave properly
    +
    25 //
    +
    26 // 2. make sure randomization is really random.
    +
    27 //
    +
    28 // 3. remove stuff that is not used
    +
    29 //
    +
    30 // 4. make the code check the return values (ROBUSTNESS/DEBUGGABILITY).
    +
    31 //
    +
    32 // 5. try to optimize the code, make it faster.
    +
    33 //
    +
    34 
    +
    35 // X. fix the memory leak. DONE
    +
    36 
    +
    37 // il RESAMPLING HA DEI PROBLEMI???: tipicamente la matrice delle particelle e' piena di n-a-n dopo il resampling, se uso poche particelle (non ho provato con molte a vedere come e' l'output).
    +
    38 // con 5000 particelle sembra che funzioni tutto...
    +
    39 
    +
    40 //things to be done:
    +
    41 
    +
    42 //1. when the ball is moving towards the camera, the tracker lags behind it... is this because particles that are nearer than the true value to the camera have zero likelihood while the ones that are farther have higher likelihood values? how could i test this? plotting the positions of the particles? how could i solve this?
    +
    43 
    +
    44 //2. check the resampling function: sometimes when the image goes blank the tracker programs quits suddenly. it's probably that function trying to write a particle value in an area where it should not (array overflow).
    +
    45 
    +
    46 // measure which parts of the tracking loop are using up processing time.
    +
    47 
    +
    48 //WISHLIST:
    +
    49 //turn all static arrays into pointers to pointers, so that their size can be chosen at run time (through the configuration file)
    +
    50 //remove unnecessary included headers and namespaces.
    +
    51 //comment the whole project in doxygen style.
    +
    52 //create a pair of support files (.hpp and .cpp) specifically for this project.
    +
    53 //create a variable to contain the parameters for the motion model
    +
    54 //the size of the image is not a parameter.
    +
    55 //there are some functions which have among their parameters "inside_outside_...". this should be fixed, as this value is now defined at compile time.
    +
    56 
    +
    57 //DONE:
    +
    58 //fixed: memory leak. when is the memory allocated by OpenCV freed? never? take a look at the small functions I call repeatedly: they might be the cause for the memory leak. use: cvReleaseImage.
    +
    59 //the images are visualized through opencv: change this to the output video port.
    +
    60 //the output data port is not used so far: it should stream the numeric values of the estimates.
    +
    61 //fixed the seg-fault problem. s-f happen when stdDev is high (or at the beginning of a tracking)... seems like a problem in the resampling algorithm.
    +
    62 //fixed. it was a prolem in the randomization that was not really random. 1. check the resampling algorithm: when the acceleration error is low, the tracker starts with particles in 0,0,0 and stays there.
    +
    63 //maybe this is due to the fact that the first images the tracker receives are meaningless, the likelihood is quite low, so the particles are spread a lot and one happens to be near the origin. all the particles are concentrated there and if you don't have a high acceleration noise you get stuck there.
    +
    64 //done. write particles status/likelihood on the particleOutputPort, for visualization purposes.
    +
    65 // write a client that reads this data and plots particles.
    +
    66 
    +
    67 #include <cmath>
    +
    68 #include <ctime>
    +
    69 #include <fstream>
    +
    70 #include <iomanip>
    +
    71 #include <iostream>
    +
    72 #include <sstream>
    +
    73 #include <utility>
    +
    74 
    +
    75 #include <opencv2/highgui/highgui.hpp>
    +
    76 #include <opencv2/core/core_c.h>
    +
    77 
    +
    78 #include <yarp/os/Log.h>
    +
    79 #include <yarp/os/LogStream.h>
    +
    80 #include <yarp/os/ResourceFinder.h>
    +
    81 #include <yarp/cv/Cv.h>
    +
    82 
    +
    83 #include <iCub/pf3dTracker.hpp>
    +
    84 
    +
    85 using namespace std;
    +
    86 using namespace yarp::os;
    +
    87 using namespace yarp::sig;
    +
    88 using namespace yarp::cv;
    +
    89 
    +
    90 void printMat(CvMat* A);
    +
    91 
    +
    92 //constructor
    +
    93 PF3DTracker::PF3DTracker()
    +
    94 {
    +
    95 }
    +
    96 
    +
    97 //destructor
    +
    98 PF3DTracker::~PF3DTracker()
    +
    99 {
    +
    100 }
    +
    101 
    +
    102 //member function that set the object up.
    +
    103 bool PF3DTracker::configure(ResourceFinder &rf)
    +
    104 {
    +
    105  _doneInitializing=false;
    +
    106 
    +
    107  bool failure;
    +
    108  bool quit;
    +
    109  string trackedObjectColorTemplate;
    +
    110  string dataFileName;
    +
    111  string trackedObjectShapeTemplate;
    +
    112  string motionModelMatrix;
    +
    113  string temp;
    +
    114  int row, column;
    +
    115  double widthRatio, heightRatio;
    +
    116 
    +
    117  quit=false;
    +
    118  _saveImagesWithOpencv=false;
    +
    119 
    +
    120  _lut = new Lut[256*256*256];
    +
    121  //create the look up table lut
    +
    122  //this shouldn't be done every time
    +
    123  //TOBEDONE: write the lut on a file and read it back.
    +
    124  fillLut(_lut);
    +
    125 
    +
    126  srand((unsigned int)time(0)); //make sure random numbers are really random.
    +
    127  rngState = cvRNG(rand());
    +
    128 
    +
    129  //allocate some memory and initialize some data structures for colour histograms.
    +
    130  int dimensions;
    +
    131  dimensions=3;
    +
    132  int sizes[3]={YBins,UBins,VBins};
    +
    133  _modelHistogramMat=cvCreateMatND(dimensions, sizes, CV_32FC1);
    +
    134  if(_modelHistogramMat==0)
    +
    135  {
    +
    136  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _modelHistogramMat.");
    +
    137  quit =true;
    +
    138  }
    +
    139  _innerHistogramMat=cvCreateMatND(dimensions, sizes, CV_32FC1);
    +
    140  if(_innerHistogramMat==0)
    +
    141  {
    +
    142  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _innerHistogramMat.");
    +
    143  quit =true;
    +
    144  }
    +
    145  _outerHistogramMat=cvCreateMatND(dimensions, sizes, CV_32FC1);
    +
    146  if(_outerHistogramMat==0)
    +
    147  {
    +
    148  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _outerHistogramMat.");
    +
    149  quit =true;
    +
    150  }
    +
    151 
    +
    152  _model3dPointsMat=cvCreateMat(3, 2*nPixels, CV_32FC1);
    +
    153  if(_model3dPointsMat==0)
    +
    154  {
    +
    155  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _model3dPointsMat.");
    +
    156  quit =true;
    +
    157  }
    +
    158  _points2Mat=cvCreateMat(3, 2*nPixels, CV_32FC1);
    +
    159  if(_points2Mat==0)
    +
    160  {
    +
    161  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _points2Mat.");
    +
    162  quit =true;
    +
    163  }
    +
    164  _tempMat=cvCreateMat(3, 2*nPixels, CV_32FC1);
    +
    165  if(_tempMat==0)
    +
    166  {
    +
    167  yWarning("PF3DTracker::open - I wasn\'t able to allocate memory for _tempMat.");
    +
    168  quit =true;
    +
    169  }
    +
    170 
    +
    171  //***********************************
    +
    172  //Read options from the command line.
    +
    173  //***********************************
    +
    174  string initializationFile = rf.check("from",Value("pf3dTracker.ini"),"Initialization file (string)").asString();
    +
    175  string context = rf.check("context",Value("pf3dTracker"),"Context (string)").asString();
    +
    176 
    +
    177  /*
    +
    178  //create and initialize the resource finder
    +
    179  ResourceFinder rf;
    +
    180  rf.setDefaultContext(context);
    +
    181  rf.setDefaultConfigFile(initializationFile);
    +
    182  rf.configure(0, NULL);
    +
    183  */
    +
    184 
    +
    185  // pass configuration over to bottle
    +
    186  Bottle botConfig(rf.toString());
    +
    187  //botConfig.setMonitor(config.getMonitor()); //is this needed?
    +
    188 
    +
    189 
    +
    190  _inputVideoPortName = botConfig.check("inputVideoPort",
    +
    191  Value("/pf3dTracker/video:i"),
    +
    192  "Input video port (string)").asString();
    +
    193  _inputVideoPort.open(_inputVideoPortName);
    +
    194 
    +
    195  _outputVideoPortName = botConfig.check("outputVideoPort",
    +
    196  Value("/pf3dTracker/video:o"),
    +
    197  "Output video port (string)").asString();
    +
    198  _outputVideoPort.open(_outputVideoPortName);
    +
    199 
    +
    200  _outputDataPortName = botConfig.check("outputDataPort",
    +
    201  Value("/pf3dTracker/data:o"),
    +
    202  "Output data port (string)").asString();
    +
    203  _outputDataPort.open(_outputDataPortName);
    +
    204 
    +
    205  _inputParticlePortName = botConfig.check("inputParticlePort",
    +
    206  Value("/pf3dTracker/particles:i"),
    +
    207  "Input particle port (string)").asString();
    +
    208  _inputParticlePort.open(_inputParticlePortName);
    +
    209 
    +
    210  _outputParticlePortName = botConfig.check("outputParticlePort",
    +
    211  Value("/pf3dTracker/particles:o"),
    +
    212  "Output particle port (string)").asString();
    +
    213  _outputParticlePort.open(_outputParticlePortName);
    +
    214 
    +
    215  _outputAttentionPortName = botConfig.check("outputAttentionPort",
    +
    216  Value("/pf3dTracker/attention:o"),
    +
    217  "Output attention port (string)").asString();
    +
    218  _outputAttentionPort.open(_outputAttentionPortName);
    +
    219 
    +
    220  _likelihoodThreshold = (float)botConfig.check("likelihoodThreshold",
    +
    221  Value(1.0),
    +
    222  "Likelihood threshold value (double)").asFloat64();
    +
    223 
    +
    224  _attentionOutputMax = botConfig.check("attentionOutputMax",
    +
    225  Value(257),
    +
    226  "attentionOutputMax (double)").asFloat64();
    +
    227  _attentionOutputDecrease = botConfig.check("attentionOutputDecrease",
    +
    228  Value(0.99),
    +
    229  "attentionOutputDecrease (double)").asFloat64();
    +
    230 
    +
    231  if (botConfig.check("outputUVDataPort"))
    +
    232  {
    +
    233  supplyUVdata = true;
    +
    234  _outputUVDataPortName = botConfig.check("outputUVDataPort",
    +
    235  Value("/PF3DTracker/dataUVOut"),
    +
    236  "Image plane output data port (string)").asString();
    +
    237  _outputUVDataPort.open(_outputUVDataPortName);
    +
    238  }
    +
    239  else
    +
    240  {
    +
    241  yWarning("No (u,v) data will be supplied");
    +
    242  supplyUVdata = false;
    +
    243  }
    +
    244 
    +
    245  _nParticles = botConfig.check("nParticles",
    +
    246  Value("1000"),
    +
    247  "Number of particles used in the tracker (int)").asInt32();
    +
    248 
    +
    249  _colorTransfPolicy = botConfig.check("colorTransfPolicy",
    +
    250  Value("1"),
    +
    251  "Color transformation policy (int)").asInt32();
    +
    252  if(_colorTransfPolicy!=0 && _colorTransfPolicy!=1)
    +
    253  {
    +
    254  yWarning() << "Color trasformation policy "<<_colorTransfPolicy<<" is not yet implemented.";
    +
    255  quit=true; //stop the execution, after checking all the parameters.
    +
    256  }
    +
    257 
    +
    258  _inside_outside_difference_weight = (float)botConfig.check("insideOutsideDiffWeight",
    +
    259  Value("1.5"),
    +
    260  "Inside-outside difference weight in the likelihood function (double)").asFloat64();
    +
    261 
    +
    262  _projectionModel = botConfig.check("projectionModel",
    +
    263  Value("perspective"),
    +
    264  "Projection model (string)").asString();
    +
    265 
    +
    266  if(_projectionModel=="perspective")
    +
    267  {
    +
    268  bool rfOk=false;
    +
    269  if (botConfig.check("cameraContext") && botConfig.check("cameraFile") && botConfig.check("cameraGroup"))
    +
    270  {
    +
    271  ResourceFinder camera_rf;
    +
    272  camera_rf.setDefaultContext(botConfig.find("cameraContext").asString().c_str());
    +
    273  camera_rf.setDefaultConfigFile(botConfig.find("cameraFile").asString().c_str());
    +
    274  camera_rf.configure(0,NULL);
    +
    275  Bottle &params=camera_rf.findGroup(botConfig.find("cameraGroup").asString());
    +
    276  if (!params.isNull())
    +
    277  {
    +
    278  _calibrationImageWidth =params.check("w",Value(320)).asInt32();
    +
    279  _calibrationImageHeight=params.check("h",Value(240)).asInt32();
    +
    280  _perspectiveFx =(float)params.check("fx",Value(257.34)).asFloat64();
    +
    281  _perspectiveFy =(float)params.check("fy",Value(257.34)).asFloat64();
    +
    282  _perspectiveCx =(float)params.check("cx",Value(160.0)).asFloat64();
    +
    283  _perspectiveCy =(float)params.check("cy",Value(120.0)).asFloat64();
    +
    284  rfOk=true;
    +
    285  }
    +
    286  }
    +
    287 
    +
    288  if (!rfOk)
    +
    289  {
    +
    290  _calibrationImageWidth =botConfig.check("w",Value(320)).asInt32();
    +
    291  _calibrationImageHeight=botConfig.check("h",Value(240)).asInt32();
    +
    292  _perspectiveFx =(float)botConfig.check("perspectiveFx",Value(257.34)).asFloat64();
    +
    293  _perspectiveFy =(float)botConfig.check("perspectiveFy",Value(257.34)).asFloat64();
    +
    294  _perspectiveCx =(float)botConfig.check("perspectiveCx",Value(160.0)).asFloat64();
    +
    295  _perspectiveCy =(float)botConfig.check("perspectiveCy",Value(120.0)).asFloat64();
    +
    296  }
    +
    297 
    +
    298  cout<<"w ="<<_calibrationImageWidth<<endl;
    +
    299  cout<<"h ="<<_calibrationImageHeight<<endl;
    +
    300  cout<<"fx="<<_perspectiveFx<<endl;
    +
    301  cout<<"fy="<<_perspectiveFy<<endl;
    +
    302  cout<<"cx="<<_perspectiveCx<<endl;
    +
    303  cout<<"cy="<<_perspectiveCy<<endl;
    +
    304  }
    +
    305  else
    +
    306  {
    +
    307  if(_projectionModel=="equidistance" || _projectionModel=="unified")
    +
    308  {
    +
    309  yWarning() <<"Projection model "<<_projectionModel<<" is not yet implemented.";
    +
    310  quit=true; //stop the execution, after checking all the parameters.
    +
    311  }
    +
    312  else
    +
    313  {
    +
    314  yWarning() <<"The projection model you specified ("<<_projectionModel<<") is not supported.";
    +
    315  quit=true; //stop the execution, after checking all the parameters.
    +
    316  }
    +
    317  }
    +
    318 
    +
    319  _initializationMethod = botConfig.check("initializationMethod",
    +
    320  Value("search"),
    +
    321  "Initialization method (string)").asString();
    +
    322 
    +
    323  if(_initializationMethod=="3dEstimate")
    +
    324  {
    +
    325  _initialX = botConfig.check("initialX",
    +
    326  Value("0"),
    +
    327  "Estimated initial X position [m] (double)").asFloat64()*1000; //meters to millimeters
    +
    328  _initialY = botConfig.check("initialY",
    +
    329  Value("0"),
    +
    330  "Estimated initial Y position [m] (double)").asFloat64()*1000; //meters to millimeters
    +
    331  _initialZ = botConfig.check("initialZ",
    +
    332  Value("1000"),
    +
    333  "Estimated initial Z position [m] (double)").asFloat64()*1000; //meters to millimeters
    +
    334  }
    +
    335  else
    +
    336  {
    +
    337  if(_initializationMethod=="2dEstimate" || _initializationMethod=="search")
    +
    338  {
    +
    339  yWarning() << "Initialization method "<<_initializationMethod<<" is not yet implemented.";
    +
    340  quit=true; //stop the execution, after checking all the parameters.
    +
    341  }
    +
    342  else
    +
    343  {
    +
    344  yWarning() << "The initialization method you specified ("<<_initializationMethod<<") is not supported.";
    +
    345  quit=true; //stop the execution, after checking all the parameters.
    +
    346  }
    +
    347  }
    +
    348 
    +
    349  _trackedObjectType = botConfig.check("trackedObjectType",
    +
    350  Value("sphere"),
    +
    351  "Tracked object type (string)").asString();
    +
    352  if(_trackedObjectType=="sphere")
    +
    353  {
    +
    354  ;//good, this one is implemented.
    +
    355  //0 means inner and outer circle, 1 means just one circle of the correct size.
    +
    356  _circleVisualizationMode = botConfig.check("circleVisualizationMode",
    +
    357  Value("0"),
    +
    358  "Visualization mode for the sphere (int)").asInt32();
    +
    359  }
    +
    360  else
    +
    361  {
    +
    362  if(_trackedObjectType=="parallelogram")
    +
    363  {
    +
    364  yWarning() << "Tracked object type "<<_trackedObjectType<<" is not yet implemented.";
    +
    365  quit=true; //stop the execution, after checking all the parameters.
    +
    366  }
    +
    367  else
    +
    368  {
    +
    369  yWarning() << "The tracked object type you specified ("<<_trackedObjectType<<") is not supported.";
    +
    370  quit=true; //stop the execution, after checking all the parameters.
    +
    371  }
    +
    372  }
    +
    373 
    +
    374  //*****************************************************
    +
    375  //Build and read the color model for the tracked object
    +
    376  //*****************************************************
    +
    377  //
    +
    378  trackedObjectColorTemplate = rf.findFile("trackedObjectColorTemplate");
    +
    379  dataFileName = rf.findFile("trackedObjectTemp");
    +
    380  //cout<<"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"<<trackedObjectColorTemplate<<endl;
    +
    381 
    +
    382  failure=computeTemplateHistogram(trackedObjectColorTemplate,dataFileName);
    +
    383  if(failure)
    +
    384  {
    +
    385  yWarning("I had troubles computing the template histogram.");
    +
    386  quit=true;
    +
    387  }
    +
    388 
    +
    389  failure=readModelHistogram(_modelHistogramMat,dataFileName.c_str());
    +
    390  if(failure)
    +
    391  {
    +
    392  yWarning("I had troubles reading the template histogram.");
    +
    393  quit=true;
    +
    394  }
    +
    395 
    +
    396  //*******************************************
    +
    397  //Read the shape model for the tracked object
    +
    398  //*******************************************
    +
    399  trackedObjectShapeTemplate = rf.findFile("trackedObjectShapeTemplate");
    +
    400  failure=readInitialmodel3dPoints(_model3dPointsMat,trackedObjectShapeTemplate);
    +
    401  if(failure)
    +
    402  {
    +
    403  yWarning("I had troubles reading the model 3D points.");
    +
    404  quit=true;
    +
    405  }
    +
    406 
    +
    407  if((_trackedObjectType=="sphere") && (_circleVisualizationMode==1))
    +
    408  {
    +
    409  //create _visualization3dPointsMat and fill it with the average between outer and inner 3D points.
    +
    410  _visualization3dPointsMat=cvCreateMat( 3, 2*nPixels, CV_32FC1 );
    +
    411  //only the first half of this matrix is used. the second part can be full of rubbish (not zeros, I guess).
    +
    412  cvSet(_visualization3dPointsMat,(cvScalar(1)));
    +
    413  for(row=0;row<3;row++)
    +
    414  {
    +
    415  for(column=0;column<nPixels;column++)
    +
    416  {
    +
    417  ((float*)(_visualization3dPointsMat->data.ptr + _visualization3dPointsMat->step*row))[column]=(((float*)(_model3dPointsMat->data.ptr + _model3dPointsMat->step*row))[column]+((float*)(_model3dPointsMat->data.ptr + _model3dPointsMat->step*row))[column+nPixels])/2;
    +
    418  }
    +
    419  }
    +
    420  }
    +
    421 
    +
    422  //***************************************************
    +
    423  //Read the motion model matrix for the tracked object
    +
    424  //***************************************************
    +
    425 
    +
    426  _accelStDev = (float)botConfig.check("accelStDev",
    +
    427  Value(150.0),
    +
    428  "StDev of acceleration noise (double)").asFloat64();
    +
    429 
    +
    430  motionModelMatrix = rf.findFile("motionModelMatrix");
    +
    431 
    +
    432  //allocate space for the _A matrix. 32bit floats, one channel.
    +
    433  _A=cvCreateMat(7,7,CV_32FC1);
    +
    434  failure=readMotionModelMatrix(_A, motionModelMatrix);
    +
    435  if(failure)
    +
    436  {
    +
    437  yWarning("I had troubles reading the motion model matrix.");
    +
    438  quit=true;
    +
    439  }
    +
    440 
    +
    441  //allocate memory for the particles;
    +
    442  _particles=cvCreateMat(7,_nParticles,CV_32FC1);
    +
    443  //fill the memory with zeros, so that valgrind won't complain.
    +
    444  cvSetZero(_particles);
    +
    445 
    +
    446  //define ways of accessing the particles:
    +
    447  _particles1 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    448  cvInitMatHeader( _particles1, 1, _nParticles, CV_32FC1, _particles->data.ptr, _particles->step );
    +
    449  _particles2 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    450  cvInitMatHeader( _particles2, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*1, _particles->step );
    +
    451  _particles3 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    452  cvInitMatHeader( _particles3, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*2, _particles->step );
    +
    453  _particles4 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    454  cvInitMatHeader( _particles4, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*3, _particles->step );
    +
    455  _particles5 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    456  cvInitMatHeader( _particles5, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*4, _particles->step );
    +
    457  _particles6 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    458  cvInitMatHeader( _particles6, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*5, _particles->step );
    +
    459  _particles7 = cvCreateMatHeader( 1,_nParticles, CV_32FC1);
    +
    460  cvInitMatHeader( _particles7, 1, _nParticles, CV_32FC1, _particles->data.ptr + _particles->step*6, _particles->step );
    +
    461  _particles1to6 = cvCreateMatHeader( 6,_nParticles, CV_32FC1);
    +
    462  cvInitMatHeader( _particles1to6, 6, _nParticles, CV_32FC1, _particles->data.ptr, _particles->step );
    +
    463 
    +
    464  //allocate memory for the "new" particles;
    +
    465  _newParticles=cvCreateMat(7,_nParticles,CV_32FC1);
    +
    466  _newParticles1to6 = cvCreateMatHeader( 6,_nParticles, CV_32FC1);
    +
    467  cvInitMatHeader( _newParticles1to6, 6, _nParticles, CV_32FC1, _newParticles->data.ptr, _newParticles->step );
    +
    468 
    +
    469  //allocate memory for "noise"
    +
    470  _noise=cvCreateMat(6,_nParticles,CV_32FC1);
    +
    471  cvSetZero(_noise);
    +
    472  _noise1 = cvCreateMatHeader( 3,_nParticles, CV_32FC1);
    +
    473  cvInitMatHeader( _noise1, 3, _nParticles, CV_32FC1, _noise->data.ptr, _noise->step );
    +
    474  cvSetZero(_noise1);
    +
    475  _noise2 = cvCreateMatHeader( 3,_nParticles, CV_32FC1);
    +
    476  cvInitMatHeader( _noise2, 3, _nParticles, CV_32FC1, _noise->data.ptr + _noise->step*3, _noise->step );
    +
    477  cvSetZero(_noise2);
    +
    478 
    +
    479  //resampling-related stuff.
    +
    480  _nChildren = cvCreateMat(1,_nParticles,CV_32FC1);
    +
    481  _label = cvCreateMat(1,_nParticles,CV_32FC1);
    +
    482  _ramp = cvCreateMat(1,_nParticles,CV_32FC1);
    +
    483  _u = cvCreateMat(1,_nParticles,CV_32FC1);
    +
    484 
    +
    485  _cumWeight =cvCreateMat(1,_nParticles+1,CV_32FC1);
    +
    486 
    +
    487  int count;
    +
    488  for(count=0;count<_nParticles;count++)
    +
    489  {
    +
    490  ((float*)(_ramp->data.ptr))[count]=(float)count+1.0F;
    +
    491  }
    +
    492 
    +
    493  temp = botConfig.check("saveImagesWithOpencv",
    +
    494  Value("false"),
    +
    495  "Save elaborated images with OpenCV? (string)").asString();
    +
    496  if(temp=="true")
    +
    497  {
    +
    498  _saveImagesWithOpencv=true;
    +
    499  }
    +
    500 
    +
    501  if(_saveImagesWithOpencv)
    +
    502  {
    +
    503  _saveImagesWithOpencvDir = botConfig.check("saveImagesWithOpencvDir",
    +
    504  Value(""),
    +
    505  "Directory where to save the elaborated images (string)").asString();
    +
    506  }
    +
    507 
    +
    508  if(_initializationMethod=="3dEstimate")
    +
    509  {
    +
    510  //cout<<"Initialization method = 3dEstimate."<<endl;
    +
    511  //*************************************************************************
    +
    512  //generate a set of random particles near the estimated initial 3D position
    +
    513  //*************************************************************************
    +
    514 
    +
    515  float mean,velocityStDev;
    +
    516  velocityStDev=0; //warning ??? !!! I'm setting parameters for the dynamic model here.
    +
    517 
    +
    518  //initialize X
    +
    519  mean=(float)_initialX;
    +
    520  cvRandArr( &rngState, _particles1, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    521  //initialize Y
    +
    522  mean=(float)_initialY;
    +
    523  cvRandArr( &rngState, _particles2, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    524  //initialize Z
    +
    525  mean=(float)_initialZ;
    +
    526  cvRandArr( &rngState, _particles3, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    527  //initialize VX
    +
    528  mean=0;
    +
    529  cvRandArr( &rngState, _particles4, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    530  //initialize VY
    +
    531  cvRandArr( &rngState, _particles5, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    532  //initialize VZ
    +
    533  cvRandArr( &rngState, _particles6, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    534  }
    +
    535 
    +
    536  downsampler=0; //this thing is used to send less data to the plotter
    +
    537 
    +
    538  //Matrices-related stuff.
    +
    539  //connect headers to data, allocate space...
    +
    540  _rzMat = cvCreateMat(3, 3, CV_32FC1);
    +
    541  _ryMat = cvCreateMat(3, 3, CV_32FC1);
    +
    542  _uv = cvCreateMat(2,2*nPixels, CV_32FC1);
    +
    543 
    +
    544  _tempMat1 = cvCreateMatHeader( 1,2*nPixels, CV_32FC1);
    +
    545  cvInitMatHeader( _tempMat1, 1, 2*nPixels, CV_32FC1,_tempMat->data.ptr, _tempMat->step );
    +
    546 
    +
    547  _tempMat2 = cvCreateMatHeader( 1,2*nPixels, CV_32FC1);
    +
    548  cvInitMatHeader( _tempMat2, 1, 2*nPixels, CV_32FC1, _tempMat->data.ptr+_tempMat->step*1, _tempMat->step ); //FUNZIONA? ??? !!!
    +
    549 
    +
    550  _tempMat3 = cvCreateMatHeader( 1,2*nPixels, CV_32FC1);
    +
    551  cvInitMatHeader( _tempMat3, 1, 2*nPixels, CV_32FC1, _tempMat->data.ptr+_tempMat->step*2, _tempMat->step ); //FUNZIONA? ??? !!!
    +
    552 
    +
    553  _p2Mat1 = cvCreateMatHeader( 1,2*nPixels, CV_32FC1);
    +
    554  cvInitMatHeader( _p2Mat1, 1, 2*nPixels, CV_32FC1, _points2Mat->data.ptr ); //FUNZIONA? ??? !!!
    +
    555  _p2Mat3 = cvCreateMatHeader( 1,2*nPixels, CV_32FC1);
    +
    556  cvInitMatHeader( _p2Mat3, 1, 2*nPixels, CV_32FC1, _points2Mat->data.ptr+_points2Mat->step*2, _points2Mat->step ); //FUNZIONA? ??? !!!
    +
    557 
    +
    558  _drawingMat=cvCreateMat(3, 2*nPixels, CV_32FC1);
    +
    559  _projectionMat=cvCreateMat(2, 3, CV_32FC1);
    +
    560 
    +
    561  _xyzMat1 = cvCreateMatHeader(1,2*nPixels,CV_32FC1);
    +
    562  _xyzMat2 = cvCreateMatHeader(1,2*nPixels,CV_32FC1);
    +
    563  _xyzMat3 = cvCreateMatHeader(1,2*nPixels,CV_32FC1);
    +
    564 
    +
    565  //testOpenCv(); //Used to test stuff.
    +
    566 
    +
    567  //**********************************
    +
    568  //Write the header line for the data
    +
    569  //**********************************
    +
    570  //cout<<"\033[37;1m"<<" frame#";
    +
    571  //cout<<"\033[32;1m"<<" meanX";
    +
    572  //cout<<" meanY";
    +
    573  //cout<<" meanZ";
    +
    574  //cout<<"\033[37;1m Likelihood";
    +
    575  //cout<<" Seing";
    +
    576  //cout<<"\033[33;1m meanU";
    +
    577  //cout<<" meanV";
    +
    578  //cout<<"\033[37;1m fps"<<"\033[0m"<<endl;
    +
    579 
    +
    580  cout<<" frame#";
    +
    581  cout<<" meanX";
    +
    582  cout<<" meanY";
    +
    583  cout<<" meanZ";
    +
    584  cout<<" Likelihood";
    +
    585  cout<<" Seing";
    +
    586  cout<<" meanU";
    +
    587  cout<<" meanV";
    +
    588  cout<<" fps"<<endl;
    +
    589 
    +
    590  //*********************************************************************
    +
    591  //Read one image from the stream.
    +
    592  //*********************************************************************
    +
    593 
    +
    594  _yarpImage = _inputVideoPort.read();
    +
    595  _inputVideoPort.getEnvelope(_yarpTimestamp);
    +
    596 
    +
    597  if (_yarpImage != NULL)
    +
    598  {
    +
    599  widthRatio=(double)_yarpImage->width()/(double)_calibrationImageWidth;
    +
    600  heightRatio=(double)_yarpImage->height()/(double)_calibrationImageHeight;
    +
    601  _perspectiveFx=_perspectiveFx*(float)widthRatio;
    +
    602  _perspectiveFy=_perspectiveFy*(float)heightRatio;
    +
    603  _perspectiveCx=_perspectiveCx*(float)widthRatio;
    +
    604  _perspectiveCy=_perspectiveCy*(float)heightRatio;
    +
    605 
    +
    606  _rawImage = cvCreateImage(cvSize(_yarpImage->width(),_yarpImage->height()),IPL_DEPTH_8U, 3); //This allocates space for the image.
    +
    607  _transformedImage = cvCreateImage(cvSize(_yarpImage->width(),_yarpImage->height()),IPL_DEPTH_8U, 3); //This allocates space for the image.
    +
    608  toCvMat(*_yarpImage).copyTo(cv::cvarrToMat(_rawImage));
    +
    609 
    +
    610  rgbToYuvBinImageLut(_rawImage,_transformedImage,_lut);
    +
    611 
    +
    612  //allocate space for the transformed image.
    +
    613  _transformedImage = cvCreateImage(cvSize(_yarpImage->width(),_yarpImage->height()),IPL_DEPTH_8U,3);
    +
    614 
    +
    615  _framesNotTracking=0;
    +
    616  _frameCounter=1;
    +
    617  _attentionOutput=0;
    +
    618 
    +
    619  _lastU=_yarpImage->width()/2.0F;
    +
    620  _lastV=_yarpImage->height()/2.0F;
    +
    621 
    +
    622  _initialTime=0;
    +
    623  _finalTime=0;
    +
    624  _firstFrame=true;
    +
    625  }
    +
    626 
    +
    627  if(quit==true)
    +
    628  {
    +
    629  yWarning("There were problems initializing the object: the execution was interrupted.");
    +
    630  return false; //there were problems initializing the objet: stop the execution.
    +
    631  }
    +
    632  else
    +
    633  {
    +
    634  _doneInitializing=true;
    +
    635  return true; //the object was set up successfully.
    +
    636  }
    +
    637 }
    +
    638 
    +
    639 //member that closes the object.
    +
    640 bool PF3DTracker::close()
    +
    641 {
    +
    642  _inputVideoPort.close();
    +
    643  _outputVideoPort.close();
    +
    644  _outputDataPort.close();
    +
    645  _outputUVDataPort.close();
    +
    646  _inputParticlePort.close();
    +
    647  _outputParticlePort.close();
    +
    648  _outputAttentionPort.close();
    +
    649 
    +
    650  if (_A != NULL)
    +
    651  cvReleaseMat(&_A);
    +
    652 
    +
    653  if (_particles != NULL)
    +
    654  cvReleaseMat(&_particles);
    +
    655 
    +
    656  if (_newParticles != NULL)
    +
    657  cvReleaseMat(&_newParticles);
    +
    658 
    +
    659  return true;
    +
    660 }
    +
    661 
    +
    662 //member that closes the object.
    +
    663 bool PF3DTracker::interruptModule()
    +
    664 {
    +
    665  _inputVideoPort.interrupt();
    +
    666  _outputVideoPort.interrupt();
    +
    667  _outputDataPort.interrupt();
    +
    668  _outputUVDataPort.interrupt();
    +
    669  _inputParticlePort.interrupt();
    +
    670  _outputParticlePort.interrupt();
    +
    671  _outputAttentionPort.interrupt();
    +
    672 
    +
    673  return true;
    +
    674 }
    +
    675 
    +
    676 //member that is repeatedly called by YARP, to give this object the chance to do something.
    +
    677 //should this function return "false", the object would be terminated.
    +
    678 //I already have one image, when I get here (I either acquire it in the initialization method or in the end of this same method).
    +
    679 bool PF3DTracker::updateModule()
    +
    680 {
    +
    681  if(_doneInitializing)
    +
    682  {
    +
    683  int count;
    +
    684  unsigned int seed;
    +
    685  float likelihood, mean, maxX, maxY, maxZ;
    +
    686  float weightedMeanX, weightedMeanY, weightedMeanZ;
    +
    687  float meanU;
    +
    688  float meanV;
    +
    689  float wholeCycle;
    +
    690  string outputFileName;
    +
    691  stringstream out;
    +
    692 
    +
    693  seed=rand();
    +
    694 
    +
    695  _finalTime=yarp::os::Time::now();
    +
    696  wholeCycle=(float)(_finalTime-_initialTime);
    +
    697  _initialTime=yarp::os::Time::now();
    +
    698 
    +
    699  //*****************************************
    +
    700  //calculate the likelihood of each particle
    +
    701  //*****************************************
    +
    702  float sumLikelihood=0.0;
    +
    703  float maxLikelihood=0.0;
    +
    704  int maxIndex=-1;
    +
    705  for(count=0;count< _nParticles;count++)
    +
    706  {
    +
    707  if(_colorTransfPolicy==0)
    +
    708  {
    +
    709  evaluateHypothesisPerspective(_model3dPointsMat,(float)cvmGet(_particles,0,count),(float)cvmGet(_particles,1,count),(float)cvmGet(_particles,2,count),_modelHistogramMat,_transformedImage,_perspectiveFx,_perspectiveFy, _perspectiveCx,_perspectiveCy,_inside_outside_difference_weight,likelihood);
    +
    710  }
    +
    711  else
    +
    712  {
    +
    713  if(_colorTransfPolicy==1)
    +
    714  {
    +
    715  evaluateHypothesisPerspectiveFromRgbImage(_model3dPointsMat,(float)cvmGet(_particles,0,count),(float)cvmGet(_particles,1,count),(float)cvmGet(_particles,2,count),_modelHistogramMat,_rawImage,_perspectiveFx,_perspectiveFy, _perspectiveCx,_perspectiveCy,_inside_outside_difference_weight,likelihood);
    +
    716  }
    +
    717  else
    +
    718  {
    +
    719  yWarning() << "Wrong ID for color transformation policy:"<<_colorTransfPolicy<<". Quitting.";
    +
    720  return false;
    +
    721  }
    +
    722  }
    +
    723 
    +
    724  cvmSet(_particles,6,count,likelihood);
    +
    725  sumLikelihood+=likelihood;
    +
    726  if(likelihood>maxLikelihood)
    +
    727  {
    +
    728  maxLikelihood=likelihood;
    +
    729  maxIndex=count;
    +
    730  }
    +
    731  }
    +
    732 
    +
    733 
    +
    734  if(maxIndex!=-1)
    +
    735  {
    +
    736  maxX=(float)cvmGet(_particles,0,maxIndex);
    +
    737  maxY=(float)cvmGet(_particles,1,maxIndex);
    +
    738  maxZ=(float)cvmGet(_particles,2,maxIndex);
    +
    739  }
    +
    740  else
    +
    741  {
    +
    742  maxX=1;
    +
    743  maxY=1;
    +
    744  maxZ=1000;
    +
    745  }
    +
    746 
    +
    747  if(maxLikelihood/exp((float)20.0)>_likelihoodThreshold) //normalizing likelihood
    +
    748  {
    +
    749  _seeingObject=1;
    +
    750  _framesNotTracking=0;
    +
    751  _attentionOutput=_attentionOutputMax;
    +
    752  }
    +
    753  else
    +
    754  {
    +
    755  _attentionOutput=_attentionOutput*_attentionOutputDecrease;
    +
    756  _seeingObject=0;
    +
    757  _framesNotTracking+=1;
    +
    758  }
    +
    759 
    +
    760  //******************************************************
    +
    761  // //send data to the plotter. COMMENTED FOR EFFICENCY
    +
    762  //******************************************************
    +
    763  // if(downsampler % 3 ==0)
    +
    764  // {
    +
    765  // //these values might be a mix of the ones before and after the resampling took place. ??? WARNING
    +
    766  // Bottle& particleOutput=_outputParticlePort.prepare();
    +
    767  // particleOutput.clear();
    +
    768  // for(count=0;count<_nParticles;count++)
    +
    769  // {
    +
    770  // particleOutput.addFloat64((double)(_particles[0][count]));
    +
    771  // particleOutput.addFloat64((double)(_particles[1][count]));
    +
    772  // particleOutput.addFloat64((double)(_particles[2][count]));
    +
    773  // particleOutput.addFloat64((double)(_particles[3][count]));
    +
    774  // particleOutput.addFloat64((double)(_particles[4][count]));
    +
    775  // particleOutput.addFloat64((double)(_particles[5][count]));
    +
    776  // particleOutput.addFloat64((double)(_particles[6][count]));
    +
    777  // }
    +
    778  // _outputParticlePort.write();
    +
    779  // }
    +
    780  // downsampler+=1;
    +
    781 
    +
    782  //If the likelihood has been under the threshold for 5 frames, reinitialize the tracker.
    +
    783  //This just works for the sphere.
    +
    784  if(_framesNotTracking==5 || sumLikelihood==0.0)
    +
    785  {
    +
    786  cout<<"**********************************************************************Reset\n";
    +
    787  float mean,velocityStDev;
    +
    788  velocityStDev=0; //warning ??? !!! I'm setting parameters for the dynamic model here.
    +
    789 
    +
    790  mean=(float)_initialX;
    +
    791  cvRandArr( &rngState, _particles1, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    792  //initialize Y
    +
    793  mean=(float)_initialY;
    +
    794  cvRandArr( &rngState, _particles2, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    795  //initialize Z
    +
    796  mean=(float)_initialZ;
    +
    797  cvRandArr( &rngState, _particles3, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    798  //initialize VX
    +
    799  mean=0;
    +
    800  cvRandArr( &rngState, _particles4, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    801  //initialize VY
    +
    802  cvRandArr( &rngState, _particles5, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    803  //initialize VZ
    +
    804  cvRandArr( &rngState, _particles6, CV_RAND_NORMAL, cvScalar(mean), cvScalar(velocityStDev));
    +
    805 
    +
    806  _framesNotTracking=0;
    +
    807 
    +
    808  weightedMeanX=weightedMeanY=weightedMeanZ=0.0; // UGO: they should be zeroed before accumulation
    +
    809  for(count=0;count<_nParticles;count++)
    +
    810  {
    +
    811  weightedMeanX+=(float)cvmGet(_particles,0,count);
    +
    812  weightedMeanY+=(float)cvmGet(_particles,1,count);
    +
    813  weightedMeanZ+=(float)cvmGet(_particles,2,count);
    +
    814  }
    +
    815  weightedMeanX/=_nParticles;
    +
    816  weightedMeanY/=_nParticles;
    +
    817  weightedMeanZ/=_nParticles;
    +
    818  //this mean is not weighted as there is no weight to use: the particles have just been generated.
    +
    819 
    +
    820  //*****************************************
    +
    821  //WRITE ESTIMATES TO THE SCREEN, FIRST PART
    +
    822  //*****************************************
    +
    823  //these are not really estimates, but...
    +
    824  cout<<setw(8)<<_frameCounter;
    +
    825  cout<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanX/1000; //millimeters to meters
    +
    826  cout<<" "<<setw(8)<<weightedMeanY/1000; //millimeters to meters
    +
    827  cout<<" "<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanZ/1000; //millimeters to meters
    +
    828  cout<<" "<<setiosflags(ios::fixed)<<setprecision(5)<<setw(8)<<maxLikelihood/exp((float)20.0); //normalizing likelihood
    +
    829  cout<<" "<<setw(5)<<_seeingObject;
    +
    830  }
    +
    831  else
    +
    832  {
    +
    833  //*********************************************
    +
    834  //Compute the mean and normalize the likelihood
    +
    835  //*********************************************
    +
    836  weightedMeanX=0.0;
    +
    837  weightedMeanY=0.0;
    +
    838  weightedMeanZ=0.0;
    +
    839  for(count=0;count<_nParticles;count++)
    +
    840  {
    +
    841  cvmSet(_particles,6,count,(cvmGet(_particles,6,count)/sumLikelihood));
    +
    842  weightedMeanX+=(float)(cvmGet(_particles,0,count)*cvmGet(_particles,6,count));
    +
    843  weightedMeanY+=(float)(cvmGet(_particles,1,count)*cvmGet(_particles,6,count));
    +
    844  weightedMeanZ+=(float)(cvmGet(_particles,2,count)*cvmGet(_particles,6,count));
    +
    845  }
    +
    846 
    +
    847  //*****************************************
    +
    848  //WRITE ESTIMATES TO THE SCREEN, FIRST PART
    +
    849  //*****************************************
    +
    850  //cout<<"\033[37;1m"<<setw(8)<<_frameCounter;
    +
    851  //cout<<" \033[32;1m"<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanX/1000; //millimeters to meters
    +
    852  //cout<<" "<<setw(8)<<weightedMeanY/1000; //millimeters to meters
    +
    853  //cout<<" "<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanZ/1000; //millimeters to meters
    +
    854  //cout<<" \033[37;1m"<<setiosflags(ios::fixed)<<setprecision(5)<<setw(8)<<maxLikelihood/exp((float)20.0); //normalizing likelihood
    +
    855  //cout<<" "<<setw(5)<<_seeingObject;
    +
    856 
    +
    857  cout<<setw(8)<<_frameCounter;
    +
    858  cout<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanX/1000; //millimeters to meters
    +
    859  cout<<" "<<setw(8)<<weightedMeanY/1000; //millimeters to meters
    +
    860  cout<<" "<<setiosflags(ios::fixed)<<setprecision(3)<<setw(8)<<weightedMeanZ/1000; //millimeters to meters
    +
    861  cout<<" "<<setiosflags(ios::fixed)<<setprecision(5)<<setw(8)<<maxLikelihood/exp((float)20.0); //normalizing likelihood
    +
    862  cout<<" "<<setw(5)<<_seeingObject;
    +
    863 
    +
    864  //------------------------------------------------------------martim
    +
    865  Bottle *particleInput = _inputParticlePort.read(false);
    +
    866  if (particleInput==NULL)
    +
    867  _numParticlesReceived=0;
    +
    868  else
    +
    869  _numParticlesReceived=(particleInput->get(0)).asInt32();
    +
    870  if(_numParticlesReceived > _nParticles)
    +
    871  {
    +
    872  _numParticlesReceived=0;
    +
    873  yWarning("PROBLEM: Input particles are more than nParticles.");
    +
    874  }
    +
    875  //------------------------------------------------------------end martim
    +
    876 
    +
    877  //**********************
    +
    878  //RESAMPLE THE PARTICLES
    +
    879  //**********************
    +
    880  int minimum_likelihood=10; //do not resample if maximum likelihood is lower than this.
    +
    881  //this is intended to prevent that the particles collapse on the origin when you start the tracker.
    +
    882  if(maxLikelihood>minimum_likelihood)
    +
    883  {
    +
    884  //TODO non funziona ancora, credo: nelle particelle resamplate ci sono dei not-a-number.
    +
    885  //systematicR(_particles1to6,_particles7,_newParticles); //SOMETHING'S WRONG HERE: sometimes the new particles look like being messed up ??? !!!
    +
    886  systematic_resampling(_particles1to6,_particles7,_newParticles,_cumWeight);
    +
    887  }
    +
    888  else //I can't apply a resampling with all weights equal to 0!
    +
    889  {
    +
    890  //TODO:CHECK that copying the whole thing creates no problems.
    +
    891  //I think I used to copy only 6 lines to make it faster.
    +
    892  //ippsCopy_32f(&_particles[0][0], &_newParticles[0][0], 6*_nParticles);
    +
    893  cvCopy(_particles,_newParticles);
    +
    894  }
    +
    895 
    +
    896  //the "good" particles now are in _newParticles
    +
    897  //******************************************
    +
    898  //APPLY THE MOTION MODEL: 1.APPLY THE MATRIX
    +
    899  //******************************************
    +
    900  cvMatMul(_A,_newParticles,_particles);
    +
    901 
    +
    902  //the "good" particles now are in _particles
    +
    903  //********************************************************
    +
    904  //APPLY THE MOTION MODEL: 2.ADD THE EFFECT OF ACCELERATION
    +
    905  //********************************************************
    +
    906  mean = 0; //NEW
    +
    907  //cout<<"Noise generation parameters: mean= "<<mean<<", accelStDev= "<<_accelStDev<<endl;
    +
    908  //cout<<"_noise1 before generation: "<<((float*)(_noise1->data.ptr + _noise->step*0))[0]<<endl;
    +
    909  cvRandArr( &rngState, _noise1, CV_RAND_NORMAL, cvScalar(mean), cvScalar(_accelStDev));
    +
    910  //cout<<"_noise1 after generation: "<<((float*)(_noise1->data.ptr + _noise->step*0))[0]<<endl;
    +
    911 
    +
    912  cvCopy(_noise1,_noise2);
    +
    913  cvConvertScale( _noise1, _noise1, 0.5, 0 );//influence on the position is half that on speed.
    +
    914  //cout<<"_noise1 after rescaling: "<<((float*)(_noise1->data.ptr + _noise->step*0))[0]<<endl;
    +
    915 
    +
    916  //cout<<"_noise2 after generation: "<<((float*)(_noise2->data.ptr + _noise->step*0))[0]<<endl;
    +
    917 
    +
    918  //cout<<"First element of _particles before addition of noise: "<<((float*)(_particles->data.ptr + _particles->step*0))[0]<<endl;
    +
    919  cvAdd(_particles1to6,_noise,_particles1to6);//sum the influence of the noise to the previous status
    +
    920  //cout<<"First element of _particles after addition of noise: "<<((float*)(_particles->data.ptr + _particles->step*0))[0]<<endl;
    +
    921 
    +
    922  //------------------------------------------------------------martim
    +
    923  // get particles from input
    +
    924  if(_numParticlesReceived > 0){
    +
    925  int topdownParticles = _nParticles - _numParticlesReceived;
    +
    926  for(count=0 ; count<_numParticlesReceived ; count++){
    +
    927  cvmSet(_particles,0,topdownParticles+count, (particleInput->get(1+count*3+0)).asFloat64());
    +
    928  cvmSet(_particles,1,topdownParticles+count, (particleInput->get(1+count*3+1)).asFloat64());
    +
    929  cvmSet(_particles,2,topdownParticles+count, (particleInput->get(1+count*3+2)).asFloat64());
    +
    930  cvmSet(_particles,3,topdownParticles+count, 0);
    +
    931  cvmSet(_particles,4,topdownParticles+count, 0);
    +
    932  cvmSet(_particles,5,topdownParticles+count, 0);
    +
    933  cvmSet(_particles,6,topdownParticles+count, 0.8); //??
    +
    934  }
    +
    935  //num_bottomup_objects=(particleInput->get(1+count*3)).asInt32();
    +
    936  }
    +
    937  //------------------------------------------------------------end martim
    +
    938  }
    +
    939 
    +
    940  //************************************
    +
    941  //DRAW THE SAMPLED POINTS ON THE IMAGE
    +
    942  //************************************
    +
    943 
    +
    944  if(_circleVisualizationMode==0)
    +
    945  {
    +
    946  drawSampledLinesPerspectiveYARP(_model3dPointsMat, weightedMeanX,weightedMeanY,weightedMeanZ, _yarpImage,_perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, 255, 255, 255, meanU, meanV);
    +
    947  }
    +
    948  if(_circleVisualizationMode==1)
    +
    949  {
    +
    950  if(_seeingObject)
    +
    951  drawContourPerspectiveYARP(_visualization3dPointsMat, weightedMeanX,weightedMeanY,weightedMeanZ, _yarpImage,_perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, 0, 255, 0, meanU, meanV);
    +
    952  else
    +
    953  drawContourPerspectiveYARP(_visualization3dPointsMat, weightedMeanX,weightedMeanY,weightedMeanZ, _yarpImage,_perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, 255,255, 0, meanU, meanV);
    +
    954  }
    +
    955 
    +
    956  //******************************************
    +
    957  //WRITE ESTIMATES TO THE SCREEN, SECOND PART
    +
    958  //******************************************
    +
    959  //cout<<"\033[33;1m"<<setw(8)<<(int)meanU;
    +
    960  //cout<<setw(5)<<(int)meanV<<"\033[0m";
    +
    961  //if(_firstFrame==false)
    +
    962  //{
    +
    963  // cout<<setw(5)<<"\033[37;1m"<<setw(8)<<setiosflags(ios::fixed)<<setprecision(3)<<wholeCycle<<"\033[0m"<<endl;
    +
    964  //}
    +
    965  //else
    +
    966  //{
    +
    967  // cout<<"\033[37;1m -----\033[0m"<<endl;
    +
    968  // _firstFrame=false;
    +
    969  //}
    +
    970 
    +
    971  cout<<setw(8)<<(int)meanU;
    +
    972  cout<<setw(5)<<(int)meanV;
    +
    973  if(_firstFrame==false)
    +
    974  {
    +
    975  cout<<setw(5)<<setw(8)<<setiosflags(ios::fixed)<<setprecision(3)<<wholeCycle<<endl;
    +
    976  }
    +
    977  else
    +
    978  {
    +
    979  cout<<" -----"<<endl;
    +
    980  _firstFrame=false;
    +
    981  }
    +
    982 
    +
    983  Bottle& output=_outputDataPort.prepare();
    +
    984  output.clear();
    +
    985  output.addFloat64(weightedMeanX/1000);//millimeters to meters
    +
    986  output.addFloat64(weightedMeanY/1000);//millimeters to meters
    +
    987  output.addFloat64(weightedMeanZ/1000);//millimeters to meters
    +
    988  output.addFloat64(maxLikelihood/exp((float)20.0));//normalizing likelihood
    +
    989  output.addFloat64(meanU);
    +
    990  output.addFloat64(meanV);
    +
    991  output.addFloat64(_seeingObject);
    +
    992 
    +
    993  //set the envelope for the output port
    +
    994  _outputDataPort.setEnvelope(_yarpTimestamp);
    +
    995 
    +
    996  _outputDataPort.write();
    +
    997 
    +
    998  if (_seeingObject && supplyUVdata)
    +
    999  {
    +
    1000  Bottle& outputUV=_outputUVDataPort.prepare();
    +
    1001 
    +
    1002  outputUV.clear();
    +
    1003  outputUV.addFloat64(meanU);
    +
    1004  outputUV.addFloat64(meanV);
    +
    1005 
    +
    1006  //set the envelope for the output port
    +
    1007  _outputUVDataPort.setEnvelope(_yarpTimestamp);
    +
    1008  _outputUVDataPort.write();
    +
    1009  }
    +
    1010 
    +
    1011  Vector& tempVector=_outputAttentionPort.prepare();
    +
    1012  tempVector.resize(5);
    +
    1013  if(maxLikelihood>_likelihoodThreshold)
    +
    1014  {
    +
    1015  tempVector(0) = (meanU-_rawImage->width/2)/(_rawImage->width/2)/1.5; //X=(U-width/2) / width
    +
    1016  tempVector(1) = (meanV-_rawImage->height/2)/(_rawImage->height/2)/1.5;//Y= -(V-height/2) / height
    +
    1017  //_lastU=meanU; I just keep it to the center of the image, for now.
    +
    1018  //_lastV=meanV;I just keep it to the center of the image, for now.
    +
    1019  }
    +
    1020  else //keep sending the old value, when likelihood is under threshold
    +
    1021  {
    +
    1022  tempVector(0) = ((_lastU-_rawImage->width/2)/(_rawImage->width/2)); //X=(U-width/2) / width
    +
    1023  tempVector(1) = ((_lastV-_rawImage->height/2)/(_rawImage->height/2));//Y= -(V-height/2) / height
    +
    1024  }
    +
    1025 
    +
    1026  tempVector(2) = 0;
    +
    1027  tempVector(3) = 0;
    +
    1028  tempVector(4) = _attentionOutput;
    +
    1029 
    +
    1030  //set the envelope for the output port
    +
    1031  _outputAttentionPort.setEnvelope(_yarpTimestamp);
    +
    1032  _outputAttentionPort.write();
    +
    1033 
    +
    1034  //************************************
    +
    1035  //Write the elaborated image to a file
    +
    1036  //************************************
    +
    1037  //I should use the output video port, instead.
    +
    1038  //write image to file, openCV.
    +
    1039  if(_saveImagesWithOpencv)
    +
    1040  {
    +
    1041  if(_frameCounter<1000) out << 0;
    +
    1042  if(_frameCounter<100) out << 0;
    +
    1043  if(_frameCounter<10) out << 0;
    +
    1044  out << _frameCounter;
    +
    1045  outputFileName=_saveImagesWithOpencvDir+out.str()+".jpeg";
    +
    1046  toCvMat(*_yarpImage).copyTo(cv::cvarrToMat(_rawImage));
    +
    1047  imwrite(outputFileName, cv::cvarrToMat(_rawImage));
    +
    1048  }
    +
    1049 
    +
    1050  //write the elaborated image on the output port.
    +
    1051  cv::Mat tmpMat=toCvMat(*_yarpImage);
    +
    1052  cvtColor(tmpMat,tmpMat,CV_BGR2RGB);
    +
    1053  _outputVideoPort.prepare() = fromCvMat<PixelRgb>(tmpMat);
    +
    1054 
    +
    1055  //set the envelope for the output port
    +
    1056  _outputVideoPort.setEnvelope(_yarpTimestamp);
    +
    1057  _outputVideoPort.write();
    +
    1058 
    +
    1059  _frameCounter++;
    +
    1060 
    +
    1061  //*******************
    +
    1062  //acquire a new image
    +
    1063  //*******************
    +
    1064  _yarpImage = _inputVideoPort.read(); //read one image from the buffer.
    +
    1065  _inputVideoPort.getEnvelope(_yarpTimestamp);
    +
    1066 
    +
    1067  toCvMat(*_yarpImage).copyTo(cv::cvarrToMat(_rawImage));
    +
    1068 
    +
    1069  //*************************************
    +
    1070  //transform the image in the YUV format
    +
    1071  //*************************************
    +
    1072  if(_colorTransfPolicy==0)
    +
    1073  {
    +
    1074  rgbToYuvBinImageLut(_rawImage,_transformedImage,_lut);
    +
    1075  }
    +
    1076  // else do nothing
    +
    1077  }
    +
    1078  //if initialization has not finished, do nothing.
    +
    1079 
    +
    1080  return true; //continue: in this case it means everything is fine.
    +
    1081 }
    +
    1082 
    +
    1083 double PF3DTracker::getPeriod()
    +
    1084 {
    +
    1085  return 0.0; // sync with incoming data
    +
    1086 }
    +
    1087 
    +
    1088 void PF3DTracker::drawSampledLinesPerspectiveYARP(CvMat* model3dPointsMat, float x, float y, float z, ImageOf<PixelRgb> *image,float _perspectiveFx,float _perspectiveFy ,float _perspectiveCx,float _perspectiveCy ,int R, int G, int B, float &meanU, float &meanV)
    +
    1089 {
    +
    1090 
    +
    1091  bool failure;
    +
    1092  //CvMat* uv=cvCreateMat(2,2*nPixels,CV_32FC1);
    +
    1093 
    +
    1094  //create a copy of the 3D original points.
    +
    1095  cvCopy(model3dPointsMat,_drawingMat);
    +
    1096 
    +
    1097  //****************************
    +
    1098  //ROTOTRANSLATE THE 3D POINTS.
    +
    1099  //****************************
    +
    1100  failure=place3dPointsPerspective(_drawingMat,x,y,z);
    +
    1101  //cout<<"rototraslated points:\n";
    +
    1102  //printMatrix(&model3dPointsDuplicate[0][0],2*nPixels,3);
    +
    1103 
    +
    1104  //***********************
    +
    1105  //PROJECT 3D POINTS TO 2D
    +
    1106  //***********************
    +
    1107  failure= perspective_projection(_drawingMat, _perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, _uv)!=0;
    +
    1108  if(failure)
    +
    1109  {
    +
    1110  yWarning("I had troubles projecting the points.");
    +
    1111  }
    +
    1112 
    +
    1113  //DRAW
    +
    1114  int conta,uPosition,vPosition;
    +
    1115  meanU=0;
    +
    1116  meanV=0;
    +
    1117  for(conta=0;conta<nPixels;conta++)
    +
    1118  {
    +
    1119  meanU=meanU+((float*)(_uv->data.ptr + _uv->step*0))[conta];
    +
    1120  meanV=meanV+((float*)(_uv->data.ptr + _uv->step*1))[conta];
    +
    1121 
    +
    1122  vPosition= (int)((float*)(_uv->data.ptr + _uv->step*1))[conta];
    +
    1123  uPosition= (int)((float*)(_uv->data.ptr + _uv->step*0))[conta];
    +
    1124  if((uPosition<_rawImage->width)&&(uPosition>=0)&&(vPosition<_rawImage->height)&&(vPosition>=0))
    +
    1125  {
    +
    1126  image->pixel(uPosition,vPosition)= PixelRgb(B,G,R);
    +
    1127  }
    +
    1128  vPosition= (int)((float*)(_uv->data.ptr + _uv->step*1))[conta+nPixels];
    +
    1129  uPosition= (int)((float*)(_uv->data.ptr + _uv->step*0))[conta+nPixels];
    +
    1130  if((uPosition<_rawImage->width)&&(uPosition>=0)&&(vPosition<_rawImage->height)&&(vPosition>=0))
    +
    1131  {
    +
    1132  image->pixel(uPosition,vPosition)= PixelRgb(B,G,R);
    +
    1133  }
    +
    1134 
    +
    1135  }
    +
    1136 
    +
    1137  meanU=floor(meanU/nPixels);
    +
    1138  meanV=floor(meanV/nPixels);
    +
    1139  if((meanU<_rawImage->width)&&(meanU>=0)&&(meanV<_rawImage->height)&&(meanV>=0))
    +
    1140  {
    +
    1141  image->pixel((int)meanU,(int)meanV)= PixelRgb(B,G,R);
    +
    1142  }
    +
    1143 
    +
    1144 }
    +
    1145 
    +
    1146 void PF3DTracker::drawContourPerspectiveYARP(CvMat* model3dPointsMat,float x, float y, float z, ImageOf<PixelRgb> *image,float _perspectiveFx,float _perspectiveFy ,float _perspectiveCx,float _perspectiveCy ,int R, int G, int B, float &meanU, float &meanV)
    +
    1147 {
    +
    1148 
    +
    1149  bool failure;
    +
    1150  //CvMat* uv=cvCreateMat(2,2*nPixels,CV_32FC1);
    +
    1151 
    +
    1152  //create a copy of the 3D original points.
    +
    1153  cvCopy(model3dPointsMat,_drawingMat);
    +
    1154 
    +
    1155  //****************************
    +
    1156  //ROTOTRANSLATE THE 3D POINTS.
    +
    1157  //****************************
    +
    1158  failure=place3dPointsPerspective(_drawingMat,x,y,z);
    +
    1159  //cout<<"rototraslated points:\n";
    +
    1160  //printMatrix(&model3dPointsDuplicate[0][0],2*nPixels,3);
    +
    1161 
    +
    1162  //***********************
    +
    1163  //PROJECT 3D POINTS TO 2D
    +
    1164  //***********************
    +
    1165  failure= perspective_projection(_drawingMat, _perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, _uv)!=0;
    +
    1166  if(failure)
    +
    1167  {
    +
    1168  yWarning("I had troubles projecting the points.");
    +
    1169  }
    +
    1170 
    +
    1171  //****
    +
    1172  //Draw
    +
    1173  //****
    +
    1174  int conta,cippa,lippa,uPosition,vPosition;
    +
    1175  meanU=0;
    +
    1176  meanV=0;
    +
    1177  for(conta=0;conta<nPixels;conta++)
    +
    1178  {
    +
    1179  meanV=meanV+((float*)(_uv->data.ptr + _uv->step*1))[conta];
    +
    1180  meanU=meanU+((float*)(_uv->data.ptr + _uv->step*0))[conta];
    +
    1181 
    +
    1182  for(lippa=-2;lippa<3;lippa++)
    +
    1183  for(cippa=-2;cippa<3;cippa++)
    +
    1184  {
    +
    1185  vPosition= (int)(((float*)(_uv->data.ptr + _uv->step*1))[conta])+lippa-1;
    +
    1186  uPosition= (int)(((float*)(_uv->data.ptr + _uv->step*0))[conta])+cippa-1;
    +
    1187 
    +
    1188  if((uPosition<_rawImage->width)&&(uPosition>=0)&&(vPosition<_rawImage->height)&&(vPosition>=0))
    +
    1189  {
    +
    1190  image->pixel(uPosition,vPosition)= PixelRgb(B,G,R);
    +
    1191  }
    +
    1192 
    +
    1193  }
    +
    1194  }
    +
    1195 
    +
    1196  meanU=floor(meanU/nPixels);
    +
    1197  meanV=floor(meanV/nPixels);
    +
    1198  if((meanU<_rawImage->width)&&(meanU>=0)&&(meanV<_rawImage->height)&&(meanV>=0))
    +
    1199  {
    +
    1200  image->pixel((int)meanU,(int)meanV)= PixelRgb(B,G,R);
    +
    1201  }
    +
    1202 
    +
    1203 }
    +
    1204 
    +
    1205 bool PF3DTracker::computeTemplateHistogram(string imageFileName,string dataFileName)
    +
    1206 {
    +
    1207  int u,v,a,b,c;
    +
    1208  float usedPoints=0;
    +
    1209  //float histogram[YBins][UBins][VBins];
    +
    1210  //float* histogram;
    +
    1211  //histogram = new float[YBins*UBins*VBins]
    +
    1212  int dimensions;
    +
    1213  dimensions=3;
    +
    1214  int sizes[3]={YBins,UBins,VBins};
    +
    1215  //create histogram and allocate memory for it.
    +
    1216  CvMatND* histogram=cvCreateMatND(dimensions, sizes, CV_32FC1);
    +
    1217  if(histogram==0)
    +
    1218  {
    +
    1219  yWarning("computeTemplateHistogram: I wasn\'t able to allocate memory for histogram.");
    +
    1220  return true; //if I can't do it, I just quit the program.
    +
    1221  }
    +
    1222  //set content of the matrix to zero.
    +
    1223  cvSetZero(histogram);
    +
    1224  //load the image
    +
    1225  auto rawImage = cv::imread(imageFileName);
    +
    1226  if( ! rawImage.data) //load the image from file.
    +
    1227  {
    +
    1228  yWarning("I wasn't able to open the image file!");
    +
    1229  return true; //if I can't do it, I just quit the program.
    +
    1230  }
    +
    1231  cv::Mat transformedImage(rawImage.rows, rawImage.cols, CV_8UC3);
    +
    1232 
    +
    1233 
    +
    1234  //allocate space for the transformed image
    +
    1235 
    +
    1236  //transform the image in the YUV format
    +
    1237  rgbToYuvBinMatLut(rawImage,transformedImage,_lut);
    +
    1238 
    +
    1239  //count the frequencies of colour bins, build the histogram.
    +
    1240  for(v=0;v<rawImage.rows;v++)
    +
    1241  for(u=0;u<rawImage.cols;u++)
    +
    1242  {
    +
    1243  //discard white pixels [255,255,255].
    +
    1244 
    +
    1245  if(!(
    +
    1246  (((uchar*)(rawImage.data + rawImage.step*v))[u*3+0])==255 && (((uchar*)(rawImage.data + rawImage.step*v))[u*3+1])==255 && (((uchar*)(rawImage.data + rawImage.step*v))[u*3+2])==255)
    +
    1247 
    +
    1248  )
    +
    1249  {
    +
    1250 
    +
    1251  a=(((uchar*)(transformedImage.data + transformedImage.step*v))[u*3+0]);//Y bin
    +
    1252  b=(((uchar*)(transformedImage.data + transformedImage.step*v))[u*3+1]);//U bin
    +
    1253  c=(((uchar*)(transformedImage.data + transformedImage.step*v))[u*3+2]);//V bin
    +
    1254 
    +
    1255  //TEST printf("histogram->size[0].step,%d\n",histogram->dim[0].step); 256
    +
    1256  //TEST printf("histogram->size[1].step,%d\n",histogram->dim[1].step); 32
    +
    1257  //TEST printf("histogram->size[2].step,%d\n",histogram->dim[2].step); 4
    +
    1258  *((float*)(histogram->data.ptr + a*histogram->dim[0].step + b*histogram->dim[1].step + c*histogram->dim[2].step)) +=1;
    +
    1259 
    +
    1260  //initial pointer + Y*UBINS*VBINS*histogram->step + U*VBINS*histogram->step + V*histogram->step. RIGHT?
    +
    1261  //histogram[(yuvBinsImage[u][v][0])*UBins*VBins + (yuvBinsImage[u][v][1])*VBins + (yuvBinsImage[u][v][2]) ]+=1; //increment the correct bin counter.
    +
    1262  usedPoints+=1;
    +
    1263  }
    +
    1264  }
    +
    1265 
    +
    1266  //normalize
    +
    1267  if(usedPoints>0)
    +
    1268  {
    +
    1269  //histogram=histogram/usedPoints
    +
    1270  cvConvertScale( histogram, histogram, 1/usedPoints, 0 );
    +
    1271  }
    +
    1272 
    +
    1273  //write the computed histogram to a file.
    +
    1274  ofstream fout(dataFileName.c_str());//open file
    +
    1275  if(!fout) //confirm file opened
    +
    1276  {
    +
    1277  yWarning("computeTemplateHistogram: unable to open the csv file to store the histogram.");
    +
    1278  return true;
    +
    1279  }
    +
    1280  else
    +
    1281  {
    +
    1282  for(a=0;a<YBins;a++)
    +
    1283  {
    +
    1284  for(b=0;b<UBins;b++)
    +
    1285  {
    +
    1286  for(c=0;c<VBins;c++)
    +
    1287  {
    +
    1288  fout<<*((float*)(histogram->data.ptr + a*histogram->dim[0].step + b*histogram->dim[1].step + c*histogram->dim[2].step))<<endl;
    +
    1289  }
    +
    1290  }
    +
    1291  }
    +
    1292  fout.close();
    +
    1293  }
    +
    1294 
    +
    1295  //clean memory up
    +
    1296  if (histogram != NULL)
    +
    1297  cvReleaseMatND(&histogram);
    +
    1298 
    +
    1299  return false;
    +
    1300 
    +
    1301 }
    +
    1302 
    +
    1303 bool PF3DTracker::readModelHistogram(CvMatND* histogram,const char fileName[])
    +
    1304 {
    +
    1305  int c1,c2,c3;
    +
    1306  char line[15];
    +
    1307 
    +
    1308  ifstream fin(fileName); //open file
    +
    1309  if(!fin) //confirm file opened
    +
    1310  {
    +
    1311  yWarning("unable to open the csv histogram file.");
    +
    1312  return true;
    +
    1313  }
    +
    1314  else
    +
    1315  {
    +
    1316  for(c1=0;c1<YBins;c1++)
    +
    1317  for(c2=0;c2<UBins;c2++)
    +
    1318  for(c3=0;c3<VBins;c3++)
    +
    1319  {
    +
    1320  fin.getline(line, 14);
    +
    1321  *((float*)(histogram->data.ptr + c1*histogram->dim[0].step + c2*histogram->dim[1].step + c3*histogram->dim[2].step))=(float)atof(line);
    +
    1322  }
    +
    1323  return false;
    +
    1324  }
    +
    1325 }
    +
    1326 
    +
    1327 bool PF3DTracker::readInitialmodel3dPoints(CvMat* points, string fileName)
    +
    1328 {
    +
    1329  int c1,c2;
    +
    1330  char line[15];
    +
    1331 
    +
    1332  ifstream fin(fileName.c_str()); //open file
    +
    1333  if(!fin) //confirm file opened
    +
    1334  {
    +
    1335  yWarning("unable to open the the 3D model file.");
    +
    1336  return true;
    +
    1337  }
    +
    1338  else
    +
    1339  {
    +
    1340  for(c1=0;c1<3;c1++)
    +
    1341  for(c2=0;c2<2*nPixels;c2++)
    +
    1342  {
    +
    1343  fin.getline(line, 14);
    +
    1344  ((float*)(points->data.ptr + points->step*c1))[c2]=(float)atof(line);
    +
    1345  }
    +
    1346  return false;
    +
    1347  }
    +
    1348 }
    +
    1349 
    +
    1350 bool PF3DTracker::readMotionModelMatrix(CvMat* points, string fileName)
    +
    1351 {
    +
    1352  int c1,c2;
    +
    1353  char line[15];
    +
    1354 
    +
    1355  ifstream fin(fileName.c_str());//open file
    +
    1356  if(!fin) //confirm file opened
    +
    1357  {
    +
    1358  yWarning("unable to open the motion model file.");
    +
    1359  return true;
    +
    1360  }
    +
    1361  else
    +
    1362  {
    +
    1363  for(c1=0;c1<7;c1++)
    +
    1364  for(c2=0;c2<7;c2++)
    +
    1365  {
    +
    1366  fin.getline(line, 14);
    +
    1367  cvmSet(points,c1,c2,atof(line));
    +
    1368  }
    +
    1369  return false;
    +
    1370  }
    +
    1371 }
    +
    1372 
    +
    1373 bool PF3DTracker::evaluateHypothesisPerspective(CvMat* model3dPointsMat,float x, float y, float z, CvMatND* modelHistogramMat, IplImage* transformedImage, float fx, float fy, float u0, float v0, float inside_outside, float &likelihood)
    +
    1374 {
    +
    1375 
    +
    1376  bool failure;
    +
    1377  float usedOuterPoints, usedInnerPoints;
    +
    1378 
    +
    1379  //create a copy of the 3D original points.
    +
    1380  cvCopy(model3dPointsMat,_drawingMat);
    +
    1381 
    +
    1382  //****************************
    +
    1383  //ROTOTRANSLATE THE 3D POINTS.
    +
    1384  //****************************
    +
    1385  failure=place3dPointsPerspective(_drawingMat,x,y,z);
    +
    1386 
    +
    1387  //***********************
    +
    1388  //PROJECT 3D POINTS TO 2D
    +
    1389  //***********************
    +
    1390  failure= perspective_projection(_drawingMat, _perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, _uv)!=0;
    +
    1391  if(failure)
    +
    1392  {
    +
    1393  yWarning("I had troubles projecting the points.");
    +
    1394  }
    +
    1395 
    +
    1396  computeHistogram(_uv, transformedImage, _innerHistogramMat, usedInnerPoints, _outerHistogramMat, usedOuterPoints);
    +
    1397  //if((usedInnerPoints<nPixels)||(usedOuterPoints<nPixels))
    +
    1398  // likelihood=0;
    +
    1399  //else
    +
    1400  failure=calculateLikelihood(_modelHistogramMat, _innerHistogramMat,_outerHistogramMat, inside_outside,likelihood);
    +
    1401 
    +
    1402  likelihood=exp(20*likelihood); //no need to divide: I'm normalizing later.
    +
    1403 
    +
    1404  //make hypotheses with pixels outside the image less likely.
    +
    1405  likelihood=likelihood*((float)usedInnerPoints/nPixels)*((float)usedInnerPoints/nPixels)*((float)usedOuterPoints/nPixels)*((float)usedOuterPoints/nPixels);
    +
    1406 
    +
    1407  return false;
    +
    1408 }
    +
    1409 
    +
    1410 bool PF3DTracker::evaluateHypothesisPerspectiveFromRgbImage(CvMat* model3dPointsMat,float x, float y, float z, CvMatND* modelHistogramMat, IplImage *image, float fx, float fy, float u0, float v0, float inside_outside, float &likelihood)
    +
    1411 {
    +
    1412 //TODO
    +
    1413 
    +
    1414  bool failure;
    +
    1415  float usedOuterPoints, usedInnerPoints;
    +
    1416 
    +
    1417  //create a copy of the 3D original points.
    +
    1418  cvCopy(model3dPointsMat,_drawingMat);
    +
    1419 
    +
    1420  //****************************
    +
    1421  //ROTOTRANSLATE THE 3D POINTS.
    +
    1422  //****************************
    +
    1423  failure=place3dPointsPerspective(_drawingMat,x,y,z);
    +
    1424 
    +
    1425  //***********************
    +
    1426  //PROJECT 3D POINTS TO 2D
    +
    1427  //***********************
    +
    1428  failure= perspective_projection(_drawingMat, _perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, _uv)!=0;
    +
    1429  if(failure)
    +
    1430  {
    +
    1431  yWarning("I had troubles projecting the points.");
    +
    1432  }
    +
    1433 
    +
    1434  computeHistogramFromRgbImage(_uv, image, _innerHistogramMat, usedInnerPoints, _outerHistogramMat, usedOuterPoints);
    +
    1435  //if((usedInnerPoints<nPixels)||(usedOuterPoints<nPixels))
    +
    1436  // likelihood=0;
    +
    1437  //else
    +
    1438  failure=calculateLikelihood(_modelHistogramMat, _innerHistogramMat, _outerHistogramMat, inside_outside,likelihood);
    +
    1439 
    +
    1440  likelihood=exp(20*likelihood); //no need to divide: I'm normalizing later.
    +
    1441 
    +
    1442  //make hypotheses with pixels outside the image less likely.
    +
    1443  likelihood=likelihood*((float)usedInnerPoints/nPixels)*((float)usedInnerPoints/nPixels)*((float)usedOuterPoints/nPixels)*((float)usedOuterPoints/nPixels);
    +
    1444 
    +
    1445  return false;
    +
    1446 }
    +
    1447 
    +
    1448 bool PF3DTracker::systematic_resampling(CvMat* oldParticlesState, CvMat* oldParticlesWeights, CvMat* newParticlesState, CvMat* cumWeight)
    +
    1449 {
    +
    1450  //function [newParticlesState] = systematic_resampling(oldParticlesWeight, oldParticlesState)
    +
    1451 
    +
    1452  double u; //random number [0,1)
    +
    1453  double sum;
    +
    1454  int c1;
    +
    1455  int rIndex; //index of the randomized array
    +
    1456  int cIndex; //index of the cumulative weight array. cIndex -1 indicates which particle we think of resampling.
    +
    1457  int npIndex; //%new particle index, tells me how many particles have been created so far.
    +
    1458  int numParticlesToGenerate = _nParticles - _numParticlesReceived; //martim
    +
    1459 
    +
    1460  //%N is the number of particles.
    +
    1461  //[lines, N] = size(oldParticlesWeight);
    +
    1462  //in CPP, _nParticles is the number of particles.
    +
    1463 
    +
    1464  //%NORMALIZE THE WEIGHTS, so that sum(oldParticles)=1.
    +
    1465  //oldParticlesWeight = oldParticlesWeight / sum(oldParticlesWeight);
    +
    1466  sum=0;
    +
    1467  for(c1=0;c1<_nParticles;c1++)
    +
    1468  {
    +
    1469  sum+=((float*)(oldParticlesWeights->data.ptr + oldParticlesWeights->step*0))[c1];
    +
    1470  }
    +
    1471  for(c1=0;c1<_nParticles;c1++)
    +
    1472  {
    +
    1473  ((float*)(oldParticlesWeights->data.ptr + oldParticlesWeights->step*0))[c1] = (((float*)(oldParticlesWeights->data.ptr + oldParticlesWeights->step*0))[c1])/(float)sum;
    +
    1474  }
    +
    1475 
    +
    1476  //%GENERATE N RANDOM VALUES
    +
    1477  //u = rand(1)/N; %random value [0,1/N)
    +
    1478  u=1/(double)numParticlesToGenerate*((double)rand()/(double)RAND_MAX); //martim
    +
    1479 
    +
    1480  //%the randomized values are going to be u, u+1/N, u+2/N, etc.
    +
    1481  //%instread of accessing this vector, the elements are computed on the fly:
    +
    1482  //%randomVector(a)= (a-1)/N+u.
    +
    1483 
    +
    1484  //%COMPUTE THE ARRAY OF CUMULATIVE WEIGHTS
    +
    1485  //cumWeight=zeros(1,N+1);
    +
    1486  //cumWeight[0]=0;
    +
    1487  ((float*)(cumWeight->data.ptr))[0]=0;
    +
    1488  for(c1=0;c1<_nParticles;c1++)
    +
    1489  {
    +
    1490  //cumWeight[c1+1]=cumWeight[c1]+oldParticlesWeight[c1];
    +
    1491 
    +
    1492  ((float*)(cumWeight->data.ptr))[c1+1]=((float*)(cumWeight->data.ptr))[c1]+((float*)(oldParticlesWeights->data.ptr + oldParticlesWeights->step*0))[c1];
    +
    1493  //cout<<"cumulative at position "<<c1+1<<" = "<<((float*)(cumWeight->data.ptr))[c1+1]<<endl;
    +
    1494 
    +
    1495  }
    +
    1496  //CHECK IF THERE IS SOME ROUNDING ERROR IN THE END OF THE ARRAY.
    +
    1497  //if(cumWeight[_nParticles]!=1)
    +
    1498  if(((float*)(cumWeight->data.ptr))[_nParticles]!=1)
    +
    1499  {
    +
    1500  //fprintf('rounding error?\n');
    +
    1501  //printf("cumWeight[_nParticles]==%15.10e\n",((float*)(cumWeight->data.ptr))[_nParticles]);
    +
    1502  ((float*)(cumWeight->data.ptr))[_nParticles]=1;
    +
    1503  if( ((float*)(cumWeight->data.ptr))[_nParticles]!=1)
    +
    1504  {
    +
    1505  //printf("still different\n");
    +
    1506  }
    +
    1507  else
    +
    1508  {
    +
    1509  //printf("now it-s ok\n");
    +
    1510  }
    +
    1511  }
    +
    1512 
    +
    1513  //cout<<"cumulative at position "<<_nParticles-1<<" = "<<((float*)(cumWeight->data.ptr))[_nParticles-1]<<endl;
    +
    1514  //cout<<"cumulative at position "<<_nParticles<<" = "<<((float*)(cumWeight->data.ptr))[_nParticles]<<endl;
    +
    1515 
    +
    1516  //%PERFORM THE ACTUAL RESAMPLING
    +
    1517  rIndex=0; //index of the randomized array
    +
    1518  cIndex=1; //index of the cumulative weight array. cIndex -1 indicates which particle we think of resampling.
    +
    1519  npIndex=0; //new particle index, tells me how many particles have been created so far.
    +
    1520 
    +
    1521  while(npIndex < numParticlesToGenerate) //martim
    +
    1522  {
    +
    1523  //siamo sicuri che deve essere >=? ??? !!! WARNING
    +
    1524  if(((float*)(cumWeight->data.ptr))[cIndex]>=(double)rIndex/(double)numParticlesToGenerate+u) //martim
    +
    1525  {
    +
    1526  //%particle cIndex-1 should be copied.
    +
    1527  //printf("replicating particle %d\n",cIndex-1);
    +
    1528  //newParticlesState(npIndex)=oldParticlesState(cIndex-1);
    +
    1529  ((float*)(newParticlesState->data.ptr + newParticlesState->step*0))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*0))[cIndex-1];
    +
    1530  ((float*)(newParticlesState->data.ptr + newParticlesState->step*1))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*1))[cIndex-1];
    +
    1531  ((float*)(newParticlesState->data.ptr + newParticlesState->step*2))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*2))[cIndex-1];
    +
    1532  ((float*)(newParticlesState->data.ptr + newParticlesState->step*3))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*3))[cIndex-1];
    +
    1533  ((float*)(newParticlesState->data.ptr + newParticlesState->step*4))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*4))[cIndex-1];
    +
    1534  ((float*)(newParticlesState->data.ptr + newParticlesState->step*5))[npIndex]=((float*)(oldParticlesState->data.ptr + oldParticlesState->step*5))[cIndex-1];
    +
    1535  ((float*)(newParticlesState->data.ptr + newParticlesState->step*6))[npIndex]=0; //initializing weight
    +
    1536  rIndex=rIndex+1;
    +
    1537  npIndex=npIndex+1;
    +
    1538  }
    +
    1539  else
    +
    1540  {
    +
    1541  //printf("not replicating particle %d\n",cIndex-1);
    +
    1542  cIndex=cIndex+1;
    +
    1543  }
    +
    1544  }
    +
    1545 
    +
    1546  return false;
    +
    1547 }
    +
    1548 
    +
    1549 bool PF3DTracker::systematicR(CvMat* inState, CvMat* weights, CvMat* outState)
    +
    1550 {
    +
    1551  float N=(float)_nParticles;
    +
    1552  float s=1.0F/N;
    +
    1553 
    +
    1554  cvZero(_nChildren);
    +
    1555 
    +
    1556  cvCopy(_ramp,_label); //label should be like: 1,2,3,4,5,6...
    +
    1557 
    +
    1558  float auxw=0;
    +
    1559  int li=0; //label of the current point
    +
    1560 
    +
    1561  //initialization
    +
    1562  float T;
    +
    1563  T=s*((float)rand()/(float)RAND_MAX); //random number between 0 and s.
    +
    1564 
    +
    1565  int j=1;
    +
    1566  float Q=0;
    +
    1567  int i=0;
    +
    1568 
    +
    1569  cvRandArr( &rngState, _u, CV_RAND_UNI, cvScalar(0), cvScalar(1));
    +
    1570 
    +
    1571  while((T<1) && (i<_nParticles)) //the second part of the condition is a hack:
    +
    1572  // the loop sometimes doesn't stop without it.
    +
    1573  {
    +
    1574  if((Q>T) && (i<_nParticles))//the second part of the condition is a hack:
    +
    1575  // the loop sometimes doesn't stop without it.
    +
    1576  {
    +
    1577  T=T+s;
    +
    1578 
    +
    1579  ((float*)(_nChildren->data.ptr))[li-1]+=1;
    +
    1580  }
    +
    1581  else //the first time it passes by here.
    +
    1582  {
    +
    1583  i=(int)(floor((N-j+1)*(((float*)(_u->data.ptr))[j-1]))+j); //De Freitas uses "fix" in matlab... I guess floor should do, in this case. MAYBE NOT?
    +
    1584 
    +
    1585  auxw=((float*)(weights->data.ptr))[i-1];
    +
    1586 
    +
    1587  li=(int)((float*)(_label->data.ptr))[i-1]; //C'E' QUALCOSA CHE NON VA QUI.
    +
    1588  Q=Q+auxw;
    +
    1589 
    +
    1590  ((float*)(weights->data.ptr))[i-1]=((float*)(weights->data.ptr))[j-1];
    +
    1591  ((float*)(_label->data.ptr))[i-1] = ((float*)(_label->data.ptr))[j-1];
    +
    1592  j=j+1;
    +
    1593  }
    +
    1594  }
    +
    1595 
    +
    1596  //COPY STUFF. I SHOULD COPY THE STATE OF THE PARTICLES, HERE.
    +
    1597  int index=1;
    +
    1598  for(i=0;i<N;i++)
    +
    1599  {
    +
    1600  if(((float*)(_nChildren->data.ptr))[i]>0)
    +
    1601  {
    +
    1602  for(j=index;(j<index+((float*)(_nChildren->data.ptr))[i])&&(j<_nParticles+1);j++) //WARNING: ??? !!! I MIGHT WELL HAVE MESSED SOMETHING UP HERE.
    +
    1603  {
    +
    1604  ((float*)(outState->data.ptr + outState->step*0))[j-1]=((float*)(inState->data.ptr + inState->step*0))[i];
    +
    1605  ((float*)(outState->data.ptr + outState->step*1))[j-1]=((float*)(inState->data.ptr + inState->step*1))[i];
    +
    1606  ((float*)(outState->data.ptr + outState->step*2))[j-1]=((float*)(inState->data.ptr + inState->step*2))[i];
    +
    1607  ((float*)(outState->data.ptr + outState->step*3))[j-1]=((float*)(inState->data.ptr + inState->step*3))[i];
    +
    1608  ((float*)(outState->data.ptr + outState->step*4))[j-1]=((float*)(inState->data.ptr + inState->step*4))[i];
    +
    1609  ((float*)(outState->data.ptr + outState->step*5))[j-1]=((float*)(inState->data.ptr + inState->step*5))[i];
    +
    1610  }
    +
    1611  }
    +
    1612  index=index+(int)((float*)(_nChildren->data.ptr))[i];
    +
    1613  }
    +
    1614 
    +
    1615  return false;
    +
    1616 }
    +
    1617 
    +
    1618 bool PF3DTracker::place3dPointsPerspective(CvMat* points, float x, float y, float z)
    +
    1619 {
    +
    1620  //*********************
    +
    1621  // 0. Prepare some data
    +
    1622  //*********************
    +
    1623  float floorDistance=sqrt(x*x+y*y); //horizontal distance from the optical center to the ball
    +
    1624  float distance=sqrt(x*x+y*y+z*z); //distance from the optical center to the ball
    +
    1625 
    +
    1626  float cosAlpha=floorDistance/distance; //cosine of an angle needed for a rotation
    +
    1627  float sinAlpha=-z/distance; //sine of an angle needed for a rotation
    +
    1628  float cosBeta=x/floorDistance; //cosine of an angle needed for a rotation
    +
    1629  float sinBeta=y/floorDistance; //sine of an angle needed for a rotation
    +
    1630 
    +
    1631  //Rotation matrix Rz: [3 x 3]
    +
    1632  ((float*)(_rzMat->data.ptr + _rzMat->step*0))[0]= cosBeta;
    +
    1633  ((float*)(_rzMat->data.ptr + _rzMat->step*0))[1]= -sinBeta;
    +
    1634  ((float*)(_rzMat->data.ptr + _rzMat->step*0))[2]= 0;
    +
    1635  ((float*)(_rzMat->data.ptr + _rzMat->step*1))[0]= sinBeta;
    +
    1636  ((float*)(_rzMat->data.ptr + _rzMat->step*1))[1]= cosBeta;
    +
    1637  ((float*)(_rzMat->data.ptr + _rzMat->step*1))[2]= 0;
    +
    1638  ((float*)(_rzMat->data.ptr + _rzMat->step*2))[0]= 0;
    +
    1639  ((float*)(_rzMat->data.ptr + _rzMat->step*2))[1]= 0;
    +
    1640  ((float*)(_rzMat->data.ptr + _rzMat->step*2))[2]= 1;
    +
    1641 
    +
    1642  //Rotation matrix Ry: [3 x 3]
    +
    1643  ((float*)(_ryMat->data.ptr + _ryMat->step*0))[0]= cosAlpha;
    +
    1644  ((float*)(_ryMat->data.ptr + _ryMat->step*0))[1]= 0;
    +
    1645  ((float*)(_ryMat->data.ptr + _ryMat->step*0))[2]= sinAlpha;
    +
    1646  ((float*)(_ryMat->data.ptr + _ryMat->step*1))[0]= 0;
    +
    1647  ((float*)(_ryMat->data.ptr + _ryMat->step*1))[1]= 1;
    +
    1648  ((float*)(_ryMat->data.ptr + _ryMat->step*1))[2]= 0;
    +
    1649  ((float*)(_ryMat->data.ptr + _ryMat->step*2))[0]= -sinAlpha;
    +
    1650  ((float*)(_ryMat->data.ptr + _ryMat->step*2))[1]= 0;
    +
    1651  ((float*)(_ryMat->data.ptr + _ryMat->step*2))[2]= cosAlpha;
    +
    1652 
    +
    1653  //***********************************
    +
    1654  // 1. Rotate points around the Y axis
    +
    1655  //***********************************
    +
    1656  //Multiply Ry by points
    +
    1657  //_points2Mat=_ryMat*points [3 x 2*nPixels]
    +
    1658  cvMatMul(_ryMat,points,_points2Mat);
    +
    1659 
    +
    1660  //*****************************************
    +
    1661  // 2. Apply a vertical and horizontal shift
    +
    1662  //*****************************************
    +
    1663  //sum floorDistance to all the elements in the first row of "points2".
    +
    1664  cvSet(_tempMat1,cvScalar(floorDistance)); //set all elements of _tempMat1 to the value of "floorDistance"
    +
    1665  cvAdd(_p2Mat1,_tempMat1,_p2Mat1); //_p2Mat1=_p2Mat1+_tempMat1.
    +
    1666 
    +
    1667  //sum z to the third row of "points2".
    +
    1668  cvSet(_tempMat3,cvScalar(z)); //set all elements of _tempMat3 to the value of "z"
    +
    1669  cvAdd(_p2Mat3,_tempMat3,_p2Mat3); //_p2Mat3=_p2Mat3+_tempMat3.
    +
    1670 
    +
    1671  //**********************************
    +
    1672  //3. Rotate points around the Z axis
    +
    1673  //**********************************
    +
    1674  //Multiply RZ by "points2", put the result in "points"
    +
    1675  //points=_rzMat*_points2Mat [3 x 2*nPixels]
    +
    1676  cvMatMul(_rzMat,_points2Mat,points);
    +
    1677 
    +
    1678  return false;
    +
    1679 }
    +
    1680 
    +
    1681 
    +
    1682 int PF3DTracker::perspective_projection(CvMat* xyz, float fx, float fy, float cx, float cy, CvMat* uv)
    +
    1683 {
    +
    1684  //fill the projection matrix with the current values.
    +
    1685  ((float*)(_projectionMat->data.ptr + _projectionMat->step*0))[0]= fx;
    +
    1686  ((float*)(_projectionMat->data.ptr + _projectionMat->step*0))[1]= 0;
    +
    1687  ((float*)(_projectionMat->data.ptr + _projectionMat->step*0))[2]= cx;
    +
    1688  ((float*)(_projectionMat->data.ptr + _projectionMat->step*1))[0]= 0;
    +
    1689  ((float*)(_projectionMat->data.ptr + _projectionMat->step*1))[1]= fy;
    +
    1690  ((float*)(_projectionMat->data.ptr + _projectionMat->step*1))[2]= cy;
    +
    1691 
    +
    1692 // int a,b;
    +
    1693 // for(a=0;a<2;a++)
    +
    1694 // {
    +
    1695 // cout<<"LINE ";
    +
    1696 // for(b=0;b<3;b++)
    +
    1697 // {
    +
    1698 // cout<<((float*)(_projectionMat->data.ptr + _projectionMat->step*a))[b]<<",";
    +
    1699 // }
    +
    1700 // cout<<"\n";
    +
    1701 // }
    +
    1702 // cout<<"\n";
    +
    1703 
    +
    1704 // for(a=0;a<3;a++)
    +
    1705 // {
    +
    1706 // cout<<"LINE ";
    +
    1707 // for(b=0;b<2*nPixels;b++)
    +
    1708 // {
    +
    1709 // cout<<((float*)(xyz->data.ptr + xyz->step*a))[b]<<",";
    +
    1710 // }
    +
    1711 // cout<<"\n";
    +
    1712 // }
    +
    1713 // cout<<"\n";
    +
    1714 
    +
    1715  //#####################################################
    +
    1716  //For every column of XYZ, divide each element by Z(i).
    +
    1717  //#####################################################
    +
    1718  //setup
    +
    1719 
    +
    1720  cvInitMatHeader( _xyzMat1, 1, 2*nPixels, CV_32FC1, xyz->data.ptr );
    +
    1721  cvInitMatHeader( _xyzMat2, 1, 2*nPixels, CV_32FC1, xyz->data.ptr + xyz->step*1);
    +
    1722  cvInitMatHeader( _xyzMat3, 1, 2*nPixels, CV_32FC1, xyz->data.ptr + xyz->step*2);
    +
    1723 
    +
    1724  //divide X (the first line of xyz) by Z (the third line of xyz).
    +
    1725  cvDiv( _xyzMat1, _xyzMat3, _xyzMat1, 1 );
    +
    1726 
    +
    1727 // for(a=0;a<3;a++)
    +
    1728 // {
    +
    1729 // cout<<"LINE ";
    +
    1730 // for(b=0;b<2*nPixels;b++)
    +
    1731 // {
    +
    1732 // cout<<((float*)(xyz->data.ptr + xyz->step*a))[b]<<",";
    +
    1733 // }
    +
    1734 // cout<<"\n";
    +
    1735 // }
    +
    1736 // cout<<"\n";
    +
    1737 
    +
    1738  //divide Y (the second line of xyz) by Z (the third line of xyz).
    +
    1739  cvDiv( _xyzMat2, _xyzMat3, _xyzMat2, 1 );
    +
    1740 
    +
    1741 // for(a=0;a<3;a++)
    +
    1742 // {
    +
    1743 // cout<<"LINE ";
    +
    1744 // for(b=0;b<2*nPixels;b++)
    +
    1745 // {
    +
    1746 // cout<<((float*)(xyz->data.ptr + xyz->step*a))[b]<<",";
    +
    1747 // }
    +
    1748 // cout<<"\n";
    +
    1749 // }
    +
    1750 // cout<<"\n";
    +
    1751 
    +
    1752  //set all elements of Z to 1.
    +
    1753  cvSet(_xyzMat3,(cvScalar(1)));
    +
    1754 
    +
    1755 // for(a=0;a<3;a++)
    +
    1756 // {
    +
    1757 // cout<<"LINE ";
    +
    1758 // for(b=0;b<2*nPixels;b++)
    +
    1759 // {
    +
    1760 // cout<<((float*)(xyz->data.ptr + xyz->step*a))[b]<<",";
    +
    1761 // }
    +
    1762 // cout<<"\n";
    +
    1763 // }
    +
    1764 // cout<<"\n";
    +
    1765 
    +
    1766  //#########################
    +
    1767  //UV=projectionMat*(XYZ/Z).
    +
    1768  //#########################
    +
    1769  cvMatMul(_projectionMat,xyz,uv);
    +
    1770 
    +
    1771 /* for(a=0;a<2;a++)
    +
    1772  {
    +
    1773  cout<<"LINE ";
    +
    1774  for(b=0;b<2*nPixels;b++)
    +
    1775  {
    +
    1776  cout<<((float*)(_uv->data.ptr + _uv->step*a))[b]<<",";
    +
    1777  }
    +
    1778  cout<<"\n";
    +
    1779  }
    +
    1780  cout<<"\n";*/
    +
    1781  return 0;
    +
    1782 
    +
    1783 }
    +
    1784 
    +
    1785 bool PF3DTracker::computeHistogram(CvMat* uv, IplImage* transformedImage, CvMatND* innerHistogramMat, float &usedInnerPoints, CvMatND* outerHistogramMat, float &usedOuterPoints)
    +
    1786 {
    +
    1787  int count;
    +
    1788  int u, v, a, b, c;
    +
    1789 
    +
    1790  usedInnerPoints=0;
    +
    1791  cvSetZero(innerHistogramMat);
    +
    1792 
    +
    1793  for(count=0;count<nPixels;count++)
    +
    1794  {
    +
    1795  u=(int)((float*)(uv->data.ptr + uv->step*0))[count]; //truncating ??? !!! warning
    +
    1796  v=(int)((float*)(uv->data.ptr + uv->step*1))[count]; //truncating ??? !!! warning
    +
    1797  if((v<transformedImage->height)&&(v>=0)&&(u<transformedImage->width)&&(u>=0))
    +
    1798  {
    +
    1799  a=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+0]);//Y bin
    +
    1800  b=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+1]);//U bin
    +
    1801  c=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+2]);//V bin
    +
    1802  *((float*)(innerHistogramMat->data.ptr + a*innerHistogramMat->dim[0].step + b*innerHistogramMat->dim[1].step + c*innerHistogramMat->dim[2].step)) +=1;
    +
    1803  usedInnerPoints+=1;
    +
    1804  }
    +
    1805  }
    +
    1806 
    +
    1807  if(usedInnerPoints>0)
    +
    1808  {
    +
    1809  cvConvertScale(innerHistogramMat, innerHistogramMat, 1/usedInnerPoints, 0 );
    +
    1810  }
    +
    1811 
    +
    1812  usedOuterPoints=0;
    +
    1813  cvSetZero(outerHistogramMat);
    +
    1814  for(count=nPixels;count<2*nPixels;count++)
    +
    1815  {
    +
    1816  u=(int)((float*)(uv->data.ptr + uv->step*0))[count]; //truncating ??? !!! warning
    +
    1817  v=(int)((float*)(uv->data.ptr + uv->step*1))[count]; //truncating ??? !!! warning
    +
    1818  if((v<transformedImage->height)&&(v>=0)&&(u<transformedImage->width)&&(u>=0))
    +
    1819  {
    +
    1820  a=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+0]);//Y bin
    +
    1821  b=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+1]);//U bin
    +
    1822  c=(((uchar*)(transformedImage->imageData + transformedImage->widthStep*v))[u*3+2]);//V bin
    +
    1823  *((float*)(outerHistogramMat->data.ptr + a*outerHistogramMat->dim[0].step + b*outerHistogramMat->dim[1].step + c*outerHistogramMat->dim[2].step)) +=1;
    +
    1824  usedOuterPoints+=1;
    +
    1825  }
    +
    1826  }
    +
    1827  if(usedOuterPoints>0)
    +
    1828  {
    +
    1829  cvConvertScale(outerHistogramMat, outerHistogramMat, 1/usedOuterPoints, 0 );
    +
    1830  }
    +
    1831 
    +
    1832  return false;
    +
    1833 }
    +
    1834 
    +
    1835 bool PF3DTracker::computeHistogramFromRgbImage(CvMat* uv, IplImage *image, CvMatND* innerHistogramMat, float &usedInnerPoints, CvMatND* outerHistogramMat, float &usedOuterPoints)
    +
    1836 {
    +
    1837  int count;
    +
    1838  int u,v;
    +
    1839  int r,g,b;
    +
    1840  int index;
    +
    1841 
    +
    1843  //INNER/
    +
    1845  usedInnerPoints=0;
    +
    1846  cvZero(innerHistogramMat);
    +
    1847  for(count=0;count<nPixels;count++)
    +
    1848  {
    +
    1849  u=(int)((float*)(uv->data.ptr + uv->step*0))[count]; //truncating ??? !!! warning
    +
    1850  v=(int)((float*)(uv->data.ptr + uv->step*1))[count]; //truncating ??? !!! warning
    +
    1851  if((v<image->height)&&(v>=0)&&(u<image->width)&&(u>=0))
    +
    1852  {
    +
    1853  //transform the color from RGB to HSI bin.
    +
    1854  r=(((uchar*)(image->imageData + image->widthStep*v))[u*3+0]);
    +
    1855  g=(((uchar*)(image->imageData + image->widthStep*v))[u*3+1]);
    +
    1856  b=(((uchar*)(image->imageData + image->widthStep*v))[u*3+2]);
    +
    1857  index=r*65536+g*256+b;
    +
    1858  //increase the bin counter
    +
    1859  *((float*)(innerHistogramMat->data.ptr + _lut[index].y*innerHistogramMat->dim[0].step + _lut[index].u*innerHistogramMat->dim[1].step + _lut[index].v*innerHistogramMat->dim[2].step)) +=1;
    +
    1860  usedInnerPoints+=1;
    +
    1861  }
    +
    1862  }
    +
    1863 
    +
    1864  //cout<<"inner points="<<usedInnerPoints<<endl;
    +
    1865  if(usedInnerPoints>0)
    +
    1866  {
    +
    1867  cvConvertScale( innerHistogramMat, innerHistogramMat, 1/usedInnerPoints, 0 );
    +
    1868  }
    +
    1869 
    +
    1871  //OUTER/
    +
    1873  usedOuterPoints=0;
    +
    1874  cvZero(outerHistogramMat);
    +
    1875  for(count=nPixels;count<2*nPixels;count++)
    +
    1876  {
    +
    1877  u=(int)((float*)(uv->data.ptr + uv->step*0))[count]; //truncating ??? !!! warning
    +
    1878  v=(int)((float*)(uv->data.ptr + uv->step*1))[count]; //truncating ??? !!! warning
    +
    1879  if((v<image->height)&&(v>=0)&&(u<image->width)&&(u>=0))
    +
    1880  {
    +
    1881  //transform the color from RGB to HSI bin.
    +
    1882  r=(((uchar*)(image->imageData + image->widthStep*v))[u*3+0]);
    +
    1883  g=(((uchar*)(image->imageData + image->widthStep*v))[u*3+1]);
    +
    1884  b=(((uchar*)(image->imageData + image->widthStep*v))[u*3+2]);
    +
    1885  index=r*65536+g*256+b;
    +
    1886  //increase the bin counter
    +
    1887  *((float*)(outerHistogramMat->data.ptr + _lut[index].y*outerHistogramMat->dim[0].step + _lut[index].u*outerHistogramMat->dim[1].step + _lut[index].v*outerHistogramMat->dim[2].step)) +=1;
    +
    1888  usedOuterPoints+=1;
    +
    1889  }
    +
    1890  }
    +
    1891  if(usedOuterPoints>0)
    +
    1892  {
    +
    1893  cvConvertScale( outerHistogramMat, outerHistogramMat, 1/usedOuterPoints, 0 );
    +
    1894  }
    +
    1895 
    +
    1896  return false;
    +
    1897 }
    +
    1898 
    +
    1899 bool PF3DTracker::calculateLikelihood(CvMatND* templateHistogramMat, CvMatND* innerHistogramMat, CvMatND* outerHistogramMat, float inside_outside, float &likelihood)
    +
    1900 {
    +
    1901  likelihood=0;
    +
    1902  int a,b,c;
    +
    1903  for(a=0;a<YBins;a++)
    +
    1904  for(b=0;b<UBins;b++)
    +
    1905  for(c=0;c<VBins;c++)
    +
    1906  {
    +
    1907  likelihood=likelihood + sqrt(
    +
    1908  *((float*)(innerHistogramMat->data.ptr + a*innerHistogramMat->dim[0].step + b*innerHistogramMat->dim[1].step + c*innerHistogramMat->dim[2].step)) *
    +
    1909  *((float*)(templateHistogramMat->data.ptr + a*templateHistogramMat->dim[0].step + b*templateHistogramMat->dim[1].step + c*templateHistogramMat->dim[2].step)))
    +
    1910  - _inside_outside_difference_weight*sqrt(
    +
    1911  *((float*)(outerHistogramMat->data.ptr + a*outerHistogramMat->dim[0].step + b*outerHistogramMat->dim[1].step + c*outerHistogramMat->dim[2].step)) *
    +
    1912  *((float*)(innerHistogramMat->data.ptr + a*innerHistogramMat->dim[0].step + b*innerHistogramMat->dim[1].step + c*innerHistogramMat->dim[2].step)));
    +
    1913 
    +
    1914  }
    +
    1915  likelihood=(likelihood+_inside_outside_difference_weight)/(1+_inside_outside_difference_weight);
    +
    1916  if(likelihood<0)
    +
    1917  yWarning("LIKELIHOOD<0!!!");
    +
    1918  return false;
    +
    1919 }
    +
    1920 
    +
    1921 bool PF3DTracker::testOpenCv()
    +
    1922 {
    +
    1923  int type;
    +
    1924  bool failure;
    +
    1925  type=CV_32FC1; //32 bits, signed, one channel.
    +
    1926  CvMat* points;
    +
    1927 
    +
    1928  points = cvCreateMat( 3, 2*nPixels, type );
    +
    1929  readInitialmodel3dPoints(points, "models/initial_ball_points_46mm_30percent.csv");
    +
    1930 
    +
    1931  failure = place3dPointsPerspective(points,100,200,1000); //Funziona...
    +
    1932 
    +
    1933  failure = perspective_projection(points, _perspectiveFx, _perspectiveFy, _perspectiveCx, _perspectiveCy, _uv)!=0;
    +
    1934 
    +
    1935  return true;
    +
    1936 
    +
    1937 }
    +
    1938 
    +
    1939 void printMat(CvMat* A)
    +
    1940 {
    +
    1941  int a,b;
    +
    1942  for(a=0;a<A->rows;a++)
    +
    1943  {
    +
    1944  for(b=0;b<A->cols;b++)
    +
    1945  {
    +
    1946  cout<<((float*)(A->data.ptr + A->step*a))[b]<<",";
    +
    1947  }
    +
    1948  cout<<"\n";
    +
    1949  }
    +
    1950 }
    +
    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released un...
    +
    + + + + diff --git a/doxygen/doc/html/pf3dTracker_8hpp_source.html b/doxygen/doc/html/pf3dTracker_8hpp_source.html new file mode 100644 index 0000000..080f52f --- /dev/null +++ b/doxygen/doc/html/pf3dTracker_8hpp_source.html @@ -0,0 +1,293 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/include/iCub/pf3dTracker.hpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    pf3dTracker.hpp
    +
    +
    +
    1 
    +
    7 //good combinations:
    +
    8 // _nParticles | stDev | inside_outside | nPixels
    +
    9 // 800 100 1.5 50
    +
    10 //with 800 particles and 30fps the 100% of the processor of CORTEX1 is used.
    +
    11 //could try to halve the number of pixels used for the circles.
    +
    12 
    +
    13 #ifndef _PF3DTRACKER_
    +
    14 #define _PF3DTRACKER_
    +
    15 
    +
    16 #include <iostream>
    +
    17 #include <sstream>
    +
    18 #include <string>
    +
    19 
    +
    20 #include <yarp/os/BufferedPort.h>
    +
    21 #include <yarp/os/LogStream.h>
    +
    22 #include <yarp/os/Network.h>
    +
    23 #include <yarp/os/RFModule.h>
    +
    24 #include <yarp/os/Stamp.h>
    +
    25 #include <yarp/os/Time.h>
    +
    26 #include <yarp/sig/Image.h>
    +
    27 #include <yarp/sig/ImageDraw.h>
    +
    28 #include <yarp/sig/ImageFile.h>
    +
    29 #include <yarp/sig/Vector.h>
    +
    30 
    +
    31 
    +
    32 #ifdef _CH_
    +
    33 #pragma package <opencv>
    +
    34 #endif
    +
    35 #ifndef _EiC
    +
    36 #include <opencv2/opencv.hpp>
    +
    37 #include <opencv2/highgui/highgui.hpp>
    +
    38 #include <opencv2/core/types_c.h>
    +
    39 #endif
    +
    40 
    +
    41 #include <iCub/pf3dTrackerSupport.hpp>
    +
    42 
    +
    43 //for tracking in the iCub: 1000 particles and an stDev of 80 work well with slow movements of the ball. the localization is quite stable. the shape model has a 20% difference wrt the real radius.
    +
    44 //#define _nParticles 5000
    +
    45 //#define stDev 100 80
    +
    46 //150 for the demo.
    +
    47 //#define stDev 150
    +
    48 
    +
    49 //#define NEWPOLICY 0
    +
    50 //1: only transform the color of the pixels that you need
    +
    51 //0: transform the whole image.
    +
    52 
    +
    53 #define nPixels 50
    +
    54 
    +
    55 #define YBins 4
    +
    56 #define UBins 8
    +
    57 #define VBins 8
    +
    58 
    +
    59 //should be 1.5 or 1.0 !!! ???
    +
    60 //#define inside_outside_difference_weight 1.5
    +
    61 //if I set it to 1.5, when the ball goes towards the camera, the tracker lags behind.
    +
    62 //this happens because the particles with "ball color" on both sides of the contour
    +
    63 //are still quite likely. the opposite is not true: when the ball goes away from the
    +
    64 // camera, the tracker follows it quite readily.
    +
    65 
    +
    66 class PF3DTracker : public yarp::os::RFModule
    +
    67 {
    +
    68 
    +
    69 private:
    +
    70 
    +
    71 int _numParticlesReceived;
    +
    72 
    +
    73 //parameters set during initialization.
    +
    74 std::string _inputVideoPortName;
    +
    75 yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb> > _inputVideoPort;
    +
    76 std::string _outputVideoPortName;
    +
    77 yarp::os::BufferedPort<yarp::sig::ImageOf<yarp::sig::PixelRgb> > _outputVideoPort;
    +
    78 std::string _outputDataPortName;
    +
    79 yarp::os::BufferedPort<yarp::os::Bottle> _outputDataPort;
    +
    80 std::string _inputParticlePortName;
    +
    81 yarp::os::BufferedPort<yarp::os::Bottle> _inputParticlePort;
    +
    82 std::string _outputParticlePortName;
    +
    83 yarp::os::BufferedPort<yarp::os::Bottle> _outputParticlePort;
    +
    84 std::string _outputAttentionPortName;
    +
    85 yarp::os::BufferedPort<yarp::sig::Vector> _outputAttentionPort;
    +
    86 std::string _outputUVDataPortName;
    +
    87 yarp::os::BufferedPort<yarp::os::Bottle> _outputUVDataPort;
    +
    88 bool supplyUVdata;
    +
    89 
    +
    90 std::string _projectionModel;
    +
    91 float _perspectiveFx;
    +
    92 float _perspectiveFy;
    +
    93 float _perspectiveCx;
    +
    94 float _perspectiveCy;
    +
    95 int _calibrationImageWidth;
    +
    96 int _calibrationImageHeight;
    +
    97 float _likelihoodThreshold;
    +
    98 
    +
    99 int _seeingObject; //0 means false, 1 means true.
    +
    100 int _circleVisualizationMode;
    +
    101 std::string _initializationMethod;
    +
    102 std::string _trackedObjectType;
    +
    103 bool _saveImagesWithOpencv;
    +
    104 std::string _saveImagesWithOpencvDir;
    +
    105 double _initialX;
    +
    106 double _initialY;
    +
    107 double _initialZ;
    +
    108 double _attentionOutput;
    +
    109 double _attentionOutputMax;
    +
    110 double _attentionOutputDecrease;
    +
    111 CvRNG rngState; //something needed by the random number generator
    +
    112 bool _doneInitializing;
    +
    113 
    +
    114 Lut* _lut;
    +
    115 CvMat* _A;
    +
    116 int _nParticles;
    +
    117 float _accelStDev;
    +
    118 float _inside_outside_difference_weight;
    +
    119 int _colorTransfPolicy;
    +
    120 
    +
    121 //float _modelHistogram[YBins][UBins][VBins]; //data
    +
    122 CvMatND* _modelHistogramMat; //OpenCV Matrix
    +
    123 CvMatND* _innerHistogramMat;//[YBins][UBins][VBins];
    +
    124 CvMatND* _outerHistogramMat;//[YBins][UBins][VBins];
    +
    125 
    +
    126 CvMat* _model3dPointsMat; //shape model
    +
    127 CvMat* _visualization3dPointsMat; //visualization model for the sphere (when _circleVisualizationMode==1). should have less points, but it was easier to make it like this.
    +
    128 
    +
    129 //not sure which of these are really used.
    +
    130 CvMat* _rzMat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    131 CvMat* _ryMat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    132 CvMat* _points2Mat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    133 CvMat* _p2Mat1; //pointer to the first row of _points2Mat
    +
    134 CvMat* _p2Mat3; //pointer to the third row of _points2Mat
    +
    135 CvMat* _tempMat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    136 CvMat* _tempMat1; //pointer to the first row of _tempMat
    +
    137 CvMat* _tempMat2; //pointer to the first row of _tempMat
    +
    138 CvMat* _tempMat3; //pointer to the first row of _tempMat
    +
    139 CvMat* _drawingMat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    140 CvMat* _projectionMat; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    141 CvMat* _xyzMat1; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    142 CvMat* _xyzMat2; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    143 CvMat* _xyzMat3; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    144 CvMat* _particles1; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    145 CvMat* _particles2; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    146 CvMat* _particles3; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    147 CvMat* _particles4; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    148 CvMat* _particles5; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    149 CvMat* _particles6; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    150 CvMat* _particles7; //this is used during some operations... it is defined here to avoid repeated instantiations
    +
    151 CvMat* _particles1to6;
    +
    152 CvMat* _newParticles1to6;
    +
    153 CvMat* _uv;
    +
    154 
    +
    155 //resampling-related stuff
    +
    156 CvMat* _nChildren;
    +
    157 CvMat* _label;
    +
    158 CvMat* _u;
    +
    159 CvMat* _ramp;
    +
    160 
    +
    161 //new resampling-related stuff
    +
    162 CvMat* _cumWeight;
    +
    163 
    +
    164 //variables
    +
    165 CvMat* _particles;
    +
    166 CvMat* _newParticles;
    +
    167 CvMat* _noise;
    +
    168 CvMat* _noise1; //lines from 0 to 2
    +
    169 CvMat* _noise2; //lines from 3 to 5
    +
    170 
    +
    171 yarp::os::Stamp _yarpTimestamp;
    +
    172 yarp::sig::ImageOf<yarp::sig::PixelRgb> *_yarpImage;
    +
    173 IplImage *_rawImage;
    +
    174 IplImage* _transformedImage;//_yuvBinsImage[image_width][image_height][3];
    +
    175 double _initialTime;
    +
    176 double _finalTime;
    +
    177 
    +
    178 int _frameCounter;
    +
    179 int _framesNotTracking; //number of frames for which the likelihood has been under the threshold. after 20 such frames the tracker is restarted.
    +
    180 int downsampler;
    +
    181 float _lastU;
    +
    182 float _lastV;
    +
    183 bool _firstFrame; //when processing the first frame do not write the fps values, as it's wrong.
    +
    184 
    +
    186 //MEMBERS THAT "WORK":/
    +
    188 bool testOpenCv();
    +
    189 bool readModelHistogram(CvMatND* histogram,const char fileName[]);
    +
    190 bool readInitialmodel3dPoints(CvMat* points,std::string fileName);
    +
    191 bool readMotionModelMatrix(CvMat* points, std::string fileName);
    +
    192 bool computeTemplateHistogram(std::string imageFileName,std::string dataFileName); //I checked the output, it seems to work, but it seems as if in the old version the normalization didn't take effect.
    +
    193 bool computeHistogram(CvMat* uv, IplImage* transformedImage, CvMatND* innerHistogramMat, float &usedInnerPoints, CvMatND* outerHistogramMat, float &usedOuterPoints);
    +
    194 bool computeHistogramFromRgbImage(CvMat* uv, IplImage *image, CvMatND* innerHistogramMat, float &usedInnerPoints, CvMatND* outerHistogramMat, float &usedOuterPoints);
    +
    195 bool calculateLikelihood(CvMatND* templateHistogramMat, CvMatND* innerHistogramMat, CvMatND* outerHistogramMat, float inside_outside, float &likelihood);
    +
    196 bool place3dPointsPerspective(CvMat* points, float x, float y, float z);
    +
    197 int perspective_projection(CvMat* xyz, float fx, float fy, float cx, float cy, CvMat* uv);
    +
    198 void drawContourPerspectiveYARP(CvMat* model3dPointsMat,float x, float y, float z, yarp::sig::ImageOf<yarp::sig::PixelRgb> *image,float _perspectiveFx,float _perspectiveFy ,float _perspectiveCx,float _perspectiveCy ,int R, int G, int B, float &meanU, float &meanV);
    +
    199 void drawSampledLinesPerspectiveYARP(CvMat* model3dPointsMat,float x, float y, float z, yarp::sig::ImageOf<yarp::sig::PixelRgb> *image,float _perspectiveFx,float _perspectiveFy ,float _perspectiveCx,float _perspectiveCy ,int R, int G, int B, float &meanU, float &meanV);
    +
    200 bool evaluateHypothesisPerspective(CvMat* model3dPointsMat, float x, float y, float z, CvMatND* modelHistogramMat, IplImage* transformedImage, float fx, float fy, float u0, float v0, float, float &likelihood);
    +
    201 
    +
    203 //MEMBERS THAT SHOULD BE CHANGED AND CHECKED:/
    +
    205 bool evaluateHypothesisPerspectiveFromRgbImage(CvMat* model3dPoints,float x, float y, float z, CvMatND* modelHistogramMat, IplImage *image, float fx, float fy, float u0, float v0, float inside_outside, float &likelihood);
    +
    206 
    +
    207 bool systematicR(CvMat* inState, CvMat* weights, CvMat* outState);
    +
    208 bool systematic_resampling(CvMat* oldParticlesState, CvMat* oldParticlesWeights, CvMat* newParticlesState, CvMat* cumWeight);
    +
    209 
    +
    210 public:
    +
    211 
    +
    212 PF3DTracker(); //constructor
    +
    213 ~PF3DTracker(); //destructor
    +
    214 
    +
    215 virtual bool configure(yarp::os::ResourceFinder &rf); //member to set the object up.
    +
    216 virtual bool close(); //member to close the object.
    +
    217 virtual bool interruptModule(); //member to close the object.
    +
    218 virtual bool updateModule(); //member that is repeatedly called by YARP, to give this object a chance to do something.
    +
    219 virtual double getPeriod();
    +
    220 
    +
    221 };
    +
    222 
    +
    223 #endif /* _PF3DTRACKER_ */
    +
    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released un...
    +
    + + + + diff --git a/doxygen/doc/html/search/all_0.html b/doxygen/doc/html/search/all_0.html new file mode 100644 index 0000000..1ec5b2d --- /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 0000000..cd922f2 --- /dev/null +++ b/doxygen/doc/html/search/all_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_3awarning_3a_20this_20method_20has_20been_20superseded_20by_20_3ca_20href_3d_22_2e_2e_2fapp_2fconf_2fmodels_2fgenerate_5fshape_5fmodel_2epy_22_3egenerate_5fshape_5fmodel_2epy_3c_2fa_3e_2e_0',[':warning: This method has been superseded by <a href="../app/conf/models/generate_shape_model.py">generate_shape_model.py</a>.',['../md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.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 0000000..9f80e90 --- /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 0000000..624b670 --- /dev/null +++ b/doxygen/doc/html/search/all_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['calc_5fcoeffs_1',['calc_coeffs',['../IIRGausDeriv_8h.html#a3e168333285d90a0bfd848d9791ca427',1,'calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8h.html#a3e7f009d38086e228c6ba8b3e5b6055f',1,'calc_coeffs(int taps, const complex< double > poles[], float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a3e7f009d38086e228c6ba8b3e5b6055f',1,'calc_coeffs(int taps, const complex< double > poles[], float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a3e168333285d90a0bfd848d9791ca427',1,'calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs): IIRGausDeriv.cpp']]], + ['calc_5fpoles_2',['calc_poles',['../IIRGausDeriv_8h.html#a2741eb625282f8d68ba971a4431407a5',1,'calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[]): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a2741eb625282f8d68ba971a4431407a5',1,'calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[]): IIRGausDeriv.cpp']]] +]; diff --git a/doxygen/doc/html/search/all_2.html b/doxygen/doc/html/search/all_2.html new file mode 100644 index 0000000..02cfffc --- /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 0000000..5b0627f --- /dev/null +++ b/doxygen/doc/html/search/all_2.js @@ -0,0 +1,19 @@ +var searchData= +[ + ['d0_5fn3_5fl2_3',['d0_N3_L2',['../IIRGausDeriv_8h.html#af5e16ead99087cccae6b8aa7a89a0952',1,'IIRGausDeriv.h']]], + ['d0_5fn3_5flinf_4',['d0_N3_Linf',['../IIRGausDeriv_8h.html#a8c8a923a255f7d1433ccbb5ca69e6848',1,'IIRGausDeriv.h']]], + ['d0_5fn4_5fl2_5',['d0_N4_L2',['../IIRGausDeriv_8h.html#a2a1aeabf73a18a2c89f07ff0f43295c8',1,'IIRGausDeriv.h']]], + ['d0_5fn4_5flinf_6',['d0_N4_Linf',['../IIRGausDeriv_8h.html#a5d56d85deaa8b0093b9a25f6dd2e390c',1,'IIRGausDeriv.h']]], + ['d0_5fn5_5fl2_7',['d0_N5_L2',['../IIRGausDeriv_8h.html#a77152b0c665b268cefdf513125e929e3',1,'IIRGausDeriv.h']]], + ['d0_5fn5_5flinf_8',['d0_N5_Linf',['../IIRGausDeriv_8h.html#a430436bf7328ee9f31e8629e69939c45',1,'IIRGausDeriv.h']]], + ['d1_5fn3_5flinf_9',['d1_N3_Linf',['../IIRGausDeriv_8h.html#ab3d3fead67d13ff1f71ec1671a7f0a75',1,'IIRGausDeriv.h']]], + ['d1_5fn4_5flinf_10',['d1_N4_Linf',['../IIRGausDeriv_8h.html#a42c5979a0cc3ff593c910114a7a04b54',1,'IIRGausDeriv.h']]], + ['d1_5fn5_5flinf_11',['d1_N5_Linf',['../IIRGausDeriv_8h.html#a941413cacffcd396c95b80945cf2ef7b',1,'IIRGausDeriv.h']]], + ['d2_5fn3_5flinf_12',['d2_N3_Linf',['../IIRGausDeriv_8h.html#a4d0b8b8666422f4f29a55924643844b2',1,'IIRGausDeriv.h']]], + ['d2_5fn4_5flinf_13',['d2_N4_Linf',['../IIRGausDeriv_8h.html#aa44e4e7714c800b8ba69135d67e969c1',1,'IIRGausDeriv.h']]], + ['d2_5fn5_5flinf_14',['d2_N5_Linf',['../IIRGausDeriv_8h.html#a99038e1ed42f8611a68f763b70f7f2f7',1,'IIRGausDeriv.h']]], + ['demo_20applications_15',['Demo Applications',['../group__demo__applications.html',1,'']]], + ['demo_20modules_16',['Demo Modules',['../group__demo__modules.html',1,'']]], + ['demoredball_17',['demoRedBall',['../group__src__demoRedBall.html',1,'']]], + ['demoyoga_18',['demoYoga',['../group__src__demoYoga.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 0000000..39767b8 --- /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 0000000..07b1149 --- /dev/null +++ b/doxygen/doc/html/search/all_3.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fastgauss_2ecpp_19',['FastGauss.cpp',['../FastGauss_8cpp.html',1,'']]], + ['fastgauss_2eh_20',['FastGauss.h',['../FastGauss_8h.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 0000000..fc40463 --- /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 0000000..089d431 --- /dev/null +++ b/doxygen/doc/html/search/all_4.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['iir_5ffilt_5fforward_21',['iir_filt_forward',['../IIRFilt_8h.html#a43b5832facfac4984b38e11e2fa80b48',1,'IIRFilt.cpp']]], + ['iirfilt_2eh_22',['IIRFilt.h',['../IIRFilt_8h.html',1,'']]], + ['iirgausderiv_2ecpp_23',['IIRGausDeriv.cpp',['../IIRGausDeriv_8cpp.html',1,'']]], + ['iirgausderiv_2eh_24',['IIRGausDeriv.h',['../IIRGausDeriv_8h.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 0000000..9dd9344 --- /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 0000000..53f2424 --- /dev/null +++ b/doxygen/doc/html/search/all_5.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lut_25',['Lut',['../structLut.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 0000000..f1e516d --- /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 0000000..de27e1c --- /dev/null +++ b/doxygen/doc/html/search/all_6.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['pf3dbottomup_26',['pf3dBottomup',['../group__icub__pf3dBottomup.html',1,'']]], + ['pf3dtracker_27',['pf3dTracker',['../group__icub__pf3dTracker.html',1,'(Global Namespace)'],['../md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html',1,'(Global Namespace)']]] +]; diff --git a/doxygen/doc/html/search/all_7.html b/doxygen/doc/html/search/all_7.html new file mode 100644 index 0000000..8ddbf6c --- /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 0000000..d3d71ec --- /dev/null +++ b/doxygen/doc/html/search/all_7.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['red_2dball_20demo_28',['Red-Ball Demo',['../group__app__demoRedBall.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 0000000..83c55ae --- /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 0000000..9c44600 --- /dev/null +++ b/doxygen/doc/html/search/all_8.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['scalespace_2ecpp_29',['ScaleSpace.cpp',['../ScaleSpace_8cpp.html',1,'']]], + ['scalespace_2eh_30',['ScaleSpace.h',['../ScaleSpace_8h.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 0000000..af8159e --- /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 0000000..b2f8eb2 --- /dev/null +++ b/doxygen/doc/html/search/classes_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['lut_31',['Lut',['../structLut.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 0000000..a933eea --- /dev/null +++ b/doxygen/doc/html/search/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/doxygen/doc/html/search/files_0.html b/doxygen/doc/html/search/files_0.html new file mode 100644 index 0000000..9498842 --- /dev/null +++ b/doxygen/doc/html/search/files_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/files_0.js b/doxygen/doc/html/search/files_0.js new file mode 100644 index 0000000..cbd21a0 --- /dev/null +++ b/doxygen/doc/html/search/files_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['fastgauss_2ecpp_32',['FastGauss.cpp',['../FastGauss_8cpp.html',1,'']]], + ['fastgauss_2eh_33',['FastGauss.h',['../FastGauss_8h.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/files_1.html b/doxygen/doc/html/search/files_1.html new file mode 100644 index 0000000..7050ef4 --- /dev/null +++ b/doxygen/doc/html/search/files_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/files_1.js b/doxygen/doc/html/search/files_1.js new file mode 100644 index 0000000..771b566 --- /dev/null +++ b/doxygen/doc/html/search/files_1.js @@ -0,0 +1,6 @@ +var searchData= +[ + ['iirfilt_2eh_34',['IIRFilt.h',['../IIRFilt_8h.html',1,'']]], + ['iirgausderiv_2ecpp_35',['IIRGausDeriv.cpp',['../IIRGausDeriv_8cpp.html',1,'']]], + ['iirgausderiv_2eh_36',['IIRGausDeriv.h',['../IIRGausDeriv_8h.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/files_2.html b/doxygen/doc/html/search/files_2.html new file mode 100644 index 0000000..497cdf5 --- /dev/null +++ b/doxygen/doc/html/search/files_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/files_2.js b/doxygen/doc/html/search/files_2.js new file mode 100644 index 0000000..e9cef8b --- /dev/null +++ b/doxygen/doc/html/search/files_2.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['scalespace_2ecpp_37',['ScaleSpace.cpp',['../ScaleSpace_8cpp.html',1,'']]], + ['scalespace_2eh_38',['ScaleSpace.h',['../ScaleSpace_8h.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/functions_0.html b/doxygen/doc/html/search/functions_0.html new file mode 100644 index 0000000..eb4c501 --- /dev/null +++ b/doxygen/doc/html/search/functions_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/functions_0.js b/doxygen/doc/html/search/functions_0.js new file mode 100644 index 0000000..017e684 --- /dev/null +++ b/doxygen/doc/html/search/functions_0.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['calc_5fcoeffs_39',['calc_coeffs',['../IIRGausDeriv_8h.html#a3e168333285d90a0bfd848d9791ca427',1,'calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8h.html#a3e7f009d38086e228c6ba8b3e5b6055f',1,'calc_coeffs(int taps, const complex< double > poles[], float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a3e7f009d38086e228c6ba8b3e5b6055f',1,'calc_coeffs(int taps, const complex< double > poles[], float *coeffs): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a3e168333285d90a0bfd848d9791ca427',1,'calc_coeffs(int taps, const complex< double > poles[], const double s, float *coeffs): IIRGausDeriv.cpp']]], + ['calc_5fpoles_40',['calc_poles',['../IIRGausDeriv_8h.html#a2741eb625282f8d68ba971a4431407a5',1,'calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[]): IIRGausDeriv.cpp'],['../IIRGausDeriv_8cpp.html#a2741eb625282f8d68ba971a4431407a5',1,'calc_poles(int taps, const double scale, const complex< double > oldpoles[], complex< double > newpoles[]): IIRGausDeriv.cpp']]] +]; diff --git a/doxygen/doc/html/search/functions_1.html b/doxygen/doc/html/search/functions_1.html new file mode 100644 index 0000000..ef4088b --- /dev/null +++ b/doxygen/doc/html/search/functions_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/functions_1.js b/doxygen/doc/html/search/functions_1.js new file mode 100644 index 0000000..822c6b5 --- /dev/null +++ b/doxygen/doc/html/search/functions_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['iir_5ffilt_5fforward_41',['iir_filt_forward',['../IIRFilt_8h.html#a43b5832facfac4984b38e11e2fa80b48',1,'IIRFilt.cpp']]] +]; diff --git a/doxygen/doc/html/search/groups_0.html b/doxygen/doc/html/search/groups_0.html new file mode 100644 index 0000000..c600b49 --- /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 0000000..ef1bb63 --- /dev/null +++ b/doxygen/doc/html/search/groups_0.js @@ -0,0 +1,7 @@ +var searchData= +[ + ['demo_20applications_54',['Demo Applications',['../group__demo__applications.html',1,'']]], + ['demo_20modules_55',['Demo Modules',['../group__demo__modules.html',1,'']]], + ['demoredball_56',['demoRedBall',['../group__src__demoRedBall.html',1,'']]], + ['demoyoga_57',['demoYoga',['../group__src__demoYoga.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/groups_1.html b/doxygen/doc/html/search/groups_1.html new file mode 100644 index 0000000..2eb3550 --- /dev/null +++ b/doxygen/doc/html/search/groups_1.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/groups_1.js b/doxygen/doc/html/search/groups_1.js new file mode 100644 index 0000000..72ccbb4 --- /dev/null +++ b/doxygen/doc/html/search/groups_1.js @@ -0,0 +1,5 @@ +var searchData= +[ + ['pf3dbottomup_58',['pf3dBottomup',['../group__icub__pf3dBottomup.html',1,'']]], + ['pf3dtracker_59',['pf3dTracker',['../group__icub__pf3dTracker.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/groups_2.html b/doxygen/doc/html/search/groups_2.html new file mode 100644 index 0000000..12f4af7 --- /dev/null +++ b/doxygen/doc/html/search/groups_2.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/groups_2.js b/doxygen/doc/html/search/groups_2.js new file mode 100644 index 0000000..30ee199 --- /dev/null +++ b/doxygen/doc/html/search/groups_2.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['red_2dball_20demo_60',['Red-Ball Demo',['../group__app__demoRedBall.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 0000000..03626f6 --- /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 0000000..2b9360b --- /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 0000000..8517b48 --- /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 0000000..125ebc3 --- /dev/null +++ b/doxygen/doc/html/search/pages_0.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['_3awarning_3a_20this_20method_20has_20been_20superseded_20by_20_3ca_20href_3d_22_2e_2e_2fapp_2fconf_2fmodels_2fgenerate_5fshape_5fmodel_2epy_22_3egenerate_5fshape_5fmodel_2epy_3c_2fa_3e_2e_61',[':warning: This method has been superseded by <a href="../app/conf/models/generate_shape_model.py">generate_shape_model.py</a>.',['../md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.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 0000000..a0fb679 --- /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 0000000..9a17674 --- /dev/null +++ b/doxygen/doc/html/search/pages_1.js @@ -0,0 +1,4 @@ +var searchData= +[ + ['pf3dtracker_62',['pf3dTracker',['../md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.html',1,'']]] +]; diff --git a/doxygen/doc/html/search/search.css b/doxygen/doc/html/search/search.css new file mode 100644 index 0000000..9074198 --- /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 0000000..fb226f7 --- /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 0000000..1d557fc --- /dev/null +++ b/doxygen/doc/html/search/searchdata.js @@ -0,0 +1,33 @@ +var indexSectionsWithContent = +{ + 0: ":cdfilprs", + 1: "l", + 2: "fis", + 3: "ci", + 4: "d", + 5: "dpr", + 6: ":p" +}; + +var indexSectionNames = +{ + 0: "all", + 1: "classes", + 2: "files", + 3: "functions", + 4: "variables", + 5: "groups", + 6: "pages" +}; + +var indexSectionLabels = +{ + 0: "All", + 1: "Data Structures", + 2: "Files", + 3: "Functions", + 4: "Variables", + 5: "Modules", + 6: "Pages" +}; + diff --git a/doxygen/doc/html/search/variables_0.html b/doxygen/doc/html/search/variables_0.html new file mode 100644 index 0000000..1e477c0 --- /dev/null +++ b/doxygen/doc/html/search/variables_0.html @@ -0,0 +1,37 @@ + + + + + + + + + + +
    +
    Loading...
    +
    + +
    Searching...
    +
    No Matches
    + +
    + + diff --git a/doxygen/doc/html/search/variables_0.js b/doxygen/doc/html/search/variables_0.js new file mode 100644 index 0000000..fb94721 --- /dev/null +++ b/doxygen/doc/html/search/variables_0.js @@ -0,0 +1,15 @@ +var searchData= +[ + ['d0_5fn3_5fl2_42',['d0_N3_L2',['../IIRGausDeriv_8h.html#af5e16ead99087cccae6b8aa7a89a0952',1,'IIRGausDeriv.h']]], + ['d0_5fn3_5flinf_43',['d0_N3_Linf',['../IIRGausDeriv_8h.html#a8c8a923a255f7d1433ccbb5ca69e6848',1,'IIRGausDeriv.h']]], + ['d0_5fn4_5fl2_44',['d0_N4_L2',['../IIRGausDeriv_8h.html#a2a1aeabf73a18a2c89f07ff0f43295c8',1,'IIRGausDeriv.h']]], + ['d0_5fn4_5flinf_45',['d0_N4_Linf',['../IIRGausDeriv_8h.html#a5d56d85deaa8b0093b9a25f6dd2e390c',1,'IIRGausDeriv.h']]], + ['d0_5fn5_5fl2_46',['d0_N5_L2',['../IIRGausDeriv_8h.html#a77152b0c665b268cefdf513125e929e3',1,'IIRGausDeriv.h']]], + ['d0_5fn5_5flinf_47',['d0_N5_Linf',['../IIRGausDeriv_8h.html#a430436bf7328ee9f31e8629e69939c45',1,'IIRGausDeriv.h']]], + ['d1_5fn3_5flinf_48',['d1_N3_Linf',['../IIRGausDeriv_8h.html#ab3d3fead67d13ff1f71ec1671a7f0a75',1,'IIRGausDeriv.h']]], + ['d1_5fn4_5flinf_49',['d1_N4_Linf',['../IIRGausDeriv_8h.html#a42c5979a0cc3ff593c910114a7a04b54',1,'IIRGausDeriv.h']]], + ['d1_5fn5_5flinf_50',['d1_N5_Linf',['../IIRGausDeriv_8h.html#a941413cacffcd396c95b80945cf2ef7b',1,'IIRGausDeriv.h']]], + ['d2_5fn3_5flinf_51',['d2_N3_Linf',['../IIRGausDeriv_8h.html#a4d0b8b8666422f4f29a55924643844b2',1,'IIRGausDeriv.h']]], + ['d2_5fn4_5flinf_52',['d2_N4_Linf',['../IIRGausDeriv_8h.html#aa44e4e7714c800b8ba69135d67e969c1',1,'IIRGausDeriv.h']]], + ['d2_5fn5_5flinf_53',['d2_N5_Linf',['../IIRGausDeriv_8h.html#a99038e1ed42f8611a68f763b70f7f2f7',1,'IIRGausDeriv.h']]] +]; 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/structLut.html b/doxygen/doc/html/structLut.html new file mode 100644 index 0000000..aa83af3 --- /dev/null +++ b/doxygen/doc/html/structLut.html @@ -0,0 +1,101 @@ + + + + + + + +icub-basic-demos: Lut Struct Reference + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + +
    +
    + +
    +
    Lut Struct Reference
    +
    +
    + +

    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released under the terms of the GNU GPL v2.0. + More...

    + +

    #include <pf3dTrackerSupport.hpp>

    + + + + + + + + +

    +Data Fields

    +int y
     
    +int u
     
    +int v
     
    +

    Detailed Description

    +

    Copyright: (C) 2009 RobotCub Consortium Authors: Matteo Taiana, Ugo Pattacini CopyPolicy: Released under the terms of the GNU GPL v2.0.

    + +

    Definition at line 28 of file pf3dTrackerSupport.hpp.

    +

    The documentation for this struct was generated from the following file:
      +
    • /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/include/iCub/pf3dTrackerSupport.hpp
    • +
    +
    + + + + 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 0000000..7d45d36 --- /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/world_8cpp_source.html b/doxygen/doc/html/world_8cpp_source.html new file mode 100644 index 0000000..364f181 --- /dev/null +++ b/doxygen/doc/html/world_8cpp_source.html @@ -0,0 +1,178 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/demoRedBall/src/world.cpp Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    world.cpp
    +
    +
    +
    1 /******************************************************************************
    +
    2  * *
    +
    3  * Copyright (C) 2020 Fondazione Istituto Italiano di Tecnologia (IIT) *
    +
    4  * All Rights Reserved. *
    +
    5  * *
    +
    6  ******************************************************************************/
    +
    7 
    +
    8 #include <cmath>
    +
    9 
    +
    10 #include <gazebo/common/Plugin.hh>
    +
    11 #include <gazebo/physics/Model.hh>
    +
    12 #include <gazebo/physics/Link.hh>
    +
    13 #include <gazebo/physics/Joint.hh>
    +
    14 #include <gazebo/common/Events.hh>
    +
    15 #include <ignition/math/Pose3.hh>
    +
    16 
    +
    17 #include <boost/bind.hpp>
    +
    18 
    +
    19 #include <yarp/os/Bottle.h>
    +
    20 #include <yarp/os/BufferedPort.h>
    +
    21 #include <yarp/os/LogStream.h>
    +
    22 
    +
    23 namespace gazebo {
    +
    24 
    +
    25 /******************************************************************************/
    +
    26 class ModelMover : public gazebo::ModelPlugin
    +
    27 {
    +
    28  gazebo::physics::ModelPtr model;
    +
    29  gazebo::event::ConnectionPtr renderer_connection;
    +
    30  yarp::os::BufferedPort<yarp::os::Bottle> port;
    +
    31  ignition::math::Vector3d starting_pos;
    +
    32 
    +
    33  /**************************************************************************/
    +
    34  void onWorldFrame()
    +
    35  {
    +
    36  if (auto* b = port.read(false))
    +
    37  {
    +
    38  if (b->size() >= 3)
    +
    39  {
    +
    40  if (model->GetJoint("fixed_to_ground"))
    +
    41  {
    +
    42  if (model->RemoveJoint("fixed_to_ground"))
    +
    43  {
    +
    44  yInfo() << "Removed fixed_to_ground joint";
    +
    45  }
    +
    46  }
    +
    47 
    +
    48  const auto x = starting_pos.X() + b->get(0).asFloat64();
    +
    49  const auto y = starting_pos.Y() + b->get(1).asFloat64();
    +
    50  const auto z = starting_pos.Z() + b->get(2).asFloat64();
    +
    51  ignition::math::Pose3d new_pose(x, y, z, 0.0, 0.0, 0.0);
    +
    52  yInfo() << "New pose:" << x << y << z;
    +
    53  model->SetWorldPose(new_pose);
    +
    54 
    +
    55  physics::LinkPtr child = model->GetLink("red-ball::root_link");
    +
    56  physics::LinkPtr parent = model->GetLink("world");
    +
    57  if (child || parent)
    +
    58  {
    +
    59  if (model->CreateJoint("fixed_to_ground", "fixed", parent, child))
    +
    60  {
    +
    61  yInfo() << "Added fixed_to_ground joint";
    +
    62  }
    +
    63  }
    +
    64  }
    +
    65  }
    +
    66  }
    +
    67 
    +
    68 public:
    +
    69  /**************************************************************************/
    +
    70  void Load(gazebo::physics::ModelPtr model, sdf::ElementPtr)
    +
    71  {
    +
    72  this->model = model;
    +
    73  auto model_sdf = model->GetSDF();
    +
    74  if( model_sdf->HasElement("pose") )
    +
    75  {
    +
    76  starting_pos = model_sdf->Get<ignition::math::Vector3d>("pose");
    +
    77  }
    +
    78  else
    +
    79  {
    +
    80  starting_pos = ignition::math::Vector3d(0.0, 0.0, 0.0);
    +
    81  }
    +
    82 
    +
    83  port.open("/" + model->GetName() + "/mover:i");
    +
    84  auto bind = boost::bind(&ModelMover::onWorldFrame, this);
    +
    85  renderer_connection = gazebo::event::Events::ConnectWorldUpdateBegin(bind);
    +
    86  }
    +
    87 
    +
    88  /**************************************************************************/
    +
    89  virtual ~ModelMover()
    +
    90  {
    +
    91  if (!port.isClosed())
    +
    92  {
    +
    93  port.close();
    +
    94  }
    +
    95  }
    +
    96 };
    +
    97 
    +
    98 }
    +
    99 
    +
    100 GZ_REGISTER_MODEL_PLUGIN(gazebo::ModelMover)
    +
    + + + + diff --git a/doxygen/doc/html/write__initial__ball__points_8m_source.html b/doxygen/doc/html/write__initial__ball__points_8m_source.html new file mode 100644 index 0000000..4ffc895 --- /dev/null +++ b/doxygen/doc/html/write__initial__ball__points_8m_source.html @@ -0,0 +1,100 @@ + + + + + + + +icub-basic-demos: /home/runner/work/icub-basic-demos/icub-basic-demos/gh-pages/pf3dTracker/matlab_files/write_initial_ball_points.m Source File + + + + + + + + + +
    +
    + + + + + + +
    +
    icub-basic-demos +
    +
    +
    + + + + + + + + +
    +
    + + +
    + +
    + + +
    +
    +
    +
    write_initial_ball_points.m
    +
    +
    +
    1 %I think this is the most up-to-date script to generate the initial ball points.
    +
    2 %generate points along two circumferences at 0.9 and 1.1 the radius of the actual ball.
    +
    3 
    +
    4 R=198/(2*pi) %ball radius.
    +
    5 R1=(1-0.20)*R; %ray for placing the internal points [mm]
    +
    6 R2=(1+0.20)*R; %ray for placing the external points [mm]
    +
    7 nPoints=50;
    +
    8 
    +
    9 t=0:(2*pi/nPoints):2*pi;
    +
    10 z=cos(t(1:nPoints));
    +
    11 y=sin(t(1:nPoints));
    +
    12 p1=R1*[zeros(1,nPoints);y;z];
    +
    13 p2=R2*[zeros(1,nPoints);y;z];
    +
    14 points=[p1,p2];
    +
    15 
    +
    16 ID=fopen('initial_ball_points_smiley_31mm_20percent.csv','w');
    +
    17 for(a=1:3)
    +
    18  for(b=1:nPoints*2)
    +
    19  fprintf(ID,'%f\n',points(a,b));
    +
    20  end;
    +
    21 end;
    +
    22 fclose(ID);
    +
    + + + + diff --git a/doxygen/doc/latex/FastGauss_8cpp.tex b/doxygen/doc/latex/FastGauss_8cpp.tex new file mode 100644 index 0000000..ca308db --- /dev/null +++ b/doxygen/doc/latex/FastGauss_8cpp.tex @@ -0,0 +1,28 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\+Fast\+Gauss.cpp File Reference} +\label{FastGauss_8cpp}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/FastGauss.cpp@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/FastGauss.cpp}} + + +Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. + + +{\ttfamily \#include $<$string.\+h$>$}\newline +{\ttfamily \#include $<$i\+Cub/\+Fast\+Gauss.\+h$>$}\newline +{\ttfamily \#include $<$i\+Cub/\+IIRGaus\+Deriv.\+h$>$}\newline +{\ttfamily \#include $<$i\+Cub/\+IIRFilt.\+h$>$}\newline + + +\doxysubsection{Detailed Description} +Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. + +\begin{DoxySeeAlso}{See also} +\char`\"{}\+Fast IIR Isotropic 2-\/\+D Complex Gabor Filters With Boundary Initialization\char`\"{}, A. Bernardino and J. Santos-\/\+Victor, 2006. +\end{DoxySeeAlso} +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Released under GNU GPL v2.\+0 +\end{DoxyNote} diff --git a/doxygen/doc/latex/FastGauss_8h.tex b/doxygen/doc/latex/FastGauss_8h.tex new file mode 100644 index 0000000..4b178e8 --- /dev/null +++ b/doxygen/doc/latex/FastGauss_8h.tex @@ -0,0 +1,25 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\+Fast\+Gauss.h File Reference} +\label{FastGauss_8h}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/FastGauss.h@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/FastGauss.h}} + + +Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. + + +{\ttfamily \#include $<$complex$>$}\newline + + +\doxysubsection{Detailed Description} +Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions. + +\begin{DoxySeeAlso}{See also} +\char`\"{}\+Fast IIR Isotropic 2-\/\+D Complex Gabor Filters With Boundary Initialization\char`\"{}, A. Bernardino and J. Santos-\/\+Victor, 2006. +\end{DoxySeeAlso} +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Released under GNU GPL v2.\+0 +\end{DoxyNote} diff --git a/doxygen/doc/latex/IIRFilt_8h.tex b/doxygen/doc/latex/IIRFilt_8h.tex new file mode 100644 index 0000000..8a0b46d --- /dev/null +++ b/doxygen/doc/latex/IIRFilt_8h.tex @@ -0,0 +1,119 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\+IIRFilt.h File Reference} +\label{IIRFilt_8h}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/IIRFilt.h@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/IIRFilt.h}} + + +Functions for generic, 3 tap, iir filtering. + + +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{IIRFilt_8h_a43b5832facfac4984b38e11e2fa80b48}{iir\+\_\+filt\+\_\+forward}} (float $\ast$in, int stepin, float $\ast$out, int stepout, int length, float $\ast$coeffs, float $\ast$i0) +\begin{DoxyCompactList}\small\item\em Functions iir\+\_\+filt\+\_\+forward and iir\+\_\+filt\+\_\+backward do a 3 tap recursive filtering operation on floating point buffers. \end{DoxyCompactList}\item +\mbox{\label{IIRFilt_8h_a43e9e9f0360bfee13e2651311a95390f}} +void {\bfseries iir\+\_\+filt\+\_\+backward} (float $\ast$in, int stepin, float $\ast$out, int stepout, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_a10ff4d91b53ed479cc9eabd72b0399ca}} +void {\bfseries iir\+\_\+filt\+\_\+forward} (float $\ast$in, float $\ast$out, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_aad0f69ef34717b6f4c4dc5bd4ec53fce}} +void {\bfseries iir\+\_\+filt\+\_\+backward} (float $\ast$in, float $\ast$out, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_a09014ca85db071904c4a15fbe2410633}} +void {\bfseries iir\+\_\+filt\+\_\+forward} (float $\ast$in, float $\ast$out, int stepout, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_ada56d2d76b95a4274d14ae620b60a381}} +void {\bfseries iir\+\_\+filt\+\_\+backward} (float $\ast$in, float $\ast$out, int stepout, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_a8363f3ebd3b1b38111c8b4fc2bf3c3d7}} +void {\bfseries iir\+\_\+filt\+\_\+forward} (float $\ast$in, int stepin, float $\ast$out, int length, float $\ast$coeffs, float $\ast$i0) +\item +\mbox{\label{IIRFilt_8h_abf2616f9930b7d91f28f0c6323e5f972}} +void {\bfseries iir\+\_\+filt\+\_\+backward} (float $\ast$in, int stepin, float $\ast$out, int length, float $\ast$coeffs, float $\ast$i0) +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Functions for generic, 3 tap, iir filtering. + +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Release under GNU GPL v2.\+0 +\end{DoxyNote} +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Released under GNU GPL v2.\+0 +\end{DoxyNote} +\begin{DoxySeeAlso}{See also} +\mbox{\hyperlink{IIRFilt_8h}{IIRFilt.\+h}} +\end{DoxySeeAlso} + + +\doxysubsection{Function Documentation} +\mbox{\label{IIRFilt_8h_a43b5832facfac4984b38e11e2fa80b48}} +\index{IIRFilt.h@{IIRFilt.h}!iir\_filt\_forward@{iir\_filt\_forward}} +\index{iir\_filt\_forward@{iir\_filt\_forward}!IIRFilt.h@{IIRFilt.h}} +\doxysubsubsection{\texorpdfstring{iir\_filt\_forward()}{iir\_filt\_forward()}} +{\footnotesize\ttfamily void iir\+\_\+filt\+\_\+forward (\begin{DoxyParamCaption}\item[{float $\ast$}]{in, }\item[{int}]{stepin, }\item[{float $\ast$}]{out, }\item[{int}]{stepout, }\item[{int}]{length, }\item[{float $\ast$}]{coeffs, }\item[{float $\ast$}]{i0 }\end{DoxyParamCaption})} + + + +Functions iir\+\_\+filt\+\_\+forward and iir\+\_\+filt\+\_\+backward do a 3 tap recursive filtering operation on floating point buffers. + +Forward filtering\+: \[ y(t) = b_0 x(t) - a_1 y(t-1) - a_2 y(t-2) - a_3 y(t-3) \] + + +\begin{DoxyParams}{Parameters} +{\em in} & Floating point buffer with the input signal. \\ +\hline +{\em stepin} & Spacing between consecutive input signal samples. \\ +\hline +{\em out} & Floating point buffer to store the computation results. \\ +\hline +{\em stepout} & Spacing between consecutive output buffer samples. \\ +\hline +{\em length} & Number of samples to process (N) \\ +\hline +{\em coeffs} & Filter coefficients. A length 4 floating point array containing $(b_0, a_1, a_2, a_3)$ \\ +\hline +{\em i0} & Filter boundary conditions. A length 3 floating point array containing\+: +\begin{DoxyItemize} +\item in the forward filtering case $(y_{-1}, y_{-2}, y_{-3})$ +\item in the backward filtering case $(y_{N}, y_{N+1}, y_{N+2})$ +\end{DoxyItemize}\\ +\hline +\end{DoxyParams} +\begin{DoxyNote}{Note} +Several overloads exist for the cases when stepin or stepout parameters are unitary. +\end{DoxyNote} + + +Definition at line 19 of file IIRFilt.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{20 \{} +\DoxyCodeLine{21 \textcolor{keywordtype}{int} j;} +\DoxyCodeLine{22 \textcolor{keywordtype}{float} b0 = coeffs[0];} +\DoxyCodeLine{23 \textcolor{keywordtype}{float} a1 = coeffs[1]; } +\DoxyCodeLine{24 \textcolor{keywordtype}{float} a2 = coeffs[2];} +\DoxyCodeLine{25 \textcolor{keywordtype}{float} a3 = coeffs[3];} +\DoxyCodeLine{26 } +\DoxyCodeLine{27 out[0] = b0*in[0] -\/ a1*i0[0] -\/ a2*i0[1] -\/ a3*i0[2];} +\DoxyCodeLine{28 out[1*stepout] = b0*in[stepin] -\/ a1*out[0] -\/ a2*i0[0] -\/ a3*i0[1];} +\DoxyCodeLine{29 out[2*stepout] = b0*in[2*stepin] -\/ a1*out[stepout] -\/ a2*out[0] -\/ a3*i0[0];} +\DoxyCodeLine{30 \textcolor{keywordflow}{for}(j = 3; j < length; j++)} +\DoxyCodeLine{31 out[j*stepout] = b0*in[j*stepin] -\/ a1*out[(j-\/1)*stepout] -\/ a2*out[(j-\/2)*stepout] -\/ a3*out[(j-\/3)*stepout];} +\DoxyCodeLine{32 \}} + +\end{DoxyCode} diff --git a/doxygen/doc/latex/IIRGausDeriv_8cpp.tex b/doxygen/doc/latex/IIRGausDeriv_8cpp.tex new file mode 100644 index 0000000..5652335 --- /dev/null +++ b/doxygen/doc/latex/IIRGausDeriv_8cpp.tex @@ -0,0 +1,366 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\+IIRGaus\+Deriv.cpp File Reference} +\label{IIRGausDeriv_8cpp}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/IIRGausDeriv.cpp@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/IIRGausDeriv.cpp}} + + +Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). + + +{\ttfamily \#include $<$complex$>$}\newline +{\ttfamily \#include $<$i\+Cub/\+IIRFilt.\+h$>$}\newline +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{IIRGausDeriv_8cpp_a2741eb625282f8d68ba971a4431407a5}{calc\+\_\+poles}} (int taps, const double scale, const complex$<$ double $>$ oldpoles\mbox{[}$\,$\mbox{]}, complex$<$ double $>$ newpoles\mbox{[}$\,$\mbox{]}) +\begin{DoxyCompactList}\small\item\em 5 tap second derivative filter with Linf norm approximation \end{DoxyCompactList}\item +void \mbox{\hyperlink{IIRGausDeriv_8cpp_a3e7f009d38086e228c6ba8b3e5b6055f}{calc\+\_\+coeffs}} (int taps, const complex$<$ double $>$ poles\mbox{[}$\,$\mbox{]}, float $\ast$coeffs) +\begin{DoxyCompactList}\small\item\em Compute the coefficients of the filter, given its poles. \end{DoxyCompactList}\item +void \mbox{\hyperlink{IIRGausDeriv_8cpp_a3e168333285d90a0bfd848d9791ca427}{calc\+\_\+coeffs}} (int taps, const complex$<$ double $>$ poles\mbox{[}$\,$\mbox{]}, const double s, float $\ast$coeffs) +\begin{DoxyCompactList}\small\item\em Compute the coefficients of the filter for scale s, given the poles at scale 2. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Variables} +\begin{DoxyCompactItemize} +\item +const complex$<$ double $>$ {\bfseries d0\+\_\+\+N3\+\_\+\+Linf} \mbox{[}$\,$\mbox{]} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). + +\begin{DoxySeeAlso}{See also} +\char`\"{}\+Recursive Gaussian Derivative Filters\char`\"{}, L.\+van.\+Vliet,I.\+T.\+Young and P.\+W.\+Verbeek, 1998 +\end{DoxySeeAlso} +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Released under GNU GPL v2.\+0 +\end{DoxyNote} + + +\doxysubsection{Function Documentation} +\mbox{\label{IIRGausDeriv_8cpp_a3e168333285d90a0bfd848d9791ca427}} +\index{IIRGausDeriv.cpp@{IIRGausDeriv.cpp}!calc\_coeffs@{calc\_coeffs}} +\index{calc\_coeffs@{calc\_coeffs}!IIRGausDeriv.cpp@{IIRGausDeriv.cpp}} +\doxysubsubsection{\texorpdfstring{calc\_coeffs()}{calc\_coeffs()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily void calc\+\_\+coeffs (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const complex$<$ double $>$}]{poles\mbox{[}$\,$\mbox{]}, }\item[{const double}]{s, }\item[{float $\ast$}]{coeffs }\end{DoxyParamCaption})} + + + +Compute the coefficients of the filter for scale s, given the poles at scale 2. + + +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em poles} & Poles of the scale 2 filter. \\ +\hline +{\em scale} & Required filter scale (values between 1 and 100 are OK). \\ +\hline +{\em coeffs} & Computed coefficients $(b_0, a_1, a_2, a_3)$\+: +\begin{DoxyItemize} +\item $ b_0 $ is the gain +\item $ (a_1, a_2, a_3)$ are the autoregressive coefficients +\end{DoxyItemize}\\ +\hline +\end{DoxyParams} + + +Definition at line 251 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{252 \{} +\DoxyCodeLine{253 } +\DoxyCodeLine{254 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{255 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_coeffs"{}};} +\DoxyCodeLine{256 } +\DoxyCodeLine{257 \textcolor{keywordflow}{if}(coeffs == NULL)} +\DoxyCodeLine{258 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_coeffs"{}};} +\DoxyCodeLine{259 } +\DoxyCodeLine{260 complex d1\_2, d2\_2, d3\_2, d4\_2, d5\_2;} +\DoxyCodeLine{261 d1\_2 = poles[0];} +\DoxyCodeLine{262 d2\_2 = poles[1];} +\DoxyCodeLine{263 d3\_2 = poles[2];} +\DoxyCodeLine{264 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{265 d4\_2 = poles[3];} +\DoxyCodeLine{266 \textcolor{keywordflow}{else}} +\DoxyCodeLine{267 d4\_2 = 0;} +\DoxyCodeLine{268 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{269 d5\_2 = poles[4];} +\DoxyCodeLine{270 \textcolor{keywordflow}{else}} +\DoxyCodeLine{271 d5\_2 = 0;} +\DoxyCodeLine{272 } +\DoxyCodeLine{273 \textcolor{keywordtype}{double} q, std, lambda;} +\DoxyCodeLine{274 \textcolor{keywordtype}{double} tol = 0.01;} +\DoxyCodeLine{275 complex j(0,1), var;} +\DoxyCodeLine{276 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{277 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{278 q = s/2;} +\DoxyCodeLine{279 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{280 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{281 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{282 \textcolor{keywordflow}{if}( abs(d4\_2) != 0 )} +\DoxyCodeLine{283 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{284 \textcolor{keywordflow}{else}} +\DoxyCodeLine{285 d4\_s = 0;} +\DoxyCodeLine{286 \textcolor{keywordflow}{if}( abs(d5\_2) != 0 )} +\DoxyCodeLine{287 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{288 \textcolor{keywordflow}{else}} +\DoxyCodeLine{289 d5\_s = 0;} +\DoxyCodeLine{290 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{291 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{292 std = sqrt(var.real());} +\DoxyCodeLine{293 \textcolor{keywordflow}{while}( fabs(s-\/std) > tol )} +\DoxyCodeLine{294 \{} +\DoxyCodeLine{295 lambda = s/std;} +\DoxyCodeLine{296 q = q*lambda;} +\DoxyCodeLine{297 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{298 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{299 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{300 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{301 \textcolor{keywordflow}{if}( abs(d4\_2) != 0)} +\DoxyCodeLine{302 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{303 \textcolor{keywordflow}{else}} +\DoxyCodeLine{304 d4\_s = 0;} +\DoxyCodeLine{305 \textcolor{keywordflow}{if}( abs(d5\_2) != 0)} +\DoxyCodeLine{306 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{307 \textcolor{keywordflow}{else}} +\DoxyCodeLine{308 d5\_s = 0;} +\DoxyCodeLine{309 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{310 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{311 std = sqrt(var.real());} +\DoxyCodeLine{312 \}} +\DoxyCodeLine{313 } +\DoxyCodeLine{314 \textcolor{comment}{//computing the filter coeffs}} +\DoxyCodeLine{315 \textcolor{keywordflow}{if}( taps == 3 )} +\DoxyCodeLine{316 \{} +\DoxyCodeLine{317 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s;} +\DoxyCodeLine{318 coeffs[1] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s));} +\DoxyCodeLine{319 coeffs[2] = (float)real(b*(d1\_s + d2\_s + d3\_s));} +\DoxyCodeLine{320 coeffs[3] = (float)real(-\/b);} +\DoxyCodeLine{321 coeffs[4] = 0.0f;} +\DoxyCodeLine{322 coeffs[5] = 0.0f;} +\DoxyCodeLine{323 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];} +\DoxyCodeLine{324 \}} +\DoxyCodeLine{325 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 4)} +\DoxyCodeLine{326 \{} +\DoxyCodeLine{327 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s;} +\DoxyCodeLine{328 coeffs[1] = (float)real(-\/b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{329 coeffs[2] = (float)real(b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s));} +\DoxyCodeLine{330 coeffs[3] = (float)real(-\/b*(d1\_s + d2\_s + d3\_s + d4\_s));} +\DoxyCodeLine{331 coeffs[4] = (float)real(b);} +\DoxyCodeLine{332 coeffs[5] = 0.0f;} +\DoxyCodeLine{333 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];} +\DoxyCodeLine{334 \}} +\DoxyCodeLine{335 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 5)} +\DoxyCodeLine{336 \{} +\DoxyCodeLine{337 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s/d5\_s;} +\DoxyCodeLine{338 coeffs[1] = (float)real(-\/b*(d4\_s*d3\_s*d2\_s*d1\_s + d5\_s*d3\_s*d2\_s*d1\_s + d5\_s*d4\_s*d2\_s*d1\_s + d5\_s*d4\_s*d3\_s*d1\_s + d5\_s*d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{339 coeffs[2] = (float)real(b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s + d5\_s*d2\_s*d1\_s + d5\_s*d3\_s*d1\_s + d5\_s*d3\_s*d2\_s + d5\_s*d4\_s*d1\_s + d5\_s*d4\_s*d2\_s + d5\_s*d4\_s*d3\_s));} +\DoxyCodeLine{340 coeffs[3] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s + d5\_s*d1\_s + d5\_s*d2\_s + d5\_s*d3\_s + d5\_s*d4\_s));} +\DoxyCodeLine{341 coeffs[4] = (float)real(b*(d1\_s + d2\_s + d3\_s + d4\_s + d5\_s));} +\DoxyCodeLine{342 coeffs[5] = (float)real(-\/b);} +\DoxyCodeLine{343 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5]; } +\DoxyCodeLine{344 \}} +\DoxyCodeLine{345 \}} + +\end{DoxyCode} +\mbox{\label{IIRGausDeriv_8cpp_a3e7f009d38086e228c6ba8b3e5b6055f}} +\index{IIRGausDeriv.cpp@{IIRGausDeriv.cpp}!calc\_coeffs@{calc\_coeffs}} +\index{calc\_coeffs@{calc\_coeffs}!IIRGausDeriv.cpp@{IIRGausDeriv.cpp}} +\doxysubsubsection{\texorpdfstring{calc\_coeffs()}{calc\_coeffs()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily void calc\+\_\+coeffs (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const complex$<$ double $>$}]{poles\mbox{[}$\,$\mbox{]}, }\item[{float $\ast$}]{coeffs }\end{DoxyParamCaption})} + + + +Compute the coefficients of the filter, given its poles. + + +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em poles} & Poles of the filter. \\ +\hline +{\em coeffs} & Computed coefficients $(b_0, a_1, a_2, a_3)$\+: +\begin{DoxyItemize} +\item $ b_0 $ is the gain +\item $ (a_1, a_2, a_3)$ are the autoregressive coefficients +\end{DoxyItemize}\\ +\hline +\end{DoxyParams} + + +Definition at line 192 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{193 \{} +\DoxyCodeLine{194 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{195 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_coeffs"{}};} +\DoxyCodeLine{196 } +\DoxyCodeLine{197 \textcolor{keywordflow}{if}(coeffs == NULL)} +\DoxyCodeLine{198 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_coeffs"{}};} +\DoxyCodeLine{199 } +\DoxyCodeLine{200 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{201 d1\_s = poles[0];} +\DoxyCodeLine{202 d2\_s = poles[1];} +\DoxyCodeLine{203 d3\_s = poles[2];} +\DoxyCodeLine{204 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{205 d4\_s = poles[3];} +\DoxyCodeLine{206 \textcolor{keywordflow}{else}} +\DoxyCodeLine{207 d4\_s = 0;} +\DoxyCodeLine{208 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{209 d5\_s = poles[4];} +\DoxyCodeLine{210 \textcolor{keywordflow}{else}} +\DoxyCodeLine{211 d5\_s = 0;} +\DoxyCodeLine{212 } +\DoxyCodeLine{213 \textcolor{comment}{//computing the filter coeffs}} +\DoxyCodeLine{214 \textcolor{keywordflow}{if}( taps == 3 )} +\DoxyCodeLine{215 \{} +\DoxyCodeLine{216 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s;} +\DoxyCodeLine{217 coeffs[1] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s));} +\DoxyCodeLine{218 coeffs[2] = (float)real(b*(d1\_s + d2\_s + d3\_s));} +\DoxyCodeLine{219 coeffs[3] = (float)real(-\/b);} +\DoxyCodeLine{220 coeffs[4] = 0.0f;} +\DoxyCodeLine{221 coeffs[5] = 0.0f;} +\DoxyCodeLine{222 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];} +\DoxyCodeLine{223 \}} +\DoxyCodeLine{224 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 4)} +\DoxyCodeLine{225 \{} +\DoxyCodeLine{226 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s;} +\DoxyCodeLine{227 coeffs[1] = (float)real(-\/b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{228 coeffs[2] = (float)real(b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s));} +\DoxyCodeLine{229 coeffs[3] = (float)real(-\/b*(d1\_s + d2\_s + d3\_s + d4\_s));} +\DoxyCodeLine{230 coeffs[4] = (float)real(b);} +\DoxyCodeLine{231 coeffs[5] = 0.0f;} +\DoxyCodeLine{232 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];} +\DoxyCodeLine{233 \}} +\DoxyCodeLine{234 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 5)} +\DoxyCodeLine{235 \{} +\DoxyCodeLine{236 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s/d5\_s;} +\DoxyCodeLine{237 coeffs[1] = (float)real(-\/b*(d4\_s*d3\_s*d2\_s*d1\_s + d5\_s*d3\_s*d2\_s*d1\_s + d5\_s*d4\_s*d2\_s*d1\_s + d5\_s*d4\_s*d3\_s*d1\_s + d5\_s*d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{238 coeffs[2] = (float)real(b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s + d5\_s*d2\_s*d1\_s + d5\_s*d3\_s*d1\_s + d5\_s*d3\_s*d2\_s + d5\_s*d4\_s*d1\_s + d5\_s*d4\_s*d2\_s + d5\_s*d4\_s*d3\_s));} +\DoxyCodeLine{239 coeffs[3] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s + d5\_s*d1\_s + d5\_s*d2\_s + d5\_s*d3\_s + d5\_s*d4\_s));} +\DoxyCodeLine{240 coeffs[4] = (float)real(b*(d1\_s + d2\_s + d3\_s + d4\_s + d5\_s));} +\DoxyCodeLine{241 coeffs[5] = (float)real(-\/b);} +\DoxyCodeLine{242 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5]; } +\DoxyCodeLine{243 \}} +\DoxyCodeLine{244 \}} + +\end{DoxyCode} +\mbox{\label{IIRGausDeriv_8cpp_a2741eb625282f8d68ba971a4431407a5}} +\index{IIRGausDeriv.cpp@{IIRGausDeriv.cpp}!calc\_poles@{calc\_poles}} +\index{calc\_poles@{calc\_poles}!IIRGausDeriv.cpp@{IIRGausDeriv.cpp}} +\doxysubsubsection{\texorpdfstring{calc\_poles()}{calc\_poles()}} +{\footnotesize\ttfamily void calc\+\_\+poles (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const double}]{scale, }\item[{const complex$<$ double $>$}]{oldpoles\mbox{[}$\,$\mbox{]}, }\item[{complex$<$ double $>$}]{newpoles\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})} + + + +5 tap second derivative filter with Linf norm approximation + +Compute the poles of the filter for scale s, given the poles at scale 2 +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em scale} & Required filter scale (values between 1 and 100 are OK). \\ +\hline +{\em oldpoles} & Poles of the scale 2 filter. \\ +\hline +{\em newpoles} & Poles of the computed filter \\ +\hline +\end{DoxyParams} + + +Definition at line 121 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{122 \{} +\DoxyCodeLine{123 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{124 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_poles"{}};} +\DoxyCodeLine{125 } +\DoxyCodeLine{126 \textcolor{keywordflow}{if}(newpoles == NULL)} +\DoxyCodeLine{127 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_poles"{}};} +\DoxyCodeLine{128 } +\DoxyCodeLine{129 complex d1\_2, d2\_2, d3\_2, d4\_2, d5\_2;} +\DoxyCodeLine{130 d1\_2 = oldpoles[0];} +\DoxyCodeLine{131 d2\_2 = oldpoles[1];} +\DoxyCodeLine{132 d3\_2 = oldpoles[2];} +\DoxyCodeLine{133 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{134 d4\_2 = oldpoles[3];} +\DoxyCodeLine{135 \textcolor{keywordflow}{else}} +\DoxyCodeLine{136 d4\_2 = 0;} +\DoxyCodeLine{137 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{138 d5\_2 = oldpoles[4];} +\DoxyCodeLine{139 \textcolor{keywordflow}{else}} +\DoxyCodeLine{140 d5\_2 = 0;} +\DoxyCodeLine{141 } +\DoxyCodeLine{142 \textcolor{keywordtype}{double} q, std, lambda;} +\DoxyCodeLine{143 \textcolor{keywordtype}{double} tol = 0.01;} +\DoxyCodeLine{144 complex j(0,1), var;} +\DoxyCodeLine{145 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{146 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{147 q = scale/2;} +\DoxyCodeLine{148 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{149 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{150 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{151 \textcolor{keywordflow}{if}( abs(d4\_2) != 0 )} +\DoxyCodeLine{152 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{153 \textcolor{keywordflow}{else}} +\DoxyCodeLine{154 d4\_s = 0;} +\DoxyCodeLine{155 \textcolor{keywordflow}{if}( abs(d5\_2) != 0 )} +\DoxyCodeLine{156 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{157 \textcolor{keywordflow}{else}} +\DoxyCodeLine{158 d5\_s = 0;} +\DoxyCodeLine{159 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{160 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{161 std = sqrt(var.real());} +\DoxyCodeLine{162 \textcolor{keywordflow}{while}( fabs(scale-\/std) > tol )} +\DoxyCodeLine{163 \{} +\DoxyCodeLine{164 lambda = scale/std;} +\DoxyCodeLine{165 q = q*lambda;} +\DoxyCodeLine{166 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{167 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{168 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{169 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{170 \textcolor{keywordflow}{if}( abs(d4\_2) != 0)} +\DoxyCodeLine{171 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{172 \textcolor{keywordflow}{else}} +\DoxyCodeLine{173 d4\_s = 0;} +\DoxyCodeLine{174 \textcolor{keywordflow}{if}( abs(d5\_2) != 0)} +\DoxyCodeLine{175 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{176 \textcolor{keywordflow}{else}} +\DoxyCodeLine{177 d5\_s = 0;} +\DoxyCodeLine{178 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{179 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{180 std = sqrt(var.real());} +\DoxyCodeLine{181 \}} +\DoxyCodeLine{182 newpoles[0] = d1\_s;} +\DoxyCodeLine{183 newpoles[1] = d2\_s;} +\DoxyCodeLine{184 newpoles[2] = d3\_s;} +\DoxyCodeLine{185 newpoles[3] = d4\_s;} +\DoxyCodeLine{186 newpoles[4] = d5\_s;} +\DoxyCodeLine{187 \}} + +\end{DoxyCode} + + +\doxysubsection{Variable Documentation} +\mbox{\label{IIRGausDeriv_8cpp_a8c8a923a255f7d1433ccbb5ca69e6848}} +\index{IIRGausDeriv.cpp@{IIRGausDeriv.cpp}!d0\_N3\_Linf@{d0\_N3\_Linf}} +\index{d0\_N3\_Linf@{d0\_N3\_Linf}!IIRGausDeriv.cpp@{IIRGausDeriv.cpp}} +\doxysubsubsection{\texorpdfstring{d0\_N3\_Linf}{d0\_N3\_Linf}} +{\footnotesize\ttfamily const complex$<$double$>$ d0\+\_\+\+N3\+\_\+\+Linf\mbox{[}$\,$\mbox{]}\hspace{0.3cm}{\ttfamily [extern]}} + +{\bfseries Initial value\+:} +\begin{DoxyCode}{0} +\DoxyCodeLine{= \{} +\DoxyCodeLine{ complex(1.40098,1.00236),} +\DoxyCodeLine{ complex(1.40098,-\/1.00236),} +\DoxyCodeLine{ complex(1.85132,0),} +\DoxyCodeLine{\}} + +\end{DoxyCode} diff --git a/doxygen/doc/latex/IIRGausDeriv_8h.tex b/doxygen/doc/latex/IIRGausDeriv_8h.tex new file mode 100644 index 0000000..f1d190e --- /dev/null +++ b/doxygen/doc/latex/IIRGausDeriv_8h.tex @@ -0,0 +1,381 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\+IIRGaus\+Deriv.h File Reference} +\label{IIRGausDeriv_8h}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/IIRGausDeriv.h@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/IIRGausDeriv.h}} + + +Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). + + +{\ttfamily \#include $<$complex$>$}\newline +\doxysubsection*{Functions} +\begin{DoxyCompactItemize} +\item +void \mbox{\hyperlink{IIRGausDeriv_8h_a2741eb625282f8d68ba971a4431407a5}{calc\+\_\+poles}} (int taps, const double scale, const complex$<$ double $>$ oldpoles\mbox{[}$\,$\mbox{]}, complex$<$ double $>$ newpoles\mbox{[}$\,$\mbox{]}) +\begin{DoxyCompactList}\small\item\em 5 tap second derivative filter with Linf norm approximation \end{DoxyCompactList}\item +void \mbox{\hyperlink{IIRGausDeriv_8h_a3e168333285d90a0bfd848d9791ca427}{calc\+\_\+coeffs}} (int taps, const complex$<$ double $>$ poles\mbox{[}$\,$\mbox{]}, const double s, float $\ast$coeffs) +\begin{DoxyCompactList}\small\item\em Compute the coefficients of the filter for scale s, given the poles at scale 2. \end{DoxyCompactList}\item +void \mbox{\hyperlink{IIRGausDeriv_8h_a3e7f009d38086e228c6ba8b3e5b6055f}{calc\+\_\+coeffs}} (int taps, const complex$<$ double $>$ poles\mbox{[}$\,$\mbox{]}, float $\ast$coeffs) +\begin{DoxyCompactList}\small\item\em Compute the coefficients of the filter, given its poles. \end{DoxyCompactList}\end{DoxyCompactItemize} +\doxysubsection*{Variables} +\begin{DoxyCompactItemize} +\item +\mbox{\label{IIRGausDeriv_8h_af5e16ead99087cccae6b8aa7a89a0952}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_af5e16ead99087cccae6b8aa7a89a0952}{d0\+\_\+\+N3\+\_\+\+L2}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em Coefficients for scale = 2 filters. \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a2a1aeabf73a18a2c89f07ff0f43295c8}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a2a1aeabf73a18a2c89f07ff0f43295c8}{d0\+\_\+\+N4\+\_\+\+L2}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 3 tap gaussian filter with L2 norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a77152b0c665b268cefdf513125e929e3}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a77152b0c665b268cefdf513125e929e3}{d0\+\_\+\+N5\+\_\+\+L2}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 4 tap gaussian filter with L2 norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a8c8a923a255f7d1433ccbb5ca69e6848}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a8c8a923a255f7d1433ccbb5ca69e6848}{d0\+\_\+\+N3\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 5 tap gaussian filter with L2 norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a5d56d85deaa8b0093b9a25f6dd2e390c}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a5d56d85deaa8b0093b9a25f6dd2e390c}{d0\+\_\+\+N4\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 3 tap gaussian filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a430436bf7328ee9f31e8629e69939c45}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a430436bf7328ee9f31e8629e69939c45}{d0\+\_\+\+N5\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 4 tap gaussian filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_ab3d3fead67d13ff1f71ec1671a7f0a75}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_ab3d3fead67d13ff1f71ec1671a7f0a75}{d1\+\_\+\+N3\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 5 tap gaussian filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a42c5979a0cc3ff593c910114a7a04b54}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a42c5979a0cc3ff593c910114a7a04b54}{d1\+\_\+\+N4\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 3 tap first derivative filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a941413cacffcd396c95b80945cf2ef7b}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a941413cacffcd396c95b80945cf2ef7b}{d1\+\_\+\+N5\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 4 tap first derivative filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a4d0b8b8666422f4f29a55924643844b2}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a4d0b8b8666422f4f29a55924643844b2}{d2\+\_\+\+N3\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 5 tap first derivative filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_aa44e4e7714c800b8ba69135d67e969c1}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_aa44e4e7714c800b8ba69135d67e969c1}{d2\+\_\+\+N4\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 3 tap second derivative filter with Linf norm approximation \end{DoxyCompactList}\item +\mbox{\label{IIRGausDeriv_8h_a99038e1ed42f8611a68f763b70f7f2f7}} +const complex$<$ double $>$ \mbox{\hyperlink{IIRGausDeriv_8h_a99038e1ed42f8611a68f763b70f7f2f7}{d2\+\_\+\+N5\+\_\+\+Linf}} \mbox{[}$\,$\mbox{]} +\begin{DoxyCompactList}\small\item\em 4 tap second derivative filter with Linf norm approximation \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2). + +\begin{DoxySeeAlso}{See also} +From \char`\"{}\+Recursive Gaussian Derivative Filters\char`\"{}, L.\+van.\+Vliet,I.\+T.\+Young and P.\+W.\+Verbeek, 1998 +\end{DoxySeeAlso} +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Release under GNU GPL v2.\+0 +\end{DoxyNote} + + +\doxysubsection{Function Documentation} +\mbox{\label{IIRGausDeriv_8h_a3e168333285d90a0bfd848d9791ca427}} +\index{IIRGausDeriv.h@{IIRGausDeriv.h}!calc\_coeffs@{calc\_coeffs}} +\index{calc\_coeffs@{calc\_coeffs}!IIRGausDeriv.h@{IIRGausDeriv.h}} +\doxysubsubsection{\texorpdfstring{calc\_coeffs()}{calc\_coeffs()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}} +{\footnotesize\ttfamily void calc\+\_\+coeffs (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const complex$<$ double $>$}]{poles\mbox{[}$\,$\mbox{]}, }\item[{const double}]{s, }\item[{float $\ast$}]{coeffs }\end{DoxyParamCaption})} + + + +Compute the coefficients of the filter for scale s, given the poles at scale 2. + + +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em poles} & Poles of the scale 2 filter. \\ +\hline +{\em scale} & Required filter scale (values between 1 and 100 are OK). \\ +\hline +{\em coeffs} & Computed coefficients $(b_0, a_1, a_2, a_3)$\+: +\begin{DoxyItemize} +\item $ b_0 $ is the gain +\item $ (a_1, a_2, a_3)$ are the autoregressive coefficients +\end{DoxyItemize}\\ +\hline +\end{DoxyParams} + + +Definition at line 251 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{252 \{} +\DoxyCodeLine{253 } +\DoxyCodeLine{254 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{255 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_coeffs"{}};} +\DoxyCodeLine{256 } +\DoxyCodeLine{257 \textcolor{keywordflow}{if}(coeffs == NULL)} +\DoxyCodeLine{258 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_coeffs"{}};} +\DoxyCodeLine{259 } +\DoxyCodeLine{260 complex d1\_2, d2\_2, d3\_2, d4\_2, d5\_2;} +\DoxyCodeLine{261 d1\_2 = poles[0];} +\DoxyCodeLine{262 d2\_2 = poles[1];} +\DoxyCodeLine{263 d3\_2 = poles[2];} +\DoxyCodeLine{264 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{265 d4\_2 = poles[3];} +\DoxyCodeLine{266 \textcolor{keywordflow}{else}} +\DoxyCodeLine{267 d4\_2 = 0;} +\DoxyCodeLine{268 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{269 d5\_2 = poles[4];} +\DoxyCodeLine{270 \textcolor{keywordflow}{else}} +\DoxyCodeLine{271 d5\_2 = 0;} +\DoxyCodeLine{272 } +\DoxyCodeLine{273 \textcolor{keywordtype}{double} q, std, lambda;} +\DoxyCodeLine{274 \textcolor{keywordtype}{double} tol = 0.01;} +\DoxyCodeLine{275 complex j(0,1), var;} +\DoxyCodeLine{276 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{277 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{278 q = s/2;} +\DoxyCodeLine{279 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{280 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{281 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{282 \textcolor{keywordflow}{if}( abs(d4\_2) != 0 )} +\DoxyCodeLine{283 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{284 \textcolor{keywordflow}{else}} +\DoxyCodeLine{285 d4\_s = 0;} +\DoxyCodeLine{286 \textcolor{keywordflow}{if}( abs(d5\_2) != 0 )} +\DoxyCodeLine{287 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{288 \textcolor{keywordflow}{else}} +\DoxyCodeLine{289 d5\_s = 0;} +\DoxyCodeLine{290 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{291 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{292 std = sqrt(var.real());} +\DoxyCodeLine{293 \textcolor{keywordflow}{while}( fabs(s-\/std) > tol )} +\DoxyCodeLine{294 \{} +\DoxyCodeLine{295 lambda = s/std;} +\DoxyCodeLine{296 q = q*lambda;} +\DoxyCodeLine{297 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{298 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{299 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{300 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{301 \textcolor{keywordflow}{if}( abs(d4\_2) != 0)} +\DoxyCodeLine{302 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{303 \textcolor{keywordflow}{else}} +\DoxyCodeLine{304 d4\_s = 0;} +\DoxyCodeLine{305 \textcolor{keywordflow}{if}( abs(d5\_2) != 0)} +\DoxyCodeLine{306 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{307 \textcolor{keywordflow}{else}} +\DoxyCodeLine{308 d5\_s = 0;} +\DoxyCodeLine{309 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{310 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{311 std = sqrt(var.real());} +\DoxyCodeLine{312 \}} +\DoxyCodeLine{313 } +\DoxyCodeLine{314 \textcolor{comment}{//computing the filter coeffs}} +\DoxyCodeLine{315 \textcolor{keywordflow}{if}( taps == 3 )} +\DoxyCodeLine{316 \{} +\DoxyCodeLine{317 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s;} +\DoxyCodeLine{318 coeffs[1] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s));} +\DoxyCodeLine{319 coeffs[2] = (float)real(b*(d1\_s + d2\_s + d3\_s));} +\DoxyCodeLine{320 coeffs[3] = (float)real(-\/b);} +\DoxyCodeLine{321 coeffs[4] = 0.0f;} +\DoxyCodeLine{322 coeffs[5] = 0.0f;} +\DoxyCodeLine{323 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];} +\DoxyCodeLine{324 \}} +\DoxyCodeLine{325 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 4)} +\DoxyCodeLine{326 \{} +\DoxyCodeLine{327 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s;} +\DoxyCodeLine{328 coeffs[1] = (float)real(-\/b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{329 coeffs[2] = (float)real(b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s));} +\DoxyCodeLine{330 coeffs[3] = (float)real(-\/b*(d1\_s + d2\_s + d3\_s + d4\_s));} +\DoxyCodeLine{331 coeffs[4] = (float)real(b);} +\DoxyCodeLine{332 coeffs[5] = 0.0f;} +\DoxyCodeLine{333 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];} +\DoxyCodeLine{334 \}} +\DoxyCodeLine{335 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 5)} +\DoxyCodeLine{336 \{} +\DoxyCodeLine{337 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s/d5\_s;} +\DoxyCodeLine{338 coeffs[1] = (float)real(-\/b*(d4\_s*d3\_s*d2\_s*d1\_s + d5\_s*d3\_s*d2\_s*d1\_s + d5\_s*d4\_s*d2\_s*d1\_s + d5\_s*d4\_s*d3\_s*d1\_s + d5\_s*d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{339 coeffs[2] = (float)real(b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s + d5\_s*d2\_s*d1\_s + d5\_s*d3\_s*d1\_s + d5\_s*d3\_s*d2\_s + d5\_s*d4\_s*d1\_s + d5\_s*d4\_s*d2\_s + d5\_s*d4\_s*d3\_s));} +\DoxyCodeLine{340 coeffs[3] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s + d5\_s*d1\_s + d5\_s*d2\_s + d5\_s*d3\_s + d5\_s*d4\_s));} +\DoxyCodeLine{341 coeffs[4] = (float)real(b*(d1\_s + d2\_s + d3\_s + d4\_s + d5\_s));} +\DoxyCodeLine{342 coeffs[5] = (float)real(-\/b);} +\DoxyCodeLine{343 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5]; } +\DoxyCodeLine{344 \}} +\DoxyCodeLine{345 \}} + +\end{DoxyCode} +\mbox{\label{IIRGausDeriv_8h_a3e7f009d38086e228c6ba8b3e5b6055f}} +\index{IIRGausDeriv.h@{IIRGausDeriv.h}!calc\_coeffs@{calc\_coeffs}} +\index{calc\_coeffs@{calc\_coeffs}!IIRGausDeriv.h@{IIRGausDeriv.h}} +\doxysubsubsection{\texorpdfstring{calc\_coeffs()}{calc\_coeffs()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}} +{\footnotesize\ttfamily void calc\+\_\+coeffs (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const complex$<$ double $>$}]{poles\mbox{[}$\,$\mbox{]}, }\item[{float $\ast$}]{coeffs }\end{DoxyParamCaption})} + + + +Compute the coefficients of the filter, given its poles. + + +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em poles} & Poles of the filter. \\ +\hline +{\em coeffs} & Computed coefficients $(b_0, a_1, a_2, a_3)$\+: +\begin{DoxyItemize} +\item $ b_0 $ is the gain +\item $ (a_1, a_2, a_3)$ are the autoregressive coefficients +\end{DoxyItemize}\\ +\hline +\end{DoxyParams} + + +Definition at line 192 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{193 \{} +\DoxyCodeLine{194 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{195 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_coeffs"{}};} +\DoxyCodeLine{196 } +\DoxyCodeLine{197 \textcolor{keywordflow}{if}(coeffs == NULL)} +\DoxyCodeLine{198 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_coeffs"{}};} +\DoxyCodeLine{199 } +\DoxyCodeLine{200 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{201 d1\_s = poles[0];} +\DoxyCodeLine{202 d2\_s = poles[1];} +\DoxyCodeLine{203 d3\_s = poles[2];} +\DoxyCodeLine{204 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{205 d4\_s = poles[3];} +\DoxyCodeLine{206 \textcolor{keywordflow}{else}} +\DoxyCodeLine{207 d4\_s = 0;} +\DoxyCodeLine{208 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{209 d5\_s = poles[4];} +\DoxyCodeLine{210 \textcolor{keywordflow}{else}} +\DoxyCodeLine{211 d5\_s = 0;} +\DoxyCodeLine{212 } +\DoxyCodeLine{213 \textcolor{comment}{//computing the filter coeffs}} +\DoxyCodeLine{214 \textcolor{keywordflow}{if}( taps == 3 )} +\DoxyCodeLine{215 \{} +\DoxyCodeLine{216 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s;} +\DoxyCodeLine{217 coeffs[1] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s));} +\DoxyCodeLine{218 coeffs[2] = (float)real(b*(d1\_s + d2\_s + d3\_s));} +\DoxyCodeLine{219 coeffs[3] = (float)real(-\/b);} +\DoxyCodeLine{220 coeffs[4] = 0.0f;} +\DoxyCodeLine{221 coeffs[5] = 0.0f;} +\DoxyCodeLine{222 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3];} +\DoxyCodeLine{223 \}} +\DoxyCodeLine{224 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 4)} +\DoxyCodeLine{225 \{} +\DoxyCodeLine{226 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s;} +\DoxyCodeLine{227 coeffs[1] = (float)real(-\/b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{228 coeffs[2] = (float)real(b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s));} +\DoxyCodeLine{229 coeffs[3] = (float)real(-\/b*(d1\_s + d2\_s + d3\_s + d4\_s));} +\DoxyCodeLine{230 coeffs[4] = (float)real(b);} +\DoxyCodeLine{231 coeffs[5] = 0.0f;} +\DoxyCodeLine{232 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4];} +\DoxyCodeLine{233 \}} +\DoxyCodeLine{234 \textcolor{keywordflow}{else} \textcolor{keywordflow}{if}(taps == 5)} +\DoxyCodeLine{235 \{} +\DoxyCodeLine{236 complex b = complex(1.0,0.0)/d1\_s/d2\_s/d3\_s/d4\_s/d5\_s;} +\DoxyCodeLine{237 coeffs[1] = (float)real(-\/b*(d4\_s*d3\_s*d2\_s*d1\_s + d5\_s*d3\_s*d2\_s*d1\_s + d5\_s*d4\_s*d2\_s*d1\_s + d5\_s*d4\_s*d3\_s*d1\_s + d5\_s*d4\_s*d3\_s*d2\_s));} +\DoxyCodeLine{238 coeffs[2] = (float)real(b*(d3\_s*d2\_s*d1\_s + d4\_s*d2\_s*d1\_s + d4\_s*d3\_s*d1\_s + d4\_s*d3\_s*d2\_s + d5\_s*d2\_s*d1\_s + d5\_s*d3\_s*d1\_s + d5\_s*d3\_s*d2\_s + d5\_s*d4\_s*d1\_s + d5\_s*d4\_s*d2\_s + d5\_s*d4\_s*d3\_s));} +\DoxyCodeLine{239 coeffs[3] = (float)real(-\/b*(d2\_s*d1\_s + d3\_s*d1\_s + d3\_s*d2\_s + d4\_s*d1\_s + d4\_s*d2\_s + d4\_s*d3\_s + d5\_s*d1\_s + d5\_s*d2\_s + d5\_s*d3\_s + d5\_s*d4\_s));} +\DoxyCodeLine{240 coeffs[4] = (float)real(b*(d1\_s + d2\_s + d3\_s + d4\_s + d5\_s));} +\DoxyCodeLine{241 coeffs[5] = (float)real(-\/b);} +\DoxyCodeLine{242 coeffs[0] = 1.0f + coeffs[1] + coeffs[2] + coeffs[3] + coeffs[4] + coeffs[5]; } +\DoxyCodeLine{243 \}} +\DoxyCodeLine{244 \}} + +\end{DoxyCode} +\mbox{\label{IIRGausDeriv_8h_a2741eb625282f8d68ba971a4431407a5}} +\index{IIRGausDeriv.h@{IIRGausDeriv.h}!calc\_poles@{calc\_poles}} +\index{calc\_poles@{calc\_poles}!IIRGausDeriv.h@{IIRGausDeriv.h}} +\doxysubsubsection{\texorpdfstring{calc\_poles()}{calc\_poles()}} +{\footnotesize\ttfamily void calc\+\_\+poles (\begin{DoxyParamCaption}\item[{int}]{taps, }\item[{const double}]{scale, }\item[{const complex$<$ double $>$}]{oldpoles\mbox{[}$\,$\mbox{]}, }\item[{complex$<$ double $>$}]{newpoles\mbox{[}$\,$\mbox{]} }\end{DoxyParamCaption})} + + + +5 tap second derivative filter with Linf norm approximation + +Compute the poles of the filter for scale s, given the poles at scale 2 +\begin{DoxyParams}{Parameters} +{\em taps} & Number of taps (3, 4, or 5) \\ +\hline +{\em scale} & Required filter scale (values between 1 and 100 are OK). \\ +\hline +{\em oldpoles} & Poles of the scale 2 filter. \\ +\hline +{\em newpoles} & Poles of the computed filter \\ +\hline +\end{DoxyParams} + + +Definition at line 121 of file IIRGaus\+Deriv.\+cpp. + + +\begin{DoxyCode}{0} +\DoxyCodeLine{122 \{} +\DoxyCodeLine{123 \textcolor{keywordflow}{if}((taps < 3)||(taps>5))} +\DoxyCodeLine{124 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}Invalid number of taps in calc\_poles"{}};} +\DoxyCodeLine{125 } +\DoxyCodeLine{126 \textcolor{keywordflow}{if}(newpoles == NULL)} +\DoxyCodeLine{127 \textcolor{keywordflow}{throw} \textcolor{stringliteral}{"{}NULL Pointer argument in calc\_poles"{}};} +\DoxyCodeLine{128 } +\DoxyCodeLine{129 complex d1\_2, d2\_2, d3\_2, d4\_2, d5\_2;} +\DoxyCodeLine{130 d1\_2 = oldpoles[0];} +\DoxyCodeLine{131 d2\_2 = oldpoles[1];} +\DoxyCodeLine{132 d3\_2 = oldpoles[2];} +\DoxyCodeLine{133 \textcolor{keywordflow}{if}(taps > 3)} +\DoxyCodeLine{134 d4\_2 = oldpoles[3];} +\DoxyCodeLine{135 \textcolor{keywordflow}{else}} +\DoxyCodeLine{136 d4\_2 = 0;} +\DoxyCodeLine{137 \textcolor{keywordflow}{if}(taps > 4)} +\DoxyCodeLine{138 d5\_2 = oldpoles[4];} +\DoxyCodeLine{139 \textcolor{keywordflow}{else}} +\DoxyCodeLine{140 d5\_2 = 0;} +\DoxyCodeLine{141 } +\DoxyCodeLine{142 \textcolor{keywordtype}{double} q, std, lambda;} +\DoxyCodeLine{143 \textcolor{keywordtype}{double} tol = 0.01;} +\DoxyCodeLine{144 complex j(0,1), var;} +\DoxyCodeLine{145 complex d1\_s, d2\_s, d3\_s, d4\_s, d5\_s;} +\DoxyCodeLine{146 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{147 q = scale/2;} +\DoxyCodeLine{148 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{149 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{150 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{151 \textcolor{keywordflow}{if}( abs(d4\_2) != 0 )} +\DoxyCodeLine{152 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{153 \textcolor{keywordflow}{else}} +\DoxyCodeLine{154 d4\_s = 0;} +\DoxyCodeLine{155 \textcolor{keywordflow}{if}( abs(d5\_2) != 0 )} +\DoxyCodeLine{156 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{157 \textcolor{keywordflow}{else}} +\DoxyCodeLine{158 d5\_s = 0;} +\DoxyCodeLine{159 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{160 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{161 std = sqrt(var.real());} +\DoxyCodeLine{162 \textcolor{keywordflow}{while}( fabs(scale-\/std) > tol )} +\DoxyCodeLine{163 \{} +\DoxyCodeLine{164 lambda = scale/std;} +\DoxyCodeLine{165 q = q*lambda;} +\DoxyCodeLine{166 \textcolor{comment}{// computing new values for the poles}} +\DoxyCodeLine{167 d1\_s = exp(log(abs(d1\_2))/q)*exp(j*arg(d1\_2)/q);} +\DoxyCodeLine{168 d2\_s = exp(log(abs(d2\_2))/q)*exp(j*arg(d2\_2)/q);} +\DoxyCodeLine{169 d3\_s = exp(log(abs(d3\_2))/q)*exp(j*arg(d3\_2)/q);} +\DoxyCodeLine{170 \textcolor{keywordflow}{if}( abs(d4\_2) != 0)} +\DoxyCodeLine{171 d4\_s = exp(log(abs(d4\_2))/q)*exp(j*arg(d4\_2)/q);} +\DoxyCodeLine{172 \textcolor{keywordflow}{else}} +\DoxyCodeLine{173 d4\_s = 0;} +\DoxyCodeLine{174 \textcolor{keywordflow}{if}( abs(d5\_2) != 0)} +\DoxyCodeLine{175 d5\_s = exp(log(abs(d5\_2))/q)*exp(j*arg(d5\_2)/q);} +\DoxyCodeLine{176 \textcolor{keywordflow}{else}} +\DoxyCodeLine{177 d5\_s = 0;} +\DoxyCodeLine{178 \textcolor{comment}{// computing the variance of the new filter}} +\DoxyCodeLine{179 var = d1\_s*2.0/(d1\_s-\/1.0)/(d1\_s-\/1.0) + d2\_s*2.0/(d2\_s-\/1.0)/(d2\_s-\/1.0) + d3\_s*2.0/(d3\_s-\/1.0)/(d3\_s-\/1.0)+d4\_s*2.0/(d4\_s-\/1.0)/(d4\_s-\/1.0)+d5\_s*2.0/(d5\_s-\/1.0)/(d5\_s-\/1.0);} +\DoxyCodeLine{180 std = sqrt(var.real());} +\DoxyCodeLine{181 \}} +\DoxyCodeLine{182 newpoles[0] = d1\_s;} +\DoxyCodeLine{183 newpoles[1] = d2\_s;} +\DoxyCodeLine{184 newpoles[2] = d3\_s;} +\DoxyCodeLine{185 newpoles[3] = d4\_s;} +\DoxyCodeLine{186 newpoles[4] = d5\_s;} +\DoxyCodeLine{187 \}} + +\end{DoxyCode} diff --git a/doxygen/doc/latex/Makefile b/doxygen/doc/latex/Makefile new file mode 100644 index 0000000..9d67151 --- /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/ScaleSpace_8cpp.tex b/doxygen/doc/latex/ScaleSpace_8cpp.tex new file mode 100644 index 0000000..fdb60dc --- /dev/null +++ b/doxygen/doc/latex/ScaleSpace_8cpp.tex @@ -0,0 +1,25 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\+Scale\+Space.cpp File Reference} +\label{ScaleSpace_8cpp}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/ScaleSpace.cpp@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/src/ScaleSpace.cpp}} + + +Implements a Gaussian Scale Space for floating point images. + + +{\ttfamily \#include $<$i\+Cub/\+Scale\+Space.\+h$>$}\newline +{\ttfamily \#include $<$cstring$>$}\newline +{\ttfamily \#include $<$cstdlib$>$}\newline +{\ttfamily \#include $<$cmath$>$}\newline + + +\doxysubsection{Detailed Description} +Implements a Gaussian Scale Space for floating point images. + +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Released under GNU GPL v2.\+0 +\end{DoxyNote} diff --git a/doxygen/doc/latex/ScaleSpace_8h.tex b/doxygen/doc/latex/ScaleSpace_8h.tex new file mode 100644 index 0000000..19ff42a --- /dev/null +++ b/doxygen/doc/latex/ScaleSpace_8h.tex @@ -0,0 +1,22 @@ +\doxysection{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\+Scale\+Space.h File Reference} +\label{ScaleSpace_8h}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/ScaleSpace.h@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3dBottomup/include/iCub/ScaleSpace.h}} + + +Implements a Gaussian Scale Space for floating point images. + + +{\ttfamily \#include $<$i\+Cub/\+Fast\+Gauss.\+h$>$}\newline + + +\doxysubsection{Detailed Description} +Implements a Gaussian Scale Space for floating point images. + +\begin{DoxyAuthor}{Author} +Alex Bernardino, ISR-\/\+IST +\end{DoxyAuthor} +\begin{DoxyDate}{Date} +2006-\/2007 +\end{DoxyDate} +\begin{DoxyNote}{Note} +Release under GNU GPL v2.\+0 +\end{DoxyNote} diff --git a/doxygen/doc/latex/annotated.tex b/doxygen/doc/latex/annotated.tex new file mode 100644 index 0000000..7381025 --- /dev/null +++ b/doxygen/doc/latex/annotated.tex @@ -0,0 +1,4 @@ +\doxysection{Data Structures} +Here are the data structures with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{\mbox{\hyperlink{structLut}{Lut}} \\*Copyright\+: (C) 2009 Robot\+Cub Consortium Authors\+: Matteo Taiana, Ugo Pattacini Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0 }{\pageref{structLut}}{} +\end{DoxyCompactList} diff --git a/doxygen/doc/latex/dir_09c3d1dd163a66c44752029483303db0.tex b/doxygen/doc/latex/dir_09c3d1dd163a66c44752029483303db0.tex new file mode 100644 index 0000000..6447e3a --- /dev/null +++ b/doxygen/doc/latex/dir_09c3d1dd163a66c44752029483303db0.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app Directory Reference} +\label{dir_09c3d1dd163a66c44752029483303db0}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.tex b/doxygen/doc/latex/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.tex new file mode 100644 index 0000000..53ff560 --- /dev/null +++ b/doxygen/doc/latex/dir_11110cf4ec97ab9f4ccc991ff6fd73d9.tex @@ -0,0 +1,11 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src Directory Reference} +\label{dir_11110cf4ec97ab9f4ccc991ff6fd73d9}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src Directory Reference}} +\subsection*{Files} +\begin{DoxyCompactItemize} +\item +file \hyperlink{FastGauss_8cpp}{Fast\+Gauss.\+cpp} +\begin{DoxyCompactList}\small\item\em Implements 3 Tap I\+IR Gaussian Filtering with Boundary Conditions. \end{DoxyCompactList}\item +file \hyperlink{IIRGausDeriv_8cpp}{I\+I\+R\+Gaus\+Deriv.\+cpp} +\begin{DoxyCompactList}\small\item\em Coefficients and poles of I\+IR Gaussian Derivative Filters (order 0, 1 and 2). \end{DoxyCompactList}\item +file \hyperlink{ScaleSpace_8cpp}{Scale\+Space.\+cpp} +\begin{DoxyCompactList}\small\item\em Implements a Gaussian Scale Space for floating point images. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_16f69bce6b508aa996db90e545a71f98.tex b/doxygen/doc/latex/dir_16f69bce6b508aa996db90e545a71f98.tex new file mode 100644 index 0000000..8b0630a --- /dev/null +++ b/doxygen/doc/latex/dir_16f69bce6b508aa996db90e545a71f98.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src Directory Reference} +\label{dir_16f69bce6b508aa996db90e545a71f98}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src Directory Reference}} diff --git a/doxygen/doc/latex/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.tex b/doxygen/doc/latex/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.tex new file mode 100644 index 0000000..a070c19 --- /dev/null +++ b/doxygen/doc/latex/dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/src Directory Reference} +\label{dir_17fdcf4fd6dbc5dc3a4c390b4cb323f2}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/src Directory Reference}} diff --git a/doxygen/doc/latex/dir_24edfe2b9091337dacb04c2225681c6a.tex b/doxygen/doc/latex/dir_24edfe2b9091337dacb04c2225681c6a.tex new file mode 100644 index 0000000..802144c --- /dev/null +++ b/doxygen/doc/latex/dir_24edfe2b9091337dacb04c2225681c6a.tex @@ -0,0 +1,7 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball Directory Reference} +\label{dir_24edfe2b9091337dacb04c2225681c6a}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\item +directory \hyperlink{dir_09c3d1dd163a66c44752029483303db0}{app} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_461bc6e266c40caf4deffca7b613e586.tex b/doxygen/doc/latex/dir_461bc6e266c40caf4deffca7b613e586.tex new file mode 100644 index 0000000..19c5195 --- /dev/null +++ b/doxygen/doc/latex/dir_461bc6e266c40caf4deffca7b613e586.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include Directory Reference} +\label{dir_461bc6e266c40caf4deffca7b613e586}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_46844ca6f7a7f72255313000c6b6b85e.tex b/doxygen/doc/latex/dir_46844ca6f7a7f72255313000c6b6b85e.tex new file mode 100644 index 0000000..41e0719 --- /dev/null +++ b/doxygen/doc/latex/dir_46844ca6f7a7f72255313000c6b6b85e.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include Directory Reference} +\label{dir_46844ca6f7a7f72255313000c6b6b85e}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_5ba73ae6ed0b41c8033623abea2a8464.tex b/doxygen/doc/latex/dir_5ba73ae6ed0b41c8033623abea2a8464.tex new file mode 100644 index 0000000..c2635cd --- /dev/null +++ b/doxygen/doc/latex/dir_5ba73ae6ed0b41c8033623abea2a8464.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub Directory Reference} +\label{dir_5ba73ae6ed0b41c8033623abea2a8464}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub Directory Reference}} diff --git a/doxygen/doc/latex/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.tex b/doxygen/doc/latex/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.tex new file mode 100644 index 0000000..6c69b8b --- /dev/null +++ b/doxygen/doc/latex/dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation Directory Reference} +\label{dir_5ec8fd5ae47fc4cf5bf3f1d9d508f559}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_61b422eae39885bd24f8acba30ef5313.tex b/doxygen/doc/latex/dir_61b422eae39885bd24f8acba30ef5313.tex new file mode 100644 index 0000000..bd220f0 --- /dev/null +++ b/doxygen/doc/latex/dir_61b422eae39885bd24f8acba30ef5313.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf/models Directory Reference} +\label{dir_61b422eae39885bd24f8acba30ef5313}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf/models Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf/models Directory Reference}} diff --git a/doxygen/doc/latex/dir_756642fb7df32f4fba8cd8cbf5208191.tex b/doxygen/doc/latex/dir_756642fb7df32f4fba8cd8cbf5208191.tex new file mode 100644 index 0000000..eb80b57 --- /dev/null +++ b/doxygen/doc/latex/dir_756642fb7df32f4fba8cd8cbf5208191.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf Directory Reference} +\label{dir_756642fb7df32f4fba8cd8cbf5208191}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_78c59be1348feda52106cbd20414be4b.tex b/doxygen/doc/latex/dir_78c59be1348feda52106cbd20414be4b.tex new file mode 100644 index 0000000..e793377 --- /dev/null +++ b/doxygen/doc/latex/dir_78c59be1348feda52106cbd20414be4b.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app/scripts Directory Reference} +\label{dir_78c59be1348feda52106cbd20414be4b}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app/scripts Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app/scripts Directory Reference}} diff --git a/doxygen/doc/latex/dir_811e15f64083e64bb2a9d8e860a70892.tex b/doxygen/doc/latex/dir_811e15f64083e64bb2a9d8e860a70892.tex new file mode 100644 index 0000000..9ecc4ee --- /dev/null +++ b/doxygen/doc/latex/dir_811e15f64083e64bb2a9d8e860a70892.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control Directory Reference} +\label{dir_811e15f64083e64bb2a9d8e860a70892}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_9ae835d45530d23e4ddf2ad0cc13b598.tex b/doxygen/doc/latex/dir_9ae835d45530d23e4ddf2ad0cc13b598.tex new file mode 100644 index 0000000..8a3952d --- /dev/null +++ b/doxygen/doc/latex/dir_9ae835d45530d23e4ddf2ad0cc13b598.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src Directory Reference} +\label{dir_9ae835d45530d23e4ddf2ad0cc13b598}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src Directory Reference}} diff --git a/doxygen/doc/latex/dir_9f0657da05b23c4879b50332cf355c63.tex b/doxygen/doc/latex/dir_9f0657da05b23c4879b50332cf355c63.tex new file mode 100644 index 0000000..bc497e7 --- /dev/null +++ b/doxygen/doc/latex/dir_9f0657da05b23c4879b50332cf355c63.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app Directory Reference} +\label{dir_9f0657da05b23c4879b50332cf355c63}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app Directory Reference}} diff --git a/doxygen/doc/latex/dir_b27c00042910d6a487ffb0dd3cd42b7b.tex b/doxygen/doc/latex/dir_b27c00042910d6a487ffb0dd3cd42b7b.tex new file mode 100644 index 0000000..05d2ded --- /dev/null +++ b/doxygen/doc/latex/dir_b27c00042910d6a487ffb0dd3cd42b7b.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga/src Directory Reference} +\label{dir_b27c00042910d6a487ffb0dd3cd42b7b}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga/src Directory Reference}} diff --git a/doxygen/doc/latex/dir_b73a721c8cbb3e92535cc94daa204a01.tex b/doxygen/doc/latex/dir_b73a721c8cbb3e92535cc94daa204a01.tex new file mode 100644 index 0000000..c80ce8c --- /dev/null +++ b/doxygen/doc/latex/dir_b73a721c8cbb3e92535cc94daa204a01.tex @@ -0,0 +1,9 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker Directory Reference} +\label{dir_b73a721c8cbb3e92535cc94daa204a01}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\item +directory \hyperlink{dir_9f0657da05b23c4879b50332cf355c63}{app} +\item +directory \hyperlink{dir_46844ca6f7a7f72255313000c6b6b85e}{include} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_bed1e4cba671f75d7de20f48ac2e3ab2.tex b/doxygen/doc/latex/dir_bed1e4cba671f75d7de20f48ac2e3ab2.tex new file mode 100644 index 0000000..a93ad5a --- /dev/null +++ b/doxygen/doc/latex/dir_bed1e4cba671f75d7de20f48ac2e3ab2.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/matlab\+\_\+files Directory Reference} +\label{dir_bed1e4cba671f75d7de20f48ac2e3ab2}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/matlab\+\_\+files Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/matlab\+\_\+files Directory Reference}} diff --git a/doxygen/doc/latex/dir_e598492b3e513106f2ee79440d3c69e6.tex b/doxygen/doc/latex/dir_e598492b3e513106f2ee79440d3c69e6.tex new file mode 100644 index 0000000..bd21b52 --- /dev/null +++ b/doxygen/doc/latex/dir_e598492b3e513106f2ee79440d3c69e6.tex @@ -0,0 +1,2 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src Directory Reference} +\label{dir_e598492b3e513106f2ee79440d3c69e6}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src Directory Reference}} diff --git a/doxygen/doc/latex/dir_e676cb3644873b6bf7df3036a086e762.tex b/doxygen/doc/latex/dir_e676cb3644873b6bf7df3036a086e762.tex new file mode 100644 index 0000000..6cfe7e9 --- /dev/null +++ b/doxygen/doc/latex/dir_e676cb3644873b6bf7df3036a086e762.tex @@ -0,0 +1,7 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup Directory Reference} +\label{dir_e676cb3644873b6bf7df3036a086e762}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\item +directory \hyperlink{dir_461bc6e266c40caf4deffca7b613e586}{include} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_eb22669ebb55c4a1830d5f6f631ad207.tex b/doxygen/doc/latex/dir_eb22669ebb55c4a1830d5f6f631ad207.tex new file mode 100644 index 0000000..4c8cc4e --- /dev/null +++ b/doxygen/doc/latex/dir_eb22669ebb55c4a1830d5f6f631ad207.tex @@ -0,0 +1,13 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub Directory Reference} +\label{dir_eb22669ebb55c4a1830d5f6f631ad207}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub Directory Reference}} +\subsection*{Files} +\begin{DoxyCompactItemize} +\item +file \hyperlink{FastGauss_8h}{Fast\+Gauss.\+h} +\begin{DoxyCompactList}\small\item\em Implements 3 Tap I\+IR Gaussian Filtering with Boundary Conditions. \end{DoxyCompactList}\item +file \hyperlink{IIRFilt_8h}{I\+I\+R\+Filt.\+h} +\begin{DoxyCompactList}\small\item\em Functions for generic, 3 tap, iir filtering. \end{DoxyCompactList}\item +file \hyperlink{IIRGausDeriv_8h}{I\+I\+R\+Gaus\+Deriv.\+h} +\begin{DoxyCompactList}\small\item\em Coefficients and poles of I\+IR Gaussian Derivative Filters (order 0, 1 and 2). \end{DoxyCompactList}\item +file \hyperlink{ScaleSpace_8h}{Scale\+Space.\+h} +\begin{DoxyCompactList}\small\item\em Implements a Gaussian Scale Space for floating point images. \end{DoxyCompactList}\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/dir_ef68c104db6052f7b3e7734a1a1b7a65.tex b/doxygen/doc/latex/dir_ef68c104db6052f7b3e7734a1a1b7a65.tex new file mode 100644 index 0000000..754973a --- /dev/null +++ b/doxygen/doc/latex/dir_ef68c104db6052f7b3e7734a1a1b7a65.tex @@ -0,0 +1,5 @@ +\section{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga Directory Reference} +\label{dir_ef68c104db6052f7b3e7734a1a1b7a65}\index{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga Directory Reference@{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga Directory Reference}} +\subsection*{Directories} +\begin{DoxyCompactItemize} +\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/doxygen.sty b/doxygen/doc/latex/doxygen.sty new file mode 100644 index 0000000..8f59bcc --- /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/files.tex b/doxygen/doc/latex/files.tex new file mode 100644 index 0000000..59a0815 --- /dev/null +++ b/doxygen/doc/latex/files.tex @@ -0,0 +1,34 @@ +\doxysection{File List} +Here is a list of all documented files with brief descriptions\+:\begin{DoxyCompactList} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src/{\bfseries main.\+cpp} }{\pageref{demoForceControl_2src_2main_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src/{\bfseries mainwindow.\+cpp} }{\pageref{mainwindow_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src/{\bfseries mainwindow.\+h} }{\pageref{mainwindow_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src/{\bfseries robot\+\_\+interfaces.\+cpp} }{\pageref{demoForceControl_2src_2robot__interfaces_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Control/src/{\bfseries robot\+\_\+interfaces.\+h} }{\pageref{demoForceControl_2src_2robot__interfaces_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src/{\bfseries main.\+cpp} }{\pageref{demoForceImitation_2src_2main_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src/{\bfseries robot\+\_\+interfaces.\+cpp} }{\pageref{demoForceImitation_2src_2robot__interfaces_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Force\+Imitation/src/{\bfseries robot\+\_\+interfaces.\+h} }{\pageref{demoForceImitation_2src_2robot__interfaces_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/app/scripts/{\bfseries acquire\+Data.\+m} }{\pageref{acquireData_8m}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/src/{\bfseries main.\+cpp} }{\pageref{demoRedBall_2src_2main_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Red\+Ball/src/{\bfseries world.\+cpp} }{\pageref{world_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/demo\+Yoga/src/{\bfseries main.\+cpp} }{\pageref{demoYoga_2src_2main_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\mbox{\hyperlink{FastGauss_8h}{Fast\+Gauss.\+h}} \\*Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions }{\pageref{FastGauss_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\mbox{\hyperlink{IIRFilt_8h}{IIRFilt.\+h}} \\*Functions for generic, 3 tap, iir filtering }{\pageref{IIRFilt_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\mbox{\hyperlink{IIRGausDeriv_8h}{IIRGaus\+Deriv.\+h}} \\*Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2) }{\pageref{IIRGausDeriv_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/{\bfseries pf3d\+Bottomup.\+hpp} }{\pageref{pf3dBottomup_8hpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/include/i\+Cub/\mbox{\hyperlink{ScaleSpace_8h}{Scale\+Space.\+h}} \\*Implements a Gaussian Scale Space for floating point images }{\pageref{ScaleSpace_8h}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/{\bfseries cvfloodfill2.\+cpp} }{\pageref{cvfloodfill2_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\mbox{\hyperlink{FastGauss_8cpp}{Fast\+Gauss.\+cpp}} \\*Implements 3 Tap IIR Gaussian Filtering with Boundary Conditions }{\pageref{FastGauss_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/{\bfseries IIRFilt.\+cpp} }{\pageref{IIRFilt_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\mbox{\hyperlink{IIRGausDeriv_8cpp}{IIRGaus\+Deriv.\+cpp}} \\*Coefficients and poles of IIR Gaussian Derivative Filters (order 0, 1 and 2) }{\pageref{IIRGausDeriv_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/{\bfseries main.\+cpp} }{\pageref{pf3dBottomup_2src_2main_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/{\bfseries pf3d\+Bottomup.\+cpp} }{\pageref{pf3dBottomup_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Bottomup/src/\mbox{\hyperlink{ScaleSpace_8cpp}{Scale\+Space.\+cpp}} \\*Implements a Gaussian Scale Space for floating point images }{\pageref{ScaleSpace_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/app/conf/models/{\bfseries generate\+\_\+shape\+\_\+model.\+py} }{\pageref{generate__shape__model_8py}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub/{\bfseries pf3d\+Tracker.\+hpp} }{\pageref{pf3dTracker_8hpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub/{\bfseries pf3d\+Tracker\+Support.\+hpp} }{\pageref{pf3dTrackerSupport_8hpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/matlab\+\_\+files/{\bfseries write\+\_\+initial\+\_\+ball\+\_\+points.\+m} }{\pageref{write__initial__ball__points_8m}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src/{\bfseries pf3d\+Tracker.\+cpp} }{\pageref{pf3dTracker_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src/{\bfseries pf3d\+Tracker\+Main.\+cpp} }{\pageref{pf3dTrackerMain_8cpp}}{} +\item\contentsline{section}{/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/src/{\bfseries pf3d\+Tracker\+Support.\+cpp} }{\pageref{pf3dTrackerSupport_8cpp}}{} +\end{DoxyCompactList} diff --git a/doxygen/doc/latex/group__app__demoRedBall.tex b/doxygen/doc/latex/group__app__demoRedBall.tex new file mode 100644 index 0000000..8bb751c --- /dev/null +++ b/doxygen/doc/latex/group__app__demoRedBall.tex @@ -0,0 +1,33 @@ +\doxysection{Red-\/\+Ball Demo} +\label{group__app__demoRedBall}\index{Red-\/Ball Demo@{Red-\/Ball Demo}} + + +The Red-\/\+Ball Demo application developed by IIT and ISR. + + +The Red-\/\+Ball Demo application developed by IIT and ISR. + +\hypertarget{group__src__demoYoga_intro_sec}{}\doxysubsection{Description}\label{group__src__demoYoga_intro_sec} +This application launches all the required modules in order to detect and track the 3-\/d position of a target within the image plane applying the particle filter algorithm along with the controllers to move the head accordingly and both arms to reach for the object and eventually grasp it. + +A second mode is also available that allows to track a moving target relying on stereo vision which needs to be calibrated in advance using a feed-\/forward neural network.\hypertarget{group__app__demoRedBall_dep_sec}{}\doxysubsection{Dependencies}\label{group__app__demoRedBall_dep_sec} +Assumes that robot\+Interface (with ICartesian\+Control interface implemented) and i\+Kin\+Gaze\+Ctrl are running.\hypertarget{group__app__demoRedBall_int_sec}{}\doxysubsection{Instantiated Modules}\label{group__app__demoRedBall_int_sec} + +\begin{DoxyItemize} +\item pf3d\+Tracker +\item motion\+CUT +\item demo\+Red\+Ball +\end{DoxyItemize}\hypertarget{group__app__demoRedBall_config_sec}{}\doxysubsection{Configuration Files}\label{group__app__demoRedBall_config_sec} +The file ./conf/config.ini contains the initialization parameters for the demo\+Grasp\+Manager module. The file ./conf/network.ini contains the network weights.\hypertarget{group__app__demoRedBall_howto_sec}{}\doxysubsection{How to run the Application}\label{group__app__demoRedBall_howto_sec} +Customize the file ./app/scripts/$\ast$.template for your specific platform before launching them. + + +\begin{DoxyItemize} +\item ./scripts/demo\+Red\+Ball.xml.\+template\+: detection done via particle filter. +\item ./scripts/demo\+Red\+Ball\+\_\+\+Stereo.xml.\+template\+: detection done with stero. +\item ./scripts/demo\+Red\+Ball\+\_\+\+Impedance.xml.\+template\+: as demo\+Grasp.\+xml.\+template but with impedance control enabled. +\end{DoxyItemize} + +\begin{DoxyNote}{Note} +To enable/disable arms refer to the options available within the config.\+ini file. +\end{DoxyNote} diff --git a/doxygen/doc/latex/group__demo__applications.tex b/doxygen/doc/latex/group__demo__applications.tex new file mode 100644 index 0000000..34ec587 --- /dev/null +++ b/doxygen/doc/latex/group__demo__applications.tex @@ -0,0 +1,22 @@ +\doxysection{Demo Applications} +\label{group__demo__applications}\index{Demo Applications@{Demo Applications}} + + +The app directory stores directories which group sets of configuration files and scripts to run a certain group of modules together. + + +\doxysubsection*{Modules} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{group__app__demoRedBall}{Red-\/\+Ball Demo}} +\begin{DoxyCompactList}\small\item\em The Red-\/\+Ball Demo application developed by IIT and ISR. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +The app directory stores directories which group sets of configuration files and scripts to run a certain group of modules together. + +Each one of them is what we call an application. In other words, an application is an instantiation of a set of modules that run at the same time. + +Documentation for each application goes in each directory. + +Ideally these directories will contain only scripts and ini/txt files. Use src to store source code. \ No newline at end of file diff --git a/doxygen/doc/latex/group__demo__modules.tex b/doxygen/doc/latex/group__demo__modules.tex new file mode 100644 index 0000000..371b25d --- /dev/null +++ b/doxygen/doc/latex/group__demo__modules.tex @@ -0,0 +1,19 @@ +\doxysection{Demo Modules} +\label{group__demo__modules}\index{Demo Modules@{Demo Modules}} + + +This is a list of modules composing the demos. + + +\doxysubsection*{Modules} +\begin{DoxyCompactItemize} +\item +\mbox{\hyperlink{group__src__demoRedBall}{demo\+Red\+Ball}} +\begin{DoxyCompactList}\small\item\em The manager module for the Red-\/\+Ball Demo developed by IIT and ISR. \end{DoxyCompactList}\item +\mbox{\hyperlink{group__src__demoYoga}{demo\+Yoga}} +\begin{DoxyCompactList}\small\item\em Demo for moving the robot joints in a coordinated fashion. \end{DoxyCompactList}\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +This is a list of modules composing the demos. + diff --git a/doxygen/doc/latex/group__icub__pf3dBottomup.tex b/doxygen/doc/latex/group__icub__pf3dBottomup.tex new file mode 100644 index 0000000..6550d34 --- /dev/null +++ b/doxygen/doc/latex/group__icub__pf3dBottomup.tex @@ -0,0 +1,21 @@ +\doxysection{pf3d\+Bottomup} +\label{group__icub__pf3dBottomup}\index{pf3dBottomup@{pf3dBottomup}} + + +$<$$>$ + + +$<$$>$ + +A bottom-\/up approach for generating particles for the \mbox{\hyperlink{group__icub__pf3dTracker}{pf3d\+Tracker}} module + +Copyright (C) 2010 Robot\+Cub Consortium + +Author\+: Martim Brandao + +Note\+: Should you use or reference my work on your own research, please let me know (mbrandao {\itshape AT} isr.\+ist.\+utl.\+pt) + +Image sequence as input, N particles (3D position of balls) as output. + +Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0.\hypertarget{group__src__demoYoga_intro_sec}{}\doxysubsection{Description}\label{group__src__demoYoga_intro_sec} +{\bfseries{For an explanation on how to configure the tracker and bottom up modules, how to connect them, how to run them through the application manager, etc., please have a look at \href{http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker}{\texttt{ this page}}.}} \ No newline at end of file diff --git a/doxygen/doc/latex/group__icub__pf3dTracker.tex b/doxygen/doc/latex/group__icub__pf3dTracker.tex new file mode 100644 index 0000000..a6e32d3 --- /dev/null +++ b/doxygen/doc/latex/group__icub__pf3dTracker.tex @@ -0,0 +1,142 @@ +\doxysection{pf3d\+Tracker} +\label{group__icub__pf3dTracker}\index{pf3dTracker@{pf3dTracker}} + + +$<$$>$ + + +$<$$>$ + +A robust and real-\/time 3D ball tracker. + +Copyright (C) 2009 Robot\+Cub Consortium + +Author\+: Matteo Taiana, \href{http://users.isr.ist.utl.pt/~mtaiana/}{\texttt{ homepage}}. + +Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0.\hypertarget{group__src__demoYoga_intro_sec}{}\doxysubsection{Description}\label{group__src__demoYoga_intro_sec} +This module implements a model-\/based object tracker\+: it estimates the 3D position of a ball given a sequence of images. One estimate is computed for each input image. The tracker outputs a flag that is set to 1 when the module is confident that it is tracking a ball, when the flag is set to 0 the tracker still computes a 3D estimate, but that is meaningless. After 5 frames with confidence under the threshold, the tracker estimate is reset. The module is meant to work together with \mbox{\hyperlink{group__icub__pf3dBottomup}{pf3d\+Bottomup}}, which is a 3D ball detector, but can also work on its own. + +{\bfseries{For an explanation on how to configure the tracker and bottom up modules, how to connect them, how to run them through the application manager, etc., please have a look at \href{http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker}{\texttt{ this page}}.}} + +{\bfseries{The algorithm is described in the paper\+: \char`\"{}\+Tracking objects with generic calibrated sensors\+: an algorithm based on color and 3\+D shape features\char`\"{}, please cite it if you use the tracker in your research.}} + +You can watch a video of the tracker in action \href{http://www.youtube.com/watch?v=Xp8qUhfMzhU}{\texttt{ here}}.\hypertarget{group__src__demoYoga_lib_sec}{}\doxysubsection{Libraries}\label{group__src__demoYoga_lib_sec} + +\begin{DoxyItemize} +\item YARP libraries. +\item Open\+Cv +\end{DoxyItemize}\hypertarget{group__src__demoYoga_parameters_sec}{}\doxysubsection{Parameters}\label{group__src__demoYoga_parameters_sec} +Configuration is done through an initialization file (See for instance icub-\/main/app/pf3d\+Tracker/conf/pf3d\+Tracker.\+ini) Here is an example, with comments\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#configuration file for pf3dTracker\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#module name\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{name /pf3dTracker} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#parameters of the algorithm\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{nParticles 900} +\DoxyCodeLine{\textcolor{preprocessor}{\#nParticles number of particles used}} +\DoxyCodeLine{accelStDev 30} +\DoxyCodeLine{\textcolor{preprocessor}{\#accelStDev standard deviation of the acceleration noise}} +\DoxyCodeLine{insideOutsideDiffWeight 1.5} +\DoxyCodeLine{\textcolor{preprocessor}{\#insideOutsideDiffWeight inside-\/outside difference weight for the likelihood function}} +\DoxyCodeLine{colorTransfPolicy 1} +\DoxyCodeLine{\textcolor{preprocessor}{\#colorTransfPolicy [0=transform the whole image | 1=only transform the pixels you need]}} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#port names and function\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{inputVideoPort /pf3dTracker/video:i} +\DoxyCodeLine{\textcolor{preprocessor}{\#inputVideoPort receives images from the grabber or the rectifying program.}} +\DoxyCodeLine{outputVideoPort /pf3dTracker/video:o} +\DoxyCodeLine{\textcolor{preprocessor}{\#outputVideoPort produces images in which the contour of the estimated ball is highlighted.}} +\DoxyCodeLine{outputDataPort /pf3dTracker/data:o} +\DoxyCodeLine{\textcolor{preprocessor}{\#outputDataPort produces a stream of data in the format: X, Y, Z [meters], likelihood, U, V [pixels], seeing\_object.}} +\DoxyCodeLine{inputParticlePort /pf3dTracker/particles:i} +\DoxyCodeLine{\textcolor{preprocessor}{\#inputParticlePort receives hypotheses on the position of the ball from the bottom up module}} +\DoxyCodeLine{outputParticlePort /pf3dTracker/particles:o} +\DoxyCodeLine{\textcolor{preprocessor}{\#outputParticlePort produces data for the plotter. it is usually not active for performance reasons.}} +\DoxyCodeLine{outputAttentionPort /pf3dTracker/attention:o} +\DoxyCodeLine{\textcolor{preprocessor}{\#outputAttentionPort produces data for the attention system, in terms of a peak of saliency.}} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#projection model and parameters\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#projectionModel, only the perspective one was implemented so far.}} +\DoxyCodeLine{projectionModel perspective} +\DoxyCodeLine{} +\DoxyCodeLine{cameraContext cameraCalibration} +\DoxyCodeLine{cameraFile icubEyes.ini} +\DoxyCodeLine{cameraGroup CAMERA\_CALIBRATION\_LEFT} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#tracked object models\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#trackedObjectType, only sphere was implemented so far.}} +\DoxyCodeLine{trackedObjectType sphere} +\DoxyCodeLine{trackedObjectColorTemplate models/red\_smiley\_2009\_07\_02.bmp} +\DoxyCodeLine{trackedObjectShapeTemplate models/initial\_ball\_points\_smiley\_31mm\_20percent.csv} +\DoxyCodeLine{} +\DoxyCodeLine{motionModelMatrix models/motion\_model\_matrix.csv} +\DoxyCodeLine{trackedObjectTemp current\_histogram.csv} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#initialization method\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#initialization method, only 3dEstimate was implemented so far.}} +\DoxyCodeLine{initializationMethod 3dEstimate} +\DoxyCodeLine{\textcolor{preprocessor}{\#initial position [meters]}} +\DoxyCodeLine{initialX 0} +\DoxyCodeLine{initialY 0} +\DoxyCodeLine{initialZ 0.5 } +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#visualization mode\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#circleVisualizationMode [0=inner and outer circle | 1=one circle with the correct radius]}} +\DoxyCodeLine{\textcolor{preprocessor}{\#default 0. only applies to the sphere.}} +\DoxyCodeLine{circleVisualizationMode 1} +\DoxyCodeLine{} +\DoxyCodeLine{} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#likelihood and reset condition \#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#the tracker produces a value of likelihood at each time step.}} +\DoxyCodeLine{\textcolor{preprocessor}{\#this value can be used to infer if the object it is tracking is the correct one.}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{\#if likelihood<=this value for 5 consecutive frames, the tracker}} +\DoxyCodeLine{\textcolor{preprocessor}{\#assumes it's not seeing the right object and is reinitialized.}} +\DoxyCodeLine{\textcolor{preprocessor}{\#}} +\DoxyCodeLine{\textcolor{preprocessor}{likelihoodThreshold 0.005}} + +\end{DoxyCode} +\hypertarget{group__src__demoYoga_portsa_sec}{}\doxysubsection{Ports Accessed}\label{group__src__demoYoga_portsa_sec} +The tracker need to be connected to a port that streams images, at the very least, in order to work.\hypertarget{group__src__demoYoga_portsc_sec}{}\doxysubsection{Ports Created}\label{group__src__demoYoga_portsc_sec} + +\begin{DoxyItemize} +\item /pf3d\+Tracker/video\+:i receives the image stream given which the ball has to be tracked. +\item /pf3d\+Tracker/video\+:o produces images in which the contour of the estimated ball is highlighted. When the tracker is confident that it\textquotesingle{}s tracking a ball, it draws the contour in green, when it is not confident (it\textquotesingle{}s looking for a ball, but does not yet have a good estimate), it draws the contour in yellow. +\item /pf3d\+Tracker/data\+:o produces a stream of data in the format\+: X, Y, Z \mbox{[}meters\mbox{]}, likelihood, U, V \mbox{[}pixels\mbox{]}, seeing\+\_\+object. ~\newline + X, Y and Z are the estimated coordinates of the tracked ball in the eye reference frame (they can be transformed to the root reference frame by module eye2\+Root\+Frame\+Transformer. The likelihood value indicates how confident the tracker is that the object it\textquotesingle{}s tracking is the right ball (the lower the likelihood, the lower the confidence, but beware that even a perfect match will result in a value pretty far from 1). U and V are the estimated coordinates of the centre of the ball in the image plane, U is horizontal and V vertical, the origin is on the top left corner of the image. Seeing\+\_\+object is a flag, it is set 1 when the likelihood is higher than a threshold specified in the initialization file, it is set to 0 otherwise. When the tracker experiences 5 consecutive images with seeing\+\_\+object==0, the estimate is reset. This prevents the tracker from getting stuck on an unlikely target. +\item /pf3d\+Tracker/particles\+:i receives hypotheses on 3D poses of a ball, normally produced by the \mbox{\hyperlink{group__icub__pf3dBottomup}{pf3d\+Bottomup}} detection module. If the tracker does not receive anything on this port, it behaves normally, i.\+e., it needs more time to find a ball and start tracking it, after initialization. +\item /pf3d\+Tracker/particles\+:o produces data for the plotter. it is usually not active for performance reasons. +\item /pf3d\+Tracker/attention\+:o produces data for the attention system, in terms of a peak of saliency. +\end{DoxyItemize}\hypertarget{group__icub__pf3dTracker_in_files_sec}{}\doxysubsection{Input Data Files}\label{group__icub__pf3dTracker_in_files_sec} +The tracker requires three input files\+: an image file used to build the colour model of the tracked ball, a file defining the motion model applied to the estimate of the ball between frames, and a shape model for the ball, defining its size and the distance between inner and outer contours (see the paper cited in the description section). For more detail on these files, please have a look at the parameters section.\hypertarget{group__icub__pf3dTracker_out_data_sec}{}\doxysubsection{Output Data Files}\label{group__icub__pf3dTracker_out_data_sec} +The module produces one output file that is only useful for debugging (current\+\_\+histogram.\+csv) and can be configured to save the images it produces to files, but this is not recommended\+: use yarpdatadumper instead.\hypertarget{group__src__demoYoga_tested_os_sec}{}\doxysubsection{Tested OS}\label{group__src__demoYoga_tested_os_sec} +Ubuntu Linux, Windows + +\begin{DoxyAuthor}{Author} +Matteo Taiana, \href{http://users.isr.ist.utl.pt/~mtaiana/}{\texttt{ homepage}}. +\end{DoxyAuthor} diff --git a/doxygen/doc/latex/group__src__demoRedBall.tex b/doxygen/doc/latex/group__src__demoRedBall.tex new file mode 100644 index 0000000..dc77625 --- /dev/null +++ b/doxygen/doc/latex/group__src__demoRedBall.tex @@ -0,0 +1,174 @@ +\doxysection{demo\+Red\+Ball} +\label{group__src__demoRedBall}\index{demoRedBall@{demoRedBall}} + + +The manager module for the Red-\/\+Ball Demo developed by IIT and ISR. + + +The manager module for the Red-\/\+Ball Demo developed by IIT and ISR. + +Copyright (C) 2010 Robot\+Cub Consortium Author\+: Ugo Pattacini, Alessandro Roncone + +Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0.\hypertarget{group__src__demoYoga_intro_sec}{}\doxysubsection{Description}\label{group__src__demoYoga_intro_sec} +This module collects the 3-\/d object positions estimated by the particle filter and sends data to the head and arm controllers in order to gaze at the target, reach for it and eventually grasp it. It relies on the YARP ICartesian\+Control interface to control both arms and on the YARP IGaze\+Control interface to control the gaze. + +Furthermore, there exists a second modality that enables to estimate the 3-\/d object position using stereo vision that needs to be calibrated in advance relying on a feed-\/forward neural network. + +Finally, a simulation modality is available to run the demo within gazebo.\hypertarget{group__src__demoYoga_lib_sec}{}\doxysubsection{Libraries}\label{group__src__demoYoga_lib_sec} + +\begin{DoxyItemize} +\item ctrl\+Lib. +\item i\+Kin. +\item YARP libraries. +\end{DoxyItemize}\hypertarget{group__src__demoYoga_parameters_sec}{}\doxysubsection{Parameters}\label{group__src__demoYoga_parameters_sec} +None.\hypertarget{group__src__demoYoga_portsa_sec}{}\doxysubsection{Ports Accessed}\label{group__src__demoYoga_portsa_sec} +The robot interface is assumed to be operative; in particular, the ICartesian\+Control interface must be available. The i\+Kin\+Gaze\+Ctrl must be running. + +In order to run the demo in simulation, such modules can be run with {\ttfamily -\/-\/context gazebo\+Cartesian\+Control}. A template is also available in the folder app/scripts/demo\+Red\+Ball\+\_\+gazebo.\+xml.\+template.\hypertarget{group__src__demoYoga_portsc_sec}{}\doxysubsection{Ports Created}\label{group__src__demoYoga_portsc_sec} + +\begin{DoxyItemize} +\item {\itshape /demo\+Red\+Ball/track\+Target}\+:i receives the 3-\/d position to track. +\item {\itshape /demo\+Red\+Ball/imd\+Target\+Left}\+:i receives the blobs list as produced by the motion\+CUT module for the left eye. +\item {\itshape /demo\+Red\+Ball/imd\+Target\+Right}\+:i receives the blobs list as produced by the motion\+CUT module for the right eye. +\item {\itshape /demo\+Red\+Ball/cmd\+Face}\+:o sends out commands to the face expression high level interface in order to give an emotional representation of the current robot state. +\item {\itshape /demo\+Red\+Ball/speech}\+:o sends a set of predefined sentences in order for an eventual TTS module to use them during the demo. This feature successfully works with the i\+Speak module. The set of predefined sentences to be spoken is defined via .ini file. +\item {\itshape /demo\+Red\+Ball/breather/head}\+:rpc interfaces with the head breather (if available) and disables/enables it according when needed +\item {\itshape /demo\+Red\+Ball/breather/left\+\_\+arm}\+:rpc interfaces with the left arm breather (if available) and disables/enables it according when needed +\item {\itshape /demo\+Red\+Ball/breather/right\+\_\+arm}\+:rpc interfaces with the right arm breather (if available) and disables/enables it according when needed +\item {\itshape /demo\+Red\+Ball/blinker}\+:rpc interfaces with the i\+Cub\+Blinker module (if available) and disables/enables it according when needed +\item {\itshape /demo\+Red\+Ball/look\+Skin}\+:rpc interfaces with the look\+Skin module (if available) and disables/enables it according when needed +\item {\itshape /demo\+Red\+Ball/gui}\+:o sends out info to update target within the icub\+\_\+gui +\item {\itshape /demo\+Red\+Ball/gazebo}\+:o interfaces with the ball model in gazebo +\item {\itshape /demo\+Red\+Ball/rpc} remote procedure call. Recognized remote commands\+: -\/\textquotesingle{}quit\textquotesingle{} quit the module +\end{DoxyItemize}\hypertarget{group__icub__pf3dTracker_in_files_sec}{}\doxysubsection{Input Data Files}\label{group__icub__pf3dTracker_in_files_sec} +None.\hypertarget{group__icub__pf3dTracker_out_data_sec}{}\doxysubsection{Output Data Files}\label{group__icub__pf3dTracker_out_data_sec} +None. \hypertarget{group__src__demoYoga_conf_file_sec}{}\doxysubsection{Configuration Files}\label{group__src__demoYoga_conf_file_sec} +The configuration file passed through the option {\itshape --from} should look like as follows\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{[general]} +\DoxyCodeLine{\textcolor{comment}{// the robot name to connect to}} +\DoxyCodeLine{robot icub} +\DoxyCodeLine{\textcolor{comment}{// the thread period [ms]}} +\DoxyCodeLine{thread\_period 30} +\DoxyCodeLine{\textcolor{comment}{// left arm switch}} +\DoxyCodeLine{left\_arm on} +\DoxyCodeLine{\textcolor{comment}{// right arm switch}} +\DoxyCodeLine{right\_arm on} +\DoxyCodeLine{\textcolor{comment}{// arm trajectory execution time [s]}} +\DoxyCodeLine{traj\_time 2.0} +\DoxyCodeLine{\textcolor{comment}{// reaching tolerance [m]}} +\DoxyCodeLine{reach\_tol 0.01} +\DoxyCodeLine{\textcolor{comment}{// eye used}} +\DoxyCodeLine{eye left} +\DoxyCodeLine{\textcolor{comment}{// homes limbs if target detection timeout expires [s]}} +\DoxyCodeLine{idle\_tmo 5.0} +\DoxyCodeLine{\textcolor{comment}{// enable the use of stereo vision calibrated by NN}} +\DoxyCodeLine{use\_network off} +\DoxyCodeLine{\textcolor{comment}{// NN configuration file}} +\DoxyCodeLine{network network.ini} +\DoxyCodeLine{\textcolor{comment}{// enable the use of speech}} +\DoxyCodeLine{speech on} +\DoxyCodeLine{\textcolor{comment}{// enable the simulation}} +\DoxyCodeLine{simulation off} +\DoxyCodeLine{} +\DoxyCodeLine{[torso]} +\DoxyCodeLine{\textcolor{comment}{// joint switch (min **) (max **) [deg]; 'min', 'max' optional}} +\DoxyCodeLine{pitch on (max 30.0)} +\DoxyCodeLine{roll off} +\DoxyCodeLine{yaw on} +\DoxyCodeLine{} +\DoxyCodeLine{[left\_arm]} +\DoxyCodeLine{\textcolor{comment}{// enable/disable the grasp}} +\DoxyCodeLine{grasp\_enable on} +\DoxyCodeLine{\textcolor{comment}{// the offset [m] to be added to the desired position}} +\DoxyCodeLine{reach\_offset 0.0 -\/0.15 -\/0.05} +\DoxyCodeLine{\textcolor{comment}{// the offset [m] for grasping}} +\DoxyCodeLine{grasp\_offset 0.0 0.0 -\/0.05} +\DoxyCodeLine{\textcolor{comment}{// hand orientation to be kept [axis-\/angle rep.]}} +\DoxyCodeLine{hand\_orientation 0.064485 0.707066 0.704201 3.140572} +\DoxyCodeLine{\textcolor{comment}{// enable impedance velocity mode}} +\DoxyCodeLine{impedance\_velocity\_mode off} +\DoxyCodeLine{impedance\_stiffness 0.5 0.5 0.5 0.2 0.1} +\DoxyCodeLine{impedance\_damping 60.0 60.0 60.0 20.0 0.0} +\DoxyCodeLine{} +\DoxyCodeLine{[right\_arm]} +\DoxyCodeLine{grasp\_enable on} +\DoxyCodeLine{reach\_offset 0.0 0.15 -\/0.05} +\DoxyCodeLine{grasp\_offset 0.0 0.0 -\/0.05} +\DoxyCodeLine{hand\_orientation -\/0.012968 -\/0.721210 0.692595 2.917075} +\DoxyCodeLine{impedance\_velocity\_mode off} +\DoxyCodeLine{impedance\_stiffness 0.5 0.5 0.5 0.2 0.1} +\DoxyCodeLine{impedance\_damping 60.0 60.0 60.0 20.0 0.0} +\DoxyCodeLine{[home\_arm]} +\DoxyCodeLine{\textcolor{comment}{// home position [deg]}} +\DoxyCodeLine{poss -\/30.0 30.0 0.0 45.0 0.0 0.0 0.0} +\DoxyCodeLine{\textcolor{comment}{// velocities to reach home positions [deg/s]}} +\DoxyCodeLine{vels 10.0 10.0 10.0 10.0 10.0 10.0 10.0} +\DoxyCodeLine{} +\DoxyCodeLine{[arm\_selection]} +\DoxyCodeLine{\textcolor{comment}{// hysteresis range added around plane y=0 [m]}} +\DoxyCodeLine{hysteresis\_thres 0.1} +\DoxyCodeLine{} +\DoxyCodeLine{[grasp]} +\DoxyCodeLine{\textcolor{comment}{// ball radius [m] for still target detection}} +\DoxyCodeLine{sphere\_radius 0.05} +\DoxyCodeLine{\textcolor{comment}{// timeout [s] for still target detection}} +\DoxyCodeLine{sphere\_tmo 3.0} +\DoxyCodeLine{\textcolor{comment}{// timeout [s] to open hand after closure}} +\DoxyCodeLine{release\_tmo 3.0} +\DoxyCodeLine{\textcolor{comment}{// open hand positions [deg]}} +\DoxyCodeLine{open\_hand 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0} +\DoxyCodeLine{\textcolor{comment}{// close hand positions [deg]}} +\DoxyCodeLine{close\_hand 0.0 80.0 12.0 18.0 27.0 50.0 20.0 50.0 135.0} +\DoxyCodeLine{\textcolor{comment}{// velocities to reach hand positions [deg/s]}} +\DoxyCodeLine{vels\_hand 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0} +\DoxyCodeLine{} +\DoxyCodeLine{[include speech \textcolor{stringliteral}{"{}speech\_English.ini"{}}]} + +\end{DoxyCode} + + +The latter inclusion is the .ini file needed for the predefined set of sentences to be spoken. The speech during the red ball demo is divided into three states\+: +\begin{DoxyItemize} +\item \mbox{[}speech\+\_\+reach\mbox{]} -\/$>$ it is used when the robot \char`\"{}sees\char`\"{} the ball, and is trying to reach it +\item \mbox{[}speech\+\_\+grasp\mbox{]} -\/$>$ is performed after the grasping action (regardless of its success/failure) +\item \mbox{[}speech\+\_\+idle\mbox{]} -\/$>$ is used after the red ball is pulled away from the robot\textquotesingle{}s sight For each of these states, there is a group in the .ini file. Each line is a sentence that will be spoken by the robot according to its state. Add as many sentences (i.\+e. lines) as you\textquotesingle{}d like to these groups\+: they will be chosen randomly by the manager at runtime. The speech file should look as follows\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{[speech\_reach]} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Oh.! There it is!!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Stay still, otherwise I can't catch it!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Give me the red ball!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Red ball is my precious... Give it to me!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Wait!! I want that ball!"{}}} +\DoxyCodeLine{} +\DoxyCodeLine{[speech\_grasp]} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Thank you dear"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Did I take it?"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}I like playing with the red ball!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Yippi ka yeah!"{}}} +\DoxyCodeLine{} +\DoxyCodeLine{[speech\_idle]} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Oh no! I want to play with the red ball again!"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}I want the red ball to be my wife"{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Playing with the red ball makes me happy, let's do it again."{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}I don't feel tired, let's play again."{}}} +\DoxyCodeLine{\textcolor{stringliteral}{"{}Oh my Gosh!! Where's the red ball??"{}}} + +\end{DoxyCode} + +\end{DoxyItemize}\hypertarget{group__src__demoRedBall_commands_sec}{}\doxysubsection{Available commands}\label{group__src__demoRedBall_commands_sec} +To run the demo in gazebo, the following commands can be used\+: + + +\begin{DoxyItemize} +\item {\ttfamily start} \mbox{[}azi ele ver\mbox{]}\+: to start the demo; optionally, one can provide the position where the robot initially needs to gaze at. +\item {\ttfamily stop}\+: to stop the demo +\item {\ttfamily update\+\_\+pose dx dy dz}\+: to update the ball position with respect to the initial position defined in the world. +\end{DoxyItemize} + +Note that on the real robot the demo automatically starts.\hypertarget{group__src__demoYoga_tested_os_sec}{}\doxysubsection{Tested OS}\label{group__src__demoYoga_tested_os_sec} +Windows, Linux + +\begin{DoxyAuthor}{Author} +Ugo Pattacini, Alessandro Roncone +\end{DoxyAuthor} diff --git a/doxygen/doc/latex/group__src__demoYoga.tex b/doxygen/doc/latex/group__src__demoYoga.tex new file mode 100644 index 0000000..ce030bb --- /dev/null +++ b/doxygen/doc/latex/group__src__demoYoga.tex @@ -0,0 +1,42 @@ +\doxysection{demo\+Yoga} +\label{group__src__demoYoga}\index{demoYoga@{demoYoga}} + + +Demo for moving the robot joints in a coordinated fashion. + + +Demo for moving the robot joints in a coordinated fashion. + +\hypertarget{group__src__demoYoga_intro_sec}{}\doxysubsection{Description}\label{group__src__demoYoga_intro_sec} +This modules move the robot into a series of positions. Repeat forever or until quit (whichever comes first).\hypertarget{group__src__demoYoga_lib_sec}{}\doxysubsection{Libraries}\label{group__src__demoYoga_lib_sec} +YARP libraries.\hypertarget{group__src__demoYoga_parameters_sec}{}\doxysubsection{Parameters}\label{group__src__demoYoga_parameters_sec} +--robot robotname --positions filename.\+txt + +Optionally\+: --verbose\+: print sequence of positions and speeds\hypertarget{group__src__demoYoga_portsa_sec}{}\doxysubsection{Ports Accessed}\label{group__src__demoYoga_portsa_sec} +Access robot\+Interface ports.\hypertarget{group__src__demoYoga_portsc_sec}{}\doxysubsection{Ports Created}\label{group__src__demoYoga_portsc_sec} +Creates remote\+\_\+controlboard for each of the robot parts.\hypertarget{group__src__demoYoga_conf_file_sec}{}\doxysubsection{Configuration Files}\label{group__src__demoYoga_conf_file_sec} +The module requires a sequence of positions\+: --positions. + +The file consists in a few sections\+: +\begin{DoxyCode}{0} +\DoxyCodeLine{time 2} + +\end{DoxyCode} + specifies the time between two movements. + +Follows a file for each robot parts. The file contains the list of positions to cycle. +\begin{DoxyCode}{0} +\DoxyCodeLine{RIGHTARM right\_arm.ini} +\DoxyCodeLine{LEFTARM left\_arm.ini} +\DoxyCodeLine{RIGHTLEG right\_leg.ini} +\DoxyCodeLine{LEFTLEG left\_leg.ini} +\DoxyCodeLine{HEAD head.ini} +\DoxyCodeLine{TORSO torso.ini} + +\end{DoxyCode} +\hypertarget{group__src__demoYoga_tested_os_sec}{}\doxysubsection{Tested OS}\label{group__src__demoYoga_tested_os_sec} +Linux and Windows. + +\begin{DoxyAuthor}{Author} +Lorenzo Natale +\end{DoxyAuthor} diff --git a/doxygen/doc/latex/longtable_doxygen.sty b/doxygen/doc/latex/longtable_doxygen.sty new file mode 100644 index 0000000..a0eb314 --- /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 0000000..e1e5546 --- /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-basic-demos_pf3dTracker_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-basic-demos_pf3dTracker_README.tex new file mode 100644 index 0000000..ca50d8d --- /dev/null +++ b/doxygen/doc/latex/md_C_1_dev_icub-basic-demos_pf3dTracker_README.tex @@ -0,0 +1,3 @@ +To find out more on how to run the tracker, please refer to this \href{http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker}{\texttt{ wiki page}} 🌐 + +You can also drop an email to \href{mailto:mtaiana@isr.ist.utl.pt}{\texttt{ Matteo Taiana}} ✉ \ No newline at end of file diff --git a/doxygen/doc/latex/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.tex b/doxygen/doc/latex/md_C_1_dev_icub-basic-demos_pf3dTracker_matlab_files_README.tex new file mode 100644 index 0000000..e69de29 diff --git a/doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.tex new file mode 100644 index 0000000..ca50d8d --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_README.tex @@ -0,0 +1,3 @@ +To find out more on how to run the tracker, please refer to this \href{http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker}{\texttt{ wiki page}} 🌐 + +You can also drop an email to \href{mailto:mtaiana@isr.ist.utl.pt}{\texttt{ Matteo Taiana}} ✉ \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.tex b/doxygen/doc/latex/md__home_runner_work_icub-basic-demos_icub-basic-demos_gh-pages_pf3dTracker_matlab_files_README.tex new file mode 100644 index 0000000..e69de29 diff --git a/doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.tex new file mode 100644 index 0000000..ca50d8d --- /dev/null +++ b/doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README.tex @@ -0,0 +1,3 @@ +To find out more on how to run the tracker, please refer to this \href{http://mediawiki.isr.ist.utl.pt/wiki/3D_ball_tracker}{\texttt{ wiki page}} 🌐 + +You can also drop an email to \href{mailto:mtaiana@isr.ist.utl.pt}{\texttt{ Matteo Taiana}} ✉ \ No newline at end of file diff --git a/doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.tex b/doxygen/doc/latex/md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README.tex new file mode 100644 index 0000000..e69de29 diff --git a/doxygen/doc/latex/modules.tex b/doxygen/doc/latex/modules.tex new file mode 100644 index 0000000..3885df7 --- /dev/null +++ b/doxygen/doc/latex/modules.tex @@ -0,0 +1,14 @@ +\doxysection{Modules} +Here is a list of all modules\+:\begin{DoxyCompactList} +\item \contentsline{section}{Demo Modules}{\pageref{group__demo__modules}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{demo\+Red\+Ball}{\pageref{group__src__demoRedBall}}{} +\item \contentsline{section}{demo\+Yoga}{\pageref{group__src__demoYoga}}{} +\end{DoxyCompactList} +\item \contentsline{section}{Demo Applications}{\pageref{group__demo__applications}}{} +\begin{DoxyCompactList} +\item \contentsline{section}{Red-\/\+Ball Demo}{\pageref{group__app__demoRedBall}}{} +\end{DoxyCompactList} +\item \contentsline{section}{pf3d\+Tracker}{\pageref{group__icub__pf3dTracker}}{} +\item \contentsline{section}{pf3d\+Bottomup}{\pageref{group__icub__pf3dBottomup}}{} +\end{DoxyCompactList} diff --git a/doxygen/doc/latex/refman.tex b/doxygen/doc/latex/refman.tex new file mode 100644 index 0000000..28ab714 --- /dev/null +++ b/doxygen/doc/latex/refman.tex @@ -0,0 +1,209 @@ +\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-\/basic-\/demos }\\ +\vspace*{1cm} +{\large Generated by Doxygen 1.9.1}\\ +\end{center} +\end{titlepage} +\clearemptydoublepage +\pagenumbering{roman} +\tableofcontents +\clearemptydoublepage +\pagenumbering{arabic} + +%--- Begin generated contents --- +\chapter{\+:warning\+: This method has been superseded by $<$a href=\char`\"{}../app/conf/models/generate\+\_\+shape\+\_\+model.\+py\char`\"{}$>$generate\+\_\+shape\+\_\+model.\+py$<$/a$>$.} +\label{md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README} +\input{md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_matlab_files_README} +\chapter{pf3d\+Tracker} +\label{md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README} +\input{md__home_runner_work_icub_basic_demos_icub_basic_demos_gh_pages_pf3dTracker_README} +\chapter{Module Index} +\input{modules} +\chapter{Data Structure Index} +\input{annotated} +\chapter{File Index} +\input{files} +\chapter{Module Documentation} +\input{group__demo__modules} +\input{group__demo__applications} +\input{group__app__demoRedBall} +\input{group__src__demoRedBall} +\input{group__icub__pf3dTracker} +\input{group__icub__pf3dBottomup} +\input{group__src__demoYoga} +\chapter{Data Structure Documentation} +\input{structLut} +\chapter{File Documentation} +\input{FastGauss_8h} +\input{IIRFilt_8h} +\input{IIRGausDeriv_8h} +\input{ScaleSpace_8h} +\input{FastGauss_8cpp} +\input{IIRGausDeriv_8cpp} +\input{ScaleSpace_8cpp} +%--- End generated contents --- + +% Index +\backmatter +\newpage +\phantomsection +\clearemptydoublepage +\addcontentsline{toc}{chapter}{\indexname} +\printindex + +\end{document} diff --git a/doxygen/doc/latex/structLut.tex b/doxygen/doc/latex/structLut.tex new file mode 100644 index 0000000..53a306e --- /dev/null +++ b/doxygen/doc/latex/structLut.tex @@ -0,0 +1,35 @@ +\doxysection{Lut Struct Reference} +\label{structLut}\index{Lut@{Lut}} + + +Copyright\+: (C) 2009 Robot\+Cub Consortium Authors\+: Matteo Taiana, Ugo Pattacini Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0. + + + + +{\ttfamily \#include $<$pf3d\+Tracker\+Support.\+hpp$>$} + +\doxysubsection*{Data Fields} +\begin{DoxyCompactItemize} +\item +\mbox{\label{structLut_a02ec6461b84d3375c306c383481c00f2}} +int {\bfseries y} +\item +\mbox{\label{structLut_a0ce7d6fb23e6c8cc9eb5935cc6a39d87}} +int {\bfseries u} +\item +\mbox{\label{structLut_ae111fc109ad126980bd30ad3b87d4720}} +int {\bfseries v} +\end{DoxyCompactItemize} + + +\doxysubsection{Detailed Description} +Copyright\+: (C) 2009 Robot\+Cub Consortium Authors\+: Matteo Taiana, Ugo Pattacini Copy\+Policy\+: Released under the terms of the GNU GPL v2.\+0. + +Definition at line 28 of file pf3d\+Tracker\+Support.\+hpp. + + + +The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize} +\item +/home/runner/work/icub-\/basic-\/demos/icub-\/basic-\/demos/gh-\/pages/pf3d\+Tracker/include/i\+Cub/pf3d\+Tracker\+Support.\+hpp\end{DoxyCompactItemize} diff --git a/doxygen/doc/latex/tabu_doxygen.sty b/doxygen/doc/latex/tabu_doxygen.sty new file mode 100644 index 0000000..60fd7e8 --- /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/generate.txt b/doxygen/generate.txt new file mode 100644 index 0000000..5768d63 --- /dev/null +++ b/doxygen/generate.txt @@ -0,0 +1,1262 @@ +# Doxyfile 1.5.1 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = icub-basic-demos + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, +# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, +# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, +# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = YES + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = YES + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = NO + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = NO + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = YES + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +INPUT = ./groups.dox \ + ../demoForceControl \ + ../demoForceImitation \ + ../demoRedBall \ + ../pf3dTracker \ + ../pf3dBottomup \ + ../demoYoga + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +# armSimple... contains too much stuff +# firmware contains a lot of stuff too +# .svn useless directory. Not sure they are parsed by doxygen, but ... just in case +EXCLUDE_PATTERNS = /*.svn/* +# */firmware/* /*armSimpleAnticollisionFilter/* /*primateVision/* + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = YES + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. Otherwise they will link to the documentstion. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = NO + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = YES + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = NO + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = NO + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = YES + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = NO + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = NO + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = NO + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = NO + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = NO + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = NO + +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected +# functions only using the \callgraph command. + +CALL_GRAPH = NO + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected +# functions only using the \callergraph command. + +CALLER_GRAPH = NO + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = NO + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = NO + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# read). + +DOT_TRANSPARENT = NO + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = NO + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- + +# The SEARCHENGINE tag specifies whether or not a search engine should be +# used. If set to NO the values of all tags below this one will be ignored. + +SEARCHENGINE = YES diff --git a/doxygen/groups.dox b/doxygen/groups.dox new file mode 100644 index 0000000..97f579a --- /dev/null +++ b/doxygen/groups.dox @@ -0,0 +1,25 @@ +/** +* +* \defgroup demo_modules Demo Modules +* +* This is a list of modules composing the demos. +* +*/ + +/** +* +* \defgroup demo_applications Demo Applications +* +* The app directory stores directories which group +* sets of configuration files and scripts to run +* a certain group of modules together. Each one +* of them is what we call an application. In other +* words, an application is an instantiation of +* a set of modules that run at the same time. +* +* Documentation for each application goes in each +* directory. +* +* Ideally these directories will contain only scripts +* and ini/txt files. Use src to store source code. +*/ diff --git a/index.html b/index.html new file mode 100644 index 0000000..9e1ed4c --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + + Page Redirection + + + If you are not redirected automatically, follow the link to the documentation + +