reachy-mini 1.2.5rc1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. reachy_mini/__init__.py +4 -0
  2. reachy_mini/apps/__init__.py +25 -0
  3. reachy_mini/apps/app.py +258 -0
  4. reachy_mini/apps/assistant.py +787 -0
  5. reachy_mini/apps/manager.py +312 -0
  6. reachy_mini/apps/sources/__init__.py +4 -0
  7. reachy_mini/apps/sources/hf_space.py +106 -0
  8. reachy_mini/apps/sources/local_common_venv.py +567 -0
  9. reachy_mini/apps/templates/README.md.j2 +12 -0
  10. reachy_mini/apps/templates/gitignore.j2 +3 -0
  11. reachy_mini/apps/templates/index.html.j2 +40 -0
  12. reachy_mini/apps/templates/main.py.j2 +74 -0
  13. reachy_mini/apps/templates/pyproject.toml.j2 +28 -0
  14. reachy_mini/apps/templates/static/index.html.j2 +27 -0
  15. reachy_mini/apps/templates/static/main.js.j2 +47 -0
  16. reachy_mini/apps/templates/static/style.css.j2 +25 -0
  17. reachy_mini/apps/templates/style.css.j2 +411 -0
  18. reachy_mini/apps/utils.py +30 -0
  19. reachy_mini/assets/config/hardware_config.yaml +164 -0
  20. reachy_mini/assets/confused1.wav +0 -0
  21. reachy_mini/assets/count.wav +0 -0
  22. reachy_mini/assets/dance1.wav +0 -0
  23. reachy_mini/assets/firmware/CHANGELOG.md +15 -0
  24. reachy_mini/assets/firmware/reachymini_ua_io16_lin_v2.1.2.bin +0 -0
  25. reachy_mini/assets/firmware/reachymini_ua_io16_lin_v2.1.3.bin +0 -0
  26. reachy_mini/assets/firmware/update.sh +9 -0
  27. reachy_mini/assets/go_sleep.wav +0 -0
  28. reachy_mini/assets/impatient1.wav +0 -0
  29. reachy_mini/assets/kinematics_data.json +253 -0
  30. reachy_mini/assets/models/fknetwork.dynamic.onnx +0 -0
  31. reachy_mini/assets/models/fknetwork.onnx +0 -0
  32. reachy_mini/assets/models/fknetwork_int8.onnx +0 -0
  33. reachy_mini/assets/models/iknetwork.onnx +0 -0
  34. reachy_mini/assets/wake_up.wav +0 -0
  35. reachy_mini/daemon/__init__.py +1 -0
  36. reachy_mini/daemon/app/__init__.py +1 -0
  37. reachy_mini/daemon/app/bg_job_register.py +142 -0
  38. reachy_mini/daemon/app/dashboard/static/assets/KO-cartoon-static.svg +40 -0
  39. reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon-static.svg +42 -0
  40. reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon.svg +6 -0
  41. reachy_mini/daemon/app/dashboard/static/assets/go-to-sleep-cartoon.svg +6 -0
  42. reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon-static.svg +50 -0
  43. reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon.svg +6 -0
  44. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-awake.svg +18 -0
  45. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-connection-lost-animation.svg +6 -0
  46. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-go-to-sleep-animation.svg +6 -0
  47. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko-animation.svg +6 -0
  48. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko.svg +22 -0
  49. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping-static.svg +41 -0
  50. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping.svg +18 -0
  51. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-wake-up-animation.svg +6 -0
  52. reachy_mini/daemon/app/dashboard/static/css/app.css +1433 -0
  53. reachy_mini/daemon/app/dashboard/static/fonts/Archivo-Italic-VariableFont_wdth,wght.ttf +0 -0
  54. reachy_mini/daemon/app/dashboard/static/fonts/Archivo-VariableFont_wdth,wght.ttf +0 -0
  55. reachy_mini/daemon/app/dashboard/static/fonts/Asap-Italic-VariableFont_wdth,wght.ttf +0 -0
  56. reachy_mini/daemon/app/dashboard/static/fonts/Asap-VariableFont_wdth,wght.ttf +0 -0
  57. reachy_mini/daemon/app/dashboard/static/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
  58. reachy_mini/daemon/app/dashboard/static/js/apps.js +323 -0
  59. reachy_mini/daemon/app/dashboard/static/js/appstore.js +167 -0
  60. reachy_mini/daemon/app/dashboard/static/js/daemon.js +169 -0
  61. reachy_mini/daemon/app/dashboard/static/js/health_check.js +9 -0
  62. reachy_mini/daemon/app/dashboard/static/js/move_player.js +132 -0
  63. reachy_mini/daemon/app/dashboard/static/js/notification.js +41 -0
  64. reachy_mini/daemon/app/dashboard/static/js/update.js +132 -0
  65. reachy_mini/daemon/app/dashboard/static/js/volume_control.js +252 -0
  66. reachy_mini/daemon/app/dashboard/static/js/wifi.js +176 -0
  67. reachy_mini/daemon/app/dashboard/tailwindcss/README.md +15 -0
  68. reachy_mini/daemon/app/dashboard/tailwindcss/package-lock.json +1127 -0
  69. reachy_mini/daemon/app/dashboard/tailwindcss/package.json +6 -0
  70. reachy_mini/daemon/app/dashboard/tailwindcss/pnpm-lock.yaml +608 -0
  71. reachy_mini/daemon/app/dashboard/tailwindcss/postcss.config.js +6 -0
  72. reachy_mini/daemon/app/dashboard/tailwindcss/styles/app.css +185 -0
  73. reachy_mini/daemon/app/dashboard/tailwindcss/tailwind.config.js +11 -0
  74. reachy_mini/daemon/app/dashboard/templates/base.html +21 -0
  75. reachy_mini/daemon/app/dashboard/templates/index.html +20 -0
  76. reachy_mini/daemon/app/dashboard/templates/sections/apps.html +8 -0
  77. reachy_mini/daemon/app/dashboard/templates/sections/appstore.html +35 -0
  78. reachy_mini/daemon/app/dashboard/templates/sections/daemon.html +45 -0
  79. reachy_mini/daemon/app/dashboard/templates/sections/move_player.html +121 -0
  80. reachy_mini/daemon/app/dashboard/templates/sections/notification.html +19 -0
  81. reachy_mini/daemon/app/dashboard/templates/sections/update.html +54 -0
  82. reachy_mini/daemon/app/dashboard/templates/sections/wifi.html +46 -0
  83. reachy_mini/daemon/app/dashboard/templates/settings.html +14 -0
  84. reachy_mini/daemon/app/dependencies.py +41 -0
  85. reachy_mini/daemon/app/main.py +469 -0
  86. reachy_mini/daemon/app/models.py +149 -0
  87. reachy_mini/daemon/app/routers/apps.py +114 -0
  88. reachy_mini/daemon/app/routers/daemon.py +85 -0
  89. reachy_mini/daemon/app/routers/kinematics.py +57 -0
  90. reachy_mini/daemon/app/routers/motors.py +41 -0
  91. reachy_mini/daemon/app/routers/move.py +265 -0
  92. reachy_mini/daemon/app/routers/state.py +146 -0
  93. reachy_mini/daemon/app/routers/update.py +86 -0
  94. reachy_mini/daemon/app/routers/volume.py +423 -0
  95. reachy_mini/daemon/app/routers/wifi_config.py +219 -0
  96. reachy_mini/daemon/app/services/__init__.py +1 -0
  97. reachy_mini/daemon/app/services/bluetooth/bluetooth_service.py +796 -0
  98. reachy_mini/daemon/app/services/bluetooth/commands/HOTSPOT.sh +7 -0
  99. reachy_mini/daemon/app/services/bluetooth/commands/RESTART_DAEMON.sh +4 -0
  100. reachy_mini/daemon/app/services/bluetooth/commands/SOFTWARE_RESET.sh +7 -0
  101. reachy_mini/daemon/app/services/bluetooth/install_service_bluetooth.sh +39 -0
  102. reachy_mini/daemon/app/services/gpio_shutdown/__init__.py +1 -0
  103. reachy_mini/daemon/app/services/gpio_shutdown/install_service.sh +33 -0
  104. reachy_mini/daemon/app/services/gpio_shutdown/launcher.sh +3 -0
  105. reachy_mini/daemon/app/services/gpio_shutdown/shutdown_monitor.py +28 -0
  106. reachy_mini/daemon/app/services/wireless/generate_asoundrc.sh +70 -0
  107. reachy_mini/daemon/app/services/wireless/install_service.sh +33 -0
  108. reachy_mini/daemon/app/services/wireless/launcher.sh +5 -0
  109. reachy_mini/daemon/backend/__init__.py +1 -0
  110. reachy_mini/daemon/backend/abstract.py +815 -0
  111. reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
  112. reachy_mini/daemon/backend/mujoco/backend.py +395 -0
  113. reachy_mini/daemon/backend/mujoco/utils.py +59 -0
  114. reachy_mini/daemon/backend/mujoco/video_udp.py +57 -0
  115. reachy_mini/daemon/backend/robot/__init__.py +8 -0
  116. reachy_mini/daemon/backend/robot/backend.py +597 -0
  117. reachy_mini/daemon/daemon.py +651 -0
  118. reachy_mini/daemon/utils.py +116 -0
  119. reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
  120. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
  121. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +0 -0
  122. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
  123. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +0 -0
  124. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
  125. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +0 -0
  126. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
  127. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +0 -0
  128. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
  129. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +0 -0
  130. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
  131. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +0 -0
  132. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
  133. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +0 -0
  134. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
  135. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +0 -0
  136. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
  137. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +0 -0
  138. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
  139. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +0 -0
  140. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
  141. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +0 -0
  142. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
  143. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +0 -0
  144. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
  145. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +0 -0
  146. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
  147. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +0 -0
  148. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
  149. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +0 -0
  150. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
  151. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +0 -0
  152. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/README.m +1 -0
  153. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_0.stl +0 -0
  154. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_1.stl +0 -0
  155. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_2.stl +0 -0
  156. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_3.stl +0 -0
  157. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_0.stl +0 -0
  158. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_1.stl +0 -0
  159. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_2.stl +0 -0
  160. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/head_one_3dprint_collider_0.stl +0 -0
  161. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_0.stl +0 -0
  162. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_1.stl +0 -0
  163. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_2.stl +0 -0
  164. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_3.stl +0 -0
  165. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_0.stl +0 -0
  166. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_1.stl +0 -0
  167. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_2.stl +0 -0
  168. reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/head_one_3dprint_collider_0.stl +0 -0
  169. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +5021 -0
  170. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +0 -0
  171. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
  172. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +0 -0
  173. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
  174. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +0 -0
  175. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
  176. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +0 -0
  177. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
  178. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +0 -0
  179. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  180. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
  181. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +18045 -0
  182. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +0 -0
  183. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
  184. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +0 -0
  185. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
  186. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +0 -0
  187. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
  188. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +0 -0
  189. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
  190. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +0 -0
  191. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
  192. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +0 -0
  193. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
  194. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +0 -0
  195. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  196. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
  197. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
  198. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +0 -0
  199. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
  200. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +0 -0
  201. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
  202. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +0 -0
  203. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  204. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
  205. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  206. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
  207. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  208. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
  209. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
  210. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +0 -0
  211. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +8940 -0
  212. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +0 -0
  213. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
  214. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +0 -0
  215. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
  216. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +0 -0
  217. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
  218. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +0 -0
  219. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
  220. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +0 -0
  221. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
  222. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +0 -0
  223. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
  224. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +0 -0
  225. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +0 -0
  226. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +485 -0
  227. reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
  228. reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
  229. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +642 -0
  230. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
  231. reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
  232. reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
  233. reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +132 -0
  234. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
  235. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +0 -0
  236. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
  237. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +0 -0
  238. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
  239. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +0 -0
  240. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
  241. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +0 -0
  242. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
  243. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +0 -0
  244. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
  245. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +0 -0
  246. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
  247. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +0 -0
  248. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
  249. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +0 -0
  250. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
  251. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +0 -0
  252. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
  253. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +0 -0
  254. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
  255. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +0 -0
  256. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
  257. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +0 -0
  258. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
  259. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +0 -0
  260. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
  261. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +0 -0
  262. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
  263. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +0 -0
  264. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
  265. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +0 -0
  266. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
  267. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +0 -0
  268. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
  269. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +0 -0
  270. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
  271. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +0 -0
  272. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
  273. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +0 -0
  274. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/README.m +1 -0
  275. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_0.stl +0 -0
  276. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_1.stl +0 -0
  277. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_2.stl +0 -0
  278. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_3.stl +0 -0
  279. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_0.stl +0 -0
  280. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_1.stl +0 -0
  281. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_2.stl +0 -0
  282. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/head_one_3dprint_collider_0.stl +0 -0
  283. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_0.stl +0 -0
  284. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_1.stl +0 -0
  285. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_2.stl +0 -0
  286. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_3.stl +0 -0
  287. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_0.stl +0 -0
  288. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_1.stl +0 -0
  289. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_2.stl +0 -0
  290. reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/head_one_3dprint_collider_0.stl +0 -0
  291. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
  292. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +0 -0
  293. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
  294. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +0 -0
  295. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
  296. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +0 -0
  297. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
  298. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +0 -0
  299. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  300. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
  301. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
  302. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +0 -0
  303. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
  304. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +0 -0
  305. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
  306. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +0 -0
  307. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
  308. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +0 -0
  309. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
  310. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +0 -0
  311. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
  312. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +0 -0
  313. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
  314. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +0 -0
  315. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
  316. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +0 -0
  317. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
  318. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +0 -0
  319. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
  320. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +0 -0
  321. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
  322. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +0 -0
  323. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
  324. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +0 -0
  325. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
  326. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +0 -0
  327. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  328. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
  329. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
  330. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +0 -0
  331. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
  332. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +0 -0
  333. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
  334. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +0 -0
  335. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
  336. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +0 -0
  337. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
  338. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +0 -0
  339. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
  340. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +0 -0
  341. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  342. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
  343. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  344. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
  345. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  346. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
  347. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
  348. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +0 -0
  349. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
  350. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +0 -0
  351. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
  352. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +0 -0
  353. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
  354. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +0 -0
  355. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
  356. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +0 -0
  357. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
  358. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +0 -0
  359. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
  360. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +0 -0
  361. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
  362. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +0 -0
  363. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
  364. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +0 -0
  365. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
  366. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +0 -0
  367. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
  368. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +0 -0
  369. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
  370. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +0 -0
  371. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
  372. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +0 -0
  373. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
  374. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +0 -0
  375. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
  376. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +0 -0
  377. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
  378. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +0 -0
  379. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
  380. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +0 -0
  381. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
  382. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +0 -0
  383. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
  384. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +0 -0
  385. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
  386. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +0 -0
  387. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
  388. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +0 -0
  389. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
  390. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +0 -0
  391. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
  392. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +0 -0
  393. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
  394. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +0 -0
  395. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
  396. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +0 -0
  397. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
  398. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +0 -0
  399. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
  400. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +0 -0
  401. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
  402. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +0 -0
  403. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
  404. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +0 -0
  405. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
  406. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +0 -0
  407. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
  408. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +0 -0
  409. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
  410. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +0 -0
  411. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
  412. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +0 -0
  413. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
  414. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +0 -0
  415. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
  416. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +0 -0
  417. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
  418. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +0 -0
  419. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
  420. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +0 -0
  421. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
  422. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +0 -0
  423. reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
  424. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3281 -0
  425. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
  426. reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
  427. reachy_mini/descriptions/reachy_mini/urdf/robot_simple_collision.urdf +2399 -0
  428. reachy_mini/io/__init__.py +15 -0
  429. reachy_mini/io/abstract.py +70 -0
  430. reachy_mini/io/audio_ws.py +242 -0
  431. reachy_mini/io/protocol.py +44 -0
  432. reachy_mini/io/video_ws.py +135 -0
  433. reachy_mini/io/ws_controller.py +120 -0
  434. reachy_mini/io/zenoh_client.py +273 -0
  435. reachy_mini/io/zenoh_server.py +230 -0
  436. reachy_mini/kinematics/__init__.py +68 -0
  437. reachy_mini/kinematics/analytical_kinematics.py +151 -0
  438. reachy_mini/kinematics/nn_kinematics.py +109 -0
  439. reachy_mini/kinematics/placo_kinematics.py +656 -0
  440. reachy_mini/media/__init__.py +1 -0
  441. reachy_mini/media/audio_base.py +111 -0
  442. reachy_mini/media/audio_control_utils.py +455 -0
  443. reachy_mini/media/audio_gstreamer.py +272 -0
  444. reachy_mini/media/audio_sounddevice.py +321 -0
  445. reachy_mini/media/audio_utils.py +114 -0
  446. reachy_mini/media/camera_base.py +100 -0
  447. reachy_mini/media/camera_constants.py +152 -0
  448. reachy_mini/media/camera_gstreamer.py +231 -0
  449. reachy_mini/media/camera_opencv.py +89 -0
  450. reachy_mini/media/camera_utils.py +111 -0
  451. reachy_mini/media/media_manager.py +281 -0
  452. reachy_mini/media/webrtc_client_gstreamer.py +288 -0
  453. reachy_mini/media/webrtc_daemon.py +334 -0
  454. reachy_mini/motion/__init__.py +4 -0
  455. reachy_mini/motion/goto.py +71 -0
  456. reachy_mini/motion/move.py +43 -0
  457. reachy_mini/motion/recorded_move.py +146 -0
  458. reachy_mini/reachy_mini.py +753 -0
  459. reachy_mini/tools/reflash_motors.py +116 -0
  460. reachy_mini/tools/setup_motor.py +422 -0
  461. reachy_mini/tools/setup_motor_rpi.py +108 -0
  462. reachy_mini/utils/__init__.py +46 -0
  463. reachy_mini/utils/constants.py +9 -0
  464. reachy_mini/utils/hardware_config/__init__.py +1 -0
  465. reachy_mini/utils/hardware_config/parser.py +65 -0
  466. reachy_mini/utils/interpolation.py +227 -0
  467. reachy_mini/utils/parse_urdf_for_kinematics.py +110 -0
  468. reachy_mini/utils/rerun.py +320 -0
  469. reachy_mini/utils/wireless_version/__init__.py +1 -0
  470. reachy_mini/utils/wireless_version/startup_check.py +144 -0
  471. reachy_mini/utils/wireless_version/update.py +20 -0
  472. reachy_mini/utils/wireless_version/update_available.py +61 -0
  473. reachy_mini/utils/wireless_version/utils.py +39 -0
  474. reachy_mini-1.2.5rc1.dist-info/METADATA +161 -0
  475. reachy_mini-1.2.5rc1.dist-info/RECORD +479 -0
  476. reachy_mini-1.2.5rc1.dist-info/WHEEL +5 -0
  477. reachy_mini-1.2.5rc1.dist-info/entry_points.txt +4 -0
  478. reachy_mini-1.2.5rc1.dist-info/licenses/LICENSE +201 -0
  479. reachy_mini-1.2.5rc1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,651 @@
1
+ """Daemon for Reachy Mini robot.
2
+
3
+ This module provides a daemon that runs a backend for either a simulated Reachy Mini using Mujoco or a real Reachy Mini robot using a serial connection.
4
+ It includes methods to start, stop, and restart the daemon, as well as to check its status.
5
+ It also provides a command-line interface for easy interaction.
6
+ """
7
+
8
+ import asyncio
9
+ import json
10
+ import logging
11
+ import time
12
+ from dataclasses import asdict, dataclass
13
+ from enum import Enum
14
+ from importlib.metadata import PackageNotFoundError, version
15
+ from threading import Event, Thread
16
+ from typing import Any, Optional
17
+
18
+ from reachy_mini.daemon.backend.abstract import MotorControlMode
19
+ from reachy_mini.daemon.utils import (
20
+ convert_enum_to_dict,
21
+ find_serial_port,
22
+ get_ip_address,
23
+ )
24
+ from reachy_mini.io import (
25
+ AsyncWebSocketAudioStreamer,
26
+ AsyncWebSocketController,
27
+ AsyncWebSocketFrameSender,
28
+ ZenohServer,
29
+ )
30
+ from reachy_mini.media.media_manager import MediaManager
31
+ from reachy_mini.tools.reflash_motors import reflash_motors
32
+
33
+ from .backend.mujoco import MujocoBackend, MujocoBackendStatus
34
+ from .backend.robot import RobotBackend, RobotBackendStatus
35
+
36
+
37
+ class Daemon:
38
+ """Daemon for simulated or real Reachy Mini robot.
39
+
40
+ Runs the server with the appropriate backend (Mujoco for simulation or RobotBackend for real hardware).
41
+ """
42
+
43
+ def __init__(
44
+ self,
45
+ log_level: str = "INFO",
46
+ robot_name: str = "reachy_mini",
47
+ wireless_version: bool = False,
48
+ desktop_app_daemon: bool = False,
49
+ ) -> None:
50
+ """Initialize the Reachy Mini daemon."""
51
+ self.log_level = log_level
52
+ self.logger = logging.getLogger(__name__)
53
+ self.logger.setLevel(self.log_level)
54
+
55
+ self.robot_name = robot_name
56
+
57
+ self.wireless_version = wireless_version
58
+ self.desktop_app_daemon = desktop_app_daemon
59
+
60
+ self.backend: "RobotBackend | MujocoBackend | None" = None
61
+ # Get package version
62
+ try:
63
+ package_version = version("reachy_mini")
64
+ self.logger.info(f"Daemon version: {package_version}")
65
+ except PackageNotFoundError:
66
+ package_version = None
67
+ self.logger.warning("Could not determine daemon version")
68
+
69
+ self._status = DaemonStatus(
70
+ robot_name=robot_name,
71
+ state=DaemonState.NOT_INITIALIZED,
72
+ wireless_version=wireless_version,
73
+ desktop_app_daemon=desktop_app_daemon,
74
+ simulation_enabled=None,
75
+ backend_status=None,
76
+ error=None,
77
+ wlan_ip=None,
78
+ version=package_version,
79
+ )
80
+ self._thread_event_publish_status = Event()
81
+
82
+ self._webrtc: Optional[Any] = (
83
+ None # type GstWebRTC imported for wireless version only
84
+ )
85
+ if wireless_version:
86
+ from reachy_mini.media.webrtc_daemon import GstWebRTC
87
+
88
+ try:
89
+ self._webrtc = GstWebRTC(log_level)
90
+ except Exception as e:
91
+ self.logger.error(f"Failed to initialize WebRTC: {e}")
92
+ self._webrtc = None
93
+
94
+ async def start(
95
+ self,
96
+ sim: bool = False,
97
+ serialport: str = "auto",
98
+ scene: str = "empty",
99
+ localhost_only: bool = True,
100
+ wake_up_on_start: bool = True,
101
+ check_collision: bool = False,
102
+ kinematics_engine: str = "AnalyticalKinematics",
103
+ headless: bool = False,
104
+ use_audio: bool = True,
105
+ websocket_uri: Optional[str] = None,
106
+ stream_media: bool = False,
107
+ hardware_config_filepath: str | None = None,
108
+ ) -> "DaemonState":
109
+ """Start the Reachy Mini daemon.
110
+
111
+ Args:
112
+ sim (bool): If True, run in simulation mode using Mujoco. Defaults to False.
113
+ serialport (str): Serial port for real motors. Defaults to "auto", which will try to find the port automatically.
114
+ scene (str): Name of the scene to load in simulation mode ("empty" or "minimal"). Defaults to "empty".
115
+ localhost_only (bool): If True, restrict the server to localhost only clients. Defaults to True.
116
+ wake_up_on_start (bool): If True, wake up Reachy Mini on start. Defaults to True.
117
+ check_collision (bool): If True, enable collision checking. Defaults to False.
118
+ kinematics_engine (str): Kinematics engine to use. Defaults to "AnalyticalKinematics".
119
+ headless (bool): If True, run Mujoco in headless mode (no GUI). Defaults to False.
120
+ websocket_uri (Optional[str]): If set, allow remote control and streaming of the robot through a WebSocket connection to the specified uri. Defaults to None.
121
+ use_audio (bool): If True, enable audio. Defaults to True.
122
+ stream_media (bool): If True, stream media to the WebSocket. Defaults to False.
123
+ hardware_config_filepath (str | None): Path to the hardware configuration YAML file. Defaults to None.
124
+
125
+ Returns:
126
+ DaemonState: The current state of the daemon after attempting to start it.
127
+
128
+ """
129
+ if self._status.state == DaemonState.RUNNING:
130
+ self.logger.warning("Daemon is already running.")
131
+ return self._status.state
132
+
133
+ self.logger.info(
134
+ f"Daemon start parameters: sim={sim}, serialport={serialport}, scene={scene}, localhost_only={localhost_only}, wake_up_on_start={wake_up_on_start}, check_collision={check_collision}, kinematics_engine={kinematics_engine}, headless={headless}, hardware_config_filepath={hardware_config_filepath}"
135
+ )
136
+
137
+ self._status.simulation_enabled = sim
138
+
139
+ if not localhost_only:
140
+ self._status.wlan_ip = get_ip_address()
141
+
142
+ self._start_params = {
143
+ "sim": sim,
144
+ "serialport": serialport,
145
+ "headless": headless,
146
+ "websocket_uri": websocket_uri,
147
+ "use_audio": use_audio,
148
+ "scene": scene,
149
+ "localhost_only": localhost_only,
150
+ "stream_media": stream_media,
151
+ }
152
+
153
+ self.logger.info("Starting Reachy Mini daemon...")
154
+ self._status.state = DaemonState.STARTING
155
+
156
+ try:
157
+ self.backend = self._setup_backend(
158
+ wireless_version=self.wireless_version,
159
+ sim=sim,
160
+ serialport=serialport,
161
+ scene=scene,
162
+ check_collision=check_collision,
163
+ kinematics_engine=kinematics_engine,
164
+ headless=headless,
165
+ websocket_uri=websocket_uri,
166
+ use_audio=use_audio,
167
+ hardware_config_filepath=hardware_config_filepath,
168
+ )
169
+ except Exception as e:
170
+ self._status.state = DaemonState.ERROR
171
+ self._status.error = str(e)
172
+ raise e
173
+
174
+ self.zenoh_server = ZenohServer(
175
+ prefix=self.robot_name,
176
+ backend=self.backend,
177
+ localhost_only=localhost_only,
178
+ )
179
+ self.zenoh_server.start()
180
+ self._thread_publish_status = Thread(target=self._publish_status, daemon=True)
181
+ self._thread_publish_status.start()
182
+
183
+ self.websocket_server: Optional[AsyncWebSocketController] = None
184
+ if websocket_uri is not None:
185
+ self.websocket_server = AsyncWebSocketController(
186
+ ws_uri=websocket_uri + "/robot", backend=self.backend
187
+ )
188
+
189
+ self._thread_publish_frames: Optional[Thread] = None
190
+ self._thread_event_publish_audio: Optional[Event] = None
191
+ self._thread_publish_audio: Optional[Thread] = None
192
+ self._thread_event_publish_frames: Optional[Event] = None
193
+ self.websocket_frame_sender: Optional[AsyncWebSocketFrameSender] = None
194
+ self.websocket_audio_sender: Optional[AsyncWebSocketAudioStreamer] = None
195
+ if stream_media:
196
+ if websocket_uri is None:
197
+ raise ValueError("WebSocket URI is required when streaming media.")
198
+ self.media_manager = MediaManager()
199
+ self.websocket_frame_sender = AsyncWebSocketFrameSender(
200
+ ws_uri=websocket_uri + "/video_stream"
201
+ )
202
+ self._thread_publish_frames = Thread(
203
+ target=self._publish_frames, daemon=True
204
+ )
205
+ self._thread_event_publish_frames = Event()
206
+ self._thread_publish_frames.start()
207
+ self.websocket_audio_sender = AsyncWebSocketAudioStreamer(
208
+ ws_uri=websocket_uri + "/audio_stream"
209
+ )
210
+ self._thread_publish_audio = Thread(target=self._publish_audio, daemon=True)
211
+ self._thread_event_publish_audio = Event()
212
+ self._thread_publish_audio.start()
213
+ self.media_manager.start_recording()
214
+ self.media_manager.start_playing()
215
+
216
+ def backend_wrapped_run() -> None:
217
+ assert self.backend is not None, (
218
+ "Backend should be initialized before running."
219
+ )
220
+
221
+ try:
222
+ self.backend.wrapped_run()
223
+ except Exception as e:
224
+ self.logger.error(f"Backend encountered an error: {e}")
225
+ self._status.state = DaemonState.ERROR
226
+ self._status.error = str(e)
227
+ self.zenoh_server.stop()
228
+ if self.websocket_server is not None:
229
+ self.websocket_server.stop()
230
+ if (
231
+ self._thread_publish_frames is not None
232
+ and self._thread_publish_frames.is_alive()
233
+ and self._thread_event_publish_frames is not None
234
+ ):
235
+ self._thread_event_publish_frames.set()
236
+ self._thread_publish_frames.join(timeout=2.0)
237
+ if (
238
+ self._thread_publish_audio is not None
239
+ and self._thread_publish_audio.is_alive()
240
+ and self._thread_event_publish_audio is not None
241
+ ):
242
+ self._thread_event_publish_audio.set()
243
+ self._thread_publish_audio.join(timeout=2.0)
244
+ if (
245
+ self.websocket_frame_sender is not None
246
+ and self.websocket_frame_sender.connected.is_set()
247
+ ):
248
+ self.websocket_frame_sender.stop_flag = True
249
+ if (
250
+ self.websocket_audio_sender is not None
251
+ and self.websocket_audio_sender.connected.is_set()
252
+ ):
253
+ self.websocket_audio_sender.stop_flag = True
254
+ self.backend = None
255
+
256
+ self.backend_run_thread = Thread(target=backend_wrapped_run)
257
+ self.backend_run_thread.start()
258
+
259
+ if not self.backend.ready.wait(timeout=2.0):
260
+ self.logger.error(
261
+ "Backend is not ready after 2 seconds. Some error occurred."
262
+ )
263
+ self._status.state = DaemonState.ERROR
264
+ self._status.error = self.backend.error
265
+ return self._status.state
266
+
267
+ if wake_up_on_start:
268
+ try:
269
+ self.logger.info("Waking up Reachy Mini...")
270
+ self.backend.set_motor_control_mode(MotorControlMode.Enabled)
271
+ await self.backend.wake_up()
272
+ except Exception as e:
273
+ self.logger.error(f"Error while waking up Reachy Mini: {e}")
274
+ self._status.state = DaemonState.ERROR
275
+ self._status.error = str(e)
276
+ return self._status.state
277
+ except KeyboardInterrupt:
278
+ self.logger.warning("Wake up interrupted by user.")
279
+ self._status.state = DaemonState.STOPPING
280
+ return self._status.state
281
+
282
+ if self._webrtc:
283
+ await asyncio.sleep(
284
+ 0.2
285
+ ) # Give some time for the backend to release the audio device
286
+ self._webrtc.start()
287
+
288
+ self.logger.info("Daemon started successfully.")
289
+ self._status.state = DaemonState.RUNNING
290
+ return self._status.state
291
+
292
+ def _publish_frames(self) -> None:
293
+ """Publish the media to the WebSocket."""
294
+ if (
295
+ self._thread_event_publish_frames is None
296
+ or self.websocket_frame_sender is None
297
+ ):
298
+ self.logger.warning("_publish_frames called but not properly initialized.")
299
+ return
300
+ while self._thread_event_publish_frames.is_set() is False:
301
+ frame = self.media_manager.get_frame()
302
+ if frame is not None:
303
+ self.websocket_frame_sender.send_frame(frame)
304
+ time.sleep(0.04)
305
+
306
+ def _publish_audio(self) -> None:
307
+ """Publish the audio to the WebSocket."""
308
+ if (
309
+ self._thread_event_publish_audio is None
310
+ or self.websocket_audio_sender is None
311
+ ):
312
+ self.logger.warning("_publish_audio called but not properly initialized.")
313
+ return
314
+
315
+ while self._thread_event_publish_audio.is_set() is False:
316
+ audio = self.media_manager.get_audio_sample()
317
+ if audio is not None:
318
+ self.websocket_audio_sender.send_audio_chunk(audio)
319
+ received_audio = self.websocket_audio_sender.get_audio_chunk()
320
+ if received_audio is not None:
321
+ self.media_manager.push_audio_sample(received_audio)
322
+ time.sleep(0.05)
323
+
324
+ async def stop(self, goto_sleep_on_stop: bool = True) -> "DaemonState":
325
+ """Stop the Reachy Mini daemon.
326
+
327
+ Args:
328
+ goto_sleep_on_stop (bool): If True, put Reachy Mini to sleep on stop. Defaults to True.
329
+
330
+ Returns:
331
+ DaemonState: The current state of the daemon after attempting to stop it.
332
+
333
+ """
334
+ if self._status.state == DaemonState.STOPPED:
335
+ self.logger.warning("Daemon is already stopped.")
336
+ return self._status.state
337
+
338
+ if self.backend is None:
339
+ self.logger.info("Daemon backend is not initialized.")
340
+ self._status.state = DaemonState.STOPPED
341
+ return self._status.state
342
+
343
+ try:
344
+ if self._status.state in (DaemonState.STOPPING, DaemonState.ERROR):
345
+ goto_sleep_on_stop = False
346
+
347
+ self.logger.info("Stopping Reachy Mini daemon...")
348
+ self._status.state = DaemonState.STOPPING
349
+ self.backend.is_shutting_down = True
350
+ self._thread_event_publish_status.set()
351
+ self.zenoh_server.stop()
352
+ if self.websocket_server is not None:
353
+ self.websocket_server.stop()
354
+
355
+ if self._webrtc:
356
+ self._webrtc.stop()
357
+
358
+ if goto_sleep_on_stop:
359
+ try:
360
+ self.logger.info("Putting Reachy Mini to sleep...")
361
+ self.backend.set_motor_control_mode(MotorControlMode.Enabled)
362
+ await self.backend.goto_sleep()
363
+ self.backend.set_motor_control_mode(MotorControlMode.Disabled)
364
+ except Exception as e:
365
+ self.logger.error(f"Error while putting Reachy Mini to sleep: {e}")
366
+ self._status.state = DaemonState.ERROR
367
+ self._status.error = str(e)
368
+ except KeyboardInterrupt:
369
+ self.logger.warning("Sleep interrupted by user.")
370
+ self._status.state = DaemonState.STOPPING
371
+
372
+ self.backend.should_stop.set()
373
+ self.backend_run_thread.join(timeout=5.0)
374
+ if self.backend_run_thread.is_alive():
375
+ self.logger.warning("Backend did not stop in time, forcing shutdown.")
376
+ self._status.state = DaemonState.ERROR
377
+
378
+ self.backend.close()
379
+ self.backend.ready.clear()
380
+
381
+ if self._status.state != DaemonState.ERROR:
382
+ self.logger.info("Daemon stopped successfully.")
383
+ self._status.state = DaemonState.STOPPED
384
+ except Exception as e:
385
+ self.logger.error(f"Error while stopping the daemon: {e}")
386
+ self._status.state = DaemonState.ERROR
387
+ self._status.error = str(e)
388
+ except KeyboardInterrupt:
389
+ self.logger.warning("Daemon already stopping...")
390
+
391
+ if self.backend is not None:
392
+ backend_status = self.backend.get_status()
393
+ if backend_status.error:
394
+ self._status.state = DaemonState.ERROR
395
+
396
+ self.backend = None
397
+
398
+ return self._status.state
399
+
400
+ async def restart(
401
+ self,
402
+ sim: Optional[bool] = None,
403
+ serialport: Optional[str] = None,
404
+ scene: Optional[str] = None,
405
+ headless: Optional[bool] = None,
406
+ use_audio: Optional[bool] = None,
407
+ websocket_uri: Optional[str] = None,
408
+ stream_media: Optional[bool] = None,
409
+ localhost_only: Optional[bool] = None,
410
+ wake_up_on_start: Optional[bool] = None,
411
+ goto_sleep_on_stop: Optional[bool] = None,
412
+ ) -> "DaemonState":
413
+ """Restart the Reachy Mini daemon.
414
+
415
+ Args:
416
+ sim (bool): If True, run in simulation mode using Mujoco. Defaults to None (uses the previous value).
417
+ serialport (str): Serial port for real motors. Defaults to None (uses the previous value).
418
+ scene (str): Name of the scene to load in simulation mode ("empty" or "minimal"). Defaults to None (uses the previous value).
419
+ headless (bool): If True, run Mujoco in headless mode (no GUI). Defaults to None (uses the previous value).
420
+ use_audio (bool): If True, enable audio. Defaults to None (uses the previous value).
421
+ websocket_uri (Optional[str]): If set, allow remote control and streaming of the robot through a WebSocket connection to the specified uri. Defaults to None (uses the previous value).
422
+ stream_media (bool): If True, stream media to the WebSocket. Defaults to None (uses the previous value).
423
+ localhost_only (bool): If True, restrict the server to localhost only clients. Defaults to None (uses the previous value).
424
+ wake_up_on_start (bool): If True, wake up Reachy Mini on start. Defaults to None (don't wake up).
425
+ goto_sleep_on_stop (bool): If True, put Reachy Mini to sleep on stop. Defaults to None (don't go to sleep).
426
+
427
+ Returns:
428
+ DaemonState: The current state of the daemon after attempting to restart it.
429
+
430
+ """
431
+ if self._status.state == DaemonState.STOPPED:
432
+ self.logger.warning("Daemon is not running.")
433
+ return self._status.state
434
+
435
+ if self._status.state in (DaemonState.RUNNING, DaemonState.ERROR):
436
+ self.logger.info("Restarting Reachy Mini daemon...")
437
+
438
+ await self.stop(
439
+ goto_sleep_on_stop=goto_sleep_on_stop
440
+ if goto_sleep_on_stop is not None
441
+ else False
442
+ )
443
+ params: dict[str, Any] = {
444
+ "sim": sim if sim is not None else self._start_params["sim"],
445
+ "serialport": serialport
446
+ if serialport is not None
447
+ else self._start_params["serialport"],
448
+ "scene": scene if scene is not None else self._start_params["scene"],
449
+ "headless": headless
450
+ if headless is not None
451
+ else self._start_params["headless"],
452
+ "use_audio": use_audio
453
+ if use_audio is not None
454
+ else self._start_params["use_audio"],
455
+ "websocket_uri": websocket_uri
456
+ if websocket_uri is not None
457
+ else self._start_params["websocket_uri"],
458
+ "stream_media": stream_media
459
+ if stream_media is not None
460
+ else self._start_params["stream_media"],
461
+ "localhost_only": localhost_only
462
+ if localhost_only is not None
463
+ else self._start_params["localhost_only"],
464
+ "wake_up_on_start": wake_up_on_start
465
+ if wake_up_on_start is not None
466
+ else False,
467
+ }
468
+
469
+ return await self.start(**params)
470
+
471
+ raise NotImplementedError(
472
+ "Restarting is only supported when the daemon is in RUNNING or ERROR state."
473
+ )
474
+
475
+ def status(self) -> "DaemonStatus":
476
+ """Get the current status of the Reachy Mini daemon."""
477
+ if self.backend is not None:
478
+ self._status.backend_status = self.backend.get_status()
479
+
480
+ assert self._status.backend_status is not None, (
481
+ "Backend status should not be None after backend initialization."
482
+ )
483
+
484
+ if self._status.backend_status.error:
485
+ self._status.state = DaemonState.ERROR
486
+ self._status.error = self._status.backend_status.error
487
+ else:
488
+ self._status.backend_status = None
489
+
490
+ return self._status
491
+
492
+ def _publish_status(self) -> None:
493
+ self._thread_event_publish_status.clear()
494
+ while self._thread_event_publish_status.is_set() is False:
495
+ json_str = json.dumps(
496
+ asdict(self.status(), dict_factory=convert_enum_to_dict)
497
+ )
498
+ self.zenoh_server.pub_status.put(json_str)
499
+ time.sleep(1)
500
+
501
+ async def run4ever(
502
+ self,
503
+ sim: bool = False,
504
+ serialport: str = "auto",
505
+ scene: str = "empty",
506
+ localhost_only: bool = True,
507
+ wake_up_on_start: bool = True,
508
+ goto_sleep_on_stop: bool = True,
509
+ check_collision: bool = False,
510
+ kinematics_engine: str = "AnalyticalKinematics",
511
+ headless: bool = False,
512
+ use_audio: bool = True,
513
+ websocket_uri: Optional[str] = None,
514
+ stream_media: bool = False,
515
+ ) -> None:
516
+ """Run the Reachy Mini daemon indefinitely.
517
+
518
+ First, it starts the daemon, then it keeps checking the status and allows for graceful shutdown on user interrupt (Ctrl+C).
519
+
520
+ Args:
521
+ sim (bool): If True, run in simulation mode using Mujoco. Defaults to False.
522
+ serialport (str): Serial port for real motors. Defaults to "auto", which will try to find the port automatically.
523
+ scene (str): Name of the scene to load in simulation mode ("empty" or "minimal"). Defaults to "empty".
524
+ localhost_only (bool): If True, restrict the server to localhost only clients. Defaults to True.
525
+ wake_up_on_start (bool): If True, wake up Reachy Mini on start. Defaults to True.
526
+ goto_sleep_on_stop (bool): If True, put Reachy Mini to sleep on stop. Defaults to True
527
+ check_collision (bool): If True, enable collision checking. Defaults to False.
528
+ kinematics_engine (str): Kinematics engine to use. Defaults to "AnalyticalKinematics".
529
+ headless (bool): If True, run Mujoco in headless mode (no GUI). Defaults to False.
530
+ use_audio (bool): If True, enable audio. Defaults to True.
531
+ websocket_uri (Optional[str]): If set, allow remote control and streaming of the robot through a WebSocket connection to the specified uri. Defaults to None.
532
+ stream_media (bool): If True, stream media to the WebSocket. Defaults to False.
533
+
534
+ """
535
+ await self.start(
536
+ sim=sim,
537
+ serialport=serialport,
538
+ scene=scene,
539
+ localhost_only=localhost_only,
540
+ wake_up_on_start=wake_up_on_start,
541
+ check_collision=check_collision,
542
+ kinematics_engine=kinematics_engine,
543
+ headless=headless,
544
+ websocket_uri=websocket_uri,
545
+ use_audio=use_audio,
546
+ stream_media=stream_media,
547
+ )
548
+
549
+ if self._status.state == DaemonState.RUNNING:
550
+ try:
551
+ self.logger.info("Daemon is running. Press Ctrl+C to stop.")
552
+ while self.backend_run_thread.is_alive():
553
+ self.logger.info(f"Daemon status: {self.status()}")
554
+ for _ in range(10):
555
+ self.backend_run_thread.join(timeout=1.0)
556
+ else:
557
+ self.logger.error("Backend thread has stopped unexpectedly.")
558
+ self._status.state = DaemonState.ERROR
559
+ except KeyboardInterrupt:
560
+ self.logger.warning("Daemon interrupted by user.")
561
+ except Exception as e:
562
+ self.logger.error(f"An error occurred: {e}")
563
+ self._status.state = DaemonState.ERROR
564
+ self._status.error = str(e)
565
+
566
+ await self.stop(goto_sleep_on_stop)
567
+
568
+ def _setup_backend(
569
+ self,
570
+ wireless_version: bool,
571
+ sim: bool,
572
+ serialport: str,
573
+ scene: str,
574
+ check_collision: bool,
575
+ kinematics_engine: str,
576
+ headless: bool,
577
+ use_audio: bool,
578
+ websocket_uri: Optional[str],
579
+ hardware_config_filepath: str | None = None,
580
+ reflash_motors_on_start: bool = True,
581
+ ) -> "RobotBackend | MujocoBackend":
582
+ if sim:
583
+ return MujocoBackend(
584
+ scene=scene,
585
+ check_collision=check_collision,
586
+ kinematics_engine=kinematics_engine,
587
+ headless=headless,
588
+ use_audio=use_audio,
589
+ websocket_uri=websocket_uri,
590
+ )
591
+ else:
592
+ if serialport == "auto":
593
+ ports = find_serial_port(wireless_version=wireless_version)
594
+
595
+ if len(ports) == 0:
596
+ raise RuntimeError(
597
+ "No Reachy Mini serial port found. "
598
+ "Check USB connection and permissions. "
599
+ "Or directly specify the serial port using --serialport."
600
+ )
601
+ elif len(ports) > 1:
602
+ raise RuntimeError(
603
+ f"Multiple Reachy Mini serial ports found {ports}."
604
+ "Please specify the serial port using --serialport."
605
+ )
606
+
607
+ serialport = ports[0]
608
+ self.logger.info(f"Found Reachy Mini serial port: {serialport}")
609
+
610
+ self.logger.info(
611
+ f"Creating RobotBackend with parameters: serialport={serialport}, check_collision={check_collision}, kinematics_engine={kinematics_engine}"
612
+ )
613
+
614
+ if reflash_motors_on_start:
615
+ reflash_motors(serialport, dont_light_up=True)
616
+
617
+ return RobotBackend(
618
+ serialport=serialport,
619
+ log_level=self.log_level,
620
+ check_collision=check_collision,
621
+ kinematics_engine=kinematics_engine,
622
+ use_audio=use_audio,
623
+ wireless_version=wireless_version,
624
+ hardware_config_filepath=hardware_config_filepath,
625
+ )
626
+
627
+
628
+ class DaemonState(Enum):
629
+ """Enum representing the state of the Reachy Mini daemon."""
630
+
631
+ NOT_INITIALIZED = "not_initialized"
632
+ STARTING = "starting"
633
+ RUNNING = "running"
634
+ STOPPING = "stopping"
635
+ STOPPED = "stopped"
636
+ ERROR = "error"
637
+
638
+
639
+ @dataclass
640
+ class DaemonStatus:
641
+ """Dataclass representing the status of the Reachy Mini daemon."""
642
+
643
+ robot_name: str
644
+ state: DaemonState
645
+ wireless_version: bool
646
+ desktop_app_daemon: bool
647
+ simulation_enabled: Optional[bool]
648
+ backend_status: Optional[RobotBackendStatus | MujocoBackendStatus]
649
+ error: Optional[str] = None
650
+ wlan_ip: Optional[str] = None
651
+ version: Optional[str] = None