Specific NAO Class for faster programming the NAO robot in Python 2.7 DIVINTECH
Abstract
Specific NAO Class for programming the camera vision following in Python 3.10.12
Full text
Uses of robotics to improve the instrumental skills of students with Autism Spectrum Disorder through the development of new inclusive contexts (DivInTech) NAO Class 1 NAO Class File 1: __init__.py 1from .import * This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 2: nao_audio_player.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : na o _audi o_ p layer . py 5F u n c ti o n : F i l e w i t h t h e c l a s s t o run a ud io i n NAO 6See ALAudioPlayer : 7h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −audio / a l a u d i o p l a y e r / a l a u d i o p l a y e r −api 8L as t m o d i f i e d : 2 1/ 0 8/2022 9Create d by : SCV 10 ///////////////////////////////////////////////////////////////////////////// """ 11 12 13 " " "++++++++++++++++++++++++++++++++++++++ 14 Libraries 15 ++++++++++++++++++++++++++++++++++++++" " " 16 # General 17 import s u b p r o c e s s 18 import q i 19 import paramiko 20 import os 21 import j s o n 22 23 24 " " "++++++++++++++++++++++++++++++++++++++ 25 C o n s t a n t s C l a s s e s 26 ++++++++++++++++++++++++++++++++++++++" " " 27 DESTINATION = "nao@192 . 1 6 8 . 1 . 4 0 : 2 0 " 28 DEFAULT_PATH = " / home / nao / musicS / " 29 USERNAME = " nao " 30 PASSWORD = " nao " 31 32 33 class Nao_AudioPlayer () : 34 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 35 Name : _ _ i n i t _ _ 36 Func t i o n : i n i t o f t h e c l a s s 37 Paramete rs : s e s s i o n : nao s e s s i o n 38 f i l e : f i l e w ith t h e p a t hs o f t h e audios t o send t o t h e r o b o t 39 ONLY WAV! 40 Retu rn : − 41 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
42 def _ _ i n i t _ _ ( s e l f , s e s s i o n , f i l e = None ) : 43 s e l f . s e s s i o n = s e s s i o n 44 # Get t h e i p o f t h e r o b o t 45 s e l f . i p = s e l f . s e s s i o n . u r l ( ) 46 i p _ i n i t = s e l f . i p . f i n d ( " / " ) + 2 47 ip_e nd = s e l f . i p . f i n d ( " :9559 " ) 48 s e l f . i p = s e l f . ip [ i p _ i n i t : i p_end ] 49 50 # Get t he s e r v i c e ALAudioPlayer . 51 s e l f . a u d i o _ p l a y e r _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALAudioPlayer" ) 52 53 i f f i l e != None : 54 self . send_audio_to_robot( f i l e ) 55 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 56 Name: send_audio_to_robot 57 Func t i o n : s e n ds t h r o u g h scp t h e WAV f i l e s 58 Paramete rs : f i l e _ w i t h _ p a t h s : f i l e w i t h t h e p a ths of th e a u di os t o se nd t o t h e r o b o t 59 ( see / Examples / SendFilesSCP / f i l e s 2 s e n d . j s o n f o r f o r ma t example ) 60 Retu rn : − 61 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 62 def s e n d _ a u d i o _ t o _ r o b o t ( s e l f , f i l e _ w i t h _ p a t h s ) : 63 wit h open ( f i l e _ w i t h _ p a t h s , ’ r ’ ) as f : 64 d a t a = j s o n . lo ad ( f ) 65 for f i l e i n d a t a : 66 f_name_nao = f i l e ["name_in_nao" ] 67 c_p a t h = f i l e [ " p a t h " ] 68 69 ssh = paramiko . SSHClient ( ) 70 ssh . l o a d _ h o s t _ k e y s ( os . p a th . e x pa n du s er ( os . p at h . j o i n ( "~" , " . ssh " , " known_hosts " ) ) ) 71 s s h . c o n n e c t ( s e l f . ip , user na me =USERNAME, p ass wor d =PASSWORD) 72 s f t p = ssh . o p e n _ s f t p ( ) 73 s f t p . put ( c_path , DEFAULT_PATH + f_name_nao ) 74 s f t p . c l o s e ( ) 75 ssh . c l o s e ( ) 76 77 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 78 Name: delete_all_audios_in_robot 79 Func t i o n : d e l e t e s a l l t h e a u d i o s i n s i d e t h e r obo t 80 Paramete rs : − 81 Retu rn : − 82 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 83 def d e l e t e _ a l l _ a u d i o s _ i n _ r o b o t ( s e l f ) : 84 s s h = paramiko . SSHClient ( ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
85 s sh . l o a d _ h o s t _ k e y s ( os . p a th . e x pa n du s er ( os . p at h . j o i n ( " ~" , " . ssh " , " known_hosts " ) ) ) 86 s s h . c o n n e c t ( s e l f . ip , usernam e=USERNAME, pa ssw ord = PASSWORD) 87 s f t p = ss h . o p e n _ s f t p ( ) 88 89 # Updated code below : 90 f i l e s I n R e m o t e A r t i f a c t s = s f t p . l i s t d i r ( pa t h =DEFAULT_PATH) 91 for f i l e i n filesInRemoteArtifacts : 92 s f t p . remove (DEFAULT_PATH + f i l e ) 93 94 # Cl os e t o end 95 s f t p . c l o s e ( ) 96 s s h . c l o s e ( ) 97 98 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 99 Name : p l a y _ a u d i o 100 Func t i o n : p l a ys t h e s p e c i f i e d audio 101 Paramete rs : audio_name : name of th e a udio i n s i d e nao 102 ( see / Examples / SendFilesSCP / f i l e s 2 s e n d . j s o n [ name_in_nao ] ) 103 asy nc : i f t h e sound has t o be p l aye d a s y n c r o n o u s l y 104 Retu rn : − 105 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 106 def p l a y _ a u d i o ( s e l f , audio_name , a sync = True ) : 107 # Path i n s i d e t he ro b o t 108 f i l e I d = s e l f . a u d i o _ p l a y e r _ s e r v i c e . l o a d F i l e (DEFAULT_PATH + audio_name) 109 s e l f . a u d i o _ p l a y e r _ s e r v i c e . p l ay ( f i l e I d , _async=async ) 110 111 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 112 Name : s t o p _ a u d i o 113 Func t i o n : s t o p s a l l a ud ios 114 Paramete rs : − 115 Retu rn : − 116 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 117 def s t o p _ a u d i o ( s e l f ) : 118 s e l f . a u d i o _ p l a y e r _ s e r v i c e . s t o p A l l ( ) 119 self . audio_player_service . unloadAllFiles () This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 3: nao_autonomous_life.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : n a o _ a u t o n o m o u s _ l i f e . py 5F u nc t i o n : F i l e t h a t ch ang es t h e autonomous l i f e o f t h e NAO r o b o t . 6See ALAuntonomousLife : 7h t t p : / / doc . aldebara n . com /2 −1/ naoqi / c ore / a u t o n o m o u s l i f e . htm l 8L as t m o d i f i e d : 1 3 /03/2023 9Create d by : SCV 10 ///////////////////////////////////////////////////////////////////////////// """ 11 12 13 " " "++++++++++++++++++++++++++++++++++++++ 14 Libraries 15 ++++++++++++++++++++++++++++++++++++++" " " 16 # General 17 import s u b p r o c e s s 18 import q i 19 import paramiko 20 import os 21 import j s o n 22 23 24 " " "++++++++++++++++++++++++++++++++++++++ 25 C o n s t a n t s C l a s s e s 26 ++++++++++++++++++++++++++++++++++++++" " " 27 28 """************************************** 29 Name : AUTONOMOUSLIFE_STATES 30 Func t i o n : c o n t a i n s t he p o s s i b l e autonomous 31 l i f e s t a t e s . 32 See : h t t p : / / doc . a ldebaran . com /2 −1/ n aoqi / cor e / a u t o n o m o u s l i f e _ a d v a n c e d . h tm l # a u t o n o m o u s l i f e − s t a t e s 33 See : h t t p : / / doc . a ldebaran . com /2 −8/ r e f / l i f e / autonomous_abilities_management . html?highlight= autonomous 34 35 S o l i t a r y s t a t e 36 −−−−−−−−−−−−−− 37 38 When t h i s s t a t e i s e n t e r e d : 39 This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
40 B as i c Awareness and B r e a t h i n g s e r v i c e s ar e s t a r t e d and parameters r e s e t . 41 Autonomous Launchpad i s s t a r t e d . 42 Only p l u g i n s f o r " s o l i t a r y " group are e na bl ed by d e f a u l t . 43 44 During t h i s s t a t e : 45 46 Any a c t i v i t y can be s t a r t e d v i a ALAutonomousLifeProxy : : sw i t c h F o cus ( ) . 47 S t a r t i n g i n t e r a c t i v e A c t i v i t y w i l l s w i t c h t o i n t e r a c t i v e s t a t e . 48 The s a f e g u a r d and d i s a b l e d s t a t e s may be e n t e r e d . 49 Autonomous Launchpad can n ot be st op ped , and i t s s u g g e s t e d a c t i v i t i e s w i l l be a u t o m a t i c a l l y focu s ed , p o t e n t i a l l y i n t e r r u p t i n g ru n n i n g A c t i v i t y . 50 51 Launchpad A c t i v i t y p r i o r i t i z a t i o n : 52 53 I f a s o l i t a r y and i n t e r a c t i v e b oth have t r u e c o n d i t i o n s a t t h e same time , i n t e r a c t i v e w i l l g et p r i o r i t y . 54 When m u l t i p l e a c t i v i t i e s have t r u e c o n d i t i o n s at t h e same time , t h e one t h a t was f o c u s e d l e a s t r e c e n t l y w i l l g e t priority . 55 During a s o l i t a r y A c t i v i t y , an i n t e r a c t i v e A c t i v i t y may i n t e r r u p t i t t o t a k e th e f o cu s . 56 A s o l i t a r y A c t i v i t y w i l l n o t be i n t e r r u p t e d a not h e r s o l i t a r y A c t i v i t y ( t h i s be h avi o r co u l d change i n t he f u t u r e ) 57 58 59 Interactive state 60 −−−−−−−−−−−−−−−−− 61 62 I n t e r a c t i v e s t a t e i s onl y e n t e r e d : 63 64 when an I n t e r a c t i v e A c t i v i t y i s f o c u s e d . 65 66 When t h i s s t a t e i s e n t e r e d : 67 68 B as i c Awareness and B r e a t h i n g s e r v i c e s w i l l be s t a r t e d and parameters r e s e t . 69 Autonomous Launchpad w i l l be s t o p p e d . 70 71 During t h i s s t a t e : 72 73 I n t e r a c t i v e a c t i v i t i e s can be s t a r t e d v i a ALAutonomousLifeProxy : : s wi tchFocus ( ) 74 Focusing a new i n t e r a c t i v e A c t i v i t y w i l l re −e n t e r t h e i n t e r a c t i v e s t a t e . 75 S o l i t a r y a c t i v i t i e s may not be s t a r t e d , t h i s would cause This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
t h e s o l i t a r y s t a t e to e n f o r c e i t s r u l e s and c r e a t e a bad l i f e c y c l e w i t h t h e u s e r . ( T h i s c o u l d change i n t h e f u t u r e ) 76 The s a f e g u a r d and d i s a b l e d s t a t e may be e n t e r e d . 77 Autonomous Launchpad can be s t a r t e d , i t w i l l not e n f o r c e f o c u s i n g i t s s u g g e s t i o n s . I t w i l l not i n t e r r u p t t h e running A c t i v i t y . 78 When an e n t i r e s t a c k o f i n t e r a c t i v e a c t i v i t i e s has e x i t e d , s o l i t a r y s t a t e w i l l be e n t e r e d . 79 When a l l humans have been l o s t , t h e i n t e r a c t i v e A c t i v i t y w i l l be f o r c i b l y e x i t e d . ( Th i s i s not y e t im plem ente d ) 80 81 82 Disa b l e d s t a t e 83 −−−−−−−−−−−−−− 84 When t h i s s t a t e i s e n t e r e d : 85 86 Focused A c t i v i t y w i l l be s t oppe d and s t a c k c l e a r e d . 87 B as i c Awareness and B r e a t h i n g s e r v i c e s w i l l be s t o p p e d i f t h e y a re r unning . 88 Autonomous Launchpad . w i l l be s t o p p e d . 89 90 During t h i s s t a t e : 91 92 No A c t i v i t y can be s t a r t e d v i a ALAutonomousLifeProxy : : switchFocus () 93 Autonomous Launchpad can n o t be s t a r t e d . 94 The s a f e g u a r d or i n t e r a c t i v e s t a t e may not be e n t e r e d . 95 96 To e x i t t h i s s t a t e : 97 98 t h e d e v e l o p e r may c a l l ALAutonomousLifeProxy : : s e t S t a t e ( ) 99 T h i s a c t i o n w i l l be p r o v i d e d i n a d e f a u l t s t a r t u p b e h a v i o r where d e s i r e d . 100 101 102 Safegua r d s t a t e 103 −−−−−−−−−−−−−−− 104 Safegua rd s t a t e i s e n t e r e d when : 105 106 A c r i t i c a l r e f l e x r a i s e d . 107 The d e v e l o p e r sho ul d n ot e n t e r t h i s s t a t e . E n t e r i n g t h i s s t a t e i s r e s e r v e d f o r c r i t i c a l Aldebaran code . 108 A c r i t i c a l r e f l e x i s r a i s e d when ALBodyTemperature s e e s t h a t a c r i t i c a l j o i n t i s too h ot to f u n c t i o n , or i f ALDiagnosis s ee s t h a t c r i t i c a l hardware i s not f u n c t i o n i n g p rope r l y , as d e f i n e d i n L e vel of f a i l u r e severity . 109 This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
110 When t h i s s t a t e i s e n t e r e d : 111 112 Focused A c t i v i t y i s s t o p ped and s t a c k c l e a r e d . 113 B as i c Awareness and B r e a t h i n g s e r v i c e s ar e s t o p p e d i f t h e y are r u n n i n g . 114 Autonomous Launchpad i s s t o p p e d . 115 The r e f l e x i s t h e n p r o c e s s e d . 116 Based on t h e outcome o f t he r e f l e x , t he s o l i t a r y s t a t e may be re −e n t e r e d . 117 For damaged hardware , t h e r o b o t d oes n o t e x i t s a f e g u a r d s t a t e . 118 For o v e r h e a t i n g , t h e r o bo t e x i t s t h e s a f e g u a r d s t a t e a f t e r c o o l i n g down s u f f i c i e n t l y . 119 120 During t h i s s t a t e : 121 122 No A c t i v i t y can be s t a r t e d v i a ALAutonomousLifeProxy : : switchFocus () 123 Autonomous Launchpad can n o t be s t a r t e d . 124 The s a f e g u a r d s t a t e may be re −e n t e r e d f o r a h i g h e r p r i o r i t y reflex . 125 126 ************************************** """ 127 class AUTONOMOUSLIFE_STATES ( ) : 128 SOLITARY = " s o l i t a r y " 129 INTERACTIVE = " i n t e r a c t i v e " 130 DISABLED = " d i s a b l e d " 131 SAFEGUARD = " s a f e g u a r d " 132 133 " " "++++++++++++++++++++++++++++++++++++++ 134 Class 135 ++++++++++++++++++++++++++++++++++++++" " " 136 class Nao_AutonomousLife () : 137 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 138 Name : _ _ i n i t _ _ 139 Func t i o n : i n i t o f t h e c l a s s 140 Paramete rs : s e s s i o n : nao s e s s i o n 141 f i l e : f i l e w ith t h e p a t hs o f t h e audios t o send t o t h e r o b o t 142 ONLY WAV! 143 Retu rn : − 144 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 145 def _ _ i n i t _ _ ( s e l f , s e s s i o n ) : 146 s e l f . s e s s i o n = s e s s i o n 147 148 # Get t he s e r v i c e ALAutonomousLife 149 s e l f . a u t o n o m o u s _ l i f e _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALAutonomousLife" ) 150 This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
151 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 152 Name: set_autonomous_life 153 Func t i o n : s e t s th e autonomous l i f e t o an s p e c i f i e d s t a t e . 154 Paramete rs : s t a t e : s e e AUTONOMOUSLIFE_STATES c l a s s . 155 Retu rn : − 156 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 157 def s e t _ a u t o n o m o u s _ l i f e ( s e l f , s t a t e ) : 158 s e l f . a u t o n o m o u s _ l i f e _ s e r v i c e . s e t S t a t e ( s t a t e ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
280 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_LEFT_FRONT, _LEDS_GROUPS . HEAD_LEFT_FRONT) 281 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_FRONT, _LEDS_GROUPS .HEAD_FRONT) 282 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_RIGHT_MIDDLE, _LEDS_GROUPS . HEAD_RIGHT_MIDDLE) 283 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_LEFT_MIDDLE , _LEDS_GROUPS . HEAD_LEFT_MIDDLE) 284 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_MIDDLE, _LEDS_GROUPS .HEAD_MIDDLE) 285 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_RIGHT_REAR , _LEDS_GROUPS . HEAD_RIGHT_REAR) 286 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_LEFT_REAR , _LEDS_GROUPS . HEAD_LEFT_REAR) 287 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . HEAD_REAR, _LEDS_GROUPS .HEAD_REAR) 288 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EYES_FULL , _LEDS_GROUPS . EYES_FULL) 289 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EYE_RIGHT , _LEDS_GROUPS . EYE_RIGHT) 290 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EYE_LEFT , _LEDS_GROUPS . EYE_LEFT ) 291 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EARS_FULL , _LEDS_GROUPS . EARS_FULL) 292 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EAR_RIGHT , _LEDS_GROUPS . EAR_RIGHT) 293 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . EAR_LEFT , _LEDS_GROUPS . EAR_LEFT) 294 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . FEET_FULL , _LEDS_GROUPS . FEET_FULL) 295 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . FOOT_RIGHT , _LEDS_GROUPS . FOOT_RIGHT) 296 s e l f . l e d s _ s e r v i c e . c r e a t e G r o u p (NAMES_LEDS_GROUPS . FOOT_LEFT , _LEDS_GROUPS . FOOT_LEFT) 297 298 ################################################### 299 ## LEDS GROUPS FUNCTIONS ## 300 ################################################### 301 302 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 303 Name : t ur n_on_ gr ou p 304 Func t i o n : t u r n s on a group o f l e d s 305 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 306 Retu rn : − 307 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 308 def tur n _ o n _ gr oup ( s e l f , group_name ) : 309 s e l f . l e d s _ s e r v i c e . on ( group_name ) 310 311 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
312 Name : t u r n _ o f f _ g r o u p 313 Func t i o n : t u r n s on a group o f l e d s 314 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 315 Retu rn : − 316 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 317 def t u r n _ o f f _ g r o u p ( s e l f , group_name ) : 318 s e l f . l e d s _ s e r v i c e . o f f ( group_name ) 319 320 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 321 Name: set_intensity 322 Func t i o n : s e t s t h e i n t e n s i t y o f a group o f l e d s 323 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 324 i n t e n s i t y : v al u e between 0 and 1 325 Retu rn : − 326 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 327 def s e t _ i n t e n s i t y ( s e l f , group_name , i n t e n s i t y ) : 328 s e l f . l e d s _ s e r v i c e . s e t I n t e n s i t y ( group_name , i n t e n s i t y ) 329 330 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 331 Name : f a d e 332 Func t i o n : s e t s t h e i n t e n s i t y o f a group o f l e d s w i t h i n a g i v e n t i m e 333 m ai n ly us ed f o r e a r s 334 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 335 i n t e n s i t y : v al u e between 0 and 1 336 d u r a t i o n : t ime t o a r r i v e t o t h e i n t e n s i t y 337 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 338 a s y n c r o n o u s l y 339 Retu rn : − 340 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 341 def f a d e ( s e l f , group_name , i n t e n s i t y , d u ra t io n , asy nc ) : 342 s e l f . l e d s _ s e r v i c e . f a d e ( group_name , i n t e n s i t y , d ur at io n , _async = async ) 343 344 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 345 Name : f a de _ rg b 346 Func t i o n : s e t s t h e c o l o r o f a group o f l e d s w i t h i n a g i ve n t i m e 347 n o t us ed f o r e a r s 348 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 349 c o l o r : s ee c l a s s COLORS 350 d u r a t i o n : t i m e t o a r r i v e t o t he c ol or 351 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 352 a s y n c r o n o u s l y 353 Retu rn : − 354 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 355 def f a d e _ r g b ( s e l f , group_name , c o lo r , d u r a t i o n , a sy nc ) : This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
356 s e l f . l e d s _ s e r v i c e . fadeRGB ( group_name , colo r , d u ra t io n , _async = async ) 357 358 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 359 Name: fade_list_rgb 360 Func t i o n : e x e c u t e s a l i s t o f c o lo r commands f o r a LED or a group o f LEDs 361 ( l i k e a t i m e l i n e f o r LEDs ) . 362 n o t us ed f o r e a r s 363 Par amet ers : group_name : one o f t h e c l a s s NAMES_LEDS_GROUPS 364 l i s t _ r g b : l i s t with d i f f e r e n t c o l o r s ( s e e c l a s s COLORS) 365 l i s t _ d u r a t i o n : l i s t with th e t i m e t o show each c ol o r o f l i s t _ r g b 366 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 367 a s y n c r o n o u s l y 368 Retu rn : − 369 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 370 def f a d e _ l i s t _ r g b ( s e l f , group_name , l i s t _ r g b , l i s t _ d u r a t i o n , async ) : 371 s e l f . l e d s _ s e r v i c e . fadeListRGB ( group_name , l i s t _ r g b , l i s t _ d u r a t i o n , _async = async ) 372 373 ############################################ 374 ## EARS FUNCTIONS ## 375 ############################################ 376 377 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 378 Name : s e t _ e a r _ a n g l e 379 F u n c t io n : an a n i m a t i o n t o show a d i r e c t i o n w i t h t h e e a r s 380 P ar am et er s : d eg r e e : The a n gl e you want t o show i n d e g r e e s ( i n t ) . 0 i s up , 90 381 i s forwards , 180 i s down and 270 i s back . 382 d u r a t i o n : d u r a t i o n i n seconds o f t h e a nim ation 383 l eave_on : I f t r u e t h e l a s t l e d i s l e f t on a t t h e end o f t h e 384 a n i m a t i o n . 385 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 386 a s y n c r o n o u s l y 387 Retu rn : − 388 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 389 def s e t _ e a r _ a n g l e ( s e l f , degree , d u r a t i o n , leave_on , as ync ) : 390 s e l f . l e d s _ s e r v i c e . earLeds S e t A n g l e ( degree , d u r a t i o n , leave_on , _async = async ) 391 392 ############################################ This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
393 ## EYES FUNCTIONS ## 394 ############################################ 395 396 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 397 Name : e y e s _ r o t a t i o n 398 Func t i o n : r o t a t i o n of t h e e y e s o f nao 399 Paramete rs : c o l o r : see c l a s s COLORS 400 r o t a t i o n _ t i m e : t i m e t o c om p le t e a l oop 401 a n i m a t i o n _ t i m e : t i m e t o be d oi ng t h e a n im a t i on 402 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 403 a s y n c r o n o u s l y 404 Retu rn : − 405 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 406 def e y e s _ r o t a t i o n ( s e l f , c o l or , r o t a t i o n _ t i m e , anima t i o n _ t im e , asy nc ) : 407 s e l f . l e d s _ s e r v i c e . r o t a t e E y e s ( c o l or , r o t a t i o n _ t i m e , ani m a t i o n _ t im e , _async = a sync ) 408 409 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 410 Name: random_eyes_animation 411 F u n c t io n : l a un c h a random a n i m a t i o n i n e y e s 412 Paramete rs : d u r a t i o n : d u r a t i o n o f t he a ni mation i n s ec onds 413 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 414 a s y n c r o n o u s l y 415 Retu rn : − 416 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 417 def rand om _e yes _a ni mat io n ( s e l f , d u r a t i o n , async ) : 418 s e l f . l e d s _ s e r v i c e . randomEyes ( d ur at io n , _async = async ) 419 420 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 421 Name : e y e s _ b l i n k i n g 422 Func t i o n : b l i n k i n g o f nao ’ s e y e s 423 Paramete rs : − 424 Retu rn : − 425 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 426 def e y e s _ b l i n k i n g ( s e l f ) : 427 p r o b B l i n k i n g = 0. 4 428 p r o b D ou b l e B l i nk i n g = 0 . 4 429 430 i f random . uni fo rm ( 0 . 0 , 1 . 0 ) < p r o b B l i n k i n g : 431 s e l f . f ad e (NAMES_LEDS_GROUPS . EYES_FULL , 0 . 0 , 0 . 0 , F a l s e ) 432 tim e . s l e e p ( 0 . 1 ) 433 s e l f . f ade (NAMES_LEDS_GROUPS. EYES_FULL , 0 . 5 , 0 . 2 , F a l s e ) 434 e l i f random . uni form ( 0 . 0 , 1 . 0 ) < p r o b D o ub l eB li nk i ng : 435 s e l f . f ade (NAMES_LEDS_GROUPS. EYES_FULL , 0 . 0 , 0 . 0 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
F a l s e ) 436 tim e . s l e e p ( 0 . 1 ) 437 s e l f . f ade (NAMES_LEDS_GROUPS. EYES_FULL , 0 . 5 , 0 . 2 , F a l s e ) 438 s e l f . f ade (NAMES_LEDS_GROUPS. EYES_FULL , 0 . 0 , 0 . 0 , F a l s e ) 439 tim e . s l e e p ( 0 . 1 ) 440 s e l f . f ade (NAMES_LEDS_GROUPS. EYES_FULL , 0 . 5 , 0 . 2 , F a l s e ) 441 442 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 443 Name : wink_ eye 444 F u nc t i on : wink o f nao ’ s e ye 445 Paramete rs : eye : i n d i c a t e s t he eye t o wink : EYE_RIGHT or EYE_LEFT of 446 NAMES_LEDS_GROUPS c l a s s 447 Retu rn : − 448 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 449 def wink_eye ( s e l f , eye ) : 450 s e l f . f a de ( eye , 0 . 0 , 0 . 0 , F a l s e ) 451 tim e . s l e e p ( 0 . 1 ) 452 s e l f . f a de ( eye , 0 . 5 , 0 . 2 , F a l s e ) 453 454 ################################################# 455 ## ANIMATION FUNCTIONS ## 456 ################################################# 457 458 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 459 Name: all_body_colored 460 F u n c t io n : l a un c h a g r ee n / y e l l o w / r ed r a s t a a n i m a t i o n on a l l body . 461 Paramete rs : d u r a t i o n : d u r a t i o n o f t he a ni mation i n s ec onds 462 async : b ool ean t h a t i n d i c a t e s i f t h e a c t i o n must be done 463 a s y n c r o n o u s l y 464 Retu rn : − 465 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 466 def a l l _ b o d y _ c o l o r e d ( s e l f , d u r a ti o n , async ) : 467 s e l f . l e d s _ s e r v i c e . r a s t a ( d ur at io n , _async = async ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 5: nao_motion.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : nao_motion . py 5F u nc t i o n : F i l e w i t h t h e c l a s s t o make move t h e r o b o t nao 6See ALAnimationPlayer: 7h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −m oti on / a l a n i m a t i o n p l a y e r / a l a n i m a t i o n p l a y e r −api 8See ALMotion : 9h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d e ve lo p e r −g u i de / naoqi −a p i s / naoqi −m ot ion / a l m o t i o n 10 See ALRobotPosture : 11 h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −m oti on / alrobotposture#alrobotposture 12 # See j o i n t s : 13 h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / nao− d ocumen ta t ion / nao−d e ve l oper −g ui d e / k i n e m a t i c s −da ta / joints 14 C r e a t i o n d a t e : 0 1 / 08 /2 0 2 2 15 L as t m o d i f i e d : 2 1 /08/2022 16 Create d by : SCV 17 ///////////////////////////////////////////////////////////////////////////// """ 18 19 20 " " "++++++++++++++++++++++++++++++++++++++ 21 Libraries 22 ++++++++++++++++++++++++++++++++++++++" " " 23 import q i 24 import Movements . movements as move 25 26 " " "++++++++++++++++++++++++++++++++++++++ 27 C o n s t a n t s C l a s s e s 28 ++++++++++++++++++++++++++++++++++++++" " " 29 30 """************************************** 31 Name : HEAD_TACTILE_GESTURES 32 Func t i o n : c l a s s t h a t c o n t a i n s th e a n imatio n t ag s . 33 See : h t t p s : / / d e ve l op e r . s o f t b a n k r o b o t i c s . com / nao6 / naoqi −develop e r −g ui de / naoqi −a p is / naoqi −motion / a l a n i m a t i o n p l a y e r / a l a n i m a t i o n p l a y e r −advanced # a n im at io np l ay er − l i s t −b eh av ior s −nao 34 ************************************** """ 35 class ANIMATION_TAGS ( ) : This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
36 AFFIRMATIVE_CONTEXT = " a f f i r m a t i v e _ c o n t e x t " 37 ANTERIOR = " a n t e r i o r " 38 COMPARISON = " comparison " 39 CONFIRMATION = " c o n f i r m a t i o n " 40 DISAPPOINTMENT = " d i s a p p o i n t m e n t " 41 DIVERSITY = " d i v e r s i t y " 42 EXCLAMATION = " e x c l a m a t i o n " 43 GLOBAL = " g l o b a l " 44 GROUP = " group " 45 HESITATION = " h e s i t a t i o n " 46 INTERROGATIVE = " i n t e r r o g a t i v e " 47 JOY = " joy " 48 LEFT_SIDE = " l e f t _ s i d e " 49 LONGRANGE = " l o n g r a n g e " 50 NEGATIVE_CONTEXT = " n e g a t i v e _ c o n t e x t " 51 OVERALL = " o v e r a l l " 52 PEOPLE = " p e o p l e " 53 REFUSAL = " r e f u s a l " 54 RIGHT_SIDE = " r i g h t _ s i d e " 55 SELF = " s e l f " 56 SHORTRANGE = " s h o r t r a n g e " 57 TOP = " top " 58 USER = " u s e r " 59 60 """************************************** 61 Name : ROBOT_POSTURES 62 Func t i o n : c l a s s t h a t c o n t a i n s th e r ob o t p o s t u r e s . 63 See : h t t p : / / doc . aldebara n . com /2 −8/ f a m i l y / n a o _ t e c h n i c a l / p o s t u r e s _ n a o v 6 . h t ml # naov6 −p o s t u r e s 64 ************************************** """ 65 class ROBOT_POSTURES ( ) : 66 CROUCH = " Crouch " 67 LYING_BACK = " LyingBack " 68 LYING_BELLY = " LyingBelly " 69 SIT = " S i t " 70 SIT_RELAX = " S i t R e l a x " 71 STAND = " Stand " 72 STAND_INIT = " S t a n d I n i t " 73 STAND_ZERO = " Sta ndZero " 74 75 """************************************** 76 Name : JOINTS 77 Func t i o n : c l a s s t h a t c o n t a i n s th e r ob o t j o i n t s . 78 See : h t t p s : / / d e ve l op e r . s o f t b a n k r o b o t i c s . com / nao6 / nao− d oc um e n tat io n / nao−d evel op e r −g uide / a c t u a t o r −se nso r − l i s t # rhand 79 h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / nao−d o c u me nt a ti on / nao−d e ve l ope r −guide / k i n e m a t i c s −dat a / j o i n t s 80 ************************************** """ 81 class JOINTS ( ) : This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
82 ############## 83 # HEAD # 84 ############## 85 HEAD_PITCH = " HeadPitch " 86 HEAD_YAW = "HeadYaw" 87 88 ############## 89 # RARM # 90 ############## 91 R_SHOULDER_ROLL = " RS h o u lderRoll " 92 R_SHOULDER_PITCH = " R S h o u l d e r P i t c h " 93 94 R_ELBOW_YAW = "RElbowYaw" 95 R_ELBOW_ROLL = " RElbowRoll " 96 97 R_WRIST_YAW = " RWristYaw " 98 99 R_HAND = "RHand" 100 101 ############## 102 # LARM # 103 ############## 104 L_SHOULDER_ROLL = " L S h o u l d e r Ro l l " 105 L_SHOULDER_PITCH = " L S h o u l d e r P i t c h " 106 107 L_ELBOW_YAW = "LElbowYaw" 108 L_ELBOW_ROLL = " LElbowRoll " 109 110 L_WRIST_YAW = " LWristYaw " 111 112 L_HAND = "LHand" 113 114 ############## 115 # RLEG # 116 ############## 117 R_HIP_YAW_PITCH = " RHipYawPitch " 118 R_HIP_PITCH = " RHipPitch " 119 R_HIP_ROLL = " RHipRoll " 120 121 R_KNEE_PITCH = " RKneePitch " 122 123 R_ANKLE_PITCH = " RAnklePitch " 124 R_ANKLE_ROLL = " RAnkleRoll " 125 126 ############## 127 # LLEG # 128 ############## 129 L_HIP_YAW_PITCH = " LHipYawPitch " 130 L_HIP_PITCH = " L HipP itch " This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
131 L_HIP_ROLL = " LHipRoll " 132 133 L_KNEE_PITCH = " LKneePitch " 134 135 L_ANKLE_PITCH = " LAnklePitch " 136 L_ANKLE_ROLL = " LAnkleRoll " 137 138 """************************************** 139 Name : DEFINED_MOVEMENTS_CHOREGRAPH 140 Func t i o n : c l a s s t h a t c o n t a i n s movements 141 s t o r e d from Choregraph . 142 ************************************** """ 143 class DEFINED_MOVEMENTS_CHOREGRAPH( ) : 144 # Moods 145 ## P o s i t i v e 146 HAPPY = "HAPPY" 147 KISSES = "KISSES" 148 EXCITED = "EXCITED" 149 ## Neutral 150 THINKING = "THINKING" 151 152 # E n t e r t a i n m e n t 153 ## Dances 154 DISCO = "DISCO" 155 HEADBANG = "HEADBANG" 156 ## Fun 157 MYSTICAL = "MYSTICAL" 158 TAKE_PICTURE = "TAKE_PICTURE" 159 ## Music 160 SAXOPHONE = "SAXOPHONE" 161 GUITAR = "GUITAR" 162 163 # Other 164 ## G r e e t i n g 165 WAVE = "WAVE" 166 ## U4 167 SAMBA_U4 = "SAMBA_U4" 168 INITIAL_MOVE_INTERACTION = "INITIAL_MOVE_INTERACTION" 169 170 " " "++++++++++++++++++++++++++++++++++++++ 171 Class 172 ++++++++++++++++++++++++++++++++++++++" " " 173 class Nao_Motion () : 174 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 175 Name : _ _ i n i t _ _ 176 Func t i o n : i n i t o f t h e c l a s s 177 Paramete rs : s e s s i o n : nao s e s s i o n 178 Retu rn : − 179 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
180 def _ _ i n i t _ _ ( s e l f , s e s s i o n ) : 181 s e l f . s e s s i o n = s e s s i o n 182 183 # I n i t t a c t i l e _ g e s t u r e s _ s e r v i c e 184 s e l f . a n i m a t i o n _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALAnimationPlayer") 185 186 # I n i t t h e m o t i o n _ s e r v i c e 187 s e l f . m o t i o n _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALMotion " ) 188 189 # I n i t t h e r o b o t _ p o s t u r e _ s e r v i c e 190 s e l f . r o b o t _ p o s t u r e _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALRobotPosture") 191 192 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 193 Name : runAnimationFromTag 194 F u n c t io n : r u ns a random a n i m a t i o n d ep e nd i ng on t h e t a g 195 Paramete rs : t a g : s e e c l a s s ANIMATION_TAGS 196 a sy nc : i f t h e a n i m a t i o n must be done a s y n c r o n o u s l y 197 Retu rn : − 198 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 199 def runAnimationFromTag ( s e l f , tag , asy nc ) : 200 s e l f . a n i m a t i o n _ s e r v i c e . runTag ( tag , _async=async ) 201 202 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 203 Name : goToP osture 204 Fun ct ion : Goes t o a p o s t u r e 205 Paramete rs : p o s t u r e : see ROBOT_POSTURES 206 Retu rn : − 207 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 208 def goT oPos ture ( s e l f , p o s t u r e ) : 209 s e l f . r o b o t _ p o s t u r e _ s e r v i c e . goT oPos ture ( po s tur e , 0 . 5 ) 210 211 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 212 Name: setStiffness 213 Func t i o n : s e t s th e S t i f f n e s s o f t h e r o b ot . 214 0 . 0 t h e mo to rs are o f f . BE CAREFUL ! ! t h e r o b o t can f a l l 215 1 . 0 t h e mo to rs a re on . 216 Int er mediu m v a l u e s are a ll owe d 217 Paramete rs : s t i f f n e s s : v al u e t o s e t 218 n e e d _ p r o t e c t i o n : ( d e f a u l t True ) bool ean t h a t i f i t s v a l u e i s True , s e t s t h e r o b o t i n ROBOT_POSTURES .CROUCH 219 Retu rn : − 220 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 221 def s e t S t i f f n e s s ( s e l f , s t i f f n e s s , n e e d _ p r o t e c t i o n = True ) : 222 i f need_protection : This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
a v a i l a b l e . I t 38 # s t o p s as soon as t h e y a re a sk ed by a n o t h e r a n i m a t i o n ( launched by 39 # ALAnimatedSpeech or ALA nimationPlaye r f o r example ) . 40 CONTEXTUAL = { " bodyLanguageMode " : " c o n t e x t u a l " } 41 # d i s a b l e d − The r obo t does n o t move 42 DISABLED = { " bodyLanguageMode " : " d i s a b l e d " } 43 #random − The r o b o t ra ndo ml y l a u n c h e s some s h o r t n e u t r a l a n i m a t i o n s which 44 # a re e x e c u t e d one a f t e r a n o t h e r . 45 RANDOM = { " bodyLanguageMode " : " random " } 46 47 """************************************** 48 Name : LANGUAGES 49 Func t i o n : c o n t a i n s t h e l an g u ages t h a t nao can t a l k 50 ************************************** """ 51 class LANGUAGES( ) : 52 SPANISH = " Span i s h " 53 ENGLISH = " E n g l i s h " 54 55 " " "++++++++++++++++++++++++++++++++++++++ 56 Class 57 ++++++++++++++++++++++++++++++++++++++" " " 58 class Nao_Speech () : 59 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 60 Name : _ _ i n i t _ _ 61 Func t i o n : i n i t o f t h e c l a s s 62 Paramete rs : s e s s i o n : nao s e s s i o n 63 Retu rn : − 64 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 65 def _ _ i n i t _ _ ( s e l f , s e s s i o n ) : 66 s e l f . s e s s i o n = s e s s i o n 67 68 # I n i t t t s _ s e r v i c e 69 s e l f . t t s _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALTextToSpeech " ) 70 #Init anim_tts_service 71 s e l f . a n i m _ t t s _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALAnimatedSpeech " ) 72 # I n i t d i a l o g _ s e r v i c e 73 s e l f . d i a l o g _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALDialog " ) 74 # I n i t d i a l o g _ l i s t t o have a c o n t r o l o f th e d i a l o g s launched 75 s e l f . d i a l o g _ l i s t = [ ] 76 77 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 78 Name : s e t _ l a n g u a g e 79 Func t i o n : s e t nao ’ s language 80 Paramete rs : language : langu age t h a t nao w i l l t a l k ( s e e This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
LANGUAGES c l a s s ) 81 Retu rn : − 82 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 83 def s e t _ l a n g u a g e ( s e l f , language = LANGUAGES. SPANISH ) : 84 s e l f . t t s _ s e r v i c e . s e tLanguage ( l an g u ag e ) 85 s e l f . d i a l o g _ s e r v i c e . setLa n g u a ge ( la n g u a g e ) 86 87 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 88 Name : s e t _ s p e e c h _ s p e e d 89 Func t i o n : s e t nao sp e ech ’ s speed 90 Paramete rs : speed : s e t s nao spee c h ’ s speed 91 Retu rn : − 92 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 93 def s e t _ s p e e c h _ s p e e d ( s e l f , spe ed ) : 94 s e l f . t t s _ s e r v i c e . s e t P a r a m e t e r ( " speed " , speed ) 95 96 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 97 Name: set_speech_pauses 98 Func t i o n : s e t nao sp e ech ’ s paus es 99 Paramete rs : pau seMid dle : s e t s nao spe e ch ’ s p auseM iddle 100 pauseLong : s e t s nao spe ech ’ s pauseLong 101 p a u s e S e n t e n c e : s e t s nao sp e ec h ’ s p a u s e S e n t e n c e 102 Retu rn : − 103 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 104 def s e t _ s p e e c h _ p a u s e s ( s e l f , pauseMiddle , pauseLong , pauseSentence) : 105 s e l f . t t s _ s e r v i c e . s e t P a r a m e t e r ( " pauseMiddle " , pauseMiddle ) 106 s e l f . t t s _ s e r v i c e . s e t P a r a m e t e r ( " pauseLong " , pauseLong ) 107 s e l f . t t s _ s e r v i c e . s e t P a r a m e t e r ( " p a u s e S e n t e n c e " , pauseSentence) 108 109 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 110 Name : s ay 111 Func t i o n : nao s p ea ks 112 Paramete rs : message : message t o say 113 asy nc : i f t h e message must be s a i d a s y n c r o n o u s l y 114 Retu rn : − 115 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 116 def say ( s e l f , message , async ) : 117 s e l f . t t s _ s e r v i c e . say ( message , _async = async ) 118 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 119 Name : anim_say 120 F u n c t io n : nao s p e a k s u s i n g an a n i m a t i o n ( moving i t s body ) 121 Paramete rs : message : message t o say 122 asy nc : i f t h e message must be s a i d a s y n c r o n o u s l y 123 c o n f i g u r a t i o n : movement t o e x p r e s s th e message ( see CONFIGURATION c l a s s ) 124 Retu rn : − This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
125 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 126 def anim_say ( s e l f , message , async = True , c o n f i g u r a t i o n = CONFIGURATION .CONTEXTUAL) : 127 s e l f . a n i m _ t t s _ s e r v i c e . say ( message , c o n f i g u r a t i o n , _async = asy nc ) 128 129 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 130 Name : s t o p _ t a l k i n g 131 F u nct io n : nao s t o p s s p e a k i n g 132 Paramete rs : − 133 Retu rn : − 134 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 135 def s t o p _ t a l k i n g ( s e l f ) : 136 s e l f . t t s _ s e r v i c e . s t o p A l l ( ) 137 138 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 139 Name : s t a r t _ d i a l o g 140 Fu nc tion : r un s a d i a l o g t o p i c on nao 141 Paramete rs : f i l e : f i l e where t h e t o p i c i s d e t a i l e d . For more information 142 on how t h e t o p i c works v i s i t : 143 h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi −d e ve l op e r −guide / naoqi −a p i s / naoqi −i n t e r a c t i o n −e n gi n es / a l d i a l o g / q i ch a t −t a b l e −c o n t en t −0# d ialog − r u l e s 144 dialog_name : s t r i n g wi t h t h e name t h a t i d e n t i f i e s t h e d i a l o g . 145 example : ’ my_dia log_example ’ 146 Retu rn : l i s t of l i s t s w i th t he t o p i c s s e n t to nao . The l i s t s i n s i d e c o n t a i n s 147 t h e d i a l o g name ( t o u n s u b s c r i b e ) and t h e t o p i c name (to desactivate 148 t h e t o p i c and unload i t ) 149 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 150 def s t a r t _ d i a l o g ( s e l f , file , dialog_name ) : 151 # Read t h e f i l e 152 f = open (file , " r " ) 153 t o p i c _ c o n t e n t = f . re a d ( ) 154 155 to pi c_ na me = s e l f . d i a l o g _ s e r v i c e . l o a d T o p i c C o n t e n t ( topic_content ) 156 157 # A c t i v a t i n g t h e l oaded t o p i c 158 s e l f . d i a l o g _ s e r v i c e . a c t i v a t e T o p i c ( topic_name ) 159 160 # S t a r t i n g t h e d i a l o g e n g in e − we need t o t y p e an a r b i t r a r y s t r i n g as t he i d e n t i f i e r 161 # We s u b s c r i b e o n l y ONCE, r e g a r d l e s s o f t he number o f t o p i c s we have a c t i v a t e d This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
162 s e l f . d i a l o g _ s e r v i c e . s u b s c r i b e ( dialog_name ) 163 164 # append t he t o p i c ru n n i n g on nao i n our l i s t 165 s e l f . d i a l o g _ l i s t . append ( [ dialog_name , topi c_n ame ] ) 166 167 # r e t u r n t h e new l i s t 168 return self . dialog_list 169 170 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 171 Name : s t o p _ d i a l o g 172 Fu nc tion : s t o p s a d i a l o g t o p i c on nao 173 Paramete rs : dialog_name : s t r i n g w i t h t h e name t h a t i d e n t i f i e s t h e d i a l o g . 174 example : ’ my_dia log_example ’ 175 topic_na me : name of t h e t o p i c 176 R et u rn : t h e l i s t w i t h o u t t h e s t o p p e d t o p i c 177 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 178 def s t o p _ d i a l o g ( s e l f , dialog_name , t opi c_name ) : 179 # s t o p p i n g t h e d i a l o g e ngi ne 180 s e l f . d i a l o g _ s e r v i c e . u n s u b s c r i b e ( dialog_name ) 181 182 # D e a c t i v a t i n g t h e t o p i c 183 s e l f . d i a l o g _ s e r v i c e . d e a c t i v a t e T o p i c ( top ic_ name ) 184 185 # now t h a t t h e d i a l o g e n g in e i s s t o p p e d and t h e r e are no more a c t i v a t e d t o p i c s , 186 # we can unload our t o p i c and f r e e t h e a s s o c i a t e d memory 187 s e l f . d i a l o g _ s e r v i c e . unloa d T o pic ( topic_ nam e ) 188 189 # e r a s e from l i s t t h e t o p i c s t o p p e d 190 s e l f . d i a l o g _ l i s t . remove ( [ dialog_name , topic_n ame ] ) 191 192 # r e t u r n t h e new l i s t 193 return self . dialog_list 194 195 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 196 Name : s t o p _ a l l _ d i a l o g s 197 Func t i o n : s t o p s a l l d i a l o g s t o p i c s on nao 198 Paramete rs : − 199 Retu rn : − 200 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 201 def stop_all_dialogs ( self ): 202 # f o r each t o p i c running on nao 203 for topic in self . dialog_list : 204 # s t o p i t 205 s e l f . s t o p _ d i a l o g ( t o p i c [ 0 ] , t o p i c [ 1 ] ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 8: nao_vision.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : n a o _ v i s i o n . py 5Func t i o n : F i l e with th e c l a s s t o c o n t r o l t he v i s i o n of r ob o t nao 6C r e a t i o n d a t e : 2 2 / 07 /2 0 2 2 7L as t m o d i f i e d : 2 2 /07/2022 8Create d by : CRR 9///////////////////////////////////////////////////////////////////////////// """ 10 11 " " "++++++++++++++++++++++++++++++++++++++ 12 Libraries 13 ++++++++++++++++++++++++++++++++++++++" " " 14 import q i 15 import numpy as np 16 17 # PIL mode 18 from PIL import Image 19 import m a t p l o t l i b . p y p lo t as p l t 20 21 # Opencv mode 22 import cv2 23 24 " " "++++++++++++++++++++++++++++++++++++++ 25 Constants 26 ++++++++++++++++++++++++++++++++++++++" " " 27 # Nao r o b o t IP a d r e s s 28 IP_ADRESS = " 1 7 2 . 1 6 . 2 . 1 5 5 " 29 30 # Camera c o n f i g u r a t i o n 31 NAME = "demo " 32 #Camara d e l cap 33 CAMERA_INDEX = 0 34 #Camara de l a boca 35 #CAMERA_INDEX = 1 36 RESOLUTION = 2 37 COLOR_SPACE = 13 38 FPS = 30 39 40 " " "++++++++++++++++++++++++++++++++++++++ 41 Class 42 ++++++++++++++++++++++++++++++++++++++" " " 43 class Nao_Vision () : 44 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
45 Name : _ _ i n i t _ _ 46 Func t i o n : i n i t o f t h e c l a s s 47 Paramete rs : s e s s i o n : nao s e s s i o n 48 # h t t p : / / doc . aldebar a n . com /2 −5/ n aoqi / v i s i o n / a l v i d e o d e v i c e −api . h tml # ALVideoDeviceProxy : : subscribeCamera__ssCR . iCR . iCR . iCR . iCR 49 name : name of t h e s u b s c r i b i n g module 50 ca me ra_i nde x : i n d e x o f t h e camera i n t h e v i d e o s yst em ( s ee Camera I n d e x e s ) . 51 r e s o l u t i o n : r e s o l u t i o n r e q u e s t e d ( s e e Supporte d r e s o l u t i o n s ) . 52 c o l o r _ s p a c e : c o l o r s p a c e r e q u e s t e d ( s ee S uppo r te d colorspaces) . 53 f p s : f p s ( fram es per second ) r e q u e s t e d t o t h e v ide o s our c e ( s ee S up po rt ed f r a m e r a t e s ) . 54 Retu rn : − 55 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 56 def _ _ i n i t _ _ ( s e l f , s e s s i o n , name = " demo " , c amera_index = 0 , r e s o l u t i o n = 2 , c o l o r _ s p a c e = 13 , f p s = 30) : 57 s e l f . s e s s i o n = s e s s i o n 58 s e l f . f a c e _ d e t e c t i o n _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALFaceDetection") 59 s e l f . v i d e o _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALVideoDevice " ) 60 s e l f . s u b s c r i b e r = s e l f . v i d e o _ s e r v i c e . subscribe C a m e r a ( name , ca mera_i ndex , r e s o l u t i o n , c o l o r _ s p a c e , f p s ) 61 62 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 63 Name: setPeopleRecognition 64 Func t i o n : t u r n s on or o f f t h e f a c e d e t e c t o r o f nao 65 Paramete rs : on_NOToff : True : On , F a l s e : O f f 66 Retu rn : imatg e (< c l a s s : numpy . numpy . ndarray >) 67 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 68 def s e t P e o p l e R e c o g n i t i o n ( s e l f , on_NOToff ) : 69 s e l f . f a c e _ d e t e c t i o n _ s e r v i c e . s e t R e c o g n i t i o n E n a b l e d ( on_NOToff) 70 s e l f . f a c e _ d e t e c t i o n _ s e r v i c e . s e t T r a c k i n g E n a b l e d ( on_NOToff ) 71 72 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 73 Name : get_ op en cv_im ag e 74 Func t i o n : o b t e n i r l a imatg e c a p t u rada p el ro b o t nao per t r e b a l l a r amb cv2 75 Paramete rs : − 76 Retu rn : imatg e (< c l a s s : numpy . numpy . ndarray >) 77 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 78 def get_opencv _image ( s e l f ) : 79 imageNAO = s e l f . v i d e o _ s e r v i c e . getImageRemote ( s e l f . subscriber) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
80 i f imageNAO i s None : 81 pass 82 else : 83 imageWidth = imageNAO [ 0 ] 84 imageHeight = imageNAO [ 1 ] 85 a r r a y = imageNAO [ 6 ] 86 87 img_cv2 = ( np . r e s h a p e ( np . f r o m b u f f e r ( a rra y , dtype = ’% i u i n t 8 ’ % imageNAO [ 2 ] ) , ( imageHeight , imageWidth , imageNAO [ 2 ] ) ) ) 88 # h t t p s : / / s t a c k o v e r f l o w . com / q u e s t i o n s /22593451/ how− to −import −opencv −on−nao−in −p y thon 89 return img_cv2 90 return None 91 92 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 93 Name : g e t _ p i l _ i m a g e 94 Func t i o n : o b t e n i r l a imatg e c a p t u rada p el ro b o t nao per t r e b a l l a r amb p i l 95 Paramete rs : − 96 Retu rn : imatg e (< c l a s s : PIL . Image . Image >) 97 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 98 def g e t _ p i l _ i m a g e ( s e l f ) : 99 imageNAO = s e l f . v i d e o _ s e r v i c e . getImageRemote ( s e l f . subscriber) 100 i f imageNAO i s None : 101 pass 102 else : 103 imageWidth = imageNAO [ 0 ] 104 imageHeight = imageNAO [ 1 ] 105 a r r a y = imageNAO [ 6 ] 106 107 # Use PIL t o c r e a t e an image from t h e new a rray o f pixels 108 i m g _ p i l = Image . f r o m b y t e s ( "RGB" , ( imageWidth , im ageHeight ) , a r r a y ) 109 return img_pil 110 return None This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1.1 Movements File 9: __init__.py 1from .import * This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 10: movements.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : movements . py 5Func t i o n : F i l e w ith some o f t h e p r e d e f i n e d movements from Choregraph 6See : h t t p : / / doc . aldebara n . com /2 −4/ s o f t w a r e / chor eg raphe / p a n e ls / t i m e l i n e _ p a n e l . html 7In t h i s web i t i s e x p l a i n e d how t o e x t r a c t t he movements from Choregraph . 8Note : Once you i n d i c a t e t he language you want t o e x p o r t t h e movement , 9i t i s saved i n t he c l i p b o a r d . T herefore , you j u s t have t o p a s t e i t 10 wherever you want i t . 11 C r e a t i o n d a t e : 2 9 / 12 /2 0 2 2 12 L as t m o d i f i e d : 2 9 /12/2022 13 Create d by : SCV 14 ///////////////////////////////////////////////////////////////////////////// """ 15 16 17 " " "++++++++++++++++++++++++++++++++++++++ 18 Libraries 19 ++++++++++++++++++++++++++++++++++++++" " " 20 import q i 21 22 " " "++++++++++++++++++++++++++++++++++++++ 23 Functions: 24 25 Summary o f t h e movements : 26 27 −−−−−−−−−−−−−−−−−−− 28 Moods 29 −−−−−−−−−−−−−−−−−−− 30 //////// 31 Positive 32 //////// 33 happy 34 kisses 35 excited 36 //////// 37 Neutral 38 //////// 39 thinking This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
40 41 −−−−−−−−−−−−−−−−−−− 42 Entertainment 43 −−−−−−−−−−−−−−−−−−− 44 //////// 45 Dances 46 //////// 47 disco 48 headbang 49 50 //////// 51 Fun 52 //////// 53 mystical 54 takePicture 55 56 //////// 57 Music 58 //////// 59 saxophone 60 guitar 61 62 −−−−−−−−−−−−−−−−−−− 63 Other 64 −−−−−−−−−−−−−−−−−−− 65 //////// 66 Greeting 67 //////// 68 wave 69 70 //////// 71 U4 72 //////// 73 sambaU4 74 initialMoveInteraction 75 76 77 ++++++++++++++++++++++++++++++++++++++" " " 78 79 """************************************** 80 Name : happy 81 Func t i o n : Makes a happy movement . 82 ************************************** """ 83 def happy ( ) : 84 names = l i s t ( ) 85 t i m e s = l i s t ( ) 86 keys = l i s t ( ) 87 88 names . append ( " H eadP itch " ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
326 names . append ( "RElbowYaw" ) 327 t i m es . append ( [ 0 . 8 , 1 . 0 8 , 1 . 3 2 , 1 . 6 , 1 . 9 2 ] ) 328 keys . append ( [ 1 . 3 3 9 1 4 , 1.3 3914 , 1.33914 , 1.33914 , 1 . 3 39 1 4 ]) 329 330 names . append ( " RHand" ) 331 t i m es . append ( [ 0 . 6 8 , 0 . 8 , 0 . 9 6 , 1 . 0 8 , 1 . 2 4 , 1 . 3 2 , 1 . 4 8 , 1 . 6 , 1 . 7 6 , 1 . 9 2 , 2 . 0 8 ] ) 332 keys . append ( [ 0 . 6 3 , 0 . 2 7 , 0 . 0 2 , 0 . 2 4 , 0 . 0 2 , 0 . 2 8 , 0 . 0 2 , 0 . 2 6 , 0 . 0 2 , 0 . 2 4 , 0 . 0 2 ] ) 333 334 names . append ( " R S h o u l d e r P i t c h " ) 335 t i m es . append ( [ 0 . 6 , 0 . 7 6 , 0 . 9 2 , 1 . 0 4 , 1 . 1 6 , 1 . 2 8 , 1 . 4 , 1 . 5 6 , 1 . 6 8 , 1 . 8 4 , 2 ] ) 336 keys . append ( [ 0 . 9 4 5 9 6 8 , 1.15541 , 1 .21475 , 1 .1 5541 , 1 .2 1475 , 1.15541, 1.21475, 1.15541, 1.21475, 1.15541, 1.21475]) 337 338 names . append ( " R S h o ulderRol l " ) 339 t i m es . append ( [ 0 . 6 , 0 . 7 6 , 1 . 0 4 , 1 . 2 8 , 1 . 5 6 , 1 . 8 4 ] ) 340 keys . append ([ −0.223402 , −0.00872665 , −0.00872665 , −0.00872665 , −0.00872665 , −0.00872665]) 341 342 names . append ( " RWristYaw " ) 343 t i m es . append ( [ 0 . 6 8 , 0 . 8 , 1 . 0 8 , 1 . 3 2 , 1 . 6 , 1 . 9 2 ] ) 344 keys . append ( [ 0 . 6 3 0 0 6 4 , 0.1 10 406 , 0 .1 104 06 , 0 .11 04 06 , 0.110 406 , 0 . 1 1 0 4 0 6 ] ) 345 346 return names , keys , t i m e s 347 348 """************************************** 349 Name : t h i n k i n g 350 Func t i o n : Makes a t h i n k i n g movement . 351 ************************************** """ 352 def thinking () : 353 names = l i s t ( ) 354 t i m e s = l i s t ( ) 355 keys = l i s t ( ) 356 357 names . append ( " H eadP itch " ) 358 t i m es . append ( [ 0 . 7 2 , 1 . 2 , 3 . 1 6 , 4 . 7 2 , 5 . 2 , 5 . 5 6 , 7 . 1 2 , 7 . 6 8 , 8 . 0 8 , 1 0 . 9 6 , 1 1 . 6 8 , 1 2 . 2 , 1 4 . 4 4 ] ) 359 keys . append ([ −0.1134 4 6 , 0 .22499 6 , 0.200 7 13 , 0 .240855 , 0.125 6 64 , −0.20886 , −0.235619 , −0.106465 , 0.14 8 4 48 , 0 .1 8 67 5 , 0 .0 76 79 45 , 0 .2 6458 1 , 0 . 2 8 9 7 2 5 ] ) 360 361 names . append ( "HeadYaw" ) 362 t i m es . append ( [ 1 . 2 , 4 . 7 2 , 5 . 5 6 , 7 . 1 2 , 8 . 0 8 , 1 0. 96 , 1 2 . 2 , 1 4 . 4 4 ] ) 363 keys . append ( [ 0 . 1 5 4 8 9 5 , 0.1 57 081 , −0.305068 , −0.312414 , 0.269 4 72 , 0 .28623 4 , −0.124212 , − 0.1309]) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
364 365 names . append ( " H i p P i t c h " ) 366 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 367 keys . append ([ − 0 . 0599121 , −0.0599156 , −0.0599151 , −0.0599156 , −0. 05991 33 , − 0.059 9156 , 0 .0 0 59 0 22 , 0 . 0 0 6 9 8 1 3 2 ] ) 368 369 names . append ( " H ipR oll " ) 370 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 371 keys . append ([ − 0 . 0 5 58505 , −0.0575959 , −0.000865071 , 0 , −0.0542387 , −0.0558505 , −0.00089844 , 0 ] ) 372 373 names . append ( " K neeP itch " ) 374 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 375 keys . append ([ − 0 . 0499039 , −0.0499079 , −0.0499075 , −0.0499079 , −0.0499056 , −0.0499079 , −0.0499155 , −0.0 499084] ) 376 377 names . append ( " L Ankl ePit ch " ) 378 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 379 keys . append ( [ 0 . 1 2 1 1 4 4 , 0.1 22 678 , 0 .12728 , 0.12728 , 0.093 532 , 0 .0 9 35 3 2 , 0 .0 62 8 52 1 , 0 . 0 6 2 8 5 2 1 ] ) 380 381 names . append ( " LAnkleRoll " ) 382 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 383 keys . append ([ − 0 .00302 6 0 2 , −0.00302602 , 0 .06293 6 , 0.06447 , 0 .0 5 21 9 79 , 0 . 05 3 73 1 9 , 0 .0 0 31 09 9 3 , 0 . 0 0 3 1 0 9 9 3 ] ) 384 385 names . append ( " LElbowRoll " ) 386 t i m es . append ( [ 0 . 6 4 , 1 . 1 2 , 4 . 6 4 , 5 . 1 2 , 5 . 4 8 , 7 . 0 4 , 7 . 6 , 8 , 1 0 . 8 8 , 1 1 . 6 , 1 2 . 1 2 , 1 4 . 3 6 ] ) 387 keys . append ([ −0.799361 , −1.48487 , −1.51669 , −1.53414 , −1.37739 , −1.36485 , −1.07861 , −1.4818 , −1.54462 , −1.39277 , −1.49101 , −1 .5171 7 ]) 388 389 names . append ( " LElbowYaw" ) 390 t i m es . append ( [ 0 . 6 4 , 1 . 1 2 , 4 . 6 4 , 5 . 4 8 , 7 . 0 4 , 7 . 6 , 8 , 1 0 . 8 8 , 1 1 . 6 , 1 2 . 1 2 , 1 4 . 3 6 ] ) 391 keys . append ( [ − 1 . 40 324 , −0.955723 , −0.909316 , −1.54856 , −1.55509 , −0.720821 , −0.474047 , −0.474047 , −0.303687 , −0.713353 , −0. 736278]) 392 393 names . append ( " LHand " ) 394 t i m es . append ( [ 0 . 6 4 , 1 . 1 2 , 1 . 6 8 , 2 . 0 8 , 2 . 6 8 , 3 . 0 8 , 3 . 7 6 , 4 . 1 6 , 4 . 6 4 , 5 . 1 2 , 5 . 4 8 , 7 . 0 4 , 7 . 6 , 8 , 1 0 . 8 8 , 1 1 . 6 , 1 2 .1 2 , 1 4 . 3 6 ] ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
395 keys . append ( [ 0 . 9 6 , 0 . 7 03 6 , 0 . 4 4 , 0 . 7 3 , 0 . 4 4 , 0 . 7 3 , 0 . 4 4 , 0 . 7 3 , 0 . 6 5 , 0 . 5 2 , 0 .84 4074 , 0 . 8 7 , 0 . 6 1 , 0 . 3 18 8 , 0 . 29 56 , 0 .6 9 , 0.503 2 , 0 . 4 9 3 2 ] ) 396 397 names . append ( " L HipPitch " ) 398 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 399 keys . append ( [ 0 . 1 2 5 8 3 , 0.1 2583 , 0 .1 22 76 2 , 0.122 76 2 , 0.1795 19 , 0.179 519 , 0 .2 6695 9 , 0 . 2 6 6 9 5 9 ] ) 400 401 names . append ( " LHipRoll " ) 402 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 403 keys . append ([ − 0 .00609 3 9 7 , −0.00609397 , −0.0674542 , −0.0674542 , −0.0475121 , −0.0475121 , 0.010 7799 , 0.0107799]) 404 405 names . append ( " LHipYawPitch " ) 406 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 407 keys . append ([ −0.239262 , −0.239262 , −0.239262 , −0.237728 , −0.237728 , −0.237728 , −0.236194 , −0. 2361 94]) 408 409 names . append ( " LKneePitch " ) 410 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 411 keys . append ([ −0.090548 , −0.0890141 , −0.0923279 , −0.0923279 , −0.0890141 , −0.0890141 , −0.0890141 , −0.0 890141] ) 412 413 names . append ( " L S h o u l d e r P i t c h " ) 414 t i m es . append ( [ 1 . 1 2 , 4 . 6 4 , 5 . 1 2 , 5 . 4 8 , 7 . 0 4 , 8 , 1 0 . 8 8 , 1 2 . 1 2 , 1 4 . 3 6 ] ) 415 keys . append ([ −0.512397 , −0.581195 , 0.09 9483 8 , 0.44047 , 0.467 748 , 0 .4 187 39 , 0 .3 61 981 , 1 .82235 , 1 . 8 3 6 2 4 ] ) 416 417 names . append ( " L S h o ul de r Ro l l " ) 418 t i m es . append ( [ 1 . 1 2 , 4 . 6 4 , 5 . 4 8 , 7 . 0 4 , 8 , 1 0 . 8 8 , 1 1 . 6 , 1 2 . 1 2 , 1 4 . 3 6 ] ) 419 keys . append ( [ 0 . 3 2 8 2 3 4 , 0.3 42 085 , 0 .2 338 74 , 0 .23 38 76 , −0.217869 , −0.243948 , 0 .80 4597 , 0 .530 721 , 0 . 5 3 6 9 4 2 ] ) 420 421 names . append ( " LWristYaw " ) 422 t i m es . append ( [ 0 . 6 4 , 1 . 1 2 , 4 . 6 4 , 5 . 4 8 , 7 . 0 4 , 8 , 1 0 . 8 8 , 1 2 . 1 2 , 1 4 . 3 6 ] ) 423 keys . append ([ −0.895354 , −0.833004 , −0.862194 , 0.019 2082 , 0.0 33160 6 , −0.60904 , −0.65506 , −0.182588 , −0.17176 6]) 424 425 names . append ( " RAnklePitch " ) 426 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1 4 . 3 2 ] ) 427 keys . append ( [ 0 . 1 1 5 0 9 2 , 0.1 16 626 , 0 .1 3 35 , 0 . 13 35 , 0.099 75 2 , 0 .0 9 97 5 2 , 0 .0 53 7 31 9 , 0 . 0 5 5 2 6 5 9 ] ) 428 429 names . append ( " RAnkleRoll " ) 430 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 431 keys . append ([ −0.0183661 , −0.0183661 , 0.035 3239 , 0.03 5323 9 , 0.030 7 22 , 0 .03072 2 , −0.00302602 , −0.00302602]) 432 433 names . append ( " RElbowRoll " ) 434 t i m es . append ( [ 0 . 5 6 , 1 . 0 4 , 4 . 5 6 , 5 . 0 4 , 5 . 4 , 6 . 9 6 , 7 . 5 2 , 7 . 9 2 , 1 0 . 8 , 1 2 . 0 4 , 1 4 . 2 8 ] ) 435 keys . append ( [ 0 . 5 7 4 2 1 3 , 0.3 82 009 , 0 .3 612 83 , 0 .37 52 46 , 0.25889, 0.249582, 1.50273, 1.49109, 1.51717, 1.48495, 1.51717]) 436 437 names . append ( "RElbowYaw" ) 438 t i m es . append ( [ 0 . 5 6 , 1 . 0 4 , 4 . 5 6 , 5 . 4 , 6 . 9 6 , 7 . 9 2 , 1 0 . 8 , 1 2 .04 , 1 4 . 2 8 ] ) 439 keys . append ( [ 1 . 4 7 8 2 9 , 1.2 3483 , 1 .2 217 , 1 .2 217 , 1 .2 217 , 0.768 491 , 0 .7 3627 8 , 0 .716 335 , 0 . 7 3 6 2 7 8 ] ) 440 441 names . append ( " RHand" ) 442 t i m es . append ( [ 0 . 5 6 , 1 . 0 4 , 4 . 5 6 , 5 . 0 4 , 5 . 4 , 6 . 9 6 , 7 . 5 2 , 7 . 9 2 , 1 0 . 8 , 1 2 . 0 4 , 1 4 . 2 8 ] ) 443 keys . append ( [ 0 . 5 4 , 0 . 3 50 4 , 0 . 3 3 , 0 . 3 1 , 0 .41 2984 , 0 . 4 3 , 0 . 6 9 , 0 .5 2 , 0.493 2 , 0 . 5 08 , 0 . 4 9 3 2 ] ) 444 445 names . append ( " RHipPitch " ) 446 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 447 keys . append ( [ 0 . 1 3 4 9 5 , 0. 13 64 84 , 0.11961 , 0 .1 19 61 , 0.17 79 01 , 0.179 436 , 0 .2 7761 2 , 0 . 2 7 6 0 7 8 ] ) 448 449 names . append ( " RHipRoll " ) 450 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 451 keys . append ( [ 0 . 0 2 4 5 8 5 9 , 0 .0 24 585 9 , −0.0275701 , −0.0275701 , −0.0275701 , −0.0275701 , −0.00302602 , −0. 00302602]) 452 453 names . append ( " RHipYawPitch " ) 454 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , 1 4 . 3 2 ] ) 455 keys . append ([ −0.239262 , −0.239262 , −0.239262 , −0.237728 , −0.237728 , −0.237728 , −0.236194 , −0. 2361 94]) 456 457 names . append ( " RKneePitch " ) 458 t i m es . append ( [ 1 . 0 8 , 4 . 6 , 5 . 4 4 , 7 , 7 . 9 6 , 1 0 . 84 , 1 2 . 0 8 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1 4 . 3 2 ] ) 459 keys . append ([ − 0 . 0923279 , −0.0923279 , −0.0923279 , −0.0923279 , −0.0923279 , −0.0923279 , −0.0923279 , −0.0 923279] ) 460 461 names . append ( " R S h o u l d e r P i t c h " ) 462 t i m es . append ( [ 1 . 0 4 , 4 . 5 6 , 5 . 4 , 6 . 9 6 , 7 . 9 2 , 1 0 . 8 , 1 2 . 0 4 , 1 4 . 2 8 ] ) 463 keys . append ( [ 1 . 5 4 7 8 5 , 1 . 5 7 , 1.43506 , 1 .43292 , 1 .8071 , 1.83624 , 1 .8 1476 , 1 . 8 3 6 2 4 ] ) 464 465 names . append ( " R S h o ulderRol l " ) 466 t i m es . append ( [ 1 . 0 4 , 4 . 5 6 , 5 . 4 , 6 . 9 6 , 7 . 5 2 , 7 . 9 2 , 1 0 . 8 , 1 2 .04 , 1 4 . 2 8 ] ) 467 keys . append ([ −0.108956 , −0.12 , −0.119999 , −0.12 , −0.640536 , −0.533873 , −0.536942 , −0.526205 , −0. 5369 42]) 468 469 names . append ( " RWristYaw " ) 470 t i m es . append ( [ 0 . 5 6 , 1 . 0 4 , 4 . 5 6 , 5 . 4 , 6 . 9 6 , 7 . 9 2 , 1 0 . 8 , 1 2 .04 , 1 4 . 2 8 ] ) 471 keys . append ( [ 0 . 4 9 7 4 1 9 , 0.0 30 638 , −0.0331613 , −0.033162 , −0.0331613 , 0 .1 4568 8 , 0 .171 766 , 0 .1 7636 7 , 0 . 1 7 1 7 6 6 ] ) 472 473 return names , keys , t i m e s 474 475 """************************************** 476 Name : d i s c o 477 Func t i o n : Dances l i k e i f i t i s i n t h e 478 d i s c o . 479 ************************************** """ 480 def d i s c o ( ) : 481 names = l i s t ( ) 482 t i m e s = l i s t ( ) 483 keys = l i s t ( ) 484 485 names . append ( " H eadP itch " ) 486 t i m es . append ( [ 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 15.8]) 487 keys . append ([ −0.476475 , 0 . 338594 , −0.476475 , 0.3385 9 4 , −0.476475 , 0 . 338594 , −0.476475 , 0.338 5 9 4 , −0.476475 , 0.338 5 94 , −0.476475 , 0 .33859 4 , −0.476475 , 0 . 338594 , −0.476475 , 0 . 338594 , −0 . 17185 ] ) 488 489 names . append ( "HeadYaw" ) 490 t i m es . append ( [ 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 15.8]) 491 keys . append ([ −0.745256 , 0 . 289725 , −0.745256 , 0.2897 2 5 , −0.745256 , 0 . 289725 , −0.745256 , 0.289 7 2 5 , 0.7452 5 6 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
−0.289725 , 0 . 745256 , −0.289725 , 0.745 2 5 6 , −0.289725 , 0 .7 4 5 25 6 , − 0.289 725 , 0 . 0 0 9 1 6 1 9 5 ] ) 492 493 names . append ( " L Ankl ePit ch " ) 494 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 495 keys . append ([ − 0 . 0 4 6 0 6 2 , 0.04 44441 , 0.161 0 28 , 0 .044 4441 , 0.161 0 28 , 0 .044 4441 , 0 . 161028 , 0.04 44441 , 0.161 0 28 , 0.092082, 0.082878, 0.092082, 0.082878, 0.092082, 0 .0 8 28 7 8 , 0 .0 9 20 8 2 , 0 .0 8 28 7 8 , 0 . 0 8 7 3 9 6 1 ] ) 496 497 names . append ( " LAnkleRoll " ) 498 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 499 keys . append ([ − 0 . 0 1 83661 , 0.06293 6 , −0.248467 , 0 . 062936 , −0.248467 , 0 . 062936 , −0.248467 , 0.062 9 3 6 , −0.248467 , −0.26389 , 0.090 4641 , −0.26389 , 0 .0904 641 , −0.26389 , 0.0904641, −0.26389, 0.0904641, −0.121144]) 500 501 names . append ( " LElbowRoll " ) 502 t i m es . append ( [ 0 . 8 , 1 . 2 4 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 1 2 , 8 . 7 2 , 9 . 1 2 , 9 . 5 2 , 10 , 1 0 . 44 , 1 0 . 8 4 , 1 1 . 2 4 , 1 1 . 7 2 , 1 2 . 0 8 , 1 2 . 4 8 , 1 2 . 8 8 , 1 3 . 3 6 , 1 3 . 7 6 , 1 4 . 1 6 , 1 4 . 5 6 , 1 5 . 0 4 , 1 5 . 8 8 ] ) 503 keys . append ( [ − 1 . 37 289 , −1.12923 , −0.369652 , −0.202446 , −0.369652 , −0.202446 , −0.369652 , −0.202446 , −0.369652 , −0.202446 , −1.54462 , −0.138102 , −1.309 , −0.257754 , −1.4591 , −0.138102 , −1.309 , −0.257754 , −1.4591 , −0.138102 , −1.309 , −0.257754 , −1.4591 , −0.138102 , −1.309 , −0.257754 , −1.4591 , − 0.424876] ) 504 505 names . append ( " LElbowYaw" ) 506 t i m es . append ( [ 0 . 8 , 1 . 2 4 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 1 2 , 8 . 7 2 , 9 . 1 2 , 9 . 5 2 , 10 , 1 0 . 44 , 1 0 . 8 4 , 1 1 . 2 4 , 1 1 . 7 2 , 1 2 . 0 8 , 1 2 . 4 8 , 1 2 . 8 8 , 1 3 . 3 6 , 1 3 . 7 6 , 1 4 . 1 6 , 1 4 . 5 6 , 1 5 . 0 4 , 1 5 . 8 8 ] ) 507 keys . append ( [ − 0 . 65 506 , −1.76453 , −0.380475 , −0.618244 , −0.380475 , −0.618244 , −0.380475 , −0.618244 , −0.380475 , −0.618244 , −1.65632 , 0.851 4 12 , 0 .0750 492 , 0.0 0157596 , 0.460 7 67 , 0 .85141 2 , 0 .0750 492 , 0.00 157596 , 0.46076 7 , 0.851 4 12 , 0.075 0492 , 0.00 157596 , 0 .46076 7 , 0.851 4 12 , 0.0 75049 2 , 0 .001575 96 , −0.682424 , − 1.210 3 7]) 508 509 names . append ( " LHand " ) 510 t i m es . append ( [ 0 . 8 , 1 . 2 4 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 1 2 , 8 . 7 2 , 9 . 1 2 , 9 . 5 2 , 10 , 1 0 . 44 , 1 0 . 8 4 , 1 1 . 2 4 , 1 1 . 7 2 , 1 2 . 0 8 , 1 2 . 4 8 , 1 2 . 8 8 , 1 3 . 3 6 , 1 3 . 7 6 , 1 4 . 1 6 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1 4 . 5 6 , 1 5 . 0 4 , 1 5 . 8 8 ] ) 511 ke ys . append ( [ 0 . 2 , 0 . 6 , 0 . 2 64 8 , 0 . 2 6 4 , 0 . 2 6 4 8 , 0 . 2 6 4 , 0 . 2 6 4 8 , 0 . 2 6 4 , 0 .2 64 8 , 0 . 2 6 4 , 0 . 1 3 , 0 . 6 7 8 , 0 . 3 , 0 . 6 7 8 4 , 0 . 3 , 0 .67 8 , 0 . 3 , 0.6 78 4 , 0 . 3 , 0 .67 8 , 0 . 3 , 0.6784 , 0 . 3 , 0 .67 8 , 0 . 3 , 0.67 8 4 , 0 . 3 , 0 . 2 9 6 8 ] ) 512 513 names . append ( " L HipPitch " ) 514 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 515 keys . append ([ −0.1533 5 8 , 0 .18565 6 , 0.147 3 06 , 0 .185656 , 0.147306, 0.185656, 0.147306, 0.185656, 0.147306, 0.101202, 0.259204, 0.101202, 0.259204, 0.101202, 0.259 204 , 0 .1 0120 2 , 0 .259 204 , 0 . 1 3 9 6 3 6 ] ) 516 517 names . append ( " LHipRoll " ) 518 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 519 keys . append ( [ 0 . 0 0 4 6 4 3 9 5 , −0.144154 , 0 .32 9 85 2 , −0 .1 44 15 4 , 0.329 8 52 , −0.144154 , 0 .32985 2 , −0.144154 , 0 . 329852 , 0.297 5 54 , −0.14117 , 0 . 297554 , −0.14117 , 0.29755 4 , −0.14117 , 0 .2 97 554 , −0.14117 , 0 . 1 0 2 8 2 ] ) 520 521 names . append ( " LHipYawPitch " ) 522 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 523 keys . append ([ −0.443284 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0.37272 , −0.357381 , −0. 17023 2]) 524 525 names . append ( " LKneePitch " ) 526 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 527 keys . append ( [ 0 . 4 0 4 9 3 4 , −0.090548 , −0.0798099 , −0.090548 , −0.0798099, −0.090548, −0.0798099, −0.090548, −0.0798099, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0782759]) 528 529 names . append ( " L S h o u l d e r P i t c h " ) 530 t i m es . append ( [ 0 . 8 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 1 2 , 8 . 7 2 , 9 . 5 2 , 1 0 . 44 , 1 1 . 2 4 , 1 2 . 0 8 , 1 2 . 8 8 , 1 3 . 7 6 , 1 4 . 5 6 , 1 5 . 3 6 , 1 5 . 8 8 ] ) 531 keys . append ( [ 0 . 6 3 9 6 3 5 , 1.74718 , 1 .85611 , 1 .7 4718 , 1 .8 5611 , 1.74718, 1.85611, 1.74718, 1.85611, 1.21475, −1.19188, This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
0.995 6 07 , −1.19188 , 0 . 995607 , −1.19188 , 0.99560 7 , −1.19188 , 0 .9 95 607 , 1 .06465 , 1 . 4 7 1 0 6 ] ) 532 533 names . append ( " L S h o ul de r Ro l l " ) 534 t i m es . append ( [ 0 . 8 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 1 2 , 8 . 7 2 , 9 . 1 2 , 9 . 5 2 , 10 , 1 0 . 44 , 10 .8 4 , 1 1 . 2 4 , 1 1 . 7 2 , 1 2 . 0 8 , 1 2 . 4 8 , 1 2 . 8 8 , 1 3 . 3 6 , 1 3 . 7 6 , 1 4 . 1 6 , 1 4 . 5 6 , 1 5 .04 , 1 5 . 8 8 ] ) 535 keys . append ( [ 0 . 3 4 0 5 0 7 , 0.24233 , 0 .1 963 09 , 0 .24 233 , 0.196 309 , 0.24233 , 0 .19630 9 , 0.24233 , 0 .19630 9 , 0.16 5 8 06 , 0.328 3 17 , 0 .59515 7 , −0.314159 , 0 .595157 , 0.328 3 1 7 , 0.595 1 57 , −0.314159 , 0 .59515 7 , 0.328 3 17 , 0 .595157 , −0.314159 , 0 . 595157 , 0 . 328317 , 0 . 595157 , −0.314159 , 0.595 157 , 0 . 1 5 3 3 5 8 ] ) 536 537 names . append ( " LWristYaw " ) 538 t i m es . append ( [ 0 . 8 , 1 . 2 4 , 1 . 6 4 , 2 . 4 4 , 3 . 3 6 , 4 . 1 6 , 5 . 0 4 , 5 . 8 4 , 6 . 7 6 , 7 . 5 6 , 8 . 7 2 , 9 . 5 2 , 1 0 . 44 , 1 1 . 2 4 , 1 2 . 0 8 , 1 2 . 8 8 , 1 3 . 7 6 , 1 4 . 5 6 , 1 5 . 8 8 ] ) 539 keys . append ( [ 0 . 1 1 9 6 1 , −1.45037 , −0.395814 , −0.420357 , −0.395814 , −0.420357 , −0.395814 , −0.420357 , −0.395814 , −0.420357 , −0.107338 , −0.400331 , −0.107338 , −0.400331 , −0. 10733 8 , −0 .4003 31 , − 0.107338 , − 0. 40033 1 , 0 . 0 8 2 7 9 3 9 ] ) 540 541 names . append ( " RAnklePitch " ) 542 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 543 keys . append ([ −0.0521 1 4 , 0 .09208 2 , 0.082 8 78 , 0 .092082 , 0.082878, 0.092082, 0.082878, 0.092082, 0.082878, 0.0 44444 1 , 0 . 161028 , 0 .044 4441 , 0 . 161028 , 0 .0444 441 , 0.161 028 , 0 .0 44 44 41 , 0 .1 6102 8 , 0 . 0 9 3 6 1 6 ] ) 544 545 names . append ( " RAnkleRoll " ) 546 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 547 keys . append ( [ 0 . 0 9 6 6 8 3 9 , 0 . 26 389 , −0.0904641 , 0 . 26 389 , −0.0904641 , 0 . 2 6 3 8 9 , −0.0904641 , 0 . 2 6389 , −0.0904641 , −0.062936 , 0 . 248467 , −0.062936 , 0.248 4 6 7 , −0.062936 , 0.248 467 , −0.062936 , 0 .2 4846 7 , 0 . 1 1 9 6 9 4 ] ) 548 549 names . append ( " RElbowRoll " ) 550 t i m es . append ( [ 0 . 8 8 , 1 . 3 2 , 1 . 7 2 , 2 . 1 2 , 2 . 5 2 , 3 , 3 . 4 4 , 3 . 8 4 , 4.24 , 4.72 , 5.12 , 5.52 , 5.92 , 6.4 , 6.84 , 7.24 , 7.64 , 8 . 1 2 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 1 5 . 08 , 15 . 4 , 1 5 . 8 ] ) 551 keys . append ( [ 1 . 3 4 6 8 9 , 1.120 5 , 0.1381 02 , 1 .30 9 , 0 .2 57 75 4 , 1. 4 5 9 1 , 0 .138102 , 1 .30 9 , 0 . 257754 , 1 . 45 91 , 0 .13810 2 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1 . 3 0 9 , 0 . 2 57 7 54 , 1 . 4 5 91 , 0 . 13 8 10 2 , 1 . 3 0 9 , 0 . 25 7 75 4 , 1.54462 , 0 .36965 2 , 0.202 4 46 , 0 .36965 2 , 0.202 4 4 6 , 0.369 6 52 , 0 .20244 6 , 0.369 6 52 , 0 .20244 6 , 0.82205 , 0.886 627 , 0 . 4 2 9 5 6 2 ] ) 552 553 names . append ( "RElbowYaw" ) 554 t i m es . append ( [ 0 . 8 8 , 1 . 3 2 , 1 . 7 2 , 2 . 1 2 , 2 . 5 2 , 3 , 3 . 4 4 , 3 . 8 4 , 4.24 , 4.72 , 5.12 , 5.52 , 5.92 , 6.4 , 6.84 , 7.24 , 7.64 , 8 . 1 2 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 1 5 . 08 , 15 . 4 , 1 5 . 8 ] ) 555 keys . append ( [ 0 . 5 9 5 1 5 , 0. 56 72 32 , −0.851412 , −0.0750492 , −0.00157596 , −0.460767 , −0.851412 , −0.0750492 , −0.00157596 , −0.460767 , −0.851412 , −0.0750492 , −0.00157596 , −0.460767 , −0.851412 , −0.0750492 , −0.00157596 , 1 . 65632 , 0 . 3 80475 , 0 . 618244 , 0 . 380475 , 0.618244, 0.380475, 0.618244, 0.380475, 0.618244, 1.57952 , 1 .0 3323 , 1 . 2 1 0 2 8 ] ) 556 557 names . append ( " RHand" ) 558 t i m es . append ( [ 0 . 8 8 , 1 . 3 2 , 1 . 7 2 , 2 . 1 2 , 2 . 5 2 , 3 , 3 . 4 4 , 3 . 8 4 , 4.24 , 4.72 , 5.12 , 5.52 , 5.92 , 6.4 , 6.84 , 7.24 , 7.64 , 8 . 1 2 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 1 5 .4 , 1 5 . 8 ] ) 559 keys . append ( [ 0 . 2 , 0 . 5 , 0. 678 , 0 . 3 , 0 .6784 , 0 . 3 , 0 .67 8 , 0 . 3 , 0. 67 84 , 0 . 3 , 0 .67 8 , 0 . 3 , 0.6 78 4 , 0 . 3 , 0 .67 8 , 0 . 3 , 0.678 4 , 0 . 1 3 , 0 . 2 64 8 , 0 . 2 6 4 , 0 . 2 6 4 8 , 0 . 2 6 4 , 0 . 2 6 4 8 , 0 . 2 6 4 , 0. 2 64 8 , 0.2 64 , 0. 24 , 0 . 2 9 7 6 ] ) 560 561 names . append ( " RHipPitch " ) 562 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 563 keys . append ([ −0.1779 8 5 , 0 .10120 2 , 0.259 2 04 , 0 .101202 , 0.259204, 0.101202, 0.259204, 0.101202, 0.259204, 0.185656, 0.147306, 0.185656, 0.147306, 0.185656, 0.147 306 , 0 .1 8565 6 , 0 .147 306 , 0 . 1 3 1 8 8 2 ] ) 564 565 names . append ( " RHipRoll " ) 566 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 567 keys . append ( [ − 0 . 11 961 , −0.297554 , 0.14117 , −0.297554 , 0.14117 , −0.297554 , 0 . 1 4117 , −0.297554 , 0 . 1 4 1 1 7 , 0.144 1 54 , −0.329852 , 0 .14415 4 , −0.329852 , 0 . 144154 , −0.329852 , 0 . 144154 , −0.329852 , −0. 0966001 ]) 568 569 names . append ( " RHipYawPitch " ) 570 t i m es . append ( [ 1 . 5 6 , 3 . 2 8 , 4 . 9 6 , 6 . 6 8 , 8 . 5 6 , 1 0. 28 , 11 .9 2 , 1 3 . 6 , 1 5 . 7 2 ] ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
571 keys . append ( [ − 0 . 37 272 , −0.37272 , −0.37272 , −0.37272 , −0.37272 , −0.37272 , −0.37272 , −0.37272 , − 0.170 232] ) 572 573 names . append ( " RKneePitch " ) 574 t i m es . append ( [ 0 . 6 8 , 1 . 5 6 , 2 . 3 6 , 3 . 2 8 , 4 . 0 8 , 4 . 9 6 , 5 . 7 6 , 6 . 6 8 , 7 . 4 8 , 8 . 5 6 , 9 . 3 6 , 1 0 . 28 , 1 1 . 0 8 , 1 1 . 9 2 , 1 2 . 7 2 , 1 3 . 6 , 1 4 . 4 , 1 5 . 7 2 ] ) 575 keys . append ( [ 0 . 4 2 6 4 9 4 , −0.0904641 , −0.0904641 , −0.0904641 , −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.090548, −0.0798099, −0.090548, −0.0798099, −0.090548 , −0.0798099 , −0.090548 , −0.0798099 , −0.091998]) 576 577 names . append ( " R S h o u l d e r P i t c h " ) 578 t i m es . append ( [ 0 . 8 8 , 1 . 7 2 , 2 . 5 2 , 3 . 4 4 , 4 . 2 4 , 5 . 1 2 , 5 . 9 2 , 6 . 8 4 , 7 . 6 4 , 8 . 1 2 , 8 . 6 4 , 9 . 4 4 , 1 0. 3 6 , 1 1. 1 6 , 12 , 1 2 . 8 , 1 3 . 6 8 , 1 4 . 4 8 , 1 5 . 4 , 1 5 . 8 ] ) 579 keys . append ( [ 0 . 9 1 5 8 4 1 , −1.19188 , 0 .9 956 07 , −1.19188 , 0.995 6 07 , −1.19188 , 0 . 995607 , −1.19188 , 0.99560 7 , 1.21475, 1.74718, 1.85611, 1.74718, 1.85611, 1.74718, 1.85611, 1.74718, 1.85611, 1.18508, 1.47268]) 580 581 names . append ( " R S h o ulderRol l " ) 582 t i m es . append ( [ 0 . 8 8 , 1 . 3 2 , 1 . 7 2 , 2 . 1 2 , 2 . 5 2 , 3 , 3 . 4 4 , 3 . 8 4 , 4.24 , 4.72 , 5.12 , 5.52 , 5.92 , 6.4 , 6.84 , 7.24 , 7.64 , 8 . 1 2 , 8 . 6 4 , 9 . 4 4 , 1 0. 36 , 1 1 . 1 6 , 12 , 1 2 . 8 , 1 3. 6 8 , 1 4 .4 8 , 1 5 . 08 , 1 5 . 8 ] ) 583 keys . append ([ −0.266959 , −0.670206 , −0.328317 , −0.595157 , 0.314 1 59 , −0.595157 , −0.328317 , −0.595157 , 0.3141 5 9 , −0.595157 , −0.328317 , −0.595157 , 0 .31415 9 , −0.595157 , −0.328317 , −0.595157 , 0 . 314159 , −0.165806 , −0.24233 , −0.196309 , −0.24233 , −0.196309 , −0.24233 , −0.196309 , −0.24233 , −0.196309 , −0.455531 , −0.16 4 18]) 584 585 names . append ( " RWristYaw " ) 586 t i m es . append ( [ 0 . 8 8 , 1 . 3 2 , 1 . 7 2 , 2 . 5 2 , 3 . 4 4 , 4 . 2 4 , 5 . 1 2 , 5 . 9 2 , 6 . 8 4 , 7 . 6 4 , 8 . 6 4 , 9 . 4 4 , 1 0. 3 6 , 1 1. 1 6 , 12 , 1 2 . 8 , 1 3 . 68 , 1 4.48 , 1 5 . 8 ] ) 587 keys . append ( [ − 0 . 4 0 1 9 4 9 , 1 . 3 9 2 7 7 , 0 . 107338 , 0 . 400331 , 0.107338, 0.400331, 0.107338, 0.400331, 0.107338, 0.400331, 0.395814, 0.420357, 0.395814, 0.420357, 0.395 814 , 0 .4 2035 7 , 0 .395 814 , 0 .4 2035 7 , 0 . 1 0 8 8 7 2 ] ) 588 589 return names , keys , t i m e s 590 591 """************************************** 592 Name : headbang 593 Func t i o n : Dances l i k e a headbang . 594 ************************************** """ This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
783 names . append ( " RHand" ) 784 t i m es . append ( [ 3 . 1 2 , 4 . 4 8 , 5 . 9 6 , 7 . 8 ] ) 785 keys . append ( [ 0 . 6 5 0 9 0 9 , 0.8 54 545 , 0 .8 520 24 , 0 . 3 0 1 6 ] ) 786 787 names . append ( " RHipPitch " ) 788 t i m es . append ( [ 3 . 1 6 , 4 .5 2 , 6 , 7 . 8 4 ] ) 789 keys . append ( [ 0 . 4 4 1 7 5 , 0 .485 624 , 0 .4 8470 2 , 0 . 1 8 7 1 0 6 ] ) 790 791 names . append ( " RHipRoll " ) 792 t i m es . append ( [ 3 . 1 6 , 4 .5 2 , 6 , 7 . 8 4 ] ) 793 keys . append ([ −0.130348 , −0.144154 , −0.151824 , −0. 0689 88]) 794 795 names . append ( " RKneePitch " ) 796 t i m es . append ( [ 3 . 1 6 , 4 .5 2 , 6 , 7 . 8 4 ] ) 797 keys . append ([ −0.103083 , −0.0966 , −0.0904641 , −0.0 735901] ) 798 799 names . append ( " R S h o u l d e r P i t c h " ) 800 t i m es . append ( [ 1 . 2 , 3 . 1 2 , 4 . 4 8 , 5 . 9 6 , 7 . 8 ] ) 801 keys . append ( [ 1 . 4 3 1 2 6 , −0.705598 , −0.710201 , −0.808375 , 1.52637]) 802 803 names . append ( " R S h o ulderRol l " ) 804 t i m es . append ( [ 1 . 2 , 2 . 2 4 , 3 . 1 2 , 4 . 4 8 , 5 . 9 6 , 7 . 8 ] ) 805 keys . append ([ −0.362067 , −1.15192 , −0.745566 , −0.322183 , −0.26389 , −0. 0813 44]) 806 807 names . append ( " RWristYaw " ) 808 t i m es . append ( [ 3 . 1 2 , 4 . 4 8 , 5 . 9 6 , 6 . 9 6 , 7 . 8 ] ) 809 keys . append ( [ 0 . 4 3 6 3 3 2 , 1.01229 , 1 .00933 , 1 .1 1701 , 0 . 1 7 3 3 ] ) 810 811 return names , keys , t i m e s 812 813 """************************************** 814 Name: takePicture 815 Func t i o n : I t s i m u l a t e s t h a t i t t a k e s a 816 picture . 817 ************************************** """ 818 def takePicture () : 819 names = l i s t ( ) 820 t i m e s = l i s t ( ) 821 keys = l i s t ( ) 822 823 names . append ( " H eadP itch " ) 824 t im es . append ( [ 0 . 5 2 , 1 , 1 . 8 , 2 . 4 , 3 . 16 , 3 . 8 ] ) 825 keys . append ( [ 0 . 1 1 8 6 8 2 , −0.0568 , −0.136136 , −0.0982179 , 0.0890118, −0.174919]) 826 827 names . append ( "HeadYaw" ) 828 t im es . append ( [ 1 , 1 . 8 , 2 . 4 , 3 . 8 ] ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
829 keys . append ([ − 0 . 0 4 29939 , −0.04913 , −0.0521979 , −0.01998 4]) 830 831 names . append ( " L Ankl ePit ch " ) 832 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 833 keys . append ( [ 0 . 0 8 5 8 6 2 2 , 0 .0 68 988 2 , 0 .07 33 03 8 , 0 .0 73 30 38 , 0 .0 85 8 62 2 , 0 . 0 9 8 1 3 4 1 ] ) 834 835 names . append ( " LAnkleRoll " ) 836 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 837 keys . append ([ −0.128814 , −0.151824 , −0.116542 , −0.116542 , −0.128814 , −0. 115008]) 838 839 names . append ( " LElbowRoll " ) 840 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 5 6 , 3 . 1 2 , 3 . 7 2 ] ) 841 keys . append ([ −0.940732 , −1.54462 , −1.54462 , −1.54462 , −1.53242 , −1.4207 , −0.44 4818 ]) 842 843 names . append ( " LElbowYaw" ) 844 t i m es . append ( [ 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 5 6 , 3 . 7 2 ] ) 845 keys . append ([ −0.679603 , −0.475581 , −0.466378 , −0.461776 , −1.16742]) 846 847 names . append ( " LHand " ) 848 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 2 8 , 2 . 4 , 2 . 5 6 , 3.72]) 849 keys . append ( [ 1 , 1 , 1 , 0 . 9 09 6 , 0 . 4 5 , 0 . 9 1 , 0 . 9 092 , 0 . 3 0 2 4 ] ) 850 851 names . append ( " L HipPitch " ) 852 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 853 keys . append ([ −0.3036 9 1 , 0 .17645 3 , 0.179 5 19 , 0 .179519 , −0.303691 , 0 . 1 3 6 5 6 8 ] ) 854 855 names . append ( " LHipRoll " ) 856 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 857 keys . append ( [ 0 . 0 9 6 6 8 3 9 , 0 .15 9578 , 0 .12 1228 , 0 .12 1228 , 0.0 966 83 9 , 0 . 1 1 5 0 9 2 ] ) 858 859 names . append ( " LHipYawPitch " ) 860 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 861 keys . append ([ −0.239262 , −0.174835 , −0.171766 , −0.171766 , −0.239262 , −0. 171766]) 862 863 names . append ( " LKneePitch " ) 864 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 865 keys . append ( [ 0 . 2 4 6 9 3 3 , −0.0828778 , −0.0923279 , −0.0923279 , 0.246 9 33 , − 0.090548] ) 866 867 names . append ( " L S h o u l d e r P i t c h " ) 868 t i m es . append ( [ 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 5 6 , 3 . 7 2 ] ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
869 keys . append ([ −0.262356 , −0.357464 , −0.285367 , −0.27923 , 1.50635]) 870 871 names . append ( " L S h o ul de r Ro l l " ) 872 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 5 6 , 3 . 7 2 ] ) 873 keys . append ( [ 0 . 6 5 4 4 9 8 , 0.2 91 418 , 0 .6 994 62 , 0 .74 70 17 , 0.728 609 , 0 . 1 1 6 5 4 2 ] ) 874 875 names . append ( " LWristYaw " ) 876 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 1 . 7 2 , 2 . 1 6 , 2 . 5 6 , 3 . 7 2 ] ) 877 keys . append ( [ − 1 . 16 064 , −0.521602 , −0.702614 , −0.684206 , −0.690342 , 0 . 1 3 0 3 4 8 ] ) 878 879 names . append ( " RAnklePitch " ) 880 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 881 keys . append ( [ 0 . 1 4 8 8 4 , 0. 07 36 74 , 0 .07330 38 , 0 .07330 38 , 0 .1 4 88 4 , 0 . 0 9 9 7 5 2 ] ) 882 883 names . append ( " RAnkleRoll " ) 884 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 885 keys . append ( [ 0 . 1 1 0 4 9 , 0 .08748 01 , 0.08 13 44 , 0 .0 81 344 , 0 .11 0 4 9 , 0 . 0 7 6 7 4 1 9 ] ) 886 887 names . append ( " RElbowRoll " ) 888 t i m es . append ( [ 0 . 3 6 , 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 5 6 , 3 . 1 2 , 3 . 6 4 ] ) 889 keys . append ( [ 1 . 0 3 6 7 3 , 1.5 4462 , 1.54462 , 1.54462 , 1 .5 325 1 , 1 .4 3 46 6 , 0 . 4 1 8 8 2 3 ] ) 890 891 names . append ( "RElbowYaw" ) 892 t i m es . append ( [ 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 5 6 , 3 . 6 4 ] ) 893 keys . append ( [ 0 . 6 5 6 5 1 1 , 0.4 67 829 , 0 .4 985 08 , 0 .47 54 97 , 1.15353]) 894 895 names . append ( " RHand" ) 896 t i m es . append ( [ 0 . 3 6 , 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 2 8 , 2 . 4 , 2 . 5 6 , 3.64]) 897 keys . append ( [ 1 , 0 . 9 0 04 , 0 . 9 0 12 , 0.8996 , 0 .3 7 , 0 . 9 , 0.9004 , 0.3052]) 898 899 names . append ( " RHipPitch " ) 900 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 901 keys . append ([ −0.2654 2 4 , 0 .17483 5 , 0.179 4 36 , 0 .179436 , −0.265424 , 0 . 1 3 3 4 1 6 ] ) 902 903 names . append ( " RHipRoll " ) 904 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 905 keys . append ([ −0.061318 , −0.05058 , −0.075124 , −0.075124 , −0.061318 , −0.06 5 92]) 906 This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
907 names . append ( " RHipYawPitch " ) 908 t i m e s . append ( [ 0 . 4 4 , 0 . 9 2 , 3 . 2 ] ) 909 keys . append ([ −0.239262 , −0.174835 , −0.23 9262 ]) 910 911 names . append ( " RKneePitch " ) 912 t i m es . append ( [ 0 . 4 4 , 0 . 9 2 , 2 . 3 6 , 2 . 7 2 , 3 . 2 , 3 . 8 4 ] ) 913 keys . append ( [ 0 . 1 4 2 7 0 4 , −0.0904641 , −0.0904641 , −0.0904641 , 0.142 7 04 , − 0.091998] ) 914 915 names . append ( " R S h o u l d e r P i t c h " ) 916 t i m es . append ( [ 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 5 6 , 3 . 6 4 ] ) 917 keys . append ([ −0.251533 , −0.358915 , −0.291418 , −0.285283 , 1.5049]) 918 919 names . append ( " R S h o ulderRol l " ) 920 t i m es . append ( [ 0 . 3 6 , 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 5 6 , 3 . 6 4 ] ) 921 keys . append ([ −0.640536 , −0.420357 , −0.785451 , −0.767043 , −0.763974 , −0. 127364]) 922 923 names . append ( " RWristYaw " ) 924 t i m es . append ( [ 0 . 3 6 , 0 . 8 4 , 1 . 6 4 , 2 . 1 6 , 2 . 5 6 , 3 . 6 4 ] ) 925 keys . append ( [ 0 . 9 9 4 8 3 8 , 0.5 47 595 , 0 .7 516 17 , 0 .73 62 78 , 0.736 278 , 0 . 1 7 7 9 0 1 ] ) 926 927 return names , keys , t i m e s 928 929 """************************************** 930 Name : saxophone 931 Func t i o n : I t s i m u l a t e s t h a t i t p l a y s a 932 saxophone . 933 ************************************** """ 934 def saxophone ( ) : 935 names = l i s t ( ) 936 t i m e s = l i s t ( ) 937 keys = l i s t ( ) 938 939 names . append ( " H eadP itch " ) 940 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 941 keys . append ([ −0.523136 , −0.303464 , −0.0301958 , −0.303464 , −0.0301958, −0.303464, −0.0301958, −0.303464, −0.0301958, −0.303464 , −0.0301958 , −0.303464 , −0.0301958 , −0.303464 , −0.0301958, −0.303464, −0.0301958, −0.303464, −0.0301958, −0.303464, −0.0301958, −0.303464, −0.0301958, −0.303464 , −0.0301958 , −0.303464 , −0.0301958 , −0.303464 , −0.0301958, −0.303464, −0.0301958, −0.303464, −0.0301958 , −0. 19025 8]) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
942 943 names . append ( "HeadYaw" ) 944 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 945 keys . append ([ −0.128898 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.186771 , −0.0123 138]) 946 947 names . append ( " L Ankl ePit ch " ) 948 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 949 keys . append ([ −0.128898 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.145772 , 0 . 400415 , 0.2761 6 2 , 0.4004 1 5 , 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0 .2 7 61 6 2 , 0 .4 0 04 1 5 , −0.1288 98 , 0 . 0 9 9 6 6 8 1 ] ) 950 951 names . append ( " LAnkleRoll " ) 952 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 953 keys . append ([ − 0 . 0 9 04641 , 0.13043 2 , 0.026 1199 , 0.130 4 32 , 0.0 26119 9 , 0 . 130432 , 0 .026 1199 , 0 . 130432 , 0 .0261 199 , 0.130 4 32 , 0 .026 1199 , 0 . 130432 , 0.02 61199 , 0.130 4 32 , 0.0 26119 9 , −0.239262 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.342125 , −0.331386 , −0.0904641 , − 0.12 8814] ) 954 955 names . append ( " LElbowRoll " ) 956 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 957 keys . append ( [ − 1 . 17 193 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
−1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , −1.2051 , − 0.437 147] ) 958 959 names . append ( " LElbowYaw" ) 960 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 961 keys . append ( [ − 1 . 15 821 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , −0.46639 , −0.265904 , − 1.159 7 5]) 962 963 names . append ( " LHand " ) 964 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 965 keys . append ( [ 0 . 8 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 4 1 , 0 . 2 , 0 . 3 1 3 6 ] ) 966 967 names . append ( " L HipPitch " ) 968 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 969 keys . append ([ − 0 . 4 7 3 9 63 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 06447 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , −0.562937 , 0.01 99001 , 0.23 0 0 57 , 0 .019 9001 , 0 . 230057 , 0.0 19900 1 , 0 . 230057 , 0 .019 9001 , 0 . 230057 , 0 .0199 001 , 0.230 0 57 , 0 .019 9001 , 0 . 230057 , 0.01 99001 , 0.230 0 57 , 0.0 199 00 1 , −0.473963 , 0 . 1 3 9 6 3 6 ] ) 970 971 names . append ( " LHipRoll " ) 972 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 973 keys . append ( [ 0 . 0 7 0 6 0 6 1 , −0.182504 , −0.0183661 , −0.182504 , −0.0183661, −0.182504, −0.0183661, −0.182504, −0.0183661, −0.182504 , −0.0183661 , −0.182504 , −0.0183661 , −0.182504 , −0.0183661 , 0 . 2 5 622 , 0.449 4 21 , 0 .44942 1 , 0.449 4 21 , 0.449421, 0.449421, 0.449421, 0.449421, 0.449421, This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
0.449421, 0.449421, 0.449421, 0.449421, 0.449421, 0.449 421 , 0 .4 4942 1 , 0 .0 706 06 1 , 0 . 1 1 6 6 2 6 ] ) 974 975 names . append ( " LHipYawPitch " ) 976 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 977 keys . append ([ −0.223922 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.239262 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.223922 , −0. 1686 98]) 978 979 names . append ( " LKneePitch " ) 980 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 981 keys . append ( [ 0 . 5 8 2 8 7 9 , 0.6 38 103 , 0 .6 350 35 , 0 .63 81 03 , 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635 0 35 , 0.659 5 77 , −0.0904641 , −0.0904641 , −0.0904641 , −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, 0.582879 , −0.0874801]) 982 983 names . append ( " L S h o u l d e r P i t c h " ) 984 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 985 keys . append ( [ 0 . 4 5 8 6 2 4 , −0.0182518 , 0 .2 68 927 , −0.0182518 , 0.268 9 27 , −0.0182518 , 0.26892 7 , −0.0182518 , 0 . 268927 , −0.0182518 , 0 . 268927 , −0.0182518 , 0.268 9 27 , −0.0182518 , 0.268 9 27 , −0.0182518 , 0.26892 7 , −0.0182518 , 0 . 268927 , −0.0182518 , 0 . 268927 , −0.0182518 , 0.268 9 27 , −0.0182518 , 0.268 9 27 , −0.0182518 , 0.26892 7 , −0.0182518 , 0 . 268927 , −0.0182518 , 0 .2 68 927 , −0.0182518 , 0 .2 68 927 , 1 . 4 4 1 9 2 ] ) 986 987 names . append ( " L S h o ul de r Ro l l " ) 988 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 989 keys . append ( [ 0 . 2 9 1 4 1 8 , −0.0940347 , −0.0940347 , −0.0940347 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
−0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347, −0.0940347 , 0 . 0 9 9 6 6 8 1 ] ) 990 991 names . append ( " LWristYaw " ) 992 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 993 keys . append ( [ − 1 . 22 571 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , −1.15957 , 0 . 0 6 1 3 1 8 ] ) 994 995 names . append ( " RAnklePitch " ) 996 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 997 keys . append ([ −0.09 6 6 0 0 1 , 0.4004 1 5 , 0 . 276162 , 0 . 400415 , 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0.276162, 0.400415, 0.276 1 62 , −0.141086 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.365133 , −0.331386 , −0.0966001 , 0 . 1 0 4 3 5 4 ] ) 998 999 names . append ( " RAnkleRoll " ) 1000 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 1001 keys . append ( [ 0 . 1 0 8 9 5 6 , 0.3 31 386 , 0 .3 421 25 , 0 .3 31 38 6 , 0.342125, 0.331386, 0.342125, 0.331386, 0.342125, 0.331386, 0.342125, 0.331386, 0.342125, 0.331386, 0.342 1 25 , 0 .18872 4 , −0.130432 , −0.0261199 , −0.130432 , −0.0261199, −0.130432, −0.0261199, −0.130432, −0.0261199, −0.130432 , −0.0261199 , −0.130432 , −0.0261199 , −0.130432 , −0.0261199 , −0.130432 , 0 .1 0895 6 , 0 . 1 2 2 7 6 2 ] ) 1002 1003 names . append ( " RElbowRoll " ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1004 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 1005 keys . append ( [ 1 . 2 4 7 1 8 , 1.3 6621 , 1.17461 , 1.36621 , 1 .1 746 1 , 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 1.36621, 1.17461, 0.444902]) 1006 1007 names . append ( "RElbowYaw" ) 1008 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 1009 keys . append ( [ 1 . 1 9 8 0 1 , 1.2 4397 , 1.24397 , 1.24397 , 1 .2 439 7 , 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.24397, 1.20261]) 1010 1011 names . append ( " RHand" ) 1012 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 1013 keys . append ( [ 0 . 8 , 0 . 5 4 , 0 . 6 6 , 0 . 5 4 , 0 . 6 6 , 0 . 5 4 , 0 . 6 6 , 0 . 5 4 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0.66 , 0.54 , 0 . 6 6 , 0 . 5 4 , 0 . 6 6 , 0 . 5 4 , 0 . 6 6 , 0 . 5 4 , 0 . 6 6 , 0 . 3 0 9 6 ] ) 1014 1015 names . append ( " RHipPitch " ) 1016 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 1017 keys . append ([ − 0 . 4 9 0 9 2 3 , 0.01 99001 , 0.230 0 57 , 0 .019 9001 , 0.230 0 57 , 0 .019 9001 , 0 . 230057 , 0.01 99001 , 0.230 0 57 , 0.0 19900 1 , 0 . 230057 , 0 .019 9001 , 0 . 230057 , 0 .0199 001 , 0.230 0 57 , −0.521602 , 0 . 0 6 4 4 7 , 0.1534 4 2 , 0.06447 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , 0.153 4 42 , 0 . 0 6 4 4 7 , −0.490923 , 0 . 1 3 4 9 5 ] ) 1018 1019 names . append ( " RHipRoll " ) 1020 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 1021 keys . append ([ − 0 . 0674542 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.449421 , −0.139552 , 0 . 182504 , 0.01 83661 , 0.1825 0 4 , 0.0 18366 1 , 0 . 182504 , 0 .018 3661 , 0 . 182504 , 0 .0183 661 , 0.182 5 04 , 0 .018 3661 , 0 . 182504 , 0.01 83661 , 0.182 5 04 , 0.0 18366 1 , 0.182 5 04 , −0.0674542 , −0.1 0120 2]) 1022 1023 names . append ( " RHipYawPitch " ) 1024 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 1025 keys . append ([ −0.223922 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.239262 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.472429 , −0.516916 , −0.223922 , −0. 1686 98]) 1026 1027 names . append ( " RKneePitch " ) 1028 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2 . 5 6 , 2 . 8 , 3 . 0 4 , 3 . 2 8 , 3 . 5 2 , 3 . 7 6 , 4 , 4 . 4 8 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 1 6 , 9 . 8 4 ] ) 1029 keys . append ( [ 0 . 5 3 6 9 4 2 , −0.0904641 , −0.0904641 , −0.0904641 , −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641, −0.0904641 , −0.0904641 , −0.0904641 , 0 .62898 2 , 0 .63810 3 , 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.635035, 0.638103, 0.536942, −0.091998]) 1030 1031 names . append ( " R S h o u l d e r P i t c h " ) 1032 t i m es . append ( [ 0 . 4 , 0 . 8 8 , 1 . 1 2 , 1 . 3 6 , 1 . 6 , 1 . 8 4 , 2 . 0 8 , 2 . 3 2 , 2.56 , 2.8 , 3.04 , 3.28 , 3.52 , 3.76 , 4, 4.24 , 4.48 , 4.72 , 4 . 9 6 , 5 . 2 , 5 . 4 4 , 5 . 6 8 , 5 . 9 2 , 6 . 1 6 , 6 . 4 , 6 . 6 4 , 6 . 8 8 , 7 . 1 2 , 7 . 3 6 , 7 . 6 , 7 . 8 4 , 8 . 0 8 , 8 . 3 6 , 9 . 8 4 ] ) 1033 keys . append ( [ 1 . 1 3 5 2 , 1 . 1 6 093 , 1 . 3 6 0 3 2 , 1 .16093 , 1 . 3 6 0 3 2 , 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.16093, 1.36032, 1.47422]) 1034 This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1189 keys . append ( [ 1 . 1 1 8 2 4 , 0. 92 80 28 , 0 .9403 , 0 .8 62 06 5 , 0.897 34 9 , 0.842125]) 1190 1191 names . append ( " L S h o ul de r Ro l l " ) 1192 t i m es . append ( [ 0 . 7 2 , 1 . 4 8 , 2 . 1 6 , 2 . 7 2 , 3 . 4 , 4 . 5 2 ] ) 1193 keys . append ( [ 0 . 3 6 3 5 1 5 , 0.2 26 991 , 0 .20398 , 0 .21 778 6 , 0.248 467 , 0 . 2 2 6 9 9 1 ] ) 1194 1195 names . append ( " LWristYaw " ) 1196 t i m es . append ( [ 1 . 4 8 , 4 . 5 2 ] ) 1197 keys . append ( [ 0 . 1 4 7 2 2 2 , 0 . 1 1 9 6 1 ] ) 1198 1199 names . append ( " RElbowRoll " ) 1200 t i m es . append ( [ 0 . 6 4 , 1 . 4 , 1 . 6 8 , 2 . 0 8 , 2 . 4 , 2 . 6 4 , 3 . 0 4 , 3 . 3 2 , 3 . 72 , 4 . 4 4 ] ) 1201 keys . append ( [ 1 . 3 8 5 2 4 , 0. 24 24 14 , 0.349 06 6 , 0.9342 49 , 0.680 6 78 , 0 .19198 6 , 0.261 7 99 , 0 .70721 6 , 1.01927 , 1.26559]) 1202 1203 names . append ( "RElbowYaw" ) 1204 t i m es . append ( [ 0 . 6 4 , 1 . 4 , 2 . 0 8 , 2 . 6 4 , 3 . 3 2 , 3 . 7 2 , 4 . 4 4 ] ) 1205 keys . append ([ −0.312 9 7 8 , 0 .56447 1 , 0.391 1 28 , 0 .348176 , 0.381 923 , 0 .9 7738 4 , 0 . 8 2 6 7 8 3 ] ) 1206 1207 names . append ( " RHand" ) 1208 t i m es . append ( [ 1 . 4 , 3 . 32 , 4 . 4 4 ] ) 1209 keys . append ( [ 0 . 8 5 3 4 7 8 , 0 .8 5493 3 , 0 . 4 2 5 1 1 6 ] ) 1210 1211 names . append ( " R S h o u l d e r P i t c h " ) 1212 t i m es . append ( [ 0 . 6 4 , 1 . 4 , 2 . 0 8 , 2 . 6 4 , 3 . 3 2 , 4 . 4 4 ] ) 1213 keys . append ( [ 0 . 2 4 7 0 1 6 , −1.17193 , −1.0891 , −1.26091 , −1.14892 , 1 . 0 2 0 1 5 ] ) 1214 1215 names . append ( " R S h o ulderRol l " ) 1216 t i m es . append ( [ 0 . 6 4 , 1 . 4 , 2 . 0 8 , 2 . 6 4 , 3 . 3 2 , 4 . 4 4 ] ) 1217 keys . append ([ −0.242414 , −0.954191 , −0.460242 , −0.960325 , −0.328317 , −0. 250085]) 1218 1219 names . append ( " RWristYaw " ) 1220 t i m es . append ( [ 1 . 4 , 3 . 32 , 4 . 4 4 ] ) 1221 keys . append ( [ − 0.312978 , −0.303775 , 0 . 1 8 2 5 0 4 ] ) 1222 1223 return names , keys , t i m e s 1224 1225 """************************************** 1226 Name : sambaU4 1227 Func t i o n : Dances l i k e U4 c a l l s i t samba . 1228 ************************************** """ 1229 def sambaU4 ( ) : This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1230 1231 names = l i s t ( ) 1232 t i m e s = l i s t ( ) 1233 keys = l i s t ( ) 1234 1235 names . append ( " H eadP itch " ) 1236 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 3 . 5 6 , 4 . 4 4 , 5 . 4 , 6 . 3 2 , 7 . 2 8 , 8 . 2 4 , 9 . 2 , 1 0 . 1 6 , 1 1 . 1 2 , 1 1 . 9 6 ] ) 1237 keys . append ( [ 0 , 0. 3 03687 , 0.293 8 07 , 0 .28373 1 , 0.2693 4 2 , 0.252 7 07 , 0 .22972 1 , 0.199 2 02 , 0 .15710 1 , 0.0 96999 9 , 0.0177092, 0]) 1238 1239 names . append ( "HeadYaw" ) 1240 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 3 . 5 6 , 4 . 4 4 , 5 . 4 , 6 . 3 2 , 7 . 2 8 , 8 . 2 4 , 9 . 2 , 1 0 . 1 6 , 1 1 . 1 2 , 1 1 . 9 6 ] ) 1241 keys . append ( [ 0 , 0 .87790 1 , −0.925025 , 0 . 9 2 6 7 7 , −0.925025 , 0.925 0 25 , −0.925025 , 0 .92502 5 , −0.925025 , 0 . 925025 , −0.925025 , 0 ] ) 1242 1243 names . append ( " LElbowRoll " ) 1244 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 4 . 4 4 , 6 . 3 2 , 8 . 2 4 , 1 0 . 1 6 ] ) 1245 keys . append ([ −0.181514 , −0.221657 , −0.221657 , −0.221657 , −0.221657 , −0. 221657]) 1246 1247 names . append ( " LElbowYaw" ) 1248 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 3 . 5 6 , 4 . 4 4 , 5 . 4 , 6 . 3 2 , 7 . 2 8 , 8 . 2 4 , 9 . 2 , 10 . 16 , 1 1 . 1 2 ] ) 1249 keys . append ([ −1 . 4 5 2 11 , 0 . 589921 , −1.50971 , 0 . 589921 , −1.50971 , 0 . 589921 , −1.50971 , 0.5899 2 1 , −1.50971 , 0.589921, −1.50971]) 1250 1251 names . append ( " L S h o ul de r Ro l l " ) 1252 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 3 . 5 6 , 4 . 4 4 , 5 . 4 , 6 . 3 2 , 7 . 2 8 , 8 . 2 4 , 9 . 2 , 10 . 16 , 1 1 . 1 2 ] ) 1253 keys . append ( [ 1 . 5 6 2 0 7 , 1.5 6207 , 1.56207 , 1.56207 , 1 .5 620 7 , 1.56207, 1.56207, 1.56207, 1.56207, 1.56207, 1.56207]) 1254 1255 names . append ( " LWristYaw " ) 1256 t i m es . append ( [ 1 . 7 2 ] ) 1257 keys . append ( [ − 0 . 6 4 2 2 8 1 ] ) 1258 1259 names . append ( " RElbowRoll " ) 1260 t i m es . append ( [ 1 . 7 2 ] ) 1261 keys . append ( [ 0 . 4 6 3 3 1 ] ) 1262 1263 names . append ( "RElbowYaw" ) 1264 t i m es . append ( [ 1 . 7 2 , 2 . 6 , 3 . 5 6 , 4 . 4 4 , 5 . 4 , 6 . 3 2 , 7 . 2 8 , 8 . 2 4 , 9 . 2 , 10 . 16 , 1 1 . 1 2 ] ) 1265 keys . append ( [ 0 . 9 8 4 3 6 6 , 0.9 84 366 , −1.01404 , 0.98 436 6 , This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
−1.01404 , 0 . 984366 , −1.01404 , 0.9843 6 6 , −1.01404 , 0.984366, −1.01404]) 1266 1267 names . append ( " R S h o ulderRol l " ) 1268 t i m es . append ( [ 1 . 7 2 , 3 . 5 6 , 5 . 4 , 7 . 2 8 , 9 . 2 , 1 1 . 1 2 ] ) 1269 keys . append ( [ − 1 . 32 645 , −1.56207 , −1.56207 , −1.56207 , −1.56207 , −1.56 2 07]) 1270 1271 names . append ( " RWristYaw " ) 1272 t i m es . append ( [ 1 . 7 2 ] ) 1273 keys . append ( [ 0 . 1 1 0 4 0 6 ] ) 1274 1275 return names , keys , t i m e s 1276 1277 1278 """************************************** 1279 Name: initialMoveInteraction 1280 Func t i o n : Moves t he h i p r o l l t o i t s l e f t 1281 ************************************** """ 1282 def initialMoveInteraction () : 1283 1284 names = l i s t ( ) 1285 t i m e s = l i s t ( ) 1286 keys = l i s t ( ) 1287 1288 names . append ( " H eadP itch " ) 1289 t i m es . append ( [ 1 . 5 6 , 4 . 7 6 ] ) 1290 keys . append ( [ 0 . 3 3 3 3 5 8 , 0 . 0 1 5 7 0 8 ] ) 1291 1292 1293 names . append ( "HeadYaw" ) 1294 t i m es . append ( [ 1 . 5 6 , 4 . 7 6 ] ) 1295 keys . append ([ − 0 . 2 6 3 5 4 5 , −0.022689 3]) 1296 1297 return names , keys , t i m e s This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
1.2 Sensors File 11: __init__.py 1from .import * This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 12: nao_head_tactile_gestures.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : n a o _ h e a d _ t a c t i l e _ g e s t u r e s . py 5Func t i o n : F i l e w ith t h e c l a s s t o g et i n f o r m a t i o n from t h e head s e n s o r s o f r ob ot nao 6See A L T a c t i l e G e s t u r e : 7h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −s e ns o rs − l e d s / altactilegesture#altactilegesture 8 9COMMENT: I t does n o t work ! ! 10 11 C r e a t i o n d a t e : 1 5 / 08 /2 0 2 2 12 L as t m o d i f i e d : 1 5 /08/2022 13 Create d by : SCV 14 ///////////////////////////////////////////////////////////////////////////// """ 15 16 17 " " "++++++++++++++++++++++++++++++++++++++ 18 Libraries 19 ++++++++++++++++++++++++++++++++++++++" " " 20 import q i 21 22 " " "++++++++++++++++++++++++++++++++++++++ 23 C o n s t a n t s C l a s s e s 24 ++++++++++++++++++++++++++++++++++++++" " " 25 26 """************************************** 27 Name : HEAD_TACTILE_GESTURES 28 Func t i o n : c l a s s t h a t c o n t a i n s t h e head g e s t u r e s . See : h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi −develo p e r −guide / naoqi −a p i s / naoqi −se n s o r s − l e d s / a l t a c t i l e g e s t u r e # d e f a u l t − t a c t i l e −g e s t u r e 29 ************************************** """ 30 class HEAD_TACTILE_GESTURES ( ) : 31 SINGLE_FRONT = ’ S i n g l e F r o n t ’ 32 SINGLE_MIDDLE = ’ Si n g l eMidd l e ’ 33 SINGLE_REAR = ’ S i n g l e R e a r ’ 34 DOUBLE_FRONT = ’ Dou bleF ront ’ 35 DOUBLE_MIDDLE = ’ DoubleMiddle ’ 36 DOUBLE_REAR = ’ DoubleRear ’ 37 SINGLE_TAP = ’ S i n g leTap ’ 38 DOUBLE_TAP = ’ DoubleTap ’ This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
39 CARESS_FRONT_TO_REAR = ’ CaressFt oR ’ 40 CARESS_REAR_TO_FRONT = ’ CaressRt oF ’ 41 ZOOM_IN = ’ ZoomIn ’ 42 ZOOM_OUT = ’ZoomOut ’ 43 THE_CLAW = ’ TheClaw ’ 44 SINGLE_FRONT_HOLD = ’ S i n g l e F r o n t H o l d ’ 45 SINGLE_MIDDLE_HOLD = ’ Si ngleMi d dleHol d ’ 46 SINGLE_REAR_HOLD = ’ SingleRearHold ’ 47 SINGLE_TAP_HOLD = ’ Singl eTapHold ’ 48 THE_CLAW_HOLD = ’ TheClawHold ’ 49 50 " " "++++++++++++++++++++++++++++++++++++++ 51 Class 52 ++++++++++++++++++++++++++++++++++++++" " " 53 class Nao_HeadTactileGestures () : 54 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 55 Name : _ _ i n i t _ _ 56 Func t i o n : i n i t o f t h e c l a s s 57 Paramete rs : s e s s i o n : nao s e s s i o n 58 c o n t r o l l e r : c o n t r o l l e r t o a d v i s e when an e v e n t happens 59 Retu rn : − 60 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 61 def _ _ i n i t _ _ ( s e l f , s e s s i o n ) : 62 63 s e l f . s e s s i o n = s e s s i o n 64 65 # I n i t t a c t i l e _ g e s t u r e s _ s e r v i c e 66 s e l f . t a c t i l e _ g e s t u r e s _ s e r v i c e = s e l f . s e s s i o n . s e r v i c e ( " ALTactileGesture") 67 68 # I n i t r e a c t t o t ouch 69 s e l f . r e a c t _ t o _ t o u c h = ReactToTouch ( s e l f . s e s s i o n , s e l f ) 70 71 #HEAD i n i t s 72 #−−−−−−−−−− 73 # I n i t l i s t of o t h e r g e s t u r e s 74 s e l f . h e a d _ n e w_ g e s t ur e s = [ ] 75 76 # I n i t l i s t of g e s t u r e s t o che ck 77 self . head_check_gestures = [] 78 79 # Connect t a c t i l e g e s t u r e h andl e r t o onG esture s i g n a l 80 s e l f . s1 = s e l f . t a c t i l e _ g e s t u r e s _ s e r v i c e . onGesture . c o n n ect ( s e l f . h e a d _ t a c t i l e _ g e s t u r e _ h a n d l e r ) 81 82 # Connect t a c t i l e g e s t u r e r e l e a s e h an d ler t o o nR el e a se signal 83 s e l f . s2 = s e l f . t a c t i l e _ g e s t u r e s _ s e r v i c e . onRelease . This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
c o n n ect ( s e l f . h e a d _ t a c t i l e _ g e s t u r e _ r e l e a s e _ h a n d l e r ) 84 85 # B oo le an ’ l o c k ’ u s e f u l f o r r e s p o n d i n g t o ’ h o ld ’ g e s t u r e s i n a more c o n t r o l l e d manner 86 self . head_gesture_hold_lock = False 87 88 ############################################ 89 ## HEAD FUNCTIONS ## 90 ############################################ 91 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 92 Name: head_add_new_gestures 93 Func t i o n : adds new head t a c t i l e g e s t u r e s 94 Paramete rs : s e s s i o n : nao s e s s i o n 95 Retu rn : − 96 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 97 def head_a d d _ new_gest u r es ( s e l f , g e s t u r e ) : 98 # C reate a new g e s t u r e 99 try : 100 s e l f . h e a d _ n e w _ g e s t u r e s . append ( s e l f . t a c t i l e _ g e s t u r e s _ s e r v i c e . c r e a t e G e s t u r e ( g e s t u r e ) ) 101 exce pt Runt i meErro r as e : 102 print e 103 104 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 105 Name : h e a d _ a d d _ g e s t u r e s _ t o _ c h e c k 106 Func t i o n : c r e a t e s a l i s t wit h th e g e s t u r e s t o check 107 Paramete rs : a d d_new _ gestur e s : bool ean . True i f t he l i s t o f new g e s t u r e s has 108 t o be added . 109 l i s t _ e x i s t i n g _ g e s t u r e s : l i s t of g e s t u r e s t h a t e x i s t and want t o 110 check ( s e e c l a s s HEAD_TACTILE_GESTURES ) 111 Retu rn : − 112 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 113 def h e a d _ a d d _ g e s t u r e s _ t o _ c h e c k ( s e l f , add _n ew _g es tu re s , list_existing_gestures ): 114 i f add_new_gestures : 115 for gesture in s e l f . head _ n e w _ g e s t u r e s : 116 s e l f . h e a d _ c h e c k _ g e s t u r e s . append ( g e s t u r e ) 117 for gesture in list_existing_gestures : 118 s e l f . h e a d _ c h e c k _ g e s t u r e s . append ( g e s t u r e ) 119 120 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 121 Name : h e a d _ t a c t i l e _ g e s t u r e _ h a n d l e r 122 Func t i o n : h and l e r o f head g e s t u r e s 123 Paramete rs : v a l ue : g e s t u r e d e t e c t e d 124 Retu rn : − This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
125 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 126 def head_tactile_gesture_handler (self , value): 127 for gesture in s e l f . he a d _ n e w _ g e s t u r e s : 128 i f v alu e == g e s t u r e : 129 s e l f . c o n t r o l l e r . h e a d _ g e s t u r e _ h a p p e n e d ( g e s t u r e ) 130 131 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 132 Name : h e a d _ t a c t i l e _ g e s t u r e _ h a n d l e r 133 Func t i o n : Enable s ’ l o c k i n g o u t ’ o f m u l t i p l e ’ h old g e s t u r e ’ s i g n a l r e s p o n s e s 134 Paramete rs : − 135 Retu rn : − 136 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 137 def h e a d _ t a c t i l e _ g e s t u r e _ r e l e a s e _ h a n d l e r ( s e l f ) : 138 s e l f . g e s t u r e _ h o l d _ l o c k = F a l s e 139 140 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 141 Name : hea d_clean_u p 142 F unction : c l e a n s up t h e h a n d l e r s 143 Paramete rs : − 144 Retu rn : − 145 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 146 def head_cl e a n _up ( s e l f ) : 147 """ 148 D i s c o n n e c t t a c t i l e g e s t u r e h a n d l e r from s i g n a l 149 """ 150 s e l f . tg . o nGesture . d i s c o n n e c t ( s e l f . s1 ) 151 s e l f . tg . o nRelease . d i s c o n n e c t ( s e l f . s2 ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 13: nao_touch.py 1# ! / usr / bin / env pyt h on 2# −*− enco ding : UTF−8 −*− 3""" ///////////////////////////////////////////////////////////////////////////// 4Name : na o_t ouc h . py 5Func t i o n : F i l e w ith t h e c l a s s t o g et i n f o r m a t i o n from t h e t ou ch s e n s o r s o f r ob ot nao 6See ALTouch : 7h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −s e ns o rs − l e d s / altouch#altouch 8h t t p s : / / d e ve lo p er . s o f t b a n k r o b o t i c s . com / nao6 / naoqi − d ev e lo p er −g ui de / naoqi −a p i s / naoqi −s e ns o rs − l e d s / a l t o u c h / a ltou ch −a pi 9C r e a t i o n d a t e : 1 5 / 08 /2 0 2 2 10 L as t m o d i f i e d : 1 5 /08/2022 11 Create d by : SCV 12 ///////////////////////////////////////////////////////////////////////////// """ 13 14 15 " " "++++++++++++++++++++++++++++++++++++++ 16 Libraries 17 ++++++++++++++++++++++++++++++++++++++" " " 18 import q i 19 import functools 20 21 " " "++++++++++++++++++++++++++++++++++++++ 22 C o n s t a n t s C l a s s e s 23 ++++++++++++++++++++++++++++++++++++++" " " 24 25 """************************************** 26 Name : TOUCH_SENSORS 27 Fun ct ion : c l a s s t h a t c o n t a i n s t ou ch s e n s o r s . 28 ************************************** """ 29 class TOUCH_SENSORS ( ) : 30 HEAD_FRONT = " Head / Touch / F r o n t " 31 HEAD_MIDDLE = " Head / Touch / Middle " 32 HEAD_REAR = " Head / Touch / Rear " 33 LEFT_HAND_GREY_ZONE = "LHand / Touch / Back " 34 LEFT_HAND_EXTERNAL_WHITE_ZONE = "LHand / Touch / L e f t " 35 LEFT_HAND_INTERNAL_WHITE_ZONE = "LHand / Touch / Right " 36 RIGHT_HAND_GREY_ZONE = " RHand / Touch / Back " 37 RIGHT_HAND_EXTERNAL_WHITE_ZONE = "RHand / Touch / R i g h t " 38 RIGHT_HAND_INTERNAL_WHITE_ZONE = "RHand / Touch / L e f t " 39 LEFT_FOOD_EXTERNAL_BUMPER = " LFoot / Bumper / L e f t " This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
40 LEFT_FOOD_INTERNAL_BUMPER = " LFoot / Bumper / Right " 41 RIGHT_FOOD_EXTERNAL_BUMPER = " RFoot / Bumper / R i g h t " 42 RIGHT_FOOD_INTERNAL_BUMPER = " RFoot / Bumper / L e f t " 43 44 """************************************** 45 Name : TOUCH_EVENTS 46 Func t i o n : c l a s s t h a t c o n t a i n s touch e v e n t s . 47 ************************************** """ 48 class TOUCH_EVENTS( ) : 49 TOUCH_CHANGED = " TouchChanged " 50 RIGHT_BUMPER_PRESSED = " Righ tBumperPressed " 51 LEFT_BUMPER_PRESSED = " Left Bumpe rPres sed " 52 # BACK_BUMPER_PRESSED = " BackBumperPressed " # Pepper o n l y 53 FRONT_TACTIL_TOUCH = " F r o n t T a c t i l T o u c h e d " 54 MIDDLE_TACTIL_TOUCH = " Middl e T a c tilTouc h e d " 55 REAR_TACTIL_TOUCH = " R e a r T a c t i l T o u c h e d " 56 HAND_RIGHT_BACK_TOUCHED = " HandRightBackTouched " 57 HAND_RIGHT_LEFT_TOUCHED = " HandRightLeftTouched " 58 HAND_RIGHT_RIGHT_TOUCHED = " HandRightRightTouched " 59 HAND_LEFT_BACK_TOUCHED = " HandLeftBackTouched " 60 HAND_LEFT_LEFT_TOUCHED = " HandLeftLeftTouched " 61 HAND_LEFT_RIGHT_TOUCHED = " HandLeftRightTouched " 62 63 64 65 " " "++++++++++++++++++++++++++++++++++++++ 66 Class 67 ++++++++++++++++++++++++++++++++++++++" " " 68 class Nao_Touch () : 69 " " "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 70 Name : _ _ i n i t _ _ 71 Func t i o n : i n i t o f t h e c l a s s 72 Paramete rs : s e s s i o n : nao s e s s i o n 73 n e e d _ c a l l b a c k : boo le an t o i n d i c a t e i f a c a l l b a c k i s needed 74 c o n t r o l l e r : c o n t r o l l e r t o a d v i s e when an e v e n t happens 75 m em or y _s er v ic e : i n c a se a h a n d l e r i s need ed 76 Retu rn : − 77 −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" " " 78 def _ _ i n i t _ _ ( s e l f , s e s s i o n , n e e d _ c a l l b a c k = F al se , c o n t r o l l e r = None , memory_service = None ) : 79 80 i f n e e d _ c a l l b a c k : 81 self . controller = controller 82 s e l f . memory_service = memory_service 83 # Connect t o an Naoqi1 E ve nt . 84 s e l f . t ouch = s e l f . memory_service . s u b s c r i b e r ( TOUCH_EVENTS.TOUCH_CHANGED) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).