reachy-mini 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reachy-mini might be problematic. Click here for more details.
- reachy_mini/__init__.py +4 -0
- reachy_mini/apps/__init__.py +24 -0
- reachy_mini/apps/app.py +121 -0
- reachy_mini/apps/manager.py +183 -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 +44 -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 +0 -0
- reachy_mini/assets/models/fknetwork.onnx +0 -0
- reachy_mini/assets/models/fknetwork_int8.onnx +0 -0
- reachy_mini/assets/models/iknetwork.onnx +0 -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/bg_job_register.py +142 -0
- reachy_mini/daemon/app/dashboard/static/assets/KO-cartoon-static.svg +40 -0
- reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon-static.svg +42 -0
- reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/go-to-sleep-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon-static.svg +50 -0
- reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-awake.svg +18 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-connection-lost-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-go-to-sleep-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko.svg +22 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping-static.svg +41 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping.svg +18 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-wake-up-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
- reachy_mini/daemon/app/dashboard/static/js/apps.js +304 -0
- reachy_mini/daemon/app/dashboard/static/js/appstore.js +150 -0
- reachy_mini/daemon/app/dashboard/static/js/daemon.js +163 -0
- reachy_mini/daemon/app/dashboard/static/js/move_player.js +132 -0
- reachy_mini/daemon/app/dashboard/static/js/setup_wifi.js +94 -0
- reachy_mini/daemon/app/dashboard/static/js/update.js +80 -0
- reachy_mini/daemon/app/dashboard/static/style.css +83 -0
- reachy_mini/daemon/app/dashboard/templates/base.html +23 -0
- reachy_mini/daemon/app/dashboard/templates/index.html +17 -0
- reachy_mini/daemon/app/dashboard/templates/sections/apps.html +8 -0
- reachy_mini/daemon/app/dashboard/templates/sections/appstore.html +29 -0
- reachy_mini/daemon/app/dashboard/templates/sections/daemon.html +36 -0
- reachy_mini/daemon/app/dashboard/templates/sections/move_player.html +27 -0
- reachy_mini/daemon/app/dashboard/update.html +22 -0
- reachy_mini/daemon/app/dashboard/wifi_config.html +41 -0
- reachy_mini/daemon/app/dependencies.py +41 -0
- reachy_mini/daemon/app/main.py +262 -0
- reachy_mini/daemon/app/models.py +147 -0
- reachy_mini/daemon/app/routers/apps.py +114 -0
- reachy_mini/daemon/app/routers/daemon.py +80 -0
- reachy_mini/daemon/app/routers/kinematics.py +57 -0
- reachy_mini/daemon/app/routers/motors.py +41 -0
- reachy_mini/daemon/app/routers/move.py +257 -0
- reachy_mini/daemon/app/routers/state.py +146 -0
- reachy_mini/daemon/backend/__init__.py +1 -0
- reachy_mini/daemon/backend/abstract.py +750 -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 +535 -0
- reachy_mini/daemon/daemon.py +444 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +5021 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +18045 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +8940 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +485 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -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 +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3281 -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 +666 -0
- reachy_mini/media/__init__.py +1 -0
- reachy_mini/media/audio_base.py +163 -0
- reachy_mini/media/audio_gstreamer.py +195 -0
- reachy_mini/media/audio_sounddevice.py +226 -0
- reachy_mini/media/audio_utils.py +27 -0
- reachy_mini/media/camera_base.py +63 -0
- reachy_mini/media/camera_constants.py +13 -0
- reachy_mini/media/camera_gstreamer.py +162 -0
- reachy_mini/media/camera_opencv.py +61 -0
- reachy_mini/media/camera_utils.py +60 -0
- reachy_mini/media/media_manager.py +194 -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 +110 -0
- reachy_mini/utils/rerun.py +546 -0
- reachy_mini-1.0.0.dist-info/METADATA +286 -0
- reachy_mini-1.0.0.dist-info/RECORD +385 -0
- reachy_mini-1.0.0.dist-info/WHEEL +5 -0
- reachy_mini-1.0.0.dist-info/entry_points.txt +3 -0
- reachy_mini-1.0.0.dist-info/licenses/LICENSE +201 -0
- reachy_mini-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
const installedApps = {
|
|
2
|
+
refreshAppList: async () => {
|
|
3
|
+
const appsData = await installedApps.fetchInstalledApps();
|
|
4
|
+
await installedApps.displayInstalledApps(appsData);
|
|
5
|
+
},
|
|
6
|
+
|
|
7
|
+
currentlyRunningApp: null,
|
|
8
|
+
busy: false,
|
|
9
|
+
toggles: {},
|
|
10
|
+
|
|
11
|
+
startApp: async (appName) => {
|
|
12
|
+
if (installedApps.busy) {
|
|
13
|
+
console.log(`Another app is currently being started or stopped.`);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
installedApps.setBusy(true);
|
|
17
|
+
|
|
18
|
+
console.log(`Current running app: ${installedApps.currentlyRunningApp}`);
|
|
19
|
+
|
|
20
|
+
if (installedApps.currentlyRunningApp) {
|
|
21
|
+
console.log(`Stopping currently running app: ${installedApps.currentlyRunningApp}...`);
|
|
22
|
+
await installedApps.stopApp(installedApps.currentlyRunningApp, true);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
console.log(`Starting app: ${appName}...`);
|
|
26
|
+
const endpoint = `/api/apps/start-app/${appName}`;
|
|
27
|
+
const resp = await fetch(endpoint, { method: 'POST' });
|
|
28
|
+
if (!resp.ok) {
|
|
29
|
+
console.error(`Failed to staret app ${appName}: ${resp.statusText}`);
|
|
30
|
+
installedApps.toggles[appName].setChecked(false);
|
|
31
|
+
installedApps.setBusy(false);
|
|
32
|
+
return;
|
|
33
|
+
} else {
|
|
34
|
+
console.log(`App ${appName} started successfully.`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
installedApps.currentlyRunningApp = appName;
|
|
38
|
+
installedApps.setBusy(false);
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
stopApp: async (appName, force = false) => {
|
|
42
|
+
if (installedApps.busy && !force) {
|
|
43
|
+
console.log(`Another app is currently being started or stopped.`);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
installedApps.setBusy(true);
|
|
47
|
+
|
|
48
|
+
console.log(`Stopping app: ${appName}...`);
|
|
49
|
+
|
|
50
|
+
if (force) {
|
|
51
|
+
console.log(`Force stopping app: ${appName}...`);
|
|
52
|
+
installedApps.toggles[appName].setChecked(false);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const endpoint = `/api/apps/stop-current-app`;
|
|
56
|
+
const resp = await fetch(endpoint, { method: 'POST' });
|
|
57
|
+
if (!resp.ok) {
|
|
58
|
+
console.error(`Failed to stop app ${appName}: ${resp.statusText}`);
|
|
59
|
+
installedApps.setBusy(false);
|
|
60
|
+
return;
|
|
61
|
+
} else {
|
|
62
|
+
console.log(`App ${appName} stopped successfully.`);
|
|
63
|
+
installedApps.toggles[appName].setChecked(false);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if (installedApps.currentlyRunningApp === appName) {
|
|
67
|
+
installedApps.currentlyRunningApp = null;
|
|
68
|
+
}
|
|
69
|
+
installedApps.setBusy(false);
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
setBusy: (isBusy) => {
|
|
73
|
+
installedApps.busy = isBusy;
|
|
74
|
+
for (const toggle of Object.values(installedApps.toggles)) {
|
|
75
|
+
if (isBusy) {
|
|
76
|
+
toggle.disable();
|
|
77
|
+
} else {
|
|
78
|
+
toggle.enable();
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
fetchInstalledApps: async () => {
|
|
84
|
+
const resp = await fetch('/api/apps/list-available/installed');
|
|
85
|
+
const appsData = await resp.json();
|
|
86
|
+
return appsData;
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
displayInstalledApps: async (appsData) => {
|
|
90
|
+
const appsListElement = document.getElementById('installed-apps');
|
|
91
|
+
appsListElement.innerHTML = '';
|
|
92
|
+
|
|
93
|
+
if (!appsData || appsData.length === 0) {
|
|
94
|
+
appsListElement.innerHTML = '<li>No installed apps found.</li>';
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const runningApp = await installedApps.getRunningApp();
|
|
99
|
+
|
|
100
|
+
installedApps.toggles = {};
|
|
101
|
+
appsData.forEach(app => {
|
|
102
|
+
const li = document.createElement('li');
|
|
103
|
+
li.className = 'app-list-item';
|
|
104
|
+
const isRunning = (app.name === runningApp);
|
|
105
|
+
li.appendChild(installedApps.createAppElement(app, isRunning));
|
|
106
|
+
appsListElement.appendChild(li);
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
createAppElement: (app, isRunning) => {
|
|
111
|
+
const container = document.createElement('div');
|
|
112
|
+
container.className = 'grid grid-cols-[auto_6rem_2rem] justify-stretch gap-x-2';
|
|
113
|
+
|
|
114
|
+
const title = document.createElement('div');
|
|
115
|
+
title.className = 'installed-app-title top-1/2 ';
|
|
116
|
+
title.innerHTML = app.name;
|
|
117
|
+
container.appendChild(title);
|
|
118
|
+
|
|
119
|
+
const slider = document.createElement('div');
|
|
120
|
+
const toggle = new ToggleSlider({
|
|
121
|
+
checked: isRunning,
|
|
122
|
+
onChange: (checked) => {
|
|
123
|
+
if (installedApps.busy) {
|
|
124
|
+
toggle.setChecked(!checked);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (checked) {
|
|
128
|
+
installedApps.startApp(app.name);
|
|
129
|
+
} else {
|
|
130
|
+
installedApps.stopApp(app.name);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
installedApps.toggles[app.name] = toggle;
|
|
135
|
+
slider.appendChild(toggle.element);
|
|
136
|
+
container.appendChild(slider);
|
|
137
|
+
|
|
138
|
+
const remove = document.createElement('button');
|
|
139
|
+
remove.innerHTML = '🗑️';
|
|
140
|
+
remove.className = '-translate-y-1 text-xl';
|
|
141
|
+
container.appendChild(remove);
|
|
142
|
+
remove.onclick = async () => {
|
|
143
|
+
console.log(`Removing ${app.name}...`);
|
|
144
|
+
const resp = await fetch(`/api/apps/remove/${app.name}`, { method: 'POST' });
|
|
145
|
+
const data = await resp.json();
|
|
146
|
+
const jobId = data.job_id;
|
|
147
|
+
|
|
148
|
+
installedApps.appUninstallLogHandler(app.name, jobId);
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
return container;
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
getRunningApp: async () => {
|
|
155
|
+
const resp = await fetch('/api/apps/current-app-status');
|
|
156
|
+
const data = await resp.json();
|
|
157
|
+
if (!data) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
installedApps.currentlyRunningApp = data.info.name;
|
|
161
|
+
return data.info.name;
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
appUninstallLogHandler: async (appName, jobId) => {
|
|
165
|
+
const installModal = document.getElementById('install-modal');
|
|
166
|
+
const modalTitle = installModal.querySelector('#modal-title');
|
|
167
|
+
modalTitle.textContent = `Uninstalling ${appName}...`;
|
|
168
|
+
installModal.classList.remove('hidden');
|
|
169
|
+
|
|
170
|
+
const logsDiv = document.getElementById('install-logs');
|
|
171
|
+
logsDiv.textContent = '';
|
|
172
|
+
|
|
173
|
+
const closeButton = document.getElementById('modal-close-button');
|
|
174
|
+
closeButton.onclick = () => {
|
|
175
|
+
installModal.classList.add('hidden');
|
|
176
|
+
};
|
|
177
|
+
closeButton.classList = "hidden";
|
|
178
|
+
closeButton.textContent = '';
|
|
179
|
+
|
|
180
|
+
const ws = new WebSocket(`ws://${location.host}/api/apps/ws/apps-manager/${jobId}`);
|
|
181
|
+
ws.onmessage = (event) => {
|
|
182
|
+
try {
|
|
183
|
+
const data = JSON.parse(event.data);
|
|
184
|
+
console.log(data.status);
|
|
185
|
+
|
|
186
|
+
if (data.status === "failed") {
|
|
187
|
+
closeButton.classList = "text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800";
|
|
188
|
+
closeButton.textContent = 'Close';
|
|
189
|
+
console.error(`Uninstallation of ${appName} failed.`);
|
|
190
|
+
} else if (data.status === "done") {
|
|
191
|
+
closeButton.classList = "text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";
|
|
192
|
+
closeButton.textContent = 'Uninstall done';
|
|
193
|
+
console.log(`Uninstallation of ${appName} completed.`);
|
|
194
|
+
|
|
195
|
+
}
|
|
196
|
+
} catch {
|
|
197
|
+
logsDiv.innerHTML += event.data + '\n';
|
|
198
|
+
logsDiv.scrollTop = logsDiv.scrollHeight;
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
ws.onclose = async () => {
|
|
202
|
+
hfAppsStore.refreshAppList();
|
|
203
|
+
installedApps.refreshAppList();
|
|
204
|
+
};
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
|
|
208
|
+
class ToggleSlider {
|
|
209
|
+
constructor({ checked = false, onChange = null } = {}) {
|
|
210
|
+
this.label = document.createElement('label');
|
|
211
|
+
this.label.className = 'relative inline-block w-28 h-8 cursor-pointer';
|
|
212
|
+
|
|
213
|
+
this.input = document.createElement('input');
|
|
214
|
+
this.input.type = 'checkbox';
|
|
215
|
+
this.input.className = 'sr-only peer';
|
|
216
|
+
this.input.checked = checked;
|
|
217
|
+
this.label.appendChild(this.input);
|
|
218
|
+
|
|
219
|
+
// Off label
|
|
220
|
+
this.offLabel = document.createElement('span');
|
|
221
|
+
this.offLabel.textContent = 'Off';
|
|
222
|
+
this.offLabel.className = 'absolute left-0 top-1/2 -translate-x-8 -translate-y-1/2 text-base select-none transition-colors duration-200 text-gray-900 peer-checked:text-gray-400';
|
|
223
|
+
this.label.appendChild(this.offLabel);
|
|
224
|
+
|
|
225
|
+
this.track = document.createElement('div');
|
|
226
|
+
this.track.className = 'absolute top-0 left-0 w-16 h-8 bg-gray-200 rounded-full transition-colors duration-200 peer-checked:bg-blue-800 dark:bg-gray-400 dark:peer-checked:bg-blue-800';
|
|
227
|
+
this.label.appendChild(this.track);
|
|
228
|
+
|
|
229
|
+
this.thumb = document.createElement('div');
|
|
230
|
+
this.thumb.className = 'absolute top-0.5 left-0.5 w-7 h-7 bg-white border border-gray-300 rounded-full transition-all duration-200';
|
|
231
|
+
this.track.appendChild(this.thumb);
|
|
232
|
+
|
|
233
|
+
// On label
|
|
234
|
+
this.onLabel = document.createElement('span');
|
|
235
|
+
this.onLabel.textContent = 'On';
|
|
236
|
+
this.onLabel.className = 'absolute right-0 top-1/2 -translate-y-1/2 -translate-x-4 text-base select-none transition-colors duration-200 text-gray-400 peer-checked:text-gray-900';
|
|
237
|
+
this.label.appendChild(this.onLabel);
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
this.input.addEventListener('change', () => {
|
|
241
|
+
if (this.input.checked) {
|
|
242
|
+
this.thumb.style.transform = 'translateX(31px)';
|
|
243
|
+
this.onLabel.classList.remove('text-gray-400');
|
|
244
|
+
this.onLabel.classList.add('text-gray-900');
|
|
245
|
+
this.offLabel.classList.remove('text-gray-900');
|
|
246
|
+
this.offLabel.classList.add('text-gray-400');
|
|
247
|
+
} else {
|
|
248
|
+
this.thumb.style.transform = 'translateX(0)';
|
|
249
|
+
this.onLabel.classList.remove('text-gray-900');
|
|
250
|
+
this.onLabel.classList.add('text-gray-400');
|
|
251
|
+
this.offLabel.classList.remove('text-gray-400');
|
|
252
|
+
this.offLabel.classList.add('text-gray-900');
|
|
253
|
+
}
|
|
254
|
+
if (onChange) onChange(this.input.checked);
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// Set initial thumb and label color
|
|
258
|
+
if (checked) {
|
|
259
|
+
this.thumb.style.transform = 'translateX(31px)';
|
|
260
|
+
this.onLabel.classList.remove('text-gray-400');
|
|
261
|
+
this.onLabel.classList.add('text-gray-900');
|
|
262
|
+
} else {
|
|
263
|
+
this.onLabel.classList.remove('text-gray-900');
|
|
264
|
+
this.onLabel.classList.add('text-gray-400');
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
this.element = this.label;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
setChecked(val) {
|
|
271
|
+
this.input.checked = val;
|
|
272
|
+
if (this.input.checked) {
|
|
273
|
+
this.thumb.style.transform = 'translateX(48px)';
|
|
274
|
+
this.onLabel.classList.remove('text-gray-400');
|
|
275
|
+
this.onLabel.classList.add('text-gray-900');
|
|
276
|
+
this.offLabel.classList.remove('text-gray-900');
|
|
277
|
+
this.offLabel.classList.add('text-gray-400');
|
|
278
|
+
} else {
|
|
279
|
+
this.thumb.style.transform = 'translateX(0)';
|
|
280
|
+
this.onLabel.classList.remove('text-gray-900');
|
|
281
|
+
this.onLabel.classList.add('text-gray-400');
|
|
282
|
+
this.offLabel.classList.remove('text-gray-400');
|
|
283
|
+
this.offLabel.classList.add('text-gray-900');
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
getChecked() {
|
|
288
|
+
return this.input.checked;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
disable() {
|
|
292
|
+
this.input.disabled = true;
|
|
293
|
+
this.label.classList.add('opacity-50', 'pointer-events-none');
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
enable() {
|
|
297
|
+
this.input.disabled = false;
|
|
298
|
+
this.label.classList.remove('opacity-50', 'pointer-events-none');
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
window.addEventListener('load', async () => {
|
|
303
|
+
await installedApps.refreshAppList();
|
|
304
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
|
|
2
|
+
const hfAppsStore = {
|
|
3
|
+
refreshAppList: async () => {
|
|
4
|
+
const appsData = await hfAppsStore.fetchAvailableApps();
|
|
5
|
+
await hfAppsStore.displayAvailableApps(appsData);
|
|
6
|
+
},
|
|
7
|
+
fetchAvailableApps: async () => {
|
|
8
|
+
const resAvailable = await fetch('/api/apps/list-available');
|
|
9
|
+
const appsData = await resAvailable.json();
|
|
10
|
+
return appsData;
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
isInstalling: false,
|
|
14
|
+
|
|
15
|
+
installApp: async (app) => {
|
|
16
|
+
if (hfAppsStore.isInstalling) {
|
|
17
|
+
console.warn('An installation is already in progress.');
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
hfAppsStore.isInstalling = true;
|
|
21
|
+
|
|
22
|
+
const appName = app.extra.cardData.title || app.name;
|
|
23
|
+
console.log(`Installing ${app.name}...`);
|
|
24
|
+
|
|
25
|
+
const resp = await fetch('/api/apps/install', {
|
|
26
|
+
method: 'POST',
|
|
27
|
+
headers: { 'Content-Type': 'application/json' },
|
|
28
|
+
body: JSON.stringify(app)
|
|
29
|
+
});
|
|
30
|
+
const data = await resp.json();
|
|
31
|
+
const jobId = data.job_id;
|
|
32
|
+
|
|
33
|
+
hfAppsStore.appInstallLogHandler(appName, jobId);
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
displayAvailableApps: async (appsData) => {
|
|
37
|
+
const appsListElement = document.getElementById('hf-available-apps');
|
|
38
|
+
appsListElement.innerHTML = '';
|
|
39
|
+
|
|
40
|
+
if (!appsData || appsData.length === 0) {
|
|
41
|
+
appsListElement.innerHTML = '<li>No available apps found.</li>';
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const hfApps = appsData.filter(app => app.source_kind === 'hf_space');
|
|
46
|
+
const installedApps = appsData.filter(app => app.source_kind === 'installed');
|
|
47
|
+
|
|
48
|
+
hfApps.forEach(app => {
|
|
49
|
+
const li = document.createElement('li');
|
|
50
|
+
li.className = 'app-list-item';
|
|
51
|
+
const isInstalled = installedApps.some(installedApp => installedApp.name === app.name);
|
|
52
|
+
li.appendChild(hfAppsStore.createAppElement(app, isInstalled));
|
|
53
|
+
appsListElement.appendChild(li);
|
|
54
|
+
});
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
createAppElement: (app, isInstalled) => {
|
|
58
|
+
const container = document.createElement('div');
|
|
59
|
+
container.className = 'grid grid-cols-[2rem_auto_8rem] justify-stretch gap-x-6';
|
|
60
|
+
|
|
61
|
+
const iconDiv = document.createElement('div');
|
|
62
|
+
iconDiv.className = 'hf-app-icon row-span-2 my-1';
|
|
63
|
+
iconDiv.textContent = app.extra.cardData.emoji || '📦';
|
|
64
|
+
container.appendChild(iconDiv);
|
|
65
|
+
|
|
66
|
+
const nameDiv = document.createElement('div');
|
|
67
|
+
nameDiv.className = 'flex flex-col';
|
|
68
|
+
|
|
69
|
+
const titleDiv = document.createElement('a');
|
|
70
|
+
titleDiv.href = app.url;
|
|
71
|
+
titleDiv.target = '_blank';
|
|
72
|
+
titleDiv.rel = 'noopener noreferrer';
|
|
73
|
+
titleDiv.className = 'hf-app-title';
|
|
74
|
+
titleDiv.textContent = app.extra.cardData.title || app.name;
|
|
75
|
+
nameDiv.appendChild(titleDiv);
|
|
76
|
+
const descriptionDiv = document.createElement('span');
|
|
77
|
+
descriptionDiv.className = 'hf-app-description';
|
|
78
|
+
descriptionDiv.textContent = app.description || 'No description available.';
|
|
79
|
+
nameDiv.appendChild(descriptionDiv);
|
|
80
|
+
container.appendChild(nameDiv);
|
|
81
|
+
|
|
82
|
+
const installButtonDiv = document.createElement('button');
|
|
83
|
+
installButtonDiv.className = 'row-span-2 my-2 hf-app-install-button';
|
|
84
|
+
|
|
85
|
+
if (isInstalled) {
|
|
86
|
+
installButtonDiv.classList.add('bg-gray-400', 'cursor-not-allowed');
|
|
87
|
+
installButtonDiv.textContent = 'Installed';
|
|
88
|
+
installButtonDiv.disabled = true;
|
|
89
|
+
} else {
|
|
90
|
+
installButtonDiv.classList.add('border', 'border-red-600');
|
|
91
|
+
installButtonDiv.textContent = 'Install';
|
|
92
|
+
installButtonDiv.onclick = async () => {
|
|
93
|
+
hfAppsStore.installApp(app);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
container.appendChild(installButtonDiv);
|
|
98
|
+
|
|
99
|
+
return container;
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
appInstallLogHandler: async (appName, jobId) => {
|
|
103
|
+
const installModal = document.getElementById('install-modal');
|
|
104
|
+
const modalTitle = installModal.querySelector('#modal-title');
|
|
105
|
+
modalTitle.textContent = `Installing ${appName}...`;
|
|
106
|
+
installModal.classList.remove('hidden');
|
|
107
|
+
|
|
108
|
+
const logsDiv = document.getElementById('install-logs');
|
|
109
|
+
logsDiv.textContent = '';
|
|
110
|
+
|
|
111
|
+
const closeButton = document.getElementById('modal-close-button');
|
|
112
|
+
closeButton.onclick = () => {
|
|
113
|
+
installModal.classList.add('hidden');
|
|
114
|
+
};
|
|
115
|
+
closeButton.classList = "hidden";
|
|
116
|
+
closeButton.textContent = '';
|
|
117
|
+
|
|
118
|
+
const ws = new WebSocket(`ws://${location.host}/api/apps/ws/apps-manager/${jobId}`);
|
|
119
|
+
ws.onmessage = (event) => {
|
|
120
|
+
try {
|
|
121
|
+
const data = JSON.parse(event.data);
|
|
122
|
+
console.log(data.status);
|
|
123
|
+
|
|
124
|
+
if (data.status === "failed") {
|
|
125
|
+
closeButton.classList = "text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800";
|
|
126
|
+
closeButton.textContent = 'Close';
|
|
127
|
+
console.error(`Installation of ${appName} failed.`);
|
|
128
|
+
} else if (data.status === "done") {
|
|
129
|
+
closeButton.classList = "text-white bg-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-green-600 dark:hover:bg-green-700 dark:focus:ring-green-800";
|
|
130
|
+
closeButton.textContent = 'Install done';
|
|
131
|
+
console.log(`Installation of ${appName} completed.`);
|
|
132
|
+
|
|
133
|
+
}
|
|
134
|
+
} catch {
|
|
135
|
+
logsDiv.innerHTML += event.data + '\n';
|
|
136
|
+
logsDiv.scrollTop = logsDiv.scrollHeight;
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
ws.onclose = async () => {
|
|
140
|
+
hfAppsStore.isInstalling = false;
|
|
141
|
+
hfAppsStore.refreshAppList();
|
|
142
|
+
installedApps.refreshAppList();
|
|
143
|
+
};
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
window.addEventListener('load', async () => {
|
|
149
|
+
await hfAppsStore.refreshAppList();
|
|
150
|
+
});
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const daemon = {
|
|
5
|
+
currentStatus: {},
|
|
6
|
+
|
|
7
|
+
start: async (wakeUp) => {
|
|
8
|
+
fetch(`/api/daemon/start?wake_up=${wakeUp}`, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
})
|
|
11
|
+
.then((response) => {
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
14
|
+
}
|
|
15
|
+
return response.json();
|
|
16
|
+
})
|
|
17
|
+
.then(async (data) => {
|
|
18
|
+
await daemon.checkStatusUpdate();
|
|
19
|
+
})
|
|
20
|
+
.catch((error) => {
|
|
21
|
+
console.error('Error starting daemon:', error);
|
|
22
|
+
});
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
stop: async (gotoSleep) => {
|
|
26
|
+
fetch(`/api/daemon/stop?goto_sleep=${gotoSleep}`, {
|
|
27
|
+
method: 'POST',
|
|
28
|
+
})
|
|
29
|
+
.then((response) => {
|
|
30
|
+
if (!response.ok) {
|
|
31
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
32
|
+
}
|
|
33
|
+
return response.json();
|
|
34
|
+
})
|
|
35
|
+
.then(async (data) => {
|
|
36
|
+
await daemon.checkStatusUpdate();
|
|
37
|
+
})
|
|
38
|
+
.catch((error) => {
|
|
39
|
+
console.error('Error stopping daemon:', error);
|
|
40
|
+
});
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
getStatus: async () => {
|
|
44
|
+
fetch('/api/daemon/status')
|
|
45
|
+
.then((response) => response.json())
|
|
46
|
+
.then(async (data) => {
|
|
47
|
+
let previousState = daemon.currentStatus.state;
|
|
48
|
+
daemon.currentStatus = data;
|
|
49
|
+
|
|
50
|
+
if (previousState !== daemon.currentStatus.state) {
|
|
51
|
+
await daemon.updateUI();
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
.catch((error) => {
|
|
55
|
+
console.error('Error fetching daemon status:', error);
|
|
56
|
+
});
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
checkStatusUpdate: async (initialState) => {
|
|
60
|
+
await daemon.getStatus();
|
|
61
|
+
|
|
62
|
+
if (!initialState) {
|
|
63
|
+
initialState = daemon.currentStatus.state;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let currentState = daemon.currentStatus.state;
|
|
67
|
+
|
|
68
|
+
if (currentState === initialState || currentState === "starting" || currentState === "stopping") {
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
daemon.checkStatusUpdate(initialState);
|
|
71
|
+
}, 500);
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
toggleSwitch: async () => {
|
|
76
|
+
const toggleDaemonSwitch = document.getElementById('daemon-toggle');
|
|
77
|
+
|
|
78
|
+
if (toggleDaemonSwitch.checked) {
|
|
79
|
+
console.log('Toggle switched ON. Starting daemon...');
|
|
80
|
+
await daemon.start(true);
|
|
81
|
+
} else {
|
|
82
|
+
console.log('Toggle switched OFF. Stopping daemon...');
|
|
83
|
+
await daemon.stop(true);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
await daemon.updateToggle();
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
updateUI: async () => {
|
|
90
|
+
const daemonStatusAnim = document.getElementById('daemon-status-anim');
|
|
91
|
+
const toggleDaemonSwitch = document.getElementById('daemon-toggle');
|
|
92
|
+
const backendStatusIcon = document.getElementById('backend-status-icon');
|
|
93
|
+
const backendStatusText = document.getElementById('backend-status-text');
|
|
94
|
+
|
|
95
|
+
let daemonState = daemon.currentStatus.state;
|
|
96
|
+
|
|
97
|
+
toggleDaemonSwitch.disabled = false;
|
|
98
|
+
backendStatusIcon.classList.remove('bg-green-500', 'bg-yellow-500', 'bg-red-500');
|
|
99
|
+
|
|
100
|
+
if (daemonState === 'starting') {
|
|
101
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-wake-up-animation.svg');
|
|
102
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/awake-cartoon.svg');
|
|
103
|
+
toggleDaemonSwitch.disabled = true;
|
|
104
|
+
toggleDaemonSwitch.checked = true;
|
|
105
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
106
|
+
backendStatusText.textContent = 'Waking up...';
|
|
107
|
+
}
|
|
108
|
+
else if (daemonState === 'running') {
|
|
109
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-awake.svg');
|
|
110
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/awake-cartoon-static.svg');
|
|
111
|
+
toggleDaemonSwitch.checked = true;
|
|
112
|
+
backendStatusIcon.classList.add('bg-green-500');
|
|
113
|
+
backendStatusText.textContent = 'Up and ready';
|
|
114
|
+
}
|
|
115
|
+
else if (daemonState === 'stopping') {
|
|
116
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-go-to-sleep-animation.svg');
|
|
117
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/go-to-sleep-cartoon.svg');
|
|
118
|
+
toggleDaemonSwitch.disabled = true;
|
|
119
|
+
toggleDaemonSwitch.checked = false;
|
|
120
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
121
|
+
backendStatusText.textContent = 'Going to sleep...';
|
|
122
|
+
}
|
|
123
|
+
else if (daemonState === 'stopped' || daemonState === 'not_initialized') {
|
|
124
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-sleeping.svg');
|
|
125
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-sleeping-static.svg');
|
|
126
|
+
toggleDaemonSwitch.checked = false;
|
|
127
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
128
|
+
backendStatusText.textContent = 'Stopped';
|
|
129
|
+
}
|
|
130
|
+
else if (daemonState === 'error') {
|
|
131
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-ko-animation.svg');
|
|
132
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/no-wifi-cartoon.svg');
|
|
133
|
+
toggleDaemonSwitch.checked = false;
|
|
134
|
+
backendStatusIcon.classList.add('bg-red-500');
|
|
135
|
+
backendStatusText.textContent = 'Error occurred';
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
await daemon.updateToggle();
|
|
139
|
+
},
|
|
140
|
+
|
|
141
|
+
updateToggle: async () => {
|
|
142
|
+
const toggle = document.getElementById('daemon-toggle');
|
|
143
|
+
const toggleSlider = document.getElementById('daemon-toggle-slider');
|
|
144
|
+
const toggleOnLabel = document.getElementById('daemon-toggle-on');
|
|
145
|
+
const toggleOffLabel = document.getElementById('daemon-toggle-off');
|
|
146
|
+
|
|
147
|
+
toggleSlider.classList.remove('hidden');
|
|
148
|
+
|
|
149
|
+
if (toggle.checked) {
|
|
150
|
+
toggleOnLabel.classList.remove('hidden');
|
|
151
|
+
toggleOffLabel.classList.add('hidden');
|
|
152
|
+
} else {
|
|
153
|
+
toggleOnLabel.classList.add('hidden');
|
|
154
|
+
toggleOffLabel.classList.remove('hidden');
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
window.addEventListener('load', async () => {
|
|
161
|
+
document.getElementById('daemon-toggle').onchange = daemon.toggleSwitch;
|
|
162
|
+
await daemon.getStatus();
|
|
163
|
+
});
|