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.
- reachy_mini/__init__.py +4 -0
- reachy_mini/apps/__init__.py +23 -0
- reachy_mini/apps/app.py +119 -0
- reachy_mini/apps/manager.py +178 -0
- reachy_mini/apps/sources/__init__.py +4 -0
- reachy_mini/apps/sources/hf_space.py +25 -0
- reachy_mini/apps/sources/local_common_venv.py +38 -0
- reachy_mini/apps/templates/README.md.j2 +1 -0
- reachy_mini/apps/templates/main.py.j2 +46 -0
- reachy_mini/apps/templates/pyproject.toml.j2 +18 -0
- reachy_mini/apps/utils.py +30 -0
- reachy_mini/assets/config/hardware_config.yaml +119 -0
- reachy_mini/assets/confused1.wav +0 -0
- reachy_mini/assets/count.wav +0 -0
- reachy_mini/assets/dance1.wav +0 -0
- reachy_mini/assets/go_sleep.wav +0 -0
- reachy_mini/assets/impatient1.wav +0 -0
- reachy_mini/assets/kinematics_data.json +253 -0
- reachy_mini/assets/models/fknetwork.dynamic.onnx +3 -0
- reachy_mini/assets/models/fknetwork.onnx +3 -0
- reachy_mini/assets/models/fknetwork_int8.onnx +3 -0
- reachy_mini/assets/models/iknetwork.onnx +3 -0
- reachy_mini/assets/wake_up.wav +0 -0
- reachy_mini/daemon/__init__.py +1 -0
- reachy_mini/daemon/app/__init__.py +1 -0
- reachy_mini/daemon/app/dashboard/apps_manager.html +202 -0
- reachy_mini/daemon/app/dashboard/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
- reachy_mini/daemon/app/dashboard/js/dashboard.js +121 -0
- reachy_mini/daemon/app/dashboard/live_robot_state.html +242 -0
- reachy_mini/daemon/app/dashboard/style.css +37 -0
- reachy_mini/daemon/app/dependencies.py +36 -0
- reachy_mini/daemon/app/main.py +271 -0
- reachy_mini/daemon/app/models.py +146 -0
- reachy_mini/daemon/app/routers/apps.py +220 -0
- reachy_mini/daemon/app/routers/daemon.py +53 -0
- reachy_mini/daemon/app/routers/kinematics.py +36 -0
- reachy_mini/daemon/app/routers/motors.py +41 -0
- reachy_mini/daemon/app/routers/move.py +200 -0
- reachy_mini/daemon/app/routers/state.py +137 -0
- reachy_mini/daemon/app/templates/dashboard.html +40 -0
- reachy_mini/daemon/backend/__init__.py +1 -0
- reachy_mini/daemon/backend/abstract.py +717 -0
- reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
- reachy_mini/daemon/backend/mujoco/backend.py +304 -0
- reachy_mini/daemon/backend/mujoco/utils.py +59 -0
- reachy_mini/daemon/backend/mujoco/video_udp.py +53 -0
- reachy_mini/daemon/backend/robot/__init__.py +8 -0
- reachy_mini/daemon/backend/robot/backend.py +490 -0
- reachy_mini/daemon/daemon.py +442 -0
- reachy_mini/daemon/utils.py +114 -0
- reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
- reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +613 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +131 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3282 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
- reachy_mini/io/__init__.py +1 -0
- reachy_mini/io/abstract.py +70 -0
- reachy_mini/io/protocol.py +44 -0
- reachy_mini/io/zenoh_client.py +258 -0
- reachy_mini/io/zenoh_server.py +183 -0
- reachy_mini/kinematics/__init__.py +68 -0
- reachy_mini/kinematics/analytical_kinematics.py +102 -0
- reachy_mini/kinematics/nn_kinematics.py +100 -0
- reachy_mini/kinematics/placo_kinematics.py +662 -0
- reachy_mini/media/__init__.py +1 -0
- reachy_mini/media/audio_base.py +75 -0
- reachy_mini/media/audio_gstreamer.py +194 -0
- reachy_mini/media/audio_sounddevice.py +207 -0
- reachy_mini/media/audio_utils.py +27 -0
- reachy_mini/media/camera_base.py +58 -0
- reachy_mini/media/camera_constants.py +13 -0
- reachy_mini/media/camera_gstreamer.py +144 -0
- reachy_mini/media/camera_opencv.py +61 -0
- reachy_mini/media/camera_utils.py +60 -0
- reachy_mini/media/media_manager.py +186 -0
- reachy_mini/motion/__init__.py +4 -0
- reachy_mini/motion/goto.py +71 -0
- reachy_mini/motion/move.py +36 -0
- reachy_mini/motion/recorded_move.py +132 -0
- reachy_mini/reachy_mini.py +705 -0
- reachy_mini/utils/__init__.py +46 -0
- reachy_mini/utils/constants.py +9 -0
- reachy_mini/utils/interpolation.py +227 -0
- reachy_mini/utils/parse_urdf_for_kinematics.py +85 -0
- reachy_mini-1.0.0rc1.dist-info/METADATA +261 -0
- reachy_mini-1.0.0rc1.dist-info/RECORD +359 -0
- reachy_mini-1.0.0rc1.dist-info/WHEEL +5 -0
- reachy_mini-1.0.0rc1.dist-info/entry_points.txt +3 -0
- reachy_mini-1.0.0rc1.dist-info/licenses/LICENSE +201 -0
- reachy_mini-1.0.0rc1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<title>Live Robot State & Control</title>
|
|
7
|
+
<link rel="stylesheet" href="style.css">
|
|
8
|
+
<!-- Chart.js for live joint plotting -->
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h2>Live Robot State & Control</h2>
|
|
14
|
+
<div>
|
|
15
|
+
<h3>Head Pose (x, y, z, roll, pitch, yaw)</h3>
|
|
16
|
+
<canvas id="pose-chart" width="400" height="200"></canvas>
|
|
17
|
+
</div>
|
|
18
|
+
<div>
|
|
19
|
+
<h3>Move Commands</h3>
|
|
20
|
+
<form id="goto-form">
|
|
21
|
+
<fieldset>
|
|
22
|
+
<legend>Goto</legend>
|
|
23
|
+
<label>x: <input type="number" step="any" id="goto-x"></label>
|
|
24
|
+
<label>y: <input type="number" step="any" id="goto-y"></label>
|
|
25
|
+
<label>z: <input type="number" step="any" id="goto-z"></label><br>
|
|
26
|
+
<label>roll: <input type="number" step="any" id="goto-roll"></label>
|
|
27
|
+
<label>pitch: <input type="number" step="any" id="goto-pitch"></label>
|
|
28
|
+
<label>yaw: <input type="number" step="any" id="goto-yaw"></label>
|
|
29
|
+
<span style="margin-left:10px"><input type="checkbox" id="goto-use-deg" checked> Use degrees</span><br>
|
|
30
|
+
<label>Antennas (left,right): <input type="number" step="any" id="goto-ant-l"> <input type="number"
|
|
31
|
+
step="any" id="goto-ant-r"></label><br>
|
|
32
|
+
<label>Duration (s): <input type="number" step="any" id="goto-duration" value="2"></label>
|
|
33
|
+
<label>Interpolation:
|
|
34
|
+
<select id="goto-interp">
|
|
35
|
+
<option value="linear">linear</option>
|
|
36
|
+
<option value="minjerk" selected>minjerk</option>
|
|
37
|
+
<option value="ease">ease</option>
|
|
38
|
+
<option value="cartoon">cartoon</option>
|
|
39
|
+
</select>
|
|
40
|
+
</label>
|
|
41
|
+
<button type="submit">Send Goto</button>
|
|
42
|
+
</fieldset>
|
|
43
|
+
</form>
|
|
44
|
+
<button id="wake-up-btn">Wake Up</button>
|
|
45
|
+
<button id="sleep-btn">Go to Sleep</button>
|
|
46
|
+
<button id="stop-btn">Stop Move</button>
|
|
47
|
+
<div id="move-result"></div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<script>
|
|
51
|
+
// Poll /api/move/running to update move status and button state
|
|
52
|
+
async function pollMoveStatus() {
|
|
53
|
+
try {
|
|
54
|
+
const res = await fetch('/api/move/running');
|
|
55
|
+
const runningMoves = await res.json();
|
|
56
|
+
// If any moves are running, disable buttons except stop
|
|
57
|
+
const isRunning = Array.isArray(runningMoves) && runningMoves.length > 0;
|
|
58
|
+
setMoveButtonsDisabled(isRunning);
|
|
59
|
+
document.getElementById('stop-btn').disabled = !isRunning;
|
|
60
|
+
// Optionally update lastMoveUUID to the first running move
|
|
61
|
+
lastMoveUUID = isRunning ? runningMoves[0].uuid : null;
|
|
62
|
+
} catch (err) {
|
|
63
|
+
// On error, enable all buttons
|
|
64
|
+
setMoveButtonsDisabled(false);
|
|
65
|
+
document.getElementById('stop-btn').disabled = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
setInterval(pollMoveStatus, 1000);
|
|
69
|
+
// Utility to enable/disable move buttons
|
|
70
|
+
function setMoveButtonsDisabled(disabled) {
|
|
71
|
+
document.getElementById('goto-form').querySelector('button[type="submit"]').disabled = disabled;
|
|
72
|
+
document.getElementById('wake-up-btn').disabled = disabled;
|
|
73
|
+
document.getElementById('sleep-btn').disabled = disabled;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function updateMoveButtons() {
|
|
77
|
+
setMoveButtonsDisabled(!!lastMoveUUID);
|
|
78
|
+
document.getElementById('stop-btn').disabled = !lastMoveUUID;
|
|
79
|
+
}
|
|
80
|
+
// --- Chart.js Setup for head pose (x, y, z, roll, pitch, yaw) ---
|
|
81
|
+
const poseCtx = document.getElementById('pose-chart').getContext('2d');
|
|
82
|
+
const poseLabels = ["x", "y", "z", "roll", "pitch", "yaw"];
|
|
83
|
+
const poseData = {
|
|
84
|
+
labels: poseLabels,
|
|
85
|
+
datasets: [{
|
|
86
|
+
label: 'Head Pose',
|
|
87
|
+
data: [0, 0, 0, 0, 0, 0],
|
|
88
|
+
backgroundColor: 'rgba(255, 99, 132, 0.2)',
|
|
89
|
+
borderColor: 'rgba(255, 99, 132, 1)',
|
|
90
|
+
borderWidth: 1
|
|
91
|
+
}]
|
|
92
|
+
};
|
|
93
|
+
const poseChart = new Chart(poseCtx, {
|
|
94
|
+
type: 'bar',
|
|
95
|
+
data: poseData,
|
|
96
|
+
options: { scales: { y: { beginAtZero: true } } }
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
// --- Live robot state via WebSocket ---
|
|
100
|
+
let ws;
|
|
101
|
+
function connectWS() {
|
|
102
|
+
ws = new WebSocket(`ws://${location.host}/api/state/ws/full`);
|
|
103
|
+
ws.onopen = () => {
|
|
104
|
+
/* ...existing code... */
|
|
105
|
+
};
|
|
106
|
+
ws.onmessage = (event) => {
|
|
107
|
+
let data;
|
|
108
|
+
try {
|
|
109
|
+
data = JSON.parse(event.data);
|
|
110
|
+
} catch {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
// Update head pose chart if available
|
|
114
|
+
if (data.head_pose) {
|
|
115
|
+
poseChart.data.datasets[0].data[0] = data.head_pose.x;
|
|
116
|
+
poseChart.data.datasets[0].data[1] = data.head_pose.y;
|
|
117
|
+
poseChart.data.datasets[0].data[2] = data.head_pose.z;
|
|
118
|
+
poseChart.data.datasets[0].data[3] = data.head_pose.roll;
|
|
119
|
+
poseChart.data.datasets[0].data[4] = data.head_pose.pitch;
|
|
120
|
+
poseChart.data.datasets[0].data[5] = data.head_pose.yaw;
|
|
121
|
+
poseChart.update();
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
ws.onclose = () => {
|
|
125
|
+
setTimeout(connectWS, 1000);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
connectWS();
|
|
129
|
+
|
|
130
|
+
// --- Move commands ---
|
|
131
|
+
const resultDiv = document.getElementById('move-result');
|
|
132
|
+
let lastMoveUUID = null;
|
|
133
|
+
// Helper: wait for move to finish by polling /api/move/running
|
|
134
|
+
async function waitForMoveToFinish() {
|
|
135
|
+
for (let i = 0; i < 60; i++) { // max 30s
|
|
136
|
+
try {
|
|
137
|
+
const res = await fetch('/api/move/running');
|
|
138
|
+
const runningMoves = await res.json();
|
|
139
|
+
const isRunning = Array.isArray(runningMoves) && runningMoves.length > 0;
|
|
140
|
+
if (!isRunning) return;
|
|
141
|
+
} catch (e) { }
|
|
142
|
+
await new Promise(r => setTimeout(r, 500));
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
document.getElementById('goto-form').onsubmit = async function (e) {
|
|
147
|
+
e.preventDefault();
|
|
148
|
+
resultDiv.textContent = 'playing move goto';
|
|
149
|
+
setMoveButtonsDisabled(true);
|
|
150
|
+
const useDeg = document.getElementById('goto-use-deg').checked;
|
|
151
|
+
// If using degrees, convert roll/pitch/yaw to radians
|
|
152
|
+
function toRad(val) { return useDeg ? (parseFloat(val) || 0) * Math.PI / 180 : parseFloat(val) || 0; }
|
|
153
|
+
const head_pose = {
|
|
154
|
+
x: parseFloat(document.getElementById('goto-x').value) || 0,
|
|
155
|
+
y: parseFloat(document.getElementById('goto-y').value) || 0,
|
|
156
|
+
z: parseFloat(document.getElementById('goto-z').value) || 0,
|
|
157
|
+
roll: toRad(document.getElementById('goto-roll').value) || 0,
|
|
158
|
+
pitch: toRad(document.getElementById('goto-pitch').value) || 0,
|
|
159
|
+
yaw: toRad(document.getElementById('goto-yaw').value) || 0,
|
|
160
|
+
};
|
|
161
|
+
const antennas = [
|
|
162
|
+
parseFloat(document.getElementById('goto-ant-l').value) || 0,
|
|
163
|
+
parseFloat(document.getElementById('goto-ant-r').value) || 0
|
|
164
|
+
];
|
|
165
|
+
const duration = parseFloat(document.getElementById('goto-duration').value) || 2;
|
|
166
|
+
const interpolation = document.getElementById('goto-interp').value;
|
|
167
|
+
try {
|
|
168
|
+
console.log('Sending goto:', { head_pose, antennas, duration, interpolation });
|
|
169
|
+
const res = await fetch('/api/move/goto', {
|
|
170
|
+
method: 'POST',
|
|
171
|
+
headers: { 'Content-Type': 'application/json' },
|
|
172
|
+
body: JSON.stringify({ head_pose, antennas, duration, interpolation })
|
|
173
|
+
});
|
|
174
|
+
const data = await res.json();
|
|
175
|
+
lastMoveUUID = data.uuid || null;
|
|
176
|
+
await waitForMoveToFinish();
|
|
177
|
+
resultDiv.textContent = 'move goto finished';
|
|
178
|
+
} catch (err) {
|
|
179
|
+
resultDiv.textContent = 'Error sending goto.';
|
|
180
|
+
}
|
|
181
|
+
updateMoveButtons();
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
document.getElementById('wake-up-btn').onclick = async function () {
|
|
185
|
+
resultDiv.textContent = 'playing move wake_up';
|
|
186
|
+
setMoveButtonsDisabled(true);
|
|
187
|
+
try {
|
|
188
|
+
const res = await fetch('/api/move/play/wake_up', { method: 'POST' });
|
|
189
|
+
const data = await res.json();
|
|
190
|
+
lastMoveUUID = data.uuid || null;
|
|
191
|
+
await waitForMoveToFinish();
|
|
192
|
+
resultDiv.textContent = 'move wake_up finished';
|
|
193
|
+
} catch (err) {
|
|
194
|
+
resultDiv.textContent = 'Error sending wake up.';
|
|
195
|
+
}
|
|
196
|
+
updateMoveButtons();
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
document.getElementById('sleep-btn').onclick = async function () {
|
|
200
|
+
resultDiv.textContent = 'playing move goto_sleep';
|
|
201
|
+
setMoveButtonsDisabled(true);
|
|
202
|
+
try {
|
|
203
|
+
const res = await fetch('/api/move/play/goto_sleep', { method: 'POST' });
|
|
204
|
+
const data = await res.json();
|
|
205
|
+
lastMoveUUID = data.uuid || null;
|
|
206
|
+
await waitForMoveToFinish();
|
|
207
|
+
resultDiv.textContent = 'move goto_sleep finished';
|
|
208
|
+
} catch (err) {
|
|
209
|
+
resultDiv.textContent = 'Error sending go to sleep.';
|
|
210
|
+
}
|
|
211
|
+
updateMoveButtons();
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
document.getElementById('stop-btn').onclick = async function () {
|
|
215
|
+
if (!lastMoveUUID) {
|
|
216
|
+
resultDiv.textContent = 'No move UUID to stop.';
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
resultDiv.textContent = 'playing move stop';
|
|
220
|
+
setMoveButtonsDisabled(true);
|
|
221
|
+
try {
|
|
222
|
+
const res = await fetch('/api/move/stop', {
|
|
223
|
+
method: 'POST',
|
|
224
|
+
headers: { 'Content-Type': 'application/json' },
|
|
225
|
+
body: JSON.stringify({ uuid: lastMoveUUID })
|
|
226
|
+
});
|
|
227
|
+
const data = await res.json();
|
|
228
|
+
await waitForMoveToFinish();
|
|
229
|
+
resultDiv.textContent = 'move stop finished';
|
|
230
|
+
lastMoveUUID = null;
|
|
231
|
+
} catch (err) {
|
|
232
|
+
resultDiv.textContent = 'Error stopping move.';
|
|
233
|
+
}
|
|
234
|
+
updateMoveButtons();
|
|
235
|
+
// Initialize button states on page load
|
|
236
|
+
updateMoveButtons();
|
|
237
|
+
};
|
|
238
|
+
</script>
|
|
239
|
+
<!-- Removed duplicated move section -->
|
|
240
|
+
</body>
|
|
241
|
+
|
|
242
|
+
</html>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
body {
|
|
2
|
+
font-family: Arial, sans-serif;
|
|
3
|
+
background: #f7f7f7;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
h1 {
|
|
9
|
+
background: #2d3e50;
|
|
10
|
+
color: #fff;
|
|
11
|
+
padding: 1em;
|
|
12
|
+
margin: 0 0 1em 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
ul#examples-list {
|
|
16
|
+
list-style: none;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 2em;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ul#examples-list li {
|
|
22
|
+
background: #fff;
|
|
23
|
+
margin-bottom: 1em;
|
|
24
|
+
padding: 1em;
|
|
25
|
+
border-radius: 6px;
|
|
26
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.07);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
ul#examples-list li a {
|
|
30
|
+
color: #2d3e50;
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
ul#examples-list li a:hover {
|
|
36
|
+
text-decoration: underline;
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
assert isinstance(backend, Backend)
|
|
20
|
+
|
|
21
|
+
if not backend.ready.is_set():
|
|
22
|
+
raise HTTPException(status_code=503, detail="Backend not running")
|
|
23
|
+
|
|
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
|
+
assert isinstance(websocket.app.state.daemon.backend, Backend)
|
|
36
|
+
return websocket.app.state.daemon.backend
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
"""Daemon entry point for the Reachy Mini robot.
|
|
2
|
+
|
|
3
|
+
This script serves as the command-line interface (CLI) entry point for the Reachy Mini daemon.
|
|
4
|
+
It initializes the daemon with specified parameters such as simulation mode, serial port,
|
|
5
|
+
scene to load, and logging level. The daemon runs indefinitely, handling requests and
|
|
6
|
+
managing the robot's state.
|
|
7
|
+
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
import argparse
|
|
11
|
+
import logging
|
|
12
|
+
import os
|
|
13
|
+
from contextlib import asynccontextmanager
|
|
14
|
+
from dataclasses import dataclass
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
from typing import AsyncGenerator
|
|
17
|
+
|
|
18
|
+
import uvicorn
|
|
19
|
+
from fastapi import APIRouter, FastAPI, Request
|
|
20
|
+
from fastapi.middleware.cors import CORSMiddleware
|
|
21
|
+
from fastapi.responses import HTMLResponse
|
|
22
|
+
from fastapi.staticfiles import StaticFiles
|
|
23
|
+
from fastapi.templating import Jinja2Templates
|
|
24
|
+
|
|
25
|
+
from reachy_mini.apps.manager import AppManager
|
|
26
|
+
from reachy_mini.daemon.app.routers import apps, daemon, kinematics, motors, move, state
|
|
27
|
+
from reachy_mini.daemon.daemon import Daemon
|
|
28
|
+
|
|
29
|
+
DASHBOARD_PAGES = Path(__file__).parent / "dashboard"
|
|
30
|
+
TEMPLATES_DIR = Path(__file__).parent / "templates"
|
|
31
|
+
templates = Jinja2Templates(directory=str(TEMPLATES_DIR))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
@dataclass
|
|
35
|
+
class Args:
|
|
36
|
+
"""Arguments for configuring the Reachy Mini daemon."""
|
|
37
|
+
|
|
38
|
+
log_level: str = "INFO"
|
|
39
|
+
|
|
40
|
+
wireless_version: bool = False
|
|
41
|
+
|
|
42
|
+
serialport: str = "auto"
|
|
43
|
+
|
|
44
|
+
sim: bool = False
|
|
45
|
+
scene: str = "empty"
|
|
46
|
+
headless: bool = False
|
|
47
|
+
|
|
48
|
+
kinematics_engine: str = "AnalyticalKinematics"
|
|
49
|
+
check_collision: bool = False
|
|
50
|
+
|
|
51
|
+
autostart: bool = True
|
|
52
|
+
|
|
53
|
+
wake_up_on_start: bool = True
|
|
54
|
+
goto_sleep_on_stop: bool = True
|
|
55
|
+
|
|
56
|
+
fastapi_host: str = "0.0.0.0"
|
|
57
|
+
fastapi_port: int = 8000
|
|
58
|
+
|
|
59
|
+
localhost_only: bool | None = None
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def create_app(args: Args) -> FastAPI:
|
|
63
|
+
"""Create and configure the FastAPI application."""
|
|
64
|
+
localhost_only = (
|
|
65
|
+
args.localhost_only
|
|
66
|
+
if args.localhost_only is not None
|
|
67
|
+
else (False if args.wireless_version else True)
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
@asynccontextmanager
|
|
71
|
+
async def lifespan(app: FastAPI) -> AsyncGenerator[None, None]:
|
|
72
|
+
"""Lifespan context manager for the FastAPI application."""
|
|
73
|
+
args = app.state.args # type: Args
|
|
74
|
+
|
|
75
|
+
if args.autostart:
|
|
76
|
+
await app.state.daemon.start(
|
|
77
|
+
serialport=args.serialport,
|
|
78
|
+
sim=args.sim,
|
|
79
|
+
scene=args.scene,
|
|
80
|
+
headless=args.headless,
|
|
81
|
+
kinematics_engine=args.kinematics_engine,
|
|
82
|
+
check_collision=args.check_collision,
|
|
83
|
+
wake_up_on_start=args.wake_up_on_start,
|
|
84
|
+
localhost_only=localhost_only,
|
|
85
|
+
)
|
|
86
|
+
yield
|
|
87
|
+
await app.state.app_manager.close()
|
|
88
|
+
await app.state.daemon.stop(
|
|
89
|
+
goto_sleep_on_stop=args.goto_sleep_on_stop,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
app = FastAPI(
|
|
93
|
+
lifespan=lifespan,
|
|
94
|
+
)
|
|
95
|
+
app.state.args = args
|
|
96
|
+
app.state.daemon = Daemon(wireless_version=args.wireless_version)
|
|
97
|
+
app.state.app_manager = AppManager()
|
|
98
|
+
|
|
99
|
+
app.add_middleware(
|
|
100
|
+
CORSMiddleware,
|
|
101
|
+
allow_origins=["*"], # or restrict to your HF domain
|
|
102
|
+
allow_methods=["*"],
|
|
103
|
+
allow_headers=["*"],
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
router = APIRouter(prefix="/api")
|
|
107
|
+
router.include_router(apps.router)
|
|
108
|
+
router.include_router(daemon.router)
|
|
109
|
+
router.include_router(kinematics.router)
|
|
110
|
+
router.include_router(motors.router)
|
|
111
|
+
router.include_router(move.router)
|
|
112
|
+
router.include_router(state.router)
|
|
113
|
+
|
|
114
|
+
app.include_router(router)
|
|
115
|
+
|
|
116
|
+
# Route to list available HTML/JS/CSS examples with links using Jinja2 template
|
|
117
|
+
@app.get("/")
|
|
118
|
+
async def list_examples(request: Request) -> HTMLResponse:
|
|
119
|
+
"""Render the dashboard."""
|
|
120
|
+
files = [f for f in os.listdir(DASHBOARD_PAGES) if f.endswith(".html")]
|
|
121
|
+
return templates.TemplateResponse(
|
|
122
|
+
"dashboard.html", {"request": request, "files": files}
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
app.mount(
|
|
126
|
+
"/dashboard",
|
|
127
|
+
StaticFiles(directory=str(DASHBOARD_PAGES), html=True),
|
|
128
|
+
name="dashboard",
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
return app
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def run_app(args: Args) -> None:
|
|
135
|
+
"""Run the FastAPI app with Uvicorn."""
|
|
136
|
+
logging.basicConfig(level=logging.INFO)
|
|
137
|
+
|
|
138
|
+
app = create_app(args)
|
|
139
|
+
uvicorn.run(app, host=args.fastapi_host, port=args.fastapi_port)
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def main() -> None:
|
|
143
|
+
"""Run the FastAPI app with Uvicorn."""
|
|
144
|
+
default_args = Args()
|
|
145
|
+
|
|
146
|
+
parser = argparse.ArgumentParser(description="Run the Reachy Mini daemon.")
|
|
147
|
+
parser.add_argument(
|
|
148
|
+
"--wireless-version",
|
|
149
|
+
action="store_true",
|
|
150
|
+
default=default_args.wireless_version,
|
|
151
|
+
help="Use the wireless version of Reachy Mini (default: False).",
|
|
152
|
+
)
|
|
153
|
+
|
|
154
|
+
# Real robot mode
|
|
155
|
+
parser.add_argument(
|
|
156
|
+
"-p",
|
|
157
|
+
"--serialport",
|
|
158
|
+
type=str,
|
|
159
|
+
default=default_args.serialport,
|
|
160
|
+
help="Serial port for real motors (default: will try to automatically find the port).",
|
|
161
|
+
)
|
|
162
|
+
# Simulation mode
|
|
163
|
+
parser.add_argument(
|
|
164
|
+
"--sim",
|
|
165
|
+
action="store_true",
|
|
166
|
+
default=default_args.sim,
|
|
167
|
+
help="Run in simulation mode using Mujoco.",
|
|
168
|
+
)
|
|
169
|
+
parser.add_argument(
|
|
170
|
+
"--scene",
|
|
171
|
+
type=str,
|
|
172
|
+
default=default_args.scene,
|
|
173
|
+
help="Name of the scene to load (default: empty)",
|
|
174
|
+
)
|
|
175
|
+
parser.add_argument(
|
|
176
|
+
"--headless",
|
|
177
|
+
action="store_true",
|
|
178
|
+
default=default_args.headless,
|
|
179
|
+
help="Run the daemon in headless mode (default: False).",
|
|
180
|
+
)
|
|
181
|
+
# Daemon options
|
|
182
|
+
parser.add_argument(
|
|
183
|
+
"--autostart",
|
|
184
|
+
action="store_true",
|
|
185
|
+
default=default_args.autostart,
|
|
186
|
+
help="Automatically start the daemon on launch (default: True).",
|
|
187
|
+
)
|
|
188
|
+
parser.add_argument(
|
|
189
|
+
"--no-autostart",
|
|
190
|
+
action="store_false",
|
|
191
|
+
dest="autostart",
|
|
192
|
+
help="Do not automatically start the daemon on launch (default: False).",
|
|
193
|
+
)
|
|
194
|
+
parser.add_argument(
|
|
195
|
+
"--wake-up-on-start",
|
|
196
|
+
action="store_true",
|
|
197
|
+
default=default_args.wake_up_on_start,
|
|
198
|
+
help="Wake up the robot on daemon start (default: True).",
|
|
199
|
+
)
|
|
200
|
+
parser.add_argument(
|
|
201
|
+
"--no-wake-up-on-start",
|
|
202
|
+
action="store_false",
|
|
203
|
+
dest="wake_up_on_start",
|
|
204
|
+
help="Do not wake up the robot on daemon start (default: False).",
|
|
205
|
+
)
|
|
206
|
+
parser.add_argument(
|
|
207
|
+
"--goto-sleep-on-stop",
|
|
208
|
+
action="store_true",
|
|
209
|
+
default=default_args.goto_sleep_on_stop,
|
|
210
|
+
help="Put the robot to sleep on daemon stop (default: True).",
|
|
211
|
+
)
|
|
212
|
+
parser.add_argument(
|
|
213
|
+
"--no-goto-sleep-on-stop",
|
|
214
|
+
action="store_false",
|
|
215
|
+
dest="goto_sleep_on_stop",
|
|
216
|
+
help="Do not put the robot to sleep on daemon stop (default: False).",
|
|
217
|
+
)
|
|
218
|
+
# Zenoh server options
|
|
219
|
+
parser.add_argument(
|
|
220
|
+
"--localhost-only",
|
|
221
|
+
action="store_true",
|
|
222
|
+
default=default_args.localhost_only,
|
|
223
|
+
help="Restrict the server to localhost only (default: True).",
|
|
224
|
+
)
|
|
225
|
+
parser.add_argument(
|
|
226
|
+
"--no-localhost-only",
|
|
227
|
+
action="store_false",
|
|
228
|
+
dest="localhost_only",
|
|
229
|
+
help="Allow the server to listen on all interfaces (default: False).",
|
|
230
|
+
)
|
|
231
|
+
# Kinematics options
|
|
232
|
+
parser.add_argument(
|
|
233
|
+
"--check-collision",
|
|
234
|
+
action="store_true",
|
|
235
|
+
default=default_args.check_collision,
|
|
236
|
+
help="Enable collision checking (default: False).",
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
parser.add_argument(
|
|
240
|
+
"--kinematics-engine",
|
|
241
|
+
type=str,
|
|
242
|
+
default=default_args.kinematics_engine,
|
|
243
|
+
choices=["Placo", "NN", "AnalyticalKinematics"],
|
|
244
|
+
help="Set the kinematics engine (default: AnalyticalKinematics).",
|
|
245
|
+
)
|
|
246
|
+
# FastAPI server options
|
|
247
|
+
parser.add_argument(
|
|
248
|
+
"--fastapi-host",
|
|
249
|
+
type=str,
|
|
250
|
+
default=default_args.fastapi_host,
|
|
251
|
+
)
|
|
252
|
+
parser.add_argument(
|
|
253
|
+
"--fastapi-port",
|
|
254
|
+
type=int,
|
|
255
|
+
default=default_args.fastapi_port,
|
|
256
|
+
)
|
|
257
|
+
# Logging options
|
|
258
|
+
parser.add_argument(
|
|
259
|
+
"--log-level",
|
|
260
|
+
type=str,
|
|
261
|
+
default=default_args.log_level,
|
|
262
|
+
choices=["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
|
|
263
|
+
help="Set the logging level (default: INFO).",
|
|
264
|
+
)
|
|
265
|
+
|
|
266
|
+
args = parser.parse_args()
|
|
267
|
+
run_app(Args(**vars(args)))
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
if __name__ == "__main__":
|
|
271
|
+
main()
|