reachy-mini 1.2.5rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- reachy_mini/__init__.py +4 -0
- reachy_mini/apps/__init__.py +25 -0
- reachy_mini/apps/app.py +258 -0
- reachy_mini/apps/assistant.py +787 -0
- reachy_mini/apps/manager.py +312 -0
- reachy_mini/apps/sources/__init__.py +4 -0
- reachy_mini/apps/sources/hf_space.py +106 -0
- reachy_mini/apps/sources/local_common_venv.py +567 -0
- reachy_mini/apps/templates/README.md.j2 +12 -0
- reachy_mini/apps/templates/gitignore.j2 +3 -0
- reachy_mini/apps/templates/index.html.j2 +40 -0
- reachy_mini/apps/templates/main.py.j2 +74 -0
- reachy_mini/apps/templates/pyproject.toml.j2 +28 -0
- reachy_mini/apps/templates/static/index.html.j2 +27 -0
- reachy_mini/apps/templates/static/main.js.j2 +47 -0
- reachy_mini/apps/templates/static/style.css.j2 +25 -0
- reachy_mini/apps/templates/style.css.j2 +411 -0
- reachy_mini/apps/utils.py +30 -0
- reachy_mini/assets/config/hardware_config.yaml +164 -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/firmware/CHANGELOG.md +15 -0
- reachy_mini/assets/firmware/reachymini_ua_io16_lin_v2.1.2.bin +0 -0
- reachy_mini/assets/firmware/reachymini_ua_io16_lin_v2.1.3.bin +0 -0
- reachy_mini/assets/firmware/update.sh +9 -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/css/app.css +1433 -0
- reachy_mini/daemon/app/dashboard/static/fonts/Archivo-Italic-VariableFont_wdth,wght.ttf +0 -0
- reachy_mini/daemon/app/dashboard/static/fonts/Archivo-VariableFont_wdth,wght.ttf +0 -0
- reachy_mini/daemon/app/dashboard/static/fonts/Asap-Italic-VariableFont_wdth,wght.ttf +0 -0
- reachy_mini/daemon/app/dashboard/static/fonts/Asap-VariableFont_wdth,wght.ttf +0 -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 +323 -0
- reachy_mini/daemon/app/dashboard/static/js/appstore.js +167 -0
- reachy_mini/daemon/app/dashboard/static/js/daemon.js +169 -0
- reachy_mini/daemon/app/dashboard/static/js/health_check.js +9 -0
- reachy_mini/daemon/app/dashboard/static/js/move_player.js +132 -0
- reachy_mini/daemon/app/dashboard/static/js/notification.js +41 -0
- reachy_mini/daemon/app/dashboard/static/js/update.js +132 -0
- reachy_mini/daemon/app/dashboard/static/js/volume_control.js +252 -0
- reachy_mini/daemon/app/dashboard/static/js/wifi.js +176 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/README.md +15 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/package-lock.json +1127 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/package.json +6 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/pnpm-lock.yaml +608 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/postcss.config.js +6 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/styles/app.css +185 -0
- reachy_mini/daemon/app/dashboard/tailwindcss/tailwind.config.js +11 -0
- reachy_mini/daemon/app/dashboard/templates/base.html +21 -0
- reachy_mini/daemon/app/dashboard/templates/index.html +20 -0
- reachy_mini/daemon/app/dashboard/templates/sections/apps.html +8 -0
- reachy_mini/daemon/app/dashboard/templates/sections/appstore.html +35 -0
- reachy_mini/daemon/app/dashboard/templates/sections/daemon.html +45 -0
- reachy_mini/daemon/app/dashboard/templates/sections/move_player.html +121 -0
- reachy_mini/daemon/app/dashboard/templates/sections/notification.html +19 -0
- reachy_mini/daemon/app/dashboard/templates/sections/update.html +54 -0
- reachy_mini/daemon/app/dashboard/templates/sections/wifi.html +46 -0
- reachy_mini/daemon/app/dashboard/templates/settings.html +14 -0
- reachy_mini/daemon/app/dependencies.py +41 -0
- reachy_mini/daemon/app/main.py +469 -0
- reachy_mini/daemon/app/models.py +149 -0
- reachy_mini/daemon/app/routers/apps.py +114 -0
- reachy_mini/daemon/app/routers/daemon.py +85 -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 +265 -0
- reachy_mini/daemon/app/routers/state.py +146 -0
- reachy_mini/daemon/app/routers/update.py +86 -0
- reachy_mini/daemon/app/routers/volume.py +423 -0
- reachy_mini/daemon/app/routers/wifi_config.py +219 -0
- reachy_mini/daemon/app/services/__init__.py +1 -0
- reachy_mini/daemon/app/services/bluetooth/bluetooth_service.py +796 -0
- reachy_mini/daemon/app/services/bluetooth/commands/HOTSPOT.sh +7 -0
- reachy_mini/daemon/app/services/bluetooth/commands/RESTART_DAEMON.sh +4 -0
- reachy_mini/daemon/app/services/bluetooth/commands/SOFTWARE_RESET.sh +7 -0
- reachy_mini/daemon/app/services/bluetooth/install_service_bluetooth.sh +39 -0
- reachy_mini/daemon/app/services/gpio_shutdown/__init__.py +1 -0
- reachy_mini/daemon/app/services/gpio_shutdown/install_service.sh +33 -0
- reachy_mini/daemon/app/services/gpio_shutdown/launcher.sh +3 -0
- reachy_mini/daemon/app/services/gpio_shutdown/shutdown_monitor.py +28 -0
- reachy_mini/daemon/app/services/wireless/generate_asoundrc.sh +70 -0
- reachy_mini/daemon/app/services/wireless/install_service.sh +33 -0
- reachy_mini/daemon/app/services/wireless/launcher.sh +5 -0
- reachy_mini/daemon/backend/__init__.py +1 -0
- reachy_mini/daemon/backend/abstract.py +815 -0
- reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
- reachy_mini/daemon/backend/mujoco/backend.py +395 -0
- reachy_mini/daemon/backend/mujoco/utils.py +59 -0
- reachy_mini/daemon/backend/mujoco/video_udp.py +57 -0
- reachy_mini/daemon/backend/robot/__init__.py +8 -0
- reachy_mini/daemon/backend/robot/backend.py +597 -0
- reachy_mini/daemon/daemon.py +651 -0
- reachy_mini/daemon/utils.py +116 -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/collision/README.m +1 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_back_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/body_top_3dprint_collider_front_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/coarse/head_one_3dprint_collider_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_back_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/body_top_3dprint_collider_front_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/collision/fine/head_one_3dprint_collider_0.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 +642 -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 +132 -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/collision/README.m +1 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_back_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/body_top_3dprint_collider_front_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/coarse/head_one_3dprint_collider_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_back_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_0.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/body_top_3dprint_collider_front_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/collision/fine/head_one_3dprint_collider_0.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/descriptions/reachy_mini/urdf/robot_simple_collision.urdf +2399 -0
- reachy_mini/io/__init__.py +15 -0
- reachy_mini/io/abstract.py +70 -0
- reachy_mini/io/audio_ws.py +242 -0
- reachy_mini/io/protocol.py +44 -0
- reachy_mini/io/video_ws.py +135 -0
- reachy_mini/io/ws_controller.py +120 -0
- reachy_mini/io/zenoh_client.py +273 -0
- reachy_mini/io/zenoh_server.py +230 -0
- reachy_mini/kinematics/__init__.py +68 -0
- reachy_mini/kinematics/analytical_kinematics.py +151 -0
- reachy_mini/kinematics/nn_kinematics.py +109 -0
- reachy_mini/kinematics/placo_kinematics.py +656 -0
- reachy_mini/media/__init__.py +1 -0
- reachy_mini/media/audio_base.py +111 -0
- reachy_mini/media/audio_control_utils.py +455 -0
- reachy_mini/media/audio_gstreamer.py +272 -0
- reachy_mini/media/audio_sounddevice.py +321 -0
- reachy_mini/media/audio_utils.py +114 -0
- reachy_mini/media/camera_base.py +100 -0
- reachy_mini/media/camera_constants.py +152 -0
- reachy_mini/media/camera_gstreamer.py +231 -0
- reachy_mini/media/camera_opencv.py +89 -0
- reachy_mini/media/camera_utils.py +111 -0
- reachy_mini/media/media_manager.py +281 -0
- reachy_mini/media/webrtc_client_gstreamer.py +288 -0
- reachy_mini/media/webrtc_daemon.py +334 -0
- reachy_mini/motion/__init__.py +4 -0
- reachy_mini/motion/goto.py +71 -0
- reachy_mini/motion/move.py +43 -0
- reachy_mini/motion/recorded_move.py +146 -0
- reachy_mini/reachy_mini.py +753 -0
- reachy_mini/tools/reflash_motors.py +116 -0
- reachy_mini/tools/setup_motor.py +422 -0
- reachy_mini/tools/setup_motor_rpi.py +108 -0
- reachy_mini/utils/__init__.py +46 -0
- reachy_mini/utils/constants.py +9 -0
- reachy_mini/utils/hardware_config/__init__.py +1 -0
- reachy_mini/utils/hardware_config/parser.py +65 -0
- reachy_mini/utils/interpolation.py +227 -0
- reachy_mini/utils/parse_urdf_for_kinematics.py +110 -0
- reachy_mini/utils/rerun.py +320 -0
- reachy_mini/utils/wireless_version/__init__.py +1 -0
- reachy_mini/utils/wireless_version/startup_check.py +144 -0
- reachy_mini/utils/wireless_version/update.py +20 -0
- reachy_mini/utils/wireless_version/update_available.py +61 -0
- reachy_mini/utils/wireless_version/utils.py +39 -0
- reachy_mini-1.2.5rc1.dist-info/METADATA +161 -0
- reachy_mini-1.2.5rc1.dist-info/RECORD +479 -0
- reachy_mini-1.2.5rc1.dist-info/WHEEL +5 -0
- reachy_mini-1.2.5rc1.dist-info/entry_points.txt +4 -0
- reachy_mini-1.2.5rc1.dist-info/licenses/LICENSE +201 -0
- reachy_mini-1.2.5rc1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
|
|
2
|
+
const hfAppsStore = {
|
|
3
|
+
refreshAppList: async () => {
|
|
4
|
+
const appsData = await hfAppsStore.fetchAvailableApps();
|
|
5
|
+
await hfAppsStore.displayAvailableApps(appsData);
|
|
6
|
+
},
|
|
7
|
+
fetchAvailableApps: async () => {
|
|
8
|
+
// Decide which source to query based on the toggle state.
|
|
9
|
+
const includeCommunity = document.getElementById('hf-show-community')?.checked === true;
|
|
10
|
+
const source = includeCommunity ? 'hf_space' : 'dashboard_selection';
|
|
11
|
+
const resAvailable = await fetch(`/api/apps/list-available/${source}`);
|
|
12
|
+
const appsData = await resAvailable.json();
|
|
13
|
+
return appsData;
|
|
14
|
+
},
|
|
15
|
+
|
|
16
|
+
isInstalling: false,
|
|
17
|
+
|
|
18
|
+
installApp: async (app) => {
|
|
19
|
+
if (hfAppsStore.isInstalling) {
|
|
20
|
+
console.warn('An installation is already in progress.');
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
hfAppsStore.isInstalling = true;
|
|
24
|
+
|
|
25
|
+
const appName = app.extra.cardData.title || app.name;
|
|
26
|
+
console.log(`Installing ${app.name}...`);
|
|
27
|
+
|
|
28
|
+
const resp = await fetch('/api/apps/install', {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
headers: { 'Content-Type': 'application/json' },
|
|
31
|
+
body: JSON.stringify(app)
|
|
32
|
+
});
|
|
33
|
+
const data = await resp.json();
|
|
34
|
+
const jobId = data.job_id;
|
|
35
|
+
|
|
36
|
+
hfAppsStore.appInstallLogHandler(appName, jobId);
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
displayAvailableApps: async (appsData) => {
|
|
40
|
+
const appsListElement = document.getElementById('hf-available-apps');
|
|
41
|
+
appsListElement.innerHTML = '';
|
|
42
|
+
|
|
43
|
+
if (!appsData || appsData.length === 0) {
|
|
44
|
+
appsListElement.innerHTML = '<li>No available apps found.</li>';
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const hfApps = appsData.filter(app => app.source_kind === 'hf_space');
|
|
49
|
+
const installedApps = await fetch('/api/apps/list-available/installed').then(res => res.json());
|
|
50
|
+
|
|
51
|
+
hfApps.forEach(app => {
|
|
52
|
+
const li = document.createElement('li');
|
|
53
|
+
li.className = 'app-list-item';
|
|
54
|
+
const isInstalled = installedApps.some(installedApp => installedApp.name === app.name);
|
|
55
|
+
li.appendChild(hfAppsStore.createAppElement(app, isInstalled));
|
|
56
|
+
appsListElement.appendChild(li);
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
createAppElement: (app, isInstalled) => {
|
|
61
|
+
const container = document.createElement('div');
|
|
62
|
+
container.className = 'grid grid-cols-[2rem_auto_8rem] justify-stretch gap-x-6';
|
|
63
|
+
|
|
64
|
+
const iconDiv = document.createElement('div');
|
|
65
|
+
iconDiv.className = 'hf-app-icon row-span-2 my-1';
|
|
66
|
+
iconDiv.textContent = app.extra.cardData.emoji || '📦';
|
|
67
|
+
container.appendChild(iconDiv);
|
|
68
|
+
|
|
69
|
+
const nameDiv = document.createElement('div');
|
|
70
|
+
nameDiv.className = 'flex flex-col';
|
|
71
|
+
|
|
72
|
+
const titleDiv = document.createElement('a');
|
|
73
|
+
titleDiv.href = app.url;
|
|
74
|
+
titleDiv.target = '_blank';
|
|
75
|
+
titleDiv.rel = 'noopener noreferrer';
|
|
76
|
+
titleDiv.className = 'hf-app-title';
|
|
77
|
+
titleDiv.textContent = app.extra.cardData.title || app.name;
|
|
78
|
+
nameDiv.appendChild(titleDiv);
|
|
79
|
+
const descriptionDiv = document.createElement('span');
|
|
80
|
+
descriptionDiv.className = 'hf-app-description';
|
|
81
|
+
descriptionDiv.textContent = app.description || 'No description available.';
|
|
82
|
+
nameDiv.appendChild(descriptionDiv);
|
|
83
|
+
container.appendChild(nameDiv);
|
|
84
|
+
|
|
85
|
+
const installButtonDiv = document.createElement('button');
|
|
86
|
+
installButtonDiv.className = 'row-span-2 my-2 hf-app-install-button';
|
|
87
|
+
|
|
88
|
+
if (isInstalled) {
|
|
89
|
+
installButtonDiv.classList.add('bg-gray-400', 'cursor-not-allowed');
|
|
90
|
+
installButtonDiv.textContent = 'Installed';
|
|
91
|
+
installButtonDiv.disabled = true;
|
|
92
|
+
} else {
|
|
93
|
+
installButtonDiv.classList.add('border', 'border-red-600');
|
|
94
|
+
installButtonDiv.textContent = 'Install';
|
|
95
|
+
installButtonDiv.onclick = async () => {
|
|
96
|
+
hfAppsStore.installApp(app);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
container.appendChild(installButtonDiv);
|
|
101
|
+
|
|
102
|
+
return container;
|
|
103
|
+
},
|
|
104
|
+
|
|
105
|
+
appInstallLogHandler: async (appName, jobId) => {
|
|
106
|
+
const installModal = document.getElementById('install-modal');
|
|
107
|
+
const modalTitle = installModal.querySelector('#modal-title');
|
|
108
|
+
modalTitle.textContent = `Installing ${appName}...`;
|
|
109
|
+
installModal.classList.remove('hidden');
|
|
110
|
+
|
|
111
|
+
const logsDiv = document.getElementById('install-logs');
|
|
112
|
+
logsDiv.textContent = '';
|
|
113
|
+
|
|
114
|
+
const closeButton = document.getElementById('modal-close-button');
|
|
115
|
+
closeButton.onclick = () => {
|
|
116
|
+
installModal.classList.add('hidden');
|
|
117
|
+
};
|
|
118
|
+
closeButton.classList = "hidden";
|
|
119
|
+
closeButton.textContent = '';
|
|
120
|
+
|
|
121
|
+
const ws = new WebSocket(`ws://${location.host}/api/apps/ws/apps-manager/${jobId}`);
|
|
122
|
+
ws.onmessage = (event) => {
|
|
123
|
+
try {
|
|
124
|
+
if (event.data.startsWith('{') && event.data.endsWith('}')) {
|
|
125
|
+
const data = JSON.parse(event.data);
|
|
126
|
+
|
|
127
|
+
if (data.status === "failed") {
|
|
128
|
+
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";
|
|
129
|
+
closeButton.textContent = 'Close';
|
|
130
|
+
console.error(`Installation of ${appName} failed.`);
|
|
131
|
+
} else if (data.status === "done") {
|
|
132
|
+
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";
|
|
133
|
+
closeButton.textContent = 'Install done';
|
|
134
|
+
console.log(`Installation of ${appName} completed.`);
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
logsDiv.innerHTML += event.data + '\n';
|
|
140
|
+
logsDiv.scrollTop = logsDiv.scrollHeight;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
} catch {
|
|
145
|
+
logsDiv.innerHTML += event.data + '\n';
|
|
146
|
+
logsDiv.scrollTop = logsDiv.scrollHeight;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
ws.onclose = async () => {
|
|
150
|
+
hfAppsStore.isInstalling = false;
|
|
151
|
+
hfAppsStore.refreshAppList();
|
|
152
|
+
installedApps.refreshAppList();
|
|
153
|
+
};
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
window.addEventListener('load', async () => {
|
|
159
|
+
// Attach change listener to community toggle if present
|
|
160
|
+
const communityToggle = document.getElementById('hf-show-community');
|
|
161
|
+
if (communityToggle) {
|
|
162
|
+
communityToggle.addEventListener('change', async () => {
|
|
163
|
+
await hfAppsStore.refreshAppList();
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
await hfAppsStore.refreshAppList();
|
|
167
|
+
});
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const daemon = {
|
|
5
|
+
currentStatus: {
|
|
6
|
+
state: null,
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
start: async (wakeUp) => {
|
|
10
|
+
await fetch(`/api/daemon/start?wake_up=${wakeUp}`, {
|
|
11
|
+
method: 'POST',
|
|
12
|
+
})
|
|
13
|
+
.then((response) => {
|
|
14
|
+
if (!response.ok) {
|
|
15
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
16
|
+
}
|
|
17
|
+
return response.json();
|
|
18
|
+
})
|
|
19
|
+
.then(async (data) => {
|
|
20
|
+
await daemon.checkStatusUpdate();
|
|
21
|
+
})
|
|
22
|
+
.catch((error) => {
|
|
23
|
+
console.error('Error starting daemon:', error);
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
stop: async (gotoSleep) => {
|
|
28
|
+
await fetch(`/api/daemon/stop?goto_sleep=${gotoSleep}`, {
|
|
29
|
+
method: 'POST',
|
|
30
|
+
})
|
|
31
|
+
.then((response) => {
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
34
|
+
}
|
|
35
|
+
return response.json();
|
|
36
|
+
})
|
|
37
|
+
.then(async (data) => {
|
|
38
|
+
await daemon.checkStatusUpdate();
|
|
39
|
+
})
|
|
40
|
+
.catch((error) => {
|
|
41
|
+
console.error('Error stopping daemon:', error);
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
getStatus: async () => {
|
|
46
|
+
await fetch('/api/daemon/status')
|
|
47
|
+
.then((response) => response.json())
|
|
48
|
+
.then(async (data) => {
|
|
49
|
+
let currentState = daemon.currentStatus.state;
|
|
50
|
+
let newState = data.state || null;
|
|
51
|
+
|
|
52
|
+
daemon.currentStatus = data;
|
|
53
|
+
|
|
54
|
+
if (currentState === null || currentState !== newState) {
|
|
55
|
+
await daemon.updateUI();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
})
|
|
59
|
+
.catch((error) => {
|
|
60
|
+
console.error('Error fetching daemon status:', error);
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
checkStatusUpdate: async (initialState) => {
|
|
65
|
+
await daemon.getStatus();
|
|
66
|
+
|
|
67
|
+
if (!initialState) {
|
|
68
|
+
initialState = daemon.currentStatus.state;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
let currentState = daemon.currentStatus.state;
|
|
72
|
+
|
|
73
|
+
if (currentState !== "error" && (currentState === initialState || currentState === "starting" || currentState === "stopping")) {
|
|
74
|
+
setTimeout(() => {
|
|
75
|
+
daemon.checkStatusUpdate(initialState);
|
|
76
|
+
}, 500);
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
toggleSwitch: async () => {
|
|
81
|
+
const toggleDaemonSwitch = document.getElementById('daemon-toggle');
|
|
82
|
+
|
|
83
|
+
if (toggleDaemonSwitch.checked) {
|
|
84
|
+
console.log('Toggle switched ON. Starting daemon...');
|
|
85
|
+
await daemon.start(true);
|
|
86
|
+
} else {
|
|
87
|
+
console.log('Toggle switched OFF. Stopping daemon...');
|
|
88
|
+
await daemon.stop(true);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
await daemon.updateToggle();
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
updateUI: async () => {
|
|
95
|
+
const daemonStatusAnim = document.getElementById('daemon-status-anim');
|
|
96
|
+
const toggleDaemonSwitch = document.getElementById('daemon-toggle');
|
|
97
|
+
const backendStatusIcon = document.getElementById('backend-status-icon');
|
|
98
|
+
const backendStatusText = document.getElementById('backend-status-text');
|
|
99
|
+
|
|
100
|
+
let daemonState = daemon.currentStatus.state;
|
|
101
|
+
|
|
102
|
+
toggleDaemonSwitch.disabled = false;
|
|
103
|
+
backendStatusIcon.classList.remove('bg-green-500', 'bg-yellow-500', 'bg-red-500');
|
|
104
|
+
|
|
105
|
+
if (daemonState === 'starting') {
|
|
106
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-wake-up-animation.svg');
|
|
107
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/awake-cartoon.svg');
|
|
108
|
+
toggleDaemonSwitch.disabled = true;
|
|
109
|
+
toggleDaemonSwitch.checked = true;
|
|
110
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
111
|
+
backendStatusText.textContent = 'Waking up...';
|
|
112
|
+
}
|
|
113
|
+
else if (daemonState === 'running') {
|
|
114
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-awake.svg');
|
|
115
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/awake-cartoon-static.svg');
|
|
116
|
+
toggleDaemonSwitch.checked = true;
|
|
117
|
+
backendStatusIcon.classList.add('bg-green-500');
|
|
118
|
+
backendStatusText.textContent = 'Up and ready';
|
|
119
|
+
}
|
|
120
|
+
else if (daemonState === 'stopping') {
|
|
121
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-go-to-sleep-animation.svg');
|
|
122
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/go-to-sleep-cartoon.svg');
|
|
123
|
+
toggleDaemonSwitch.disabled = true;
|
|
124
|
+
toggleDaemonSwitch.checked = false;
|
|
125
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
126
|
+
backendStatusText.textContent = 'Going to sleep...';
|
|
127
|
+
}
|
|
128
|
+
else if (daemonState === 'stopped' || daemonState === 'not_initialized') {
|
|
129
|
+
// daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-sleeping.svg');
|
|
130
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/reachy-mini-sleeping-static.svg');
|
|
131
|
+
toggleDaemonSwitch.checked = false;
|
|
132
|
+
backendStatusIcon.classList.add('bg-yellow-500');
|
|
133
|
+
backendStatusText.textContent = 'Stopped';
|
|
134
|
+
}
|
|
135
|
+
else if (daemonState === 'error') {
|
|
136
|
+
daemonStatusAnim.setAttribute('data', '/static/assets/no-wifi-cartoon.svg');
|
|
137
|
+
toggleDaemonSwitch.checked = false;
|
|
138
|
+
backendStatusIcon.classList.add('bg-red-500');
|
|
139
|
+
backendStatusText.textContent = 'Error occurred';
|
|
140
|
+
|
|
141
|
+
notificationCenter.showError(daemon.currentStatus.error);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
await daemon.updateToggle();
|
|
145
|
+
},
|
|
146
|
+
|
|
147
|
+
updateToggle: async () => {
|
|
148
|
+
const toggle = document.getElementById('daemon-toggle');
|
|
149
|
+
const toggleSlider = document.getElementById('daemon-toggle-slider');
|
|
150
|
+
const toggleOnLabel = document.getElementById('daemon-toggle-on');
|
|
151
|
+
const toggleOffLabel = document.getElementById('daemon-toggle-off');
|
|
152
|
+
|
|
153
|
+
toggleSlider.classList.remove('hidden');
|
|
154
|
+
|
|
155
|
+
if (toggle.checked) {
|
|
156
|
+
toggleOnLabel.classList.remove('hidden');
|
|
157
|
+
toggleOffLabel.classList.add('hidden');
|
|
158
|
+
} else {
|
|
159
|
+
toggleOnLabel.classList.add('hidden');
|
|
160
|
+
toggleOffLabel.classList.remove('hidden');
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
window.addEventListener('load', async () => {
|
|
167
|
+
document.getElementById('daemon-toggle').onchange = daemon.toggleSwitch;
|
|
168
|
+
await daemon.getStatus();
|
|
169
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
window.addEventListener("load", () => {
|
|
2
|
+
const healthCheckInterval = setInterval(async () => {
|
|
3
|
+
const response = await fetch("/health-check", { method: "POST" });
|
|
4
|
+
if (!response.ok) {
|
|
5
|
+
console.error("Health check failed");
|
|
6
|
+
clearInterval(healthCheckInterval);
|
|
7
|
+
}
|
|
8
|
+
}, 2500);
|
|
9
|
+
});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const updateMoveItems = async (dataset) => {
|
|
2
|
+
fetch(`/api/move/recorded-move-datasets/list/${dataset}`)
|
|
3
|
+
.then(response => response.json())
|
|
4
|
+
.then(data => {
|
|
5
|
+
// Update the UI with the list of recorded moves
|
|
6
|
+
const moveSelectToggle = document.getElementById('move-select-toggle');
|
|
7
|
+
moveSelectToggle.innerHTML = '';
|
|
8
|
+
|
|
9
|
+
data.forEach(moveName => {
|
|
10
|
+
const option = document.createElement('option');
|
|
11
|
+
option.value = moveName;
|
|
12
|
+
option.textContent = moveName;
|
|
13
|
+
moveSelectToggle.appendChild(option);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
})
|
|
17
|
+
.catch(error => {
|
|
18
|
+
console.error(`Error fetching recorded moves for dataset '${dataset}':`, error);
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const movePlayer = {
|
|
23
|
+
playing: false,
|
|
24
|
+
currentMove: null,
|
|
25
|
+
|
|
26
|
+
playRecordedMove: async (dataset, move) => {
|
|
27
|
+
console.log(`Requesting play move '${move}' from dataset '${dataset}'`);
|
|
28
|
+
|
|
29
|
+
// movePlayer.playing = true;
|
|
30
|
+
// movePlayer.updateUI();
|
|
31
|
+
|
|
32
|
+
await fetch(`/api/move/play/recorded-move-dataset/${dataset}/${move}`, {
|
|
33
|
+
method: 'POST'
|
|
34
|
+
}).then(response => {
|
|
35
|
+
if (!response.ok) {
|
|
36
|
+
throw new Error(`HTTP error! status: ${response.status}`);
|
|
37
|
+
}
|
|
38
|
+
return response.json();
|
|
39
|
+
}
|
|
40
|
+
).then(data => {
|
|
41
|
+
movePlayer.currentMove = data.uuid;
|
|
42
|
+
}).catch(error => {
|
|
43
|
+
console.error(`Error playing move '${move}' from dataset '${dataset}':`, error);
|
|
44
|
+
// movePlayer.playing = false;
|
|
45
|
+
// movePlayer.currentMove = null;
|
|
46
|
+
// movePlayer.updateUI();
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
stopMove: async () => {
|
|
51
|
+
console.log(`Requesting stop of current move`);
|
|
52
|
+
|
|
53
|
+
await fetch(`/api/move/stop`, {
|
|
54
|
+
method: 'POST',
|
|
55
|
+
body: JSON.stringify({ uuid: movePlayer.currentMove }),
|
|
56
|
+
headers: {
|
|
57
|
+
'Content-Type': 'application/json'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
updateUI: () => {
|
|
63
|
+
const movePlayBtn = document.getElementById('move-play-btn');
|
|
64
|
+
const moveStopBtn = document.getElementById('move-stop-btn');
|
|
65
|
+
|
|
66
|
+
if (movePlayer.playing) {
|
|
67
|
+
movePlayBtn.disabled = true;
|
|
68
|
+
moveStopBtn.disabled = false;
|
|
69
|
+
} else {
|
|
70
|
+
movePlayBtn.disabled = false;
|
|
71
|
+
moveStopBtn.disabled = true;
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
|
|
75
|
+
checkMoveStatus: async () => {
|
|
76
|
+
let ws = new WebSocket(`ws://${window.location.host}/api/move/ws/updates`);
|
|
77
|
+
|
|
78
|
+
ws.onmessage = (event) => {
|
|
79
|
+
const data = JSON.parse(event.data);
|
|
80
|
+
if (data.type === 'move_started') {
|
|
81
|
+
movePlayer.playing = true;
|
|
82
|
+
movePlayer.currentMove = data.move_id;
|
|
83
|
+
}
|
|
84
|
+
else if (data.type === 'move_completed') {
|
|
85
|
+
movePlayer.playing = false;
|
|
86
|
+
movePlayer.currentMove = null;
|
|
87
|
+
}
|
|
88
|
+
else if (data.type === 'move_failed' || data.type === 'move_cancelled') {
|
|
89
|
+
movePlayer.playing = false;
|
|
90
|
+
movePlayer.currentMove = null;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
movePlayer.updateUI();
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
ws.onclose = () => {
|
|
97
|
+
console.log('Move status WebSocket closed, reconnecting in 1 second...');
|
|
98
|
+
setTimeout(() => {
|
|
99
|
+
movePlayer.checkMoveStatus();
|
|
100
|
+
}, 1000);
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
window.addEventListener('DOMContentLoaded', (event) => {
|
|
106
|
+
const moveDatasetToggle = document.getElementById('move-dataset-toggle');
|
|
107
|
+
|
|
108
|
+
moveDatasetToggle.addEventListener('change', (_) => {
|
|
109
|
+
const selectedDataset = moveDatasetToggle.value;
|
|
110
|
+
updateMoveItems(selectedDataset);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
const movePlayBtn = document.getElementById('move-play-btn');
|
|
114
|
+
movePlayBtn.addEventListener('click', async () => {
|
|
115
|
+
const selectedDataset = moveDatasetToggle.value;
|
|
116
|
+
const moveSelectToggle = document.getElementById('move-select-toggle');
|
|
117
|
+
const selectedMove = moveSelectToggle.value;
|
|
118
|
+
|
|
119
|
+
await movePlayer.playRecordedMove(selectedDataset, selectedMove);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const moveStopBtn = document.getElementById('move-stop-btn');
|
|
123
|
+
moveStopBtn.addEventListener('click', async () => {
|
|
124
|
+
await movePlayer.stopMove();
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
// Initialize move items on page load
|
|
128
|
+
updateMoveItems(moveDatasetToggle.value);
|
|
129
|
+
|
|
130
|
+
movePlayer.checkMoveStatus();
|
|
131
|
+
movePlayer.updateUI();
|
|
132
|
+
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const notificationCenter = {
|
|
2
|
+
|
|
3
|
+
showInfo: (message, duration = 5000, autoclose = true) => {
|
|
4
|
+
notificationCenter.showNotification(message, false, duration, autoclose);
|
|
5
|
+
},
|
|
6
|
+
showError: (message, duration = 5000, autoclose = false) => {
|
|
7
|
+
message = notificationCenter.errorTranslation(message);
|
|
8
|
+
notificationCenter.showNotification(message, true, duration, autoclose);
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
showNotification: (message, error, duration = 5000, autoclose = true) => {
|
|
12
|
+
document.getElementById('notification-message').textContent = message;
|
|
13
|
+
document.getElementById('notification-modal').style.display = 'block';
|
|
14
|
+
|
|
15
|
+
if (error) {
|
|
16
|
+
document.getElementById('notification-content').classList.add('error');
|
|
17
|
+
document.getElementById('notification-content').classList.remove('info');
|
|
18
|
+
} else {
|
|
19
|
+
document.getElementById('notification-content').classList.remove('error');
|
|
20
|
+
document.getElementById('notification-content').classList.add('info');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (autoclose) {
|
|
24
|
+
setTimeout(notificationCenter.closeNotification, duration);
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
closeNotification: () => {
|
|
29
|
+
document.getElementById('notification-modal').style.display = 'none';
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
errorTranslation: (errorMessage) => {
|
|
33
|
+
if (errorMessage.includes('No Reachy Mini serial port found.')) {
|
|
34
|
+
return 'Reachy Mini not detected on USB. Please check that the USB cable is properly connected.';
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
console.log('No translation found for error message:', errorMessage);
|
|
38
|
+
return errorMessage;
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
const updateManager = {
|
|
2
|
+
busy: false,
|
|
3
|
+
preRelease: false,
|
|
4
|
+
|
|
5
|
+
checkForUpdate: async () => {
|
|
6
|
+
await updateManager.updateUI(); // Clear previous state
|
|
7
|
+
|
|
8
|
+
await fetch('/update/available?pre_release=' + updateManager.preRelease)
|
|
9
|
+
.then(async response => {
|
|
10
|
+
if (!response.ok) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
const data = await response.json();
|
|
14
|
+
await updateManager.updateUI(data);
|
|
15
|
+
}).catch(error => {
|
|
16
|
+
console.error('Error checking for updates:', error);
|
|
17
|
+
});
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
startUpdate: async () => {
|
|
21
|
+
if (updateManager.busy) {
|
|
22
|
+
console.warn('An update is already in progress.');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
updateManager.busy = true;
|
|
26
|
+
|
|
27
|
+
fetch('/update/start?pre_release=' + updateManager.preRelease, { method: 'POST' })
|
|
28
|
+
.then(response => {
|
|
29
|
+
if (response.ok) {
|
|
30
|
+
return response.json();
|
|
31
|
+
} else {
|
|
32
|
+
return response.json().then(data => {
|
|
33
|
+
throw new Error(data.detail || 'Error starting update');
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
.then(data => {
|
|
38
|
+
const jobId = data.job_id;
|
|
39
|
+
updateManager.connectLogsWebSocket(jobId);
|
|
40
|
+
})
|
|
41
|
+
.catch(error => {
|
|
42
|
+
console.error('Error triggering update:', error);
|
|
43
|
+
updateManager.busy = false;
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
connectLogsWebSocket: (jobId) => {
|
|
48
|
+
const updateModal = document.getElementById('update-modal');
|
|
49
|
+
const updateModalTitle = document.getElementById('update-modal-title');
|
|
50
|
+
const logsDiv = document.getElementById('update-logs');
|
|
51
|
+
const closeButton = document.getElementById('update-modal-close-button');
|
|
52
|
+
|
|
53
|
+
updateModalTitle.textContent = 'Updating...';
|
|
54
|
+
|
|
55
|
+
closeButton.onclick = () => {
|
|
56
|
+
updateModal.classList.add('hidden');
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
updateModal.classList.remove('hidden');
|
|
60
|
+
|
|
61
|
+
const ws = new WebSocket(`ws://${location.host}/update/ws/logs?job_id=${jobId}`);
|
|
62
|
+
|
|
63
|
+
ws.onmessage = (event) => {
|
|
64
|
+
// console.log('Update log:', event);
|
|
65
|
+
logsDiv.innerHTML += event.data + '<br>';
|
|
66
|
+
logsDiv.scrollTop = logsDiv.scrollHeight;
|
|
67
|
+
};
|
|
68
|
+
ws.onclose = async () => {
|
|
69
|
+
console.log('Update logs WebSocket closed');
|
|
70
|
+
closeButton.classList.remove('hidden');
|
|
71
|
+
closeButton.textContent = 'Close';
|
|
72
|
+
updateModalTitle.textContent = 'Update Completed ✅';
|
|
73
|
+
|
|
74
|
+
updateManager.busy = false;
|
|
75
|
+
await updateManager.checkForUpdate();
|
|
76
|
+
};
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
updateUI: async (update) => {
|
|
80
|
+
// updateManager.updateMainPage(isUpdateAvailable);
|
|
81
|
+
updateManager.updateUpdatePage(update);
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
// updateMainPage: async (update) => {
|
|
85
|
+
// const daemonUpdateBtn = document.getElementById('daemon-update-btn');
|
|
86
|
+
// if (!daemonUpdateBtn) return;
|
|
87
|
+
|
|
88
|
+
// if (isUpdateAvailable) {
|
|
89
|
+
// daemonUpdateBtn.innerHTML = 'Update <span class="rounded-full bg-blue-700 text-white text-xs font-semibold px-2 py-1 ml-2">1</span>';
|
|
90
|
+
// } else {
|
|
91
|
+
// daemonUpdateBtn.innerHTML = 'Update';
|
|
92
|
+
// }
|
|
93
|
+
// },
|
|
94
|
+
updateUpdatePage: async (data) => {
|
|
95
|
+
const statusElem = document.getElementById('update-status');
|
|
96
|
+
if (!statusElem) return;
|
|
97
|
+
|
|
98
|
+
const currentVersionElem = document.getElementById('current-version');
|
|
99
|
+
const availableVersionElem = document.getElementById('available-version');
|
|
100
|
+
const availableVersionContainer = document.getElementById('available-version-container');
|
|
101
|
+
const startUpdateBtn = document.getElementById('start-update-btn');
|
|
102
|
+
|
|
103
|
+
if (!data || !data.update || !data.update.reachy_mini) {
|
|
104
|
+
statusElem.innerHTML = 'Checking for updates...';
|
|
105
|
+
if (currentVersionElem) currentVersionElem.textContent = '';
|
|
106
|
+
if (availableVersionElem) availableVersionElem.textContent = '';
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const updateInfo = data.update.reachy_mini;
|
|
111
|
+
const isUpdateAvailable = updateInfo.is_available;
|
|
112
|
+
const currentVersion = updateInfo.current_version || '-';
|
|
113
|
+
const availableVersion = updateInfo.available_version || '-';
|
|
114
|
+
|
|
115
|
+
if (currentVersionElem) currentVersionElem.textContent = `Current version: ${currentVersion}`;
|
|
116
|
+
if (availableVersionElem) availableVersionElem.textContent = `Available version: ${availableVersion}`;
|
|
117
|
+
|
|
118
|
+
if (isUpdateAvailable) {
|
|
119
|
+
statusElem.innerHTML = 'An update is available!';
|
|
120
|
+
if (availableVersionContainer) availableVersionContainer.classList.remove('hidden');
|
|
121
|
+
startUpdateBtn.classList.remove('hidden');
|
|
122
|
+
} else {
|
|
123
|
+
statusElem.innerHTML = 'Your system is up to date.';
|
|
124
|
+
if (availableVersionContainer) availableVersionContainer.classList.add('hidden');
|
|
125
|
+
startUpdateBtn.classList.add('hidden');
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
window.addEventListener('load', async () => {
|
|
131
|
+
await updateManager.checkForUpdate();
|
|
132
|
+
});
|