GUI for Rehabilitation Robotics

<meta content="OpenOffice.org 2.4 (Linux)" name="GENERATOR" /> <style type="text/css"> <!-- @page { size: 21cm 29.7cm; margin: 2cm } P { margin-bottom: 0.21cm } --> </style> <p lang="en-US">Topic of this talk is the implementation in Python Language of an user interface aimed to the control and the supervision of an anthropomorphic robot, for a robotic rehabilitation application for the upper limb.</p> <p lang="en-US" style="margin-bottom: 0cm;">Control systems for robots are typically made up of two distinct elements: the control system, in the strict sense of the word, which, through algorithms (position, velocity, force, ... control) has to determine instantly the movement and the state of the robot and directly communicate, through dedicated I/O analog/digital cards, with motor drivers and, consequently, with motors which move the robot. Beside this unit (typically at low level), a graphical user interface (GUI), at an higher level, permits the robot to be interfaced with the final user, for the programming, supervision and normal applications.</p> <p lang="en-US" style="margin-bottom: 0cm;">These two main units have different characteristics and requirements: the control system needs an high speed of execution, which let the execution of algorithms many times per second, in order to guarantee an highly reactive response of the system and a fluid execution of trajectories to be executed; moreover, for a correct execution of motion laws, it is necessary that the duration of each control cycle is deterministic in temporal terms. For these two main reasons the use of compiled languages and real-time operating systems is a compulsory choice in order to have high performances. About the user interface, the requisites are completely different: it has to be very user-friendly, highly intuitive and, eventually, easily reconfigurable to satisfy requirements of different users. It has to be able to reduce as much as possible, “the distance and difference of language” which, in a certain way, is between the user and the machine. For this reason Python is an optimum language to develop this sort of application, especially for pc-based control systems.</p> <p lang="en-US" style="margin-bottom: 0cm;">Topic of the talk, is the realization of a pc-based control system, focusing on its GUI, to control a Mitsubishi Pa-10 robot with seven-degrees of freedom, with particular attention for the development of applications in upper-limb rehabilitation field.</p> <p lang="en-US" style="margin-bottom: 0cm;">The low-level control system has been implemented in C++ based on the real-time Linux/Xenomai operating system, on the other side the GUI has been implemented completely in Python.</p> <p lang="en-US" style="margin-bottom: 0cm;">In general terms the interface let to command functionalities of the robot, the selection of different user modalities, the monitoring of the robot state and the visualization of the robot in a tri-dimensional environment.</p> <p lang="en-US" style="margin-bottom: 0cm;">The control system at low level and the GUI (high level) communicate reciprocally through the TCP/IP protocol, so that they can be executed on different platforms or processors not to steal necessary computational resources for the execution of robot control algorithms. The use of this protocol doesn't forbid the execution of both the softwares on a multi-tasking operating system.</p> <p lang="en-US" style="margin-bottom: 0cm;">For the gui, in the strict sense of the word, (windows, buttons, menus, ...) we used the graphic library Qt v4, through PyQt bindings. </p> <p lang="en-US" style="margin-bottom: 0cm;">Particular attention has been used for the creation of the virtual model of the robot. During rehabilitation the robot will be used for the execution of therapies for the upper limb. The user will be able to interact with the robot through a force/torque sensor installed on the end-effector and robot and patient will be able to collaborate during therapies, defined by the therapist. As many researches demonstrate, a virtual environment is extremely important to increase the effectiveness of rehabilitation therapies, stimulating the patient and increasing its level of participation during exercises. For this reason, a virtual environment, based on Vpython, has been created. The geometric model of a generic serial robot can be imported through the STL standard file format.</p> <p lang="en-US" style="margin-bottom: 0cm;">Moreover, curves and surfaces (trajectories and objects), mathematically implemented in the control system can be visually represented.</p> <p lang="en-US" style="margin-bottom: 0cm;">For the representation and analysis of data about robot motion we used PyLab and MatPlotLib libraries, interfaced with Qt4.</p> <p lang="en-US" style="margin-bottom: 0cm;">Main topics shown and analyzed during the talk will be:</p> <p lang="en-US" style="margin-bottom: 0cm;"><br /> </p> <p lang="en-US" style="margin-bottom: 0cm;"><br /> </p> <p lang="en-US" style="margin-bottom: 0cm;"><br /> </p> <ul><li><p lang="en-US" style="margin-bottom: 0cm;">introduction of the application (robot, control system, GUI, aims);</p> </li><li><p lang="en-US" style="margin-bottom: 0cm;">brief description of differences and functionalities of low level control in C++, and of high-level interface, with a description of communication;</p> </li><li><p lang="en-US" style="margin-bottom: 0cm;">analysis of the Python interface focusing on:</p> <ul><li><p lang="en-US" style="margin-bottom: 0cm;">main functionalities for a correct communication with the low level control system, based on proper messages managed by independent threads;</p> </li><li><p lang="en-US" style="margin-bottom: 0cm;">description of the graphic user interface with PyQt4;</p> </li><li><p lang="en-US" style="margin-bottom: 0cm;">description of functionalities implemented with VPython;</p> </li><li><p lang="en-US" style="margin-bottom: 0cm;">description of the use of PyLab and MatPlotLib.</p> </li></ul> </li></ul> <p lang="en-US" style="margin-bottom: 0cm;">Modules have been implemented in order to use them also in other robotic applications.</p> <p lang="en-US" style="margin-bottom: 0cm;">The work here described has been realized in IRAS group (Industrial Robotics & Automation Systems) of the Institute of Industrial Technologies and Automation, Milan, of the Italian National Council of Research.</p><p lang="en-US" style="margin-bottom: 0cm;"><br /></p><p lang="en-US" style="margin-bottom: 0cm;"><br /></p> </p> </div> <div class="when-where"> <a href="/pycon3/programma"><b>pycon3</b> </a> in the track <i>Diffondere Python</i>. </div> <hr /> </div> <div class="column span-4 last"> <div class="details"> <h3>Download</h3> <div class="button download"> <a href="/media/stuff/slides/gui-for-rehabilitation-robotics.pdf">Slide (PDF Document) — 1.3 MB</a> </div> <hr /> <dl> <dt>Language</dt> <dd>IT</dd> <dt>Duration</dt> <dd>45 minutes</dd> </dl> </div> </div> </div> </div> <div class="column span-2 last"> <div id="sponsor"> <h4>Our sponsors</h4> <div class="ad"> <a href="http://www.os3.it/"> <img src="/media/stuff/sponsor/resized/os3.jpg" alt="OS3" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://python.org/psf/"> <img src="/media/stuff/sponsor/resized/python-software-foundation.jpg" alt="Python Software Foundation" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://qt.nokia.com/"> <img src="/media/stuff/sponsor/resized/qt-software.jpg" alt="Qt Software" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.a-tono.com/"> <img src="/media/stuff/sponsor/resized/a-tono.jpg" alt="A-Tono" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://linkgroup.it/"> <img src="/media/stuff/sponsor/resized/link-it.jpg" alt="Link It" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.python.it/"> <img src="/media/stuff/sponsor/resized/comunita-italiana-python.jpg" alt="comunità italiana python" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://2ndquadrant.it/"> <img src="/media/stuff/sponsor/resized/2ndquadrant.jpg" alt="2ndQuadrant" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://dada.dada.net/en/node/21?rif_o=INF"> <img src="/media/stuff/sponsor/resized/dada.jpg" alt="Dada" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.develer.com/landing/develer_software_python_corsi.html"> <img src="/media/stuff/sponsor/resized/develer.jpg" alt="Develer" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.statpro.com/"> <img src="/media/stuff/sponsor/resized/statpro.jpg" alt="Statpro" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://unbit.it/"> <img src="/media/stuff/sponsor/resized/unbit.jpg" alt="Unbit" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.abstract.it/"> <img src="/media/stuff/sponsor/resized/abstract.jpg" alt="Abstract" width="110" height="70" /> </a> </div> <div class="ad"> <a href="http://www.riverbankcomputing.co.uk/software/pyqt/intro"> <img src="/media/stuff/sponsor/resized/riverbank-computing-limited.jpg" alt="Riverbank computing limited" width="110" height="70" /> </a> </div> </div> <!-- /column --> </div> <!-- /container --> </div> <!-- /wrapper --> </div> <div id="footer" style="clear: both"> <div class="container clearfix"> <div id="footer-nav"> <h4>PyCon Quattro</h4> <ul> <li><a href="/pycon4/dove" title="">Dove</a></li> <li><a href="/contatti" title="">Contatti</a></li> <li><a href="/organizzatori" title="">Gli organizzatori</a></li> <li><a href="/faq" title="">FAQ</a></li> <li><a href="/pycon3" title="">PyCon Tre (2009)</a></li> <li><a href="/pycon2" title="">PyCon Due (2008)</a></li> <li><a href="/pycon1" title="">PyCon Uno (2007)</a></li> </ul> </div> <div id="elsewhere"> <h4>Ci trovi anche su…</h4> <ul> <li><img src="/static/708b8c873698/p4/i/twitter-16x16.png" alt="Twitter" width="16" height="16"/><a href="http://twitter.com/pyconit">Twitter</a></li> <li><img src="/static/708b8c873698/p4/i/facebook-16x16.png" alt="Facebook" width="16" height="16"/><a href="http://www.facebook.com/group.php?gid=92045427216">Facebook</a></li> </ul> </div> <div class="column span-7 append-1"> <h4>Credits</h4> <p>Copyright © 2007–2010 Python Italia, with <a href="http://creativecommons.org/licenses/by-nd/3.0/">some rights reserved</a>.</p> <p>CF 94144670489, P. IVA 05753460483</p> </div> <div class="column span-2"> <h4>Accounting System</h4> <p><a href="http://www.softwell.it/">Softwell</a></p> </div> <div class="column span-2 last"> <h4>Progetto grafico</h4> <p><a href="http://passiomatic.com/">Andrea Peltrin</a></p> </div> <hr /> <div id="django-badge"><a href="http://www.djangoproject.com/"><img src="http://media.djangoproject.com/img/badges/djangosite80x15.gif" height="15" alt="A Django site." title="A Django site." /></a></div> </div><!-- container --> </div><!-- /footer --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker("UA-1860245-1"); pageTracker._trackPageview(); } catch(err) { } </script> <script type="text/javascript" src="http://static.hab.la/js/wc.js"></script> <script type="text/javascript"> config = new hbl.hwindow.config(); config.vars["start_hidden"] = 1; wc_init("1751-12112149-10-1389", config); </script> </body> </html>