reachy-mini 1.0.0__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.

Potentially problematic release.


This version of reachy-mini might be problematic. Click here for more details.

Files changed (385) hide show
  1. reachy_mini/__init__.py +4 -0
  2. reachy_mini/apps/__init__.py +24 -0
  3. reachy_mini/apps/app.py +121 -0
  4. reachy_mini/apps/manager.py +183 -0
  5. reachy_mini/apps/sources/__init__.py +4 -0
  6. reachy_mini/apps/sources/hf_space.py +25 -0
  7. reachy_mini/apps/sources/local_common_venv.py +44 -0
  8. reachy_mini/apps/templates/README.md.j2 +1 -0
  9. reachy_mini/apps/templates/main.py.j2 +46 -0
  10. reachy_mini/apps/templates/pyproject.toml.j2 +18 -0
  11. reachy_mini/apps/utils.py +30 -0
  12. reachy_mini/assets/config/hardware_config.yaml +119 -0
  13. reachy_mini/assets/confused1.wav +0 -0
  14. reachy_mini/assets/count.wav +0 -0
  15. reachy_mini/assets/dance1.wav +0 -0
  16. reachy_mini/assets/go_sleep.wav +0 -0
  17. reachy_mini/assets/impatient1.wav +0 -0
  18. reachy_mini/assets/kinematics_data.json +253 -0
  19. reachy_mini/assets/models/fknetwork.dynamic.onnx +0 -0
  20. reachy_mini/assets/models/fknetwork.onnx +0 -0
  21. reachy_mini/assets/models/fknetwork_int8.onnx +0 -0
  22. reachy_mini/assets/models/iknetwork.onnx +0 -0
  23. reachy_mini/assets/wake_up.wav +0 -0
  24. reachy_mini/daemon/__init__.py +1 -0
  25. reachy_mini/daemon/app/__init__.py +1 -0
  26. reachy_mini/daemon/app/bg_job_register.py +142 -0
  27. reachy_mini/daemon/app/dashboard/static/assets/KO-cartoon-static.svg +40 -0
  28. reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon-static.svg +42 -0
  29. reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon.svg +6 -0
  30. reachy_mini/daemon/app/dashboard/static/assets/go-to-sleep-cartoon.svg +6 -0
  31. reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon-static.svg +50 -0
  32. reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon.svg +6 -0
  33. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-awake.svg +18 -0
  34. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-connection-lost-animation.svg +6 -0
  35. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-go-to-sleep-animation.svg +6 -0
  36. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko-animation.svg +6 -0
  37. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko.svg +22 -0
  38. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping-static.svg +41 -0
  39. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping.svg +18 -0
  40. reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-wake-up-animation.svg +6 -0
  41. reachy_mini/daemon/app/dashboard/static/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
  42. reachy_mini/daemon/app/dashboard/static/js/apps.js +304 -0
  43. reachy_mini/daemon/app/dashboard/static/js/appstore.js +150 -0
  44. reachy_mini/daemon/app/dashboard/static/js/daemon.js +163 -0
  45. reachy_mini/daemon/app/dashboard/static/js/move_player.js +132 -0
  46. reachy_mini/daemon/app/dashboard/static/js/setup_wifi.js +94 -0
  47. reachy_mini/daemon/app/dashboard/static/js/update.js +80 -0
  48. reachy_mini/daemon/app/dashboard/static/style.css +83 -0
  49. reachy_mini/daemon/app/dashboard/templates/base.html +23 -0
  50. reachy_mini/daemon/app/dashboard/templates/index.html +17 -0
  51. reachy_mini/daemon/app/dashboard/templates/sections/apps.html +8 -0
  52. reachy_mini/daemon/app/dashboard/templates/sections/appstore.html +29 -0
  53. reachy_mini/daemon/app/dashboard/templates/sections/daemon.html +36 -0
  54. reachy_mini/daemon/app/dashboard/templates/sections/move_player.html +27 -0
  55. reachy_mini/daemon/app/dashboard/update.html +22 -0
  56. reachy_mini/daemon/app/dashboard/wifi_config.html +41 -0
  57. reachy_mini/daemon/app/dependencies.py +41 -0
  58. reachy_mini/daemon/app/main.py +262 -0
  59. reachy_mini/daemon/app/models.py +147 -0
  60. reachy_mini/daemon/app/routers/apps.py +114 -0
  61. reachy_mini/daemon/app/routers/daemon.py +80 -0
  62. reachy_mini/daemon/app/routers/kinematics.py +57 -0
  63. reachy_mini/daemon/app/routers/motors.py +41 -0
  64. reachy_mini/daemon/app/routers/move.py +257 -0
  65. reachy_mini/daemon/app/routers/state.py +146 -0
  66. reachy_mini/daemon/backend/__init__.py +1 -0
  67. reachy_mini/daemon/backend/abstract.py +750 -0
  68. reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
  69. reachy_mini/daemon/backend/mujoco/backend.py +304 -0
  70. reachy_mini/daemon/backend/mujoco/utils.py +59 -0
  71. reachy_mini/daemon/backend/mujoco/video_udp.py +53 -0
  72. reachy_mini/daemon/backend/robot/__init__.py +8 -0
  73. reachy_mini/daemon/backend/robot/backend.py +535 -0
  74. reachy_mini/daemon/daemon.py +444 -0
  75. reachy_mini/daemon/utils.py +114 -0
  76. reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
  77. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
  78. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +0 -0
  79. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
  80. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +0 -0
  81. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
  82. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +0 -0
  83. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
  84. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +0 -0
  85. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
  86. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +0 -0
  87. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
  88. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +0 -0
  89. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
  90. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +0 -0
  91. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
  92. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +0 -0
  93. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
  94. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +0 -0
  95. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
  96. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +0 -0
  97. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
  98. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +0 -0
  99. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
  100. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +0 -0
  101. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
  102. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +0 -0
  103. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
  104. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +0 -0
  105. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
  106. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +0 -0
  107. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
  108. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +0 -0
  109. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +5021 -0
  110. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +0 -0
  111. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
  112. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +0 -0
  113. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
  114. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +0 -0
  115. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
  116. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +0 -0
  117. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
  118. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +0 -0
  119. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  120. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
  121. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +18045 -0
  122. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +0 -0
  123. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
  124. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +0 -0
  125. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
  126. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +0 -0
  127. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
  128. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +0 -0
  129. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
  130. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +0 -0
  131. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
  132. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +0 -0
  133. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
  134. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +0 -0
  135. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  136. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
  137. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
  138. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +0 -0
  139. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
  140. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +0 -0
  141. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
  142. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +0 -0
  143. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  144. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
  145. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  146. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
  147. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  148. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
  149. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
  150. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +0 -0
  151. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +8940 -0
  152. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +0 -0
  153. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
  154. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +0 -0
  155. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
  156. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +0 -0
  157. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
  158. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +0 -0
  159. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
  160. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +0 -0
  161. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
  162. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +0 -0
  163. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
  164. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +0 -0
  165. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +0 -0
  166. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +485 -0
  167. reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
  168. reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
  169. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +613 -0
  170. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
  171. reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
  172. reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
  173. reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +131 -0
  174. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
  175. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +0 -0
  176. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
  177. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +0 -0
  178. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
  179. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +0 -0
  180. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
  181. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +0 -0
  182. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
  183. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +0 -0
  184. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
  185. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +0 -0
  186. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
  187. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +0 -0
  188. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
  189. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +0 -0
  190. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
  191. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +0 -0
  192. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
  193. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +0 -0
  194. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
  195. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +0 -0
  196. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
  197. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +0 -0
  198. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
  199. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +0 -0
  200. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
  201. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +0 -0
  202. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
  203. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +0 -0
  204. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
  205. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +0 -0
  206. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
  207. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +0 -0
  208. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
  209. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +0 -0
  210. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
  211. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +0 -0
  212. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
  213. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +0 -0
  214. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
  215. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +0 -0
  216. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
  217. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +0 -0
  218. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
  219. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +0 -0
  220. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
  221. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +0 -0
  222. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  223. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
  224. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
  225. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +0 -0
  226. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
  227. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +0 -0
  228. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
  229. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +0 -0
  230. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
  231. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +0 -0
  232. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
  233. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +0 -0
  234. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
  235. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +0 -0
  236. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
  237. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +0 -0
  238. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
  239. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +0 -0
  240. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
  241. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +0 -0
  242. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
  243. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +0 -0
  244. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
  245. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +0 -0
  246. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
  247. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +0 -0
  248. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
  249. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +0 -0
  250. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  251. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
  252. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
  253. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +0 -0
  254. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
  255. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +0 -0
  256. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
  257. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +0 -0
  258. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
  259. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +0 -0
  260. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
  261. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +0 -0
  262. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
  263. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +0 -0
  264. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  265. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
  266. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  267. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
  268. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  269. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
  270. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
  271. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +0 -0
  272. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
  273. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +0 -0
  274. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
  275. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +0 -0
  276. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
  277. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +0 -0
  278. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
  279. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +0 -0
  280. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
  281. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +0 -0
  282. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
  283. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +0 -0
  284. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
  285. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +0 -0
  286. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
  287. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +0 -0
  288. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
  289. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +0 -0
  290. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
  291. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +0 -0
  292. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
  293. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +0 -0
  294. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
  295. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +0 -0
  296. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
  297. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +0 -0
  298. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
  299. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +0 -0
  300. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
  301. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +0 -0
  302. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
  303. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +0 -0
  304. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
  305. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +0 -0
  306. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
  307. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +0 -0
  308. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
  309. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +0 -0
  310. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
  311. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +0 -0
  312. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
  313. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +0 -0
  314. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
  315. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +0 -0
  316. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
  317. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +0 -0
  318. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
  319. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +0 -0
  320. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
  321. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +0 -0
  322. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
  323. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +0 -0
  324. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
  325. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +0 -0
  326. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
  327. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +0 -0
  328. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
  329. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +0 -0
  330. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
  331. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +0 -0
  332. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
  333. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +0 -0
  334. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
  335. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +0 -0
  336. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
  337. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +0 -0
  338. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
  339. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +0 -0
  340. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
  341. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +0 -0
  342. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
  343. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +0 -0
  344. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
  345. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +0 -0
  346. reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
  347. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3281 -0
  348. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
  349. reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
  350. reachy_mini/io/__init__.py +1 -0
  351. reachy_mini/io/abstract.py +70 -0
  352. reachy_mini/io/protocol.py +44 -0
  353. reachy_mini/io/zenoh_client.py +258 -0
  354. reachy_mini/io/zenoh_server.py +183 -0
  355. reachy_mini/kinematics/__init__.py +68 -0
  356. reachy_mini/kinematics/analytical_kinematics.py +102 -0
  357. reachy_mini/kinematics/nn_kinematics.py +100 -0
  358. reachy_mini/kinematics/placo_kinematics.py +666 -0
  359. reachy_mini/media/__init__.py +1 -0
  360. reachy_mini/media/audio_base.py +163 -0
  361. reachy_mini/media/audio_gstreamer.py +195 -0
  362. reachy_mini/media/audio_sounddevice.py +226 -0
  363. reachy_mini/media/audio_utils.py +27 -0
  364. reachy_mini/media/camera_base.py +63 -0
  365. reachy_mini/media/camera_constants.py +13 -0
  366. reachy_mini/media/camera_gstreamer.py +162 -0
  367. reachy_mini/media/camera_opencv.py +61 -0
  368. reachy_mini/media/camera_utils.py +60 -0
  369. reachy_mini/media/media_manager.py +194 -0
  370. reachy_mini/motion/__init__.py +4 -0
  371. reachy_mini/motion/goto.py +71 -0
  372. reachy_mini/motion/move.py +36 -0
  373. reachy_mini/motion/recorded_move.py +132 -0
  374. reachy_mini/reachy_mini.py +705 -0
  375. reachy_mini/utils/__init__.py +46 -0
  376. reachy_mini/utils/constants.py +9 -0
  377. reachy_mini/utils/interpolation.py +227 -0
  378. reachy_mini/utils/parse_urdf_for_kinematics.py +110 -0
  379. reachy_mini/utils/rerun.py +546 -0
  380. reachy_mini-1.0.0.dist-info/METADATA +286 -0
  381. reachy_mini-1.0.0.dist-info/RECORD +385 -0
  382. reachy_mini-1.0.0.dist-info/WHEEL +5 -0
  383. reachy_mini-1.0.0.dist-info/entry_points.txt +3 -0
  384. reachy_mini-1.0.0.dist-info/licenses/LICENSE +201 -0
  385. reachy_mini-1.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,132 @@
1
+ const updateMoveItems = async (dataset) => {
2
+ fetch(`/api/move/recorded-move-datasets/list/${dataset}`)
3
+ .then(response => response.json())
4
+ .then(data => {
5
+ // Update the UI with the list of recorded moves
6
+ const moveSelectToggle = document.getElementById('move-select-toggle');
7
+ moveSelectToggle.innerHTML = '';
8
+
9
+ data.forEach(moveName => {
10
+ const option = document.createElement('option');
11
+ option.value = moveName;
12
+ option.textContent = moveName;
13
+ moveSelectToggle.appendChild(option);
14
+ });
15
+
16
+ })
17
+ .catch(error => {
18
+ console.error(`Error fetching recorded moves for dataset '${dataset}':`, error);
19
+ });
20
+ };
21
+
22
+ const movePlayer = {
23
+ playing: false,
24
+ currentMove: null,
25
+
26
+ playRecordedMove: async (dataset, move) => {
27
+ console.log(`Requesting play move '${move}' from dataset '${dataset}'`);
28
+
29
+ // movePlayer.playing = true;
30
+ // movePlayer.updateUI();
31
+
32
+ await fetch(`/api/move/play/recorded-move-dataset/${dataset}/${move}`, {
33
+ method: 'POST'
34
+ }).then(response => {
35
+ if (!response.ok) {
36
+ throw new Error(`HTTP error! status: ${response.status}`);
37
+ }
38
+ return response.json();
39
+ }
40
+ ).then(data => {
41
+ movePlayer.currentMove = data.uuid;
42
+ }).catch(error => {
43
+ console.error(`Error playing move '${move}' from dataset '${dataset}':`, error);
44
+ // movePlayer.playing = false;
45
+ // movePlayer.currentMove = null;
46
+ // movePlayer.updateUI();
47
+ });
48
+ },
49
+
50
+ stopMove: async () => {
51
+ console.log(`Requesting stop of current move`);
52
+
53
+ await fetch(`/api/move/stop`, {
54
+ method: 'POST',
55
+ body: JSON.stringify({ uuid: movePlayer.currentMove }),
56
+ headers: {
57
+ 'Content-Type': 'application/json'
58
+ }
59
+ });
60
+ },
61
+
62
+ updateUI: () => {
63
+ const movePlayBtn = document.getElementById('move-play-btn');
64
+ const moveStopBtn = document.getElementById('move-stop-btn');
65
+
66
+ if (movePlayer.playing) {
67
+ movePlayBtn.disabled = true;
68
+ moveStopBtn.disabled = false;
69
+ } else {
70
+ movePlayBtn.disabled = false;
71
+ moveStopBtn.disabled = true;
72
+ }
73
+ },
74
+
75
+ checkMoveStatus: async () => {
76
+ let ws = new WebSocket(`ws://${window.location.host}/api/move/ws/updates`);
77
+
78
+ ws.onmessage = (event) => {
79
+ const data = JSON.parse(event.data);
80
+ if (data.type === 'move_started') {
81
+ movePlayer.playing = true;
82
+ movePlayer.currentMove = data.move_id;
83
+ }
84
+ else if (data.type === 'move_completed') {
85
+ movePlayer.playing = false;
86
+ movePlayer.currentMove = null;
87
+ }
88
+ else if (data.type === 'move_failed' || data.type === 'move_cancelled') {
89
+ movePlayer.playing = false;
90
+ movePlayer.currentMove = null;
91
+ }
92
+
93
+ movePlayer.updateUI();
94
+ };
95
+
96
+ ws.onclose = () => {
97
+ console.log('Move status WebSocket closed, reconnecting in 1 second...');
98
+ setTimeout(() => {
99
+ movePlayer.checkMoveStatus();
100
+ }, 1000);
101
+ };
102
+ }
103
+ };
104
+
105
+ window.addEventListener('DOMContentLoaded', (event) => {
106
+ const moveDatasetToggle = document.getElementById('move-dataset-toggle');
107
+
108
+ moveDatasetToggle.addEventListener('change', (_) => {
109
+ const selectedDataset = moveDatasetToggle.value;
110
+ updateMoveItems(selectedDataset);
111
+ });
112
+
113
+ const movePlayBtn = document.getElementById('move-play-btn');
114
+ movePlayBtn.addEventListener('click', async () => {
115
+ const selectedDataset = moveDatasetToggle.value;
116
+ const moveSelectToggle = document.getElementById('move-select-toggle');
117
+ const selectedMove = moveSelectToggle.value;
118
+
119
+ await movePlayer.playRecordedMove(selectedDataset, selectedMove);
120
+ });
121
+
122
+ const moveStopBtn = document.getElementById('move-stop-btn');
123
+ moveStopBtn.addEventListener('click', async () => {
124
+ await movePlayer.stopMove();
125
+ });
126
+
127
+ // Initialize move items on page load
128
+ updateMoveItems(moveDatasetToggle.value);
129
+
130
+ movePlayer.checkMoveStatus();
131
+ movePlayer.updateUI();
132
+ });
@@ -0,0 +1,94 @@
1
+
2
+ window.onload = () => {
3
+ refreshStatus();
4
+ setInterval(refreshStatus, 1000);
5
+ };
6
+
7
+
8
+ const refreshStatus = () => {
9
+ const statusDiv = document.getElementById('status');
10
+
11
+ fetch('/wifi/status')
12
+ .then(response => response.json())
13
+ .then(data => {
14
+ statusDiv.innerText = `Status: ${data}`;
15
+
16
+ handleStatus(data);
17
+ })
18
+ .catch(error => {
19
+ console.error('Error fetching WiFi status:', error);
20
+ statusDiv.innerText = 'Make sure you are connected on the right WiFi.\n Attempt to reconnect...';
21
+ });
22
+
23
+ fetch('/wifi/error')
24
+ .then(response => response.json())
25
+ .then(data => {
26
+ if (data.error !== null) {
27
+ console.log('Error data:', data);
28
+ alert(`Error while trying to connect: ${data.error}.\n Switching back to hotspot mode.`);
29
+ fetch('/wifi/reset_error', { method: 'POST' });
30
+ }
31
+ })
32
+ .catch(error => {
33
+ console.error('Error fetching WiFi error:', error);
34
+ });
35
+ }
36
+
37
+ const connectToWifi = (_) => {
38
+ const ssid = document.getElementById('ssid').value;
39
+ const password = document.getElementById('password').value;
40
+
41
+ if (!ssid) {
42
+ alert('Please enter an SSID.');
43
+ return;
44
+ }
45
+
46
+ fetch(`/wifi/connect?ssid=${encodeURIComponent(ssid)}&password=${encodeURIComponent(password)}`, {
47
+ method: 'POST',
48
+ headers: {
49
+ 'Content-Type': 'application/json',
50
+ },
51
+ })
52
+ .then(response => {
53
+ if (!response.ok) {
54
+ return response.json().then(errData => {
55
+ throw new Error(errData.detail || 'Failed to connect to WiFi');
56
+ });
57
+ }
58
+ return response.json();
59
+ })
60
+ .then(data => {
61
+ console.log('Connection response:', data);
62
+ handleStatus('busy');
63
+ })
64
+ .catch(error => {
65
+ console.error('Error connecting to WiFi:', error);
66
+ alert(`Error connecting to WiFi: ${error.message}`);
67
+ });
68
+ return false; // Prevent form submission
69
+ }
70
+
71
+ const handleStatus = (status) => {
72
+ const addWifiDiv = document.getElementById('add-wifi');
73
+ addWifiDiv.hidden = true;
74
+
75
+ const busyDiv = document.getElementById('busy');
76
+ busyDiv.hidden = true;
77
+
78
+ const connectedDiv = document.getElementById('connected');
79
+ connectedDiv.hidden = true;
80
+
81
+ if (status === 'hotspot') {
82
+ addWifiDiv.hidden = false;
83
+ } else if (status === 'wlan') {
84
+ connectedDiv.hidden = false;
85
+ }
86
+ else if (status === 'busy') {
87
+ busyDiv.hidden = false;
88
+ }
89
+ else {
90
+ console.warn(`Unknown status: ${status}`);
91
+ }
92
+
93
+ currentStatus = status;
94
+ };
@@ -0,0 +1,80 @@
1
+ async function checkUpdates() {
2
+ const statusElem = document.getElementById('status');
3
+ const updateBtn = document.getElementById('update-btn');
4
+ statusElem.textContent = 'Checking for updates...';
5
+ updateBtn.style.display = 'none';
6
+
7
+ try {
8
+ const response = await fetch('/update/available');
9
+ const data = await response.json();
10
+ if (data.update.reachy_mini) {
11
+ statusElem.textContent = 'An update is available!';
12
+ updateBtn.style.display = 'inline-block';
13
+ } else {
14
+ statusElem.textContent = 'Your system is up to date.';
15
+ }
16
+ } catch (e) {
17
+ statusElem.textContent = 'Error checking for updates.';
18
+ }
19
+ }
20
+
21
+ async function triggerUpdate() {
22
+ const statusElem = document.getElementById('status');
23
+ statusElem.textContent = 'Updating...';
24
+ try {
25
+ const response = await fetch('/update/start', { method: 'POST' });
26
+ if (response.ok) {
27
+ await response.json().then(data => {
28
+ connectLogsWebSocket(data.job_id);
29
+ });
30
+ statusElem.textContent = 'Update started!';
31
+
32
+ } else {
33
+ await response.json().then(data => {
34
+ if (data.detail) {
35
+ statusElem.textContent = 'Error: ' + data.detail;
36
+ }
37
+ });
38
+ }
39
+ } catch (e) {
40
+ statusElem.textContent = 'Error triggering update.';
41
+ }
42
+ }
43
+
44
+
45
+ function connectLogsWebSocket(jobId) {
46
+ const logsElem = document.getElementById('logs');
47
+ if (!logsElem) return;
48
+
49
+ let wsProto = window.location.protocol === 'https:' ? 'wss' : 'ws';
50
+ let wsUrl = wsProto + '://' + window.location.host + '/update/ws/logs?job_id=' + jobId;
51
+ const ws = new WebSocket(wsUrl);
52
+
53
+ ws.onmessage = function (event) {
54
+ // Append new log line
55
+ logsElem.textContent += event.data + '\n';
56
+ logsElem.scrollTop = logsElem.scrollHeight;
57
+ };
58
+ ws.onerror = function () {
59
+ logsElem.textContent += '[WebSocket error connecting to logs]\n';
60
+ };
61
+ ws.onclose = function () {
62
+ logsElem.textContent += '[WebSocket closed]\n';
63
+
64
+ const statusElem = document.getElementById('status');
65
+ statusElem.textContent = 'Update completed. Reloading in a 5 seconds...';
66
+
67
+ for (let i = 5; i > 0; i--) {
68
+ setTimeout(() => {
69
+ statusElem.textContent = 'Update completed. Reloading in ' + i + ' seconds...';
70
+ }, (5 - i) * 1000);
71
+ }
72
+ setTimeout(() => {
73
+ window.location.reload();
74
+ }, 5000);
75
+ };
76
+ }
77
+
78
+ window.onload = function () {
79
+ checkUpdates();
80
+ };
@@ -0,0 +1,83 @@
1
+ @import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,100..900;1,100..900&display=swap');
2
+ @import url('https://fonts.googleapis.com/css2?family=Asap:wght@400;500;700&display=swap');
3
+
4
+ html {
5
+ -webkit-font-smoothing: antialiased;
6
+ -moz-osx-font-smoothing: grayscale;
7
+ }
8
+
9
+ body {
10
+ font-family: 'Archivo', 'Asap', sans-serif;
11
+ }
12
+
13
+ .daemon-status-title {
14
+ font-size: 36px;
15
+ font-weight: 500;
16
+ letter-spacing: 0.3px;
17
+ }
18
+
19
+ .daemon-status-collapse {
20
+ font-family: 'Asap', sans-serif;
21
+ font-weight: 400;
22
+ color: rgba(0, 0, 0, 0.7);
23
+ }
24
+
25
+ /* APPs styles */
26
+
27
+ .app-section {
28
+ border-radius: 8px;
29
+ border-width: 1px;
30
+ padding: 16px;
31
+ gap: 16px;
32
+ background: #FFFFFF;
33
+ }
34
+
35
+ .installed-app-title {
36
+ font-weight: 600;
37
+ }
38
+
39
+ /* Hugging Face App Store Styles */
40
+
41
+ .app-section-title {
42
+ font-weight: 500;
43
+ font-size: 24px;
44
+ letter-spacing: 0px;
45
+ }
46
+
47
+ .app-list-item {
48
+ padding: 4px;
49
+ }
50
+
51
+ .hf-app-icon {
52
+ width: 42px;
53
+ height: 42px;
54
+ border-radius: 10px;
55
+ text-align: center;
56
+ font-size: 31px;
57
+ background-color: rgba(0, 0, 0, 0.1);
58
+
59
+ }
60
+
61
+ .hf-app-title {
62
+ font-weight: 500;
63
+ font-size: 18px;
64
+ }
65
+
66
+ .hf-app-description {
67
+ font-family: 'Asap', sans-serif;
68
+ font-weight: 400;
69
+ font-size: 16px;
70
+ line-height: 75%;
71
+ color: rgba(0, 0, 0, 0.4);
72
+ }
73
+
74
+ .hf-app-install-button {
75
+ font-weight: 500;
76
+ font-size: 20px;
77
+ font-style: Bold;
78
+ text-align: center;
79
+ border-radius: 8px;
80
+ display: flex;
81
+ align-items: center;
82
+ justify-content: center;
83
+ }
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>{% block title %}Reachy Mini dashboard{% endblock %}</title>
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <link rel="stylesheet" href="/static/style.css">
10
+
11
+ {% block extra_js %}{% endblock %}
12
+ </head>
13
+
14
+
15
+ <body class="bg-gray-50">
16
+ <header>
17
+ </header>
18
+ <div class="container py-8 px-4 sm:px-8 md:px-8 lg:px-8 xl:px-8 mx-auto w-full md:w-2/3">
19
+ {% block content %}{% endblock %}
20
+ </div>
21
+ </body>
22
+
23
+ </html>
@@ -0,0 +1,17 @@
1
+ {% extends "base.html" %}
2
+
3
+ {% block content %}
4
+
5
+ <div class="grid gap-4">
6
+ {% include "sections/daemon.html" %}
7
+ {% include "sections/apps.html" %}
8
+ {% include "sections/appstore.html" %}
9
+ </div>
10
+ {% endblock %}
11
+
12
+ {% block extra_js %}
13
+ <script src="/static/js/daemon.js"></script>
14
+ <script src="/static/js/apps.js"></script>
15
+ <script src="/static/js/appstore.js"></script>
16
+ <script src="/static/js/move_player.js"></script>
17
+ {% endblock %}
@@ -0,0 +1,8 @@
1
+ <section class="w-full">
2
+ <div class="app-section">
3
+ <div class="app-section-title">Applications</div>
4
+ <div class="">
5
+ <ul id="installed-apps" class="overflow-y-auto max-h-96"></ul>
6
+ </div>
7
+ </div>
8
+ </section>
@@ -0,0 +1,29 @@
1
+ <section class="grid app-section">
2
+
3
+ <div id="install-modal" tabindex="-1" aria-hidden="true"
4
+ class="hidden fixed inset-0 z-50 flex items-center justify-center w-full h-full">
5
+ <div class="relative p-4 w-full max-w-2xl max-h-full">
6
+ <div class="relative bg-white rounded-lg shadow-sm dark:bg-gray-700">
7
+ <div
8
+ class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600 border-gray-200">
9
+ <h3 id="modal-title" class="text-xl font-semibold text-gray-900 dark:text-white"></h3>
10
+ </div>
11
+ <div class="p-4 md:p-5 space-y-4">
12
+ <div id="install-logs" class="overflow-y-auto max-h-48 text-gray-500 dark:text-gray-400">
13
+ </div>
14
+ </div>
15
+ <div
16
+ class="flex items-center justify-center p-4 md:p-5 border-t border-gray-200 rounded-b dark:border-gray-600">
17
+ <button id="modal-close-button" data-modal-hide="default-modal" type="button"
18
+ class="hidden"></button>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ </div>
23
+
24
+
25
+ <div class="app-section-title">Install from 🤗 Hugging Face</div>
26
+ <div class="">
27
+ <ul id="hf-available-apps" class="overflow-y-auto max-h-96">Loading app from 🤗...</ul>
28
+ </div>
29
+ </section>
@@ -0,0 +1,36 @@
1
+ <section class="flex flex-col md:flex-row gap-4">
2
+ <!-- Daemon Status Animation -->
3
+ <div class="flex-1 min-w-[50%] justify-center items-center flex">
4
+ <object id="daemon-status-anim" data="" type="image/svg+xml" class="w-full h-auto"></object>
5
+ </div>
6
+ <div class="flex-1 py-2">
7
+ <div class="flex justify-between items-center">
8
+ <div class="daemon-status-title">Reachy Mini</div>
9
+ <!-- Toggle Daemon slider -->
10
+ <span>
11
+ <label>
12
+ <input id="daemon-toggle" type="checkbox" value="" class="sr-only peer">
13
+ <div id="daemon-toggle-slider"
14
+ class="relative w-20 h-8 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-gray-100 dark:peer-focus:ring-gray-100 rounded-full peer dark:bg-red-400 peer-checked:after:translate-x-[46px] rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-7 after:w-7 after:transition-all dark:border-gray-600 peer-checked:bg-green-400 dark:peer-checked:bg-green-400 hidden">
15
+ <span id="daemon-toggle-on"
16
+ class="absolute top-1/2 start-1.5 -translate-y-1/2 flex justify-center items-center size-7 text-white peer-checked:text-white transition-colors duration-200 hidden">ON</span>
17
+ <span id="daemon-toggle-off"
18
+ class="absolute top-1/2 end-2.5 -translate-y-1/2 flex justify-center items-center size-7 text-white">
19
+ OFF
20
+ </span>
21
+ </div>
22
+ </label>
23
+ </span>
24
+ </div>
25
+ <!-- Daemon status: -->
26
+ <div id="backend-status" class="">
27
+ <div class="flex items-center pt-1 w-full">
28
+ <span id="backend-status-icon" class="inline-block w-4 h-4 rounded-full align-middle mr-2"></span>
29
+ <span id="backend-status-text" class="daemon-status-collapse"></span>
30
+ </div>
31
+ </div>
32
+
33
+ <div class="mt-4">
34
+ {% include 'sections/move_player.html' %}
35
+ </div>
36
+ </section>
@@ -0,0 +1,27 @@
1
+ <div class="grid app-section py-2">
2
+ <div class="flex flex-row gap-4">
3
+ <div class="text-xl">Move player</div>
4
+ <div class="flex flex-row gap-2 py-1">
5
+ <button id="move-play-btn"
6
+ class="px-2 py-1 rounded bg-blue-500 text-white font-semibold shadow hover:bg-blue-600 transition-colors duration-150 flex items-center justify-center disabled:bg-gray-300 disabled:text-gray-500">
7
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
8
+ <path d="M6.5 5.5v9l7-4.5-7-4.5z" />
9
+ </svg>
10
+ </button>
11
+ <button id="move-stop-btn" class="px-2 py-1 rounded bg-red-500 text-white font-semibold shadow hover:bg-red-600 transition-colors duration-150 flex items-center justify-center
12
+ disabled:bg-gray-300 disabled:text-gray-500">
13
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
14
+ <rect x="5" y="5" width="10" height="10" rx="2" />
15
+ </svg>
16
+ </button>
17
+ </div>
18
+ </div>
19
+ <div class="flex flex-row gap-4 justify-center">
20
+ <select id="move-dataset-toggle" class="px-2 py-1 rounded border border-gray-300 bg-white">
21
+ <option value="pollen-robotics/reachy-mini-dances-library">Dances</option>
22
+ <option value="pollen-robotics/reachy-mini-emotions-library">Emotions</option>
23
+ </select>
24
+ <select id="move-select-toggle" class="px-2 py-1 rounded border border-gray-300 bg-white">
25
+ </select>
26
+ </div>
27
+ </div>
@@ -0,0 +1,22 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Checking Updates</title>
7
+ <script src="/dashboard/js/update.js"></script>
8
+ </head>
9
+
10
+ <body>
11
+ <div class="container">
12
+ <h1>Checking Updates:</h1>
13
+ <div class="status" id="status">Checking for updates...</div>
14
+ <button onclick="checkUpdates()">Refresh</button>
15
+ <button id="update-btn" onclick="triggerUpdate()" style="display:none;">Update Now</button>
16
+ <div id="logs"
17
+ style="margin-top:2em; padding:1em; background:#222; color:#eee; font-family:monospace; height:200px; overflow-y:auto; border-radius:4px;">
18
+ </div>
19
+ </div>
20
+ </body>
21
+
22
+ </html>
@@ -0,0 +1,41 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Basic HTML Page</title>
8
+ <script src="/dashboard/js/setup_wifi.js"></script>
9
+ </head>
10
+
11
+ <body>
12
+ <h1>Setup your WiFi</h1>
13
+
14
+ <h3>Current Status:</h3>
15
+ <div id="status">Loading...</div>
16
+
17
+ <div id="add-wifi" hidden>
18
+ <h2>Add your WiFi</h2>
19
+
20
+ <form id="wifi-form">
21
+ <label for="ssid">SSID:</label>
22
+ <input type="text" id="ssid" name="ssid" required><br><br>
23
+ <label for="password">Password:</label>
24
+ <input type="password" id="password" name="password" required><br><br>
25
+ <input type="button" onclick="connectToWifi(event)" target="_blank" formtarget="_blank" value="Connect">
26
+ </form>
27
+ </div>
28
+
29
+ <div id="busy" hidden>
30
+ <h2>Operation in progress...</h2>
31
+ <p>Please wait while we set up your connection.</p>
32
+ </div>
33
+
34
+ <div id="connected" hidden>
35
+ <h2>Connected!</h2>
36
+ <p>Your device is now connected to the WiFi network.</p>
37
+ </div>
38
+
39
+ </body>
40
+
41
+ </html>
@@ -0,0 +1,41 @@
1
+ """FastAPI common request dependencies."""
2
+
3
+ from fastapi import HTTPException, Request, WebSocket
4
+
5
+ from ...apps.manager import AppManager
6
+ from ..backend.abstract import Backend
7
+ from ..daemon import Daemon
8
+
9
+
10
+ def get_daemon(request: Request) -> Daemon:
11
+ """Get the daemon as request dependency."""
12
+ assert isinstance(request.app.state.daemon, Daemon)
13
+ return request.app.state.daemon
14
+
15
+
16
+ def get_backend(request: Request) -> Backend:
17
+ """Get the backend as request dependency."""
18
+ backend = request.app.state.daemon.backend
19
+
20
+ if backend is None or not backend.ready.is_set():
21
+ raise HTTPException(status_code=503, detail="Backend not running")
22
+
23
+ assert isinstance(backend, Backend)
24
+ return backend
25
+
26
+
27
+ def get_app_manager(request: Request) -> "AppManager":
28
+ """Get the app manager as request dependency."""
29
+ assert isinstance(request.app.state.app_manager, AppManager)
30
+ return request.app.state.app_manager
31
+
32
+
33
+ def ws_get_backend(websocket: WebSocket) -> Backend:
34
+ """Get the backend as websocket dependency."""
35
+ backend = websocket.app.state.daemon.backend
36
+
37
+ if backend is None or not backend.ready.is_set():
38
+ raise HTTPException(status_code=503, detail="Backend not running")
39
+
40
+ assert isinstance(backend, Backend)
41
+ return backend