reachy-mini 1.0.0rc1__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 (359) hide show
  1. reachy_mini/__init__.py +4 -0
  2. reachy_mini/apps/__init__.py +23 -0
  3. reachy_mini/apps/app.py +119 -0
  4. reachy_mini/apps/manager.py +178 -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 +38 -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 +3 -0
  20. reachy_mini/assets/models/fknetwork.onnx +3 -0
  21. reachy_mini/assets/models/fknetwork_int8.onnx +3 -0
  22. reachy_mini/assets/models/iknetwork.onnx +3 -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/dashboard/apps_manager.html +202 -0
  27. reachy_mini/daemon/app/dashboard/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
  28. reachy_mini/daemon/app/dashboard/js/dashboard.js +121 -0
  29. reachy_mini/daemon/app/dashboard/live_robot_state.html +242 -0
  30. reachy_mini/daemon/app/dashboard/style.css +37 -0
  31. reachy_mini/daemon/app/dependencies.py +36 -0
  32. reachy_mini/daemon/app/main.py +271 -0
  33. reachy_mini/daemon/app/models.py +146 -0
  34. reachy_mini/daemon/app/routers/apps.py +220 -0
  35. reachy_mini/daemon/app/routers/daemon.py +53 -0
  36. reachy_mini/daemon/app/routers/kinematics.py +36 -0
  37. reachy_mini/daemon/app/routers/motors.py +41 -0
  38. reachy_mini/daemon/app/routers/move.py +200 -0
  39. reachy_mini/daemon/app/routers/state.py +137 -0
  40. reachy_mini/daemon/app/templates/dashboard.html +40 -0
  41. reachy_mini/daemon/backend/__init__.py +1 -0
  42. reachy_mini/daemon/backend/abstract.py +717 -0
  43. reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
  44. reachy_mini/daemon/backend/mujoco/backend.py +304 -0
  45. reachy_mini/daemon/backend/mujoco/utils.py +59 -0
  46. reachy_mini/daemon/backend/mujoco/video_udp.py +53 -0
  47. reachy_mini/daemon/backend/robot/__init__.py +8 -0
  48. reachy_mini/daemon/backend/robot/backend.py +490 -0
  49. reachy_mini/daemon/daemon.py +442 -0
  50. reachy_mini/daemon/utils.py +114 -0
  51. reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
  52. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
  53. reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +3 -0
  54. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
  55. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +3 -0
  56. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
  57. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +3 -0
  58. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
  59. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +3 -0
  60. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
  61. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +3 -0
  62. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
  63. reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +3 -0
  64. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
  65. reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +3 -0
  66. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
  67. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +3 -0
  68. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
  69. reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +3 -0
  70. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
  71. reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +3 -0
  72. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
  73. reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +3 -0
  74. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
  75. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +3 -0
  76. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
  77. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +3 -0
  78. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
  79. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +3 -0
  80. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
  81. reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +3 -0
  82. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
  83. reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +3 -0
  84. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +3 -0
  85. reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +3 -0
  86. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
  87. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +3 -0
  88. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
  89. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +3 -0
  90. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
  91. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +3 -0
  92. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
  93. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +3 -0
  94. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  95. reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
  96. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +3 -0
  97. reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +3 -0
  98. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
  99. reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +3 -0
  100. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
  101. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +3 -0
  102. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
  103. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +3 -0
  104. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
  105. reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +3 -0
  106. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
  107. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +3 -0
  108. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
  109. reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +3 -0
  110. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  111. reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
  112. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
  113. reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +3 -0
  114. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
  115. reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +3 -0
  116. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
  117. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +3 -0
  118. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  119. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
  120. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  121. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
  122. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  123. reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
  124. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
  125. reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +3 -0
  126. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +3 -0
  127. reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +3 -0
  128. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
  129. reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +3 -0
  130. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
  131. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +3 -0
  132. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
  133. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +3 -0
  134. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
  135. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +3 -0
  136. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
  137. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +3 -0
  138. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
  139. reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +3 -0
  140. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +3 -0
  141. reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +3 -0
  142. reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
  143. reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
  144. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +613 -0
  145. reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
  146. reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
  147. reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
  148. reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +131 -0
  149. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
  150. reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +3 -0
  151. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
  152. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +3 -0
  153. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
  154. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +3 -0
  155. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
  156. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +3 -0
  157. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
  158. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +3 -0
  159. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
  160. reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +3 -0
  161. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
  162. reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +3 -0
  163. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
  164. reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +3 -0
  165. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
  166. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +3 -0
  167. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
  168. reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +3 -0
  169. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
  170. reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +3 -0
  171. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
  172. reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +3 -0
  173. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
  174. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +3 -0
  175. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
  176. reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +3 -0
  177. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
  178. reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +3 -0
  179. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
  180. reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +3 -0
  181. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
  182. reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +3 -0
  183. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
  184. reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +3 -0
  185. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
  186. reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +3 -0
  187. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
  188. reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +3 -0
  189. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
  190. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +3 -0
  191. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
  192. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +3 -0
  193. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
  194. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +3 -0
  195. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
  196. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +3 -0
  197. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
  198. reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
  199. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
  200. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +3 -0
  201. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
  202. reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +3 -0
  203. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
  204. reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +3 -0
  205. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
  206. reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +3 -0
  207. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
  208. reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +3 -0
  209. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
  210. reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +3 -0
  211. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
  212. reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +3 -0
  213. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
  214. reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +3 -0
  215. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
  216. reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +3 -0
  217. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
  218. reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +3 -0
  219. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
  220. reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +3 -0
  221. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
  222. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +3 -0
  223. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
  224. reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +3 -0
  225. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
  226. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
  227. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
  228. reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +3 -0
  229. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
  230. reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +3 -0
  231. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
  232. reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +3 -0
  233. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
  234. reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +3 -0
  235. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
  236. reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +3 -0
  237. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
  238. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +3 -0
  239. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
  240. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
  241. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
  242. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
  243. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
  244. reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
  245. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
  246. reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +3 -0
  247. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
  248. reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +3 -0
  249. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
  250. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +3 -0
  251. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
  252. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +3 -0
  253. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
  254. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +3 -0
  255. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
  256. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +3 -0
  257. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
  258. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +3 -0
  259. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
  260. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +3 -0
  261. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
  262. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +3 -0
  263. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
  264. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +3 -0
  265. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
  266. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +3 -0
  267. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
  268. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +3 -0
  269. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
  270. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +3 -0
  271. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
  272. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +3 -0
  273. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
  274. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +3 -0
  275. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
  276. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +3 -0
  277. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
  278. reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +3 -0
  279. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
  280. reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +3 -0
  281. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
  282. reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +3 -0
  283. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
  284. reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +3 -0
  285. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
  286. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +3 -0
  287. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
  288. reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +3 -0
  289. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
  290. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +3 -0
  291. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
  292. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +3 -0
  293. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
  294. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +3 -0
  295. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
  296. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +3 -0
  297. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
  298. reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +3 -0
  299. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
  300. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +3 -0
  301. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
  302. reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +3 -0
  303. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
  304. reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +3 -0
  305. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
  306. reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +3 -0
  307. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
  308. reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +3 -0
  309. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
  310. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +3 -0
  311. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
  312. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +3 -0
  313. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
  314. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +3 -0
  315. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
  316. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +3 -0
  317. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
  318. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +3 -0
  319. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
  320. reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +3 -0
  321. reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
  322. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3282 -0
  323. reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
  324. reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
  325. reachy_mini/io/__init__.py +1 -0
  326. reachy_mini/io/abstract.py +70 -0
  327. reachy_mini/io/protocol.py +44 -0
  328. reachy_mini/io/zenoh_client.py +258 -0
  329. reachy_mini/io/zenoh_server.py +183 -0
  330. reachy_mini/kinematics/__init__.py +68 -0
  331. reachy_mini/kinematics/analytical_kinematics.py +102 -0
  332. reachy_mini/kinematics/nn_kinematics.py +100 -0
  333. reachy_mini/kinematics/placo_kinematics.py +662 -0
  334. reachy_mini/media/__init__.py +1 -0
  335. reachy_mini/media/audio_base.py +75 -0
  336. reachy_mini/media/audio_gstreamer.py +194 -0
  337. reachy_mini/media/audio_sounddevice.py +207 -0
  338. reachy_mini/media/audio_utils.py +27 -0
  339. reachy_mini/media/camera_base.py +58 -0
  340. reachy_mini/media/camera_constants.py +13 -0
  341. reachy_mini/media/camera_gstreamer.py +144 -0
  342. reachy_mini/media/camera_opencv.py +61 -0
  343. reachy_mini/media/camera_utils.py +60 -0
  344. reachy_mini/media/media_manager.py +186 -0
  345. reachy_mini/motion/__init__.py +4 -0
  346. reachy_mini/motion/goto.py +71 -0
  347. reachy_mini/motion/move.py +36 -0
  348. reachy_mini/motion/recorded_move.py +132 -0
  349. reachy_mini/reachy_mini.py +705 -0
  350. reachy_mini/utils/__init__.py +46 -0
  351. reachy_mini/utils/constants.py +9 -0
  352. reachy_mini/utils/interpolation.py +227 -0
  353. reachy_mini/utils/parse_urdf_for_kinematics.py +85 -0
  354. reachy_mini-1.0.0rc1.dist-info/METADATA +261 -0
  355. reachy_mini-1.0.0rc1.dist-info/RECORD +359 -0
  356. reachy_mini-1.0.0rc1.dist-info/WHEEL +5 -0
  357. reachy_mini-1.0.0rc1.dist-info/entry_points.txt +3 -0
  358. reachy_mini-1.0.0rc1.dist-info/licenses/LICENSE +201 -0
  359. reachy_mini-1.0.0rc1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,46 @@
1
+ """Utility functions for Reachy Mini.
2
+
3
+ These functions provide various utilities such as creating head poses, performing minimum jerk interpolation,
4
+ checking if the Reachy Mini daemon is running, and performing linear pose interpolation.
5
+
6
+ """
7
+
8
+ import numpy as np
9
+ import numpy.typing as npt
10
+ from scipy.spatial.transform import Rotation as R
11
+
12
+
13
+ def create_head_pose(
14
+ x: float = 0,
15
+ y: float = 0,
16
+ z: float = 0,
17
+ roll: float = 0,
18
+ pitch: float = 0,
19
+ yaw: float = 0,
20
+ mm: bool = False,
21
+ degrees: bool = True,
22
+ ) -> npt.NDArray[np.float64]:
23
+ """Create a homogeneous transformation matrix representing a pose in 6D space (position and orientation).
24
+
25
+ Args:
26
+ x (float): X coordinate of the position.
27
+ y (float): Y coordinate of the position.
28
+ z (float): Z coordinate of the position.
29
+ roll (float): Roll angle
30
+ pitch (float): Pitch angle
31
+ yaw (float): Yaw angle
32
+ mm (bool): If True, convert position from millimeters to meters.
33
+ degrees (bool): If True, interpret roll, pitch, and yaw as degrees; otherwise as radians.
34
+
35
+ Returns:
36
+ np.ndarray: A 4x4 homogeneous transformation matrix representing the pose.
37
+
38
+ """
39
+ pose = np.eye(4)
40
+ rot = R.from_euler("xyz", [roll, pitch, yaw], degrees=degrees).as_matrix()
41
+ pose[:3, :3] = rot
42
+ pose[:, 3] = [x, y, z, 1]
43
+ if mm:
44
+ pose[:3, 3] /= 1000
45
+
46
+ return pose
@@ -0,0 +1,9 @@
1
+ """Utility constants for the reachy_mini package."""
2
+
3
+ from importlib.resources import files
4
+
5
+ import reachy_mini
6
+
7
+ URDF_ROOT_PATH: str = str(files(reachy_mini).joinpath("descriptions/reachy_mini/urdf"))
8
+ ASSETS_ROOT_PATH: str = str(files(reachy_mini).joinpath("assets/"))
9
+ MODELS_ROOT_PATH: str = str(files(reachy_mini).joinpath("assets/models"))
@@ -0,0 +1,227 @@
1
+ """Interpolation utilities for Reachy Mini."""
2
+
3
+ from enum import Enum
4
+ from typing import Callable, Optional, Tuple
5
+
6
+ import numpy as np
7
+ import numpy.typing as npt
8
+ from scipy.spatial.transform import Rotation as R
9
+
10
+ InterpolationFunc = Callable[[float], npt.NDArray[np.float64]]
11
+
12
+
13
+ def minimum_jerk(
14
+ starting_position: npt.NDArray[np.float64],
15
+ goal_position: npt.NDArray[np.float64],
16
+ duration: float,
17
+ starting_velocity: Optional[npt.NDArray[np.float64]] = None,
18
+ starting_acceleration: Optional[npt.NDArray[np.float64]] = None,
19
+ final_velocity: Optional[npt.NDArray[np.float64]] = None,
20
+ final_acceleration: Optional[npt.NDArray[np.float64]] = None,
21
+ ) -> InterpolationFunc:
22
+ """Compute the mimimum jerk interpolation function from starting position to goal position."""
23
+ if starting_velocity is None:
24
+ starting_velocity = np.zeros(starting_position.shape)
25
+ if starting_acceleration is None:
26
+ starting_acceleration = np.zeros(starting_position.shape)
27
+ if final_velocity is None:
28
+ final_velocity = np.zeros(goal_position.shape)
29
+ if final_acceleration is None:
30
+ final_acceleration = np.zeros(goal_position.shape)
31
+
32
+ a0 = starting_position
33
+ a1 = starting_velocity
34
+ a2 = starting_acceleration / 2
35
+
36
+ d1, d2, d3, d4, d5 = [duration**i for i in range(1, 6)]
37
+
38
+ A = np.array(((d3, d4, d5), (3 * d2, 4 * d3, 5 * d4), (6 * d1, 12 * d2, 20 * d3)))
39
+ B = np.array(
40
+ (
41
+ goal_position - a0 - (a1 * d1) - (a2 * d2),
42
+ final_velocity - a1 - (2 * a2 * d1),
43
+ final_acceleration - (2 * a2),
44
+ )
45
+ )
46
+ X = np.linalg.solve(A, B)
47
+
48
+ coeffs = [a0, a1, a2, X[0], X[1], X[2]]
49
+
50
+ def f(t: float) -> npt.NDArray[np.float64]:
51
+ if t > duration:
52
+ return goal_position
53
+ return np.sum([c * t**i for i, c in enumerate(coeffs)], axis=0) # type: ignore[no-any-return]
54
+
55
+ return f
56
+
57
+
58
+ def linear_pose_interpolation(
59
+ start_pose: npt.NDArray[np.float64], target_pose: npt.NDArray[np.float64], t: float
60
+ ) -> npt.NDArray[np.float64]:
61
+ """Linearly interpolate between two poses in 6D space."""
62
+ # Extract rotations
63
+ rot_start = R.from_matrix(start_pose[:3, :3])
64
+ rot_end = R.from_matrix(target_pose[:3, :3])
65
+
66
+ # Compute relative rotation q_rel such that rot_start * q_rel = rot_end
67
+ q_rel = rot_start.inv() * rot_end
68
+ # Convert to rotation vector (axis-angle)
69
+ rotvec_rel = q_rel.as_rotvec()
70
+ # Scale the rotation vector by t (allows t<0 or >1 for overshoot)
71
+ rot_interp = (rot_start * R.from_rotvec(rotvec_rel * t)).as_matrix()
72
+
73
+ # Extract translations
74
+ pos_start = start_pose[:3, 3]
75
+ pos_end = target_pose[:3, 3]
76
+ # Linear interpolation/extrapolation on translation
77
+ pos_interp = pos_start + (pos_end - pos_start) * t
78
+
79
+ # Compose homogeneous transformation
80
+ interp_pose = np.eye(4)
81
+ interp_pose[:3, :3] = rot_interp
82
+ interp_pose[:3, 3] = pos_interp
83
+
84
+ return interp_pose
85
+
86
+
87
+ class InterpolationTechnique(str, Enum):
88
+ """Enumeration of interpolation techniques."""
89
+
90
+ LINEAR = "linear"
91
+ MIN_JERK = "minjerk"
92
+ EASE_IN_OUT = "ease_in_out"
93
+ CARTOON = "cartoon"
94
+
95
+
96
+ def time_trajectory(
97
+ t: float, method: InterpolationTechnique = InterpolationTechnique.MIN_JERK
98
+ ) -> float:
99
+ """Compute the time trajectory value based on the specified interpolation method."""
100
+ if t < 0 or t > 1:
101
+ raise ValueError("time value is out of range [0,1]")
102
+
103
+ if method == InterpolationTechnique.LINEAR:
104
+ return t
105
+
106
+ elif method == InterpolationTechnique.MIN_JERK:
107
+ return 10 * t**3 - 15 * t**4 + 6 * t**5
108
+
109
+ elif method == InterpolationTechnique.EASE_IN_OUT:
110
+ if t < 0.5:
111
+ return 2 * t * t
112
+ else:
113
+ return 1 - ((-2 * t + 2) ** 2) / 2
114
+
115
+ elif method == InterpolationTechnique.CARTOON:
116
+ c1 = 1.70158
117
+ c2 = c1 * 1.525
118
+
119
+ if t < 0.5:
120
+ # phase in
121
+ return ((2 * t) ** 2 * ((c2 + 1) * 2 * t - c2)) / 2
122
+ else:
123
+ # phase out
124
+ return (((2 * t - 2) ** 2 * ((c2 + 1) * (2 * t - 2) + c2)) + 2) / 2
125
+
126
+ else:
127
+ raise ValueError(
128
+ "Unknown interpolation method: {} (possible values: {})".format(
129
+ method,
130
+ list(InterpolationTechnique),
131
+ )
132
+ )
133
+
134
+
135
+ def delta_angle_between_mat_rot(
136
+ P: npt.NDArray[np.float64], Q: npt.NDArray[np.float64]
137
+ ) -> float:
138
+ """Compute the angle (in radians) between two 3x3 rotation matrices `P` and `Q`.
139
+
140
+ This is equivalent to the angular distance in axis-angle space.
141
+ It is computed via the trace of the relative rotation matrix.
142
+
143
+ References:
144
+ - https://math.stackexchange.com/questions/2113634/comparing-two-rotation-matrices
145
+ - http://www.boris-belousov.net/2016/12/01/quat-dist/
146
+
147
+ Args:
148
+ P: A 3x3 rotation matrix.
149
+ Q: Another 3x3 rotation matrix.
150
+
151
+ Returns:
152
+ The angle in radians between the two rotations.
153
+
154
+ """
155
+ R = np.dot(P, Q.T)
156
+ tr = (np.trace(R) - 1) / 2
157
+ tr = np.clip(tr, -1.0, 1.0) # Ensure numerical stability
158
+ return float(np.arccos(tr))
159
+
160
+
161
+ def distance_between_poses(
162
+ pose1: npt.NDArray[np.float64], pose2: npt.NDArray[np.float64]
163
+ ) -> Tuple[float, float, float]:
164
+ """Compute three types of distance between two 4x4 homogeneous transformation matrices.
165
+
166
+ The result combines translation (in mm) and rotation (in degrees) using an arbitrary but
167
+ emotionally satisfying equivalence: 1 degree ≈ 1 mm.
168
+
169
+ Args:
170
+ pose1: A 4x4 homogeneous transformation matrix representing the first pose.
171
+ pose2: A 4x4 homogeneous transformation matrix representing the second pose.
172
+
173
+ Returns:
174
+ A tuple of:
175
+ - translation distance in meters,
176
+ - angular distance in radians,
177
+ - unhinged distance in magic-mm (translation in mm + rotation in degrees).
178
+
179
+ """
180
+ distance_translation = float(np.linalg.norm(pose1[:3, 3] - pose2[:3, 3]))
181
+ distance_angle = delta_angle_between_mat_rot(pose1[:3, :3], pose2[:3, :3])
182
+ unhinged_distance = distance_translation * 1000 + np.rad2deg(distance_angle)
183
+
184
+ return distance_translation, distance_angle, unhinged_distance
185
+
186
+
187
+ def compose_world_offset(
188
+ T_abs: npt.NDArray[np.float64],
189
+ T_off_world: npt.NDArray[np.float64],
190
+ reorthonormalize: bool = False,
191
+ ) -> npt.NDArray[np.float64]:
192
+ """Compose an absolute world-frame pose with a world-frame offset.
193
+
194
+ - translations add in world: t_final = t_abs + t_off
195
+ - rotations compose in world: R_final = R_off @ R_abs
196
+ This rotates the frame in place (about its own origin) by a rotation
197
+ defined in world axes, and shifts it by a world translation.
198
+
199
+ Parameters
200
+ ----------
201
+ T_abs : (4,4) ndarray
202
+ Absolute pose in world frame.
203
+ T_off_world : (4,4) ndarray
204
+ Offset transform specified in world axes (dx,dy,dz in world; dR about world axes).
205
+ reorthonormalize : bool
206
+ If True, SVD-orthonormalize the resulting rotation to fight drift.
207
+
208
+ Returns
209
+ -------
210
+ T_final : (4,4) ndarray
211
+ Resulting pose in world frame.
212
+
213
+ """
214
+ R_abs, t_abs = T_abs[:3, :3], T_abs[:3, 3]
215
+ R_off, t_off = T_off_world[:3, :3], T_off_world[:3, 3]
216
+
217
+ R_final = R_off @ R_abs
218
+ if reorthonormalize:
219
+ U, _, Vt = np.linalg.svd(R_final)
220
+ R_final = U @ Vt
221
+
222
+ t_final = t_abs + t_off
223
+
224
+ T_final = np.eye(4)
225
+ T_final[:3, :3] = R_final
226
+ T_final[:3, 3] = t_final
227
+ return T_final
@@ -0,0 +1,85 @@
1
+ """Generate kinematics data from URDF using Placo as preprocessing.
2
+
3
+ The analytical kinematics need information from the URDF. This files computes the information and writes it in a .json file.
4
+ """
5
+
6
+ import json
7
+ from importlib.resources import files
8
+ from typing import Any, Dict
9
+
10
+ import numpy as np # noqa: D100
11
+ from placo_utils.tf import tf
12
+
13
+ import reachy_mini
14
+ from reachy_mini.kinematics.placo_kinematics import PlacoKinematics
15
+
16
+
17
+ def get_data() -> Dict[str, Any]:
18
+ """Generate the urdf_kinematics.json file."""
19
+ urdf_root_path: str = str(
20
+ files(reachy_mini).joinpath("descriptions/reachy_mini/urdf")
21
+ )
22
+
23
+ placo_kinematics = PlacoKinematics(urdf_root_path, 0.02)
24
+ robot = placo_kinematics.robot
25
+
26
+ placo_kinematics.fk(np.array([0.0] * 7), no_iterations=20)
27
+ robot.update_kinematics()
28
+
29
+ # Measuring lengths for the arm and branch (constants could be used)
30
+ T_world_head_home = robot.get_T_world_frame("head").copy()
31
+ T_world_1 = robot.get_T_world_frame("stewart_1")
32
+ T_world_arm1 = robot.get_T_world_frame("passive_1_link_x")
33
+ T_1_arm1 = np.linalg.inv(T_world_1) @ T_world_arm1
34
+ arm_z = T_1_arm1[2, 3]
35
+ motor_arm_length = np.linalg.norm(T_1_arm1[:2, 3])
36
+
37
+ T_world_branch1 = robot.get_T_world_frame("closing_1_2")
38
+ T_arm1_branch1 = np.linalg.inv(T_world_arm1) @ T_world_branch1
39
+ rod_length = np.linalg.norm(T_arm1_branch1[:3, 3])
40
+
41
+ motors = [
42
+ {"name": "stewart_1", "branch_frame": "closing_1_2", "offset": 0, "solution": 0},
43
+ {"name": "stewart_2", "branch_frame": "closing_2_2", "offset": 0, "solution": 1},
44
+ {"name": "stewart_3", "branch_frame": "closing_3_2", "offset": 0, "solution": 0},
45
+ {"name": "stewart_4", "branch_frame": "closing_4_2", "offset": 0, "solution": 1},
46
+ {"name": "stewart_5", "branch_frame": "closing_5_2", "offset": 0, "solution": 0},
47
+ {
48
+ "name": "stewart_6",
49
+ "branch_frame": "passive_7_link_y",
50
+ "offset": 0,
51
+ "solution": 1,
52
+ },
53
+ ]
54
+
55
+ for motor in motors:
56
+ T_world_branch = robot.get_T_world_frame(motor["branch_frame"])
57
+ T_head_branch = np.linalg.inv(T_world_head_home) @ T_world_branch
58
+ T_world_motor = robot.get_T_world_frame(motor["name"]) @ tf.translation_matrix(
59
+ (0, 0, arm_z)
60
+ )
61
+ motor["T_motor_world"] = np.linalg.inv(T_world_motor).tolist()
62
+ motor["branch_position"] = T_head_branch[:3, 3].tolist()
63
+ motor["limits"] = robot.get_joint_limits(motor["name"]).tolist()
64
+
65
+ data = {
66
+ "motor_arm_length": motor_arm_length,
67
+ "rod_length": rod_length,
68
+ "head_z_offset": placo_kinematics.head_z_offset,
69
+ "motors": motors,
70
+ }
71
+
72
+ return data
73
+
74
+
75
+ def main() -> None:
76
+ """Generate the urdf_kinematics.json file."""
77
+ assets_root_path: str = str(files(reachy_mini).joinpath("assets/"))
78
+ data = get_data()
79
+ print(assets_root_path + "/" + "kinematics_data.json")
80
+ with open(assets_root_path + "/" + "kinematics_data.json", "w") as f:
81
+ json.dump(data, f, indent=4)
82
+
83
+
84
+ if __name__ == "__main__":
85
+ main()
@@ -0,0 +1,261 @@
1
+ Metadata-Version: 2.4
2
+ Name: reachy_mini
3
+ Version: 1.0.0rc1
4
+ Author-email: Pollen Robotics <contact@pollen-robotics.com>
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ License-File: LICENSE
8
+ Requires-Dist: numpy<2.3.0,>=2.2.5
9
+ Requires-Dist: scipy==1.15.3
10
+ Requires-Dist: reachy_mini_motor_controller>=1.0.0
11
+ Requires-Dist: eclipse-zenoh>=1.4.0
12
+ Requires-Dist: opencv-python<=5.0
13
+ Requires-Dist: cv2_enumerate_cameras>=1.2.1
14
+ Requires-Dist: psutil
15
+ Requires-Dist: jinja2
16
+ Requires-Dist: uvicorn[standard]
17
+ Requires-Dist: fastapi
18
+ Requires-Dist: pyserial
19
+ Requires-Dist: huggingface-hub==0.34.4
20
+ Requires-Dist: sounddevice==0.5.1
21
+ Requires-Dist: soundfile==0.13.1
22
+ Requires-Dist: reachy-mini-rust-kinematics>=1.0.1
23
+ Requires-Dist: asgiref
24
+ Requires-Dist: aiohttp
25
+ Requires-Dist: log-throttling==0.0.3
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: pytest-asyncio; extra == "dev"
29
+ Requires-Dist: ruff==0.12.0; extra == "dev"
30
+ Requires-Dist: onshape-to-robot==1.7.6; extra == "dev"
31
+ Requires-Dist: mujoco==3.3.0; extra == "dev"
32
+ Requires-Dist: placo==0.9.14; extra == "dev"
33
+ Requires-Dist: pre-commit; extra == "dev"
34
+ Requires-Dist: mypy==1.18.2; extra == "dev"
35
+ Requires-Dist: rustypot>=1.3.0; extra == "dev"
36
+ Provides-Extra: examples
37
+ Requires-Dist: pynput; extra == "examples"
38
+ Provides-Extra: mujoco
39
+ Requires-Dist: mujoco==3.3.0; extra == "mujoco"
40
+ Provides-Extra: nn-kinematics
41
+ Requires-Dist: onnxruntime==1.22.1; extra == "nn-kinematics"
42
+ Provides-Extra: placo-kinematics
43
+ Requires-Dist: placo==0.9.14; extra == "placo-kinematics"
44
+ Provides-Extra: gstreamer
45
+ Requires-Dist: PyGObject<=3.46.0,>=3.42.2; extra == "gstreamer"
46
+ Dynamic: license-file
47
+
48
+ # Reachy Mini
49
+
50
+ > ⚠️ Reachy Mini is still in beta. Expect bugs, some of them we won't fix right away if they are not a priority.
51
+
52
+ [Reachy Mini](https://www.pollen-robotics.com/reachy-mini/) is an expressive, open-source robot designed for human-robot interaction, creative coding, and AI experimentation. We made it to be affordable, easy to use, hackable and cute, so that you can focus on building cool AI applications!
53
+
54
+ [![Reachy Mini Hello](/docs/assets/reachy_mini_hello.gif)](https://www.pollen-robotics.com/reachy-mini/)
55
+
56
+ ### Versions Lite & Wireless
57
+
58
+ Reachy Mini's hardware comes in two flavors:
59
+ - **Reachy Mini lite**: where the robot is directly connected to your computer via USB. And the code that controls the robot (the daemon) runs on your computer.
60
+ - **Reachy Mini wireless**: where an Raspberry Pi is embedded in the robot, and the code that controls the robot (the daemon) runs on the Raspberry Pi. You can connect to it via Wi-Fi from your computer. (TODO: add link to section on how to set it up)
61
+
62
+ There is also a simulated version of Reachy Mini in [MuJoCo](https://mujoco.org) that you can use to prototype your applications before deploying them on the real robot. It behaves like the lite version where the daemon runs on your computer.
63
+
64
+ ## Software overview
65
+
66
+ This repository provides everything you need to control Reachy Mini, both in simulation and on the real robot. It consists of two main parts:
67
+
68
+ - **The 😈 Daemon 😈**: A background service that manages communication with the robot's motors and sensors, or with the simulation environment. It should be running before you can control the robot. It can run either for the simulation (MuJoCo) or for the real robot.
69
+ - **🐍 SDK & 🕸️ API** to control the robot's main features (head, antennas, camera, speakers, microphone, etc.) and connect with your AI experimentation. Depending on your preferences and needs, there is a [Python SDK](#using-the-python-sdk) and a [HTTP REST API](#using-the-rest-api).
70
+
71
+ Using the [Python SDK](#using-the-python-sdk), making your robot move only require a few lines of code, as illustrated in the example below:
72
+
73
+ ```python
74
+ from reachy_mini import ReachyMini
75
+ from reachy_mini.utils import create_head_pose
76
+
77
+ with ReachyMini() as reachy_mini:
78
+ # Move the head up (10mm on z-axis) and roll it 15 degrees
79
+ pose = create_head_pose(z=10, roll=15, degrees=True, mm=True)
80
+ reachy_mini.goto_target(head=pose, duration=2.0)
81
+
82
+ # Reset to default pose
83
+ pose = create_head_pose()
84
+ reachy_mini.goto_target(head=pose, duration=2.0)
85
+ ```
86
+
87
+ and using the [REST API](#using-the-rest-api), reading the current state of the robot:
88
+
89
+ ```bash
90
+ curl 'http://localhost:8000/api/state/full'
91
+ ```
92
+
93
+ Those two examples above assume that the daemon is already running (either in simulation or on the real robot) locally.
94
+
95
+ ## Installation of the daemon and Python SDK
96
+
97
+ As mentioned above, before being able to use the robot, you need to run the daemon that will handle the communication with the motors.
98
+
99
+ We support and test on Linux and macOS. It's also working on Windows, but it is less tested at the moment. Do not hesitate to open an issue if you encounter any problem.
100
+
101
+ The daemon is built in Python, so you need to have Python installed on your computer (versions from 3.10 to 3.13 are supported). We recommend using a virtual environment to avoid dependency conflicts with your other Python projects.
102
+
103
+ You can install Reachy Mini from the source code or from PyPI.
104
+
105
+ From PyPI, you can install the package with:
106
+
107
+ ```bash
108
+ pip install reachy-mini
109
+ ```
110
+
111
+ From the source code, you can install the package with:
112
+
113
+ ```bash
114
+ git clone https://github.com/pollen-robotics/reachy_mini
115
+ pip install -e ./reachy_mini
116
+ ```
117
+
118
+ The same package provides both the daemon and the Python SDK.
119
+
120
+ ## Run the reachy mini daemon
121
+
122
+ Before being able to use the robot, you need to run the daemon that will handle the communication with the motors. This daemon can run either in simulation (MuJoCo) or on the real robot.
123
+
124
+ ```bash
125
+ reachy-mini-daemon
126
+ ```
127
+
128
+ or run it via the Python module:
129
+
130
+ ```bash
131
+ python -m reachy_mini.daemon.app.main
132
+ ```
133
+
134
+ Additional argument for both simulation and real robot:
135
+
136
+ ```bash
137
+ --localhost-only: (default behavior). The server will only accept connections from localhost.
138
+ ```
139
+
140
+ or
141
+
142
+ ```bash
143
+ --no-localhost-only: If set, the server will accept connections from any connection on the local network.
144
+ ```
145
+
146
+ ### In simulation ([MuJoCo](https://mujoco.org))
147
+
148
+ You first have to install the optional dependency `mujoco`.
149
+
150
+ ```bash
151
+ pip install reachy-mini[mujoco]
152
+ ```
153
+
154
+ Then run the daemon with the `--sim` argument.
155
+
156
+ ```bash
157
+ reachy-mini-daemon --sim
158
+ ```
159
+
160
+ Additional arguments:
161
+
162
+ ```bash
163
+ --scene <empty|minimal> : (Default empty). Choose between a basic empty scene, or a scene with a table and some objects.
164
+ ```
165
+
166
+ <img src="https://www.pollen-robotics.com/wp-content/uploads/2025/06/Reachy_mini_simulation.gif" width="250" alt="Reachy Mini in MuJoCo">
167
+
168
+
169
+ *Note: On OSX in order to run mujoco, you need to use mjpython (see [here](https://mujoco.readthedocs.io/en/stable/python.html#passive-viewer)). So, you should run the daemon with:*
170
+
171
+ ```bash
172
+ mjpython -m reachy_mini.daemon.app.main --sim
173
+ ```
174
+
175
+ ### For the lite version (connected via USB)
176
+
177
+ It should automatically detect the serial port of the robot. If it does not, you can specify it manually with the `-p` option:
178
+
179
+ ```bash
180
+ reachy-mini-daemon -p <serial_port>
181
+ ```
182
+
183
+ ### Usage
184
+
185
+ For more information about the daemon and its options, you can run:
186
+
187
+ ```bash
188
+ reachy-mini-daemon --help
189
+ ```
190
+
191
+ ## Run the demo
192
+
193
+ Conversational demo for the Reachy Mini robot combining LLM realtime APIs, vision pipelines, and choreographed motion libraries: [reachy_mini_conversation_demo](https://github.com/pollen-robotics/reachy_mini_conversation_demo).
194
+
195
+ ## Using the Python SDK
196
+
197
+ The API is designed to be simple and intuitive. You can control the robot's features such as the head, antennas, camera, speakers, and microphone. For instance, to move the head of the robot, you can use the `goto_target` method as shown in the example below:
198
+
199
+ ```python
200
+ from reachy_mini import ReachyMini
201
+ from reachy_mini.utils import create_head_pose
202
+
203
+ with ReachyMini() as reachy_mini:
204
+ # Move the head up (10mm on z-axis) and roll it 15 degrees
205
+ pose = create_head_pose(z=10, roll=15, degrees=True, mm=True)
206
+ reachy_mini.goto_target(head=pose, duration=2.0)
207
+
208
+ # Reset to default pose
209
+ pose = create_head_pose()
210
+ reachy_mini.goto_target(head=pose, duration=2.0)
211
+ ```
212
+
213
+ For a full description of the SDK, please refer to the [Python SDK documentation](./docs/python-sdk.md).
214
+
215
+ ## Using the REST API
216
+
217
+ The daemon also provides a REST API via [fastapi](https://fastapi.tiangolo.com/) that you can use to control the robot and get its state. The API is accessible via HTTP and WebSocket.
218
+
219
+ By default, the API server runs on `http://localhost:8000`. The API is documented using OpenAPI, and you can access the documentation at `http://localhost:8000/docs` when the daemon is running.
220
+
221
+ More information about the API can be found in the [HTTP API documentation](./docs/rest-api.md).
222
+
223
+ ## Open source & contribution
224
+
225
+ This project is actively developed and maintained by the [Pollen Robotics team](https://www.pollen-robotics.com) and the [Hugging Face team](https://huggingface.co/).
226
+
227
+ We welcome contributions from the community! If you want to report a bug or request a feature, please open an issue on GitHub. If you want to contribute code, please fork the repository and submit a pull request.
228
+
229
+ ### 3D models
230
+
231
+ TODO
232
+
233
+ ### Contributing
234
+
235
+ Development tools are available in the optional dependencies.
236
+
237
+ ```bash
238
+ pip install -e .[dev]
239
+ pre-commit install
240
+ ```
241
+
242
+ Your files will be checked before any commit. Checks may also be manually run with
243
+
244
+ ```bash
245
+ pre-commit run --all-files
246
+ ```
247
+
248
+ Checks are performed by Ruff. You may want to [configure your IDE to support it](https://docs.astral.sh/ruff/editors/setup/).
249
+
250
+ ## License
251
+
252
+ This project is licensed under the Apache 2.0 License - see the [LICENSE](LICENSE) file for details.
253
+
254
+ The robot design files are licensed under the [TODO](TODO) license.
255
+
256
+ ### Simulation model used
257
+
258
+ - https://polyhaven.com/a/food_apple_01
259
+ - https://polyhaven.com/a/croissant
260
+ - https://polyhaven.com/a/wooden_table_02
261
+ - https://polyhaven.com/a/rubber_duck_toy