reachy-mini 1.0.0rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reachy-mini might be problematic. Click here for more details.
- reachy_mini/__init__.py +4 -0
- reachy_mini/apps/__init__.py +23 -0
- reachy_mini/apps/app.py +119 -0
- reachy_mini/apps/manager.py +178 -0
- reachy_mini/apps/sources/__init__.py +4 -0
- reachy_mini/apps/sources/hf_space.py +25 -0
- reachy_mini/apps/sources/local_common_venv.py +38 -0
- reachy_mini/apps/templates/README.md.j2 +1 -0
- reachy_mini/apps/templates/main.py.j2 +46 -0
- reachy_mini/apps/templates/pyproject.toml.j2 +18 -0
- reachy_mini/apps/utils.py +30 -0
- reachy_mini/assets/config/hardware_config.yaml +119 -0
- reachy_mini/assets/confused1.wav +0 -0
- reachy_mini/assets/count.wav +0 -0
- reachy_mini/assets/dance1.wav +0 -0
- reachy_mini/assets/go_sleep.wav +0 -0
- reachy_mini/assets/impatient1.wav +0 -0
- reachy_mini/assets/kinematics_data.json +253 -0
- reachy_mini/assets/models/fknetwork.dynamic.onnx +3 -0
- reachy_mini/assets/models/fknetwork.onnx +3 -0
- reachy_mini/assets/models/fknetwork_int8.onnx +3 -0
- reachy_mini/assets/models/iknetwork.onnx +3 -0
- reachy_mini/assets/wake_up.wav +0 -0
- reachy_mini/daemon/__init__.py +1 -0
- reachy_mini/daemon/app/__init__.py +1 -0
- reachy_mini/daemon/app/dashboard/apps_manager.html +202 -0
- reachy_mini/daemon/app/dashboard/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
- reachy_mini/daemon/app/dashboard/js/dashboard.js +121 -0
- reachy_mini/daemon/app/dashboard/live_robot_state.html +242 -0
- reachy_mini/daemon/app/dashboard/style.css +37 -0
- reachy_mini/daemon/app/dependencies.py +36 -0
- reachy_mini/daemon/app/main.py +271 -0
- reachy_mini/daemon/app/models.py +146 -0
- reachy_mini/daemon/app/routers/apps.py +220 -0
- reachy_mini/daemon/app/routers/daemon.py +53 -0
- reachy_mini/daemon/app/routers/kinematics.py +36 -0
- reachy_mini/daemon/app/routers/motors.py +41 -0
- reachy_mini/daemon/app/routers/move.py +200 -0
- reachy_mini/daemon/app/routers/state.py +137 -0
- reachy_mini/daemon/app/templates/dashboard.html +40 -0
- reachy_mini/daemon/backend/__init__.py +1 -0
- reachy_mini/daemon/backend/abstract.py +717 -0
- reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
- reachy_mini/daemon/backend/mujoco/backend.py +304 -0
- reachy_mini/daemon/backend/mujoco/utils.py +59 -0
- reachy_mini/daemon/backend/mujoco/video_udp.py +53 -0
- reachy_mini/daemon/backend/robot/__init__.py +8 -0
- reachy_mini/daemon/backend/robot/backend.py +490 -0
- reachy_mini/daemon/daemon.py +442 -0
- reachy_mini/daemon/utils.py +114 -0
- reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +3 -0
- reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
- reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +613 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +131 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +3 -0
- reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3282 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
- reachy_mini/io/__init__.py +1 -0
- reachy_mini/io/abstract.py +70 -0
- reachy_mini/io/protocol.py +44 -0
- reachy_mini/io/zenoh_client.py +258 -0
- reachy_mini/io/zenoh_server.py +183 -0
- reachy_mini/kinematics/__init__.py +68 -0
- reachy_mini/kinematics/analytical_kinematics.py +102 -0
- reachy_mini/kinematics/nn_kinematics.py +100 -0
- reachy_mini/kinematics/placo_kinematics.py +662 -0
- reachy_mini/media/__init__.py +1 -0
- reachy_mini/media/audio_base.py +75 -0
- reachy_mini/media/audio_gstreamer.py +194 -0
- reachy_mini/media/audio_sounddevice.py +207 -0
- reachy_mini/media/audio_utils.py +27 -0
- reachy_mini/media/camera_base.py +58 -0
- reachy_mini/media/camera_constants.py +13 -0
- reachy_mini/media/camera_gstreamer.py +144 -0
- reachy_mini/media/camera_opencv.py +61 -0
- reachy_mini/media/camera_utils.py +60 -0
- reachy_mini/media/media_manager.py +186 -0
- reachy_mini/motion/__init__.py +4 -0
- reachy_mini/motion/goto.py +71 -0
- reachy_mini/motion/move.py +36 -0
- reachy_mini/motion/recorded_move.py +132 -0
- reachy_mini/reachy_mini.py +705 -0
- reachy_mini/utils/__init__.py +46 -0
- reachy_mini/utils/constants.py +9 -0
- reachy_mini/utils/interpolation.py +227 -0
- reachy_mini/utils/parse_urdf_for_kinematics.py +85 -0
- reachy_mini-1.0.0rc1.dist-info/METADATA +261 -0
- reachy_mini-1.0.0rc1.dist-info/RECORD +359 -0
- reachy_mini-1.0.0rc1.dist-info/WHEEL +5 -0
- reachy_mini-1.0.0rc1.dist-info/entry_points.txt +3 -0
- reachy_mini-1.0.0rc1.dist-info/licenses/LICENSE +201 -0
- reachy_mini-1.0.0rc1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
{
|
|
2
|
+
"motor_arm_length": 0.04000000000000001,
|
|
3
|
+
"rod_length": 0.08499999999999995,
|
|
4
|
+
"head_z_offset": 0.177,
|
|
5
|
+
"motors": [
|
|
6
|
+
{
|
|
7
|
+
"name": "stewart_1",
|
|
8
|
+
"branch_frame": "closing_1_2",
|
|
9
|
+
"offset": 0,
|
|
10
|
+
"solution": 0,
|
|
11
|
+
"T_motor_world": [
|
|
12
|
+
[
|
|
13
|
+
0.8660247915798898,
|
|
14
|
+
-0.5000010603626028,
|
|
15
|
+
-2.298079077119539e-06,
|
|
16
|
+
-0.009999848080267933
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
4.490195936008854e-06,
|
|
20
|
+
3.1810770986818273e-06,
|
|
21
|
+
0.999999999984859,
|
|
22
|
+
-0.07663346037245178
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
-0.500001060347722,
|
|
26
|
+
-0.8660247915770963,
|
|
27
|
+
4.999994360718464e-06,
|
|
28
|
+
0.03666015757925319
|
|
29
|
+
],
|
|
30
|
+
[
|
|
31
|
+
0.0,
|
|
32
|
+
0.0,
|
|
33
|
+
0.0,
|
|
34
|
+
1.0
|
|
35
|
+
]
|
|
36
|
+
],
|
|
37
|
+
"branch_position": [
|
|
38
|
+
0.020648178337122566,
|
|
39
|
+
0.021763723638894568,
|
|
40
|
+
1.0345743467476964e-07
|
|
41
|
+
],
|
|
42
|
+
"limits": [
|
|
43
|
+
-3.141592653589793,
|
|
44
|
+
3.141592653589793
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "stewart_2",
|
|
49
|
+
"branch_frame": "closing_2_2",
|
|
50
|
+
"offset": 0,
|
|
51
|
+
"solution": 1,
|
|
52
|
+
"T_motor_world": [
|
|
53
|
+
[
|
|
54
|
+
-0.8660211183436269,
|
|
55
|
+
0.5000074225224785,
|
|
56
|
+
2.298069723064582e-06,
|
|
57
|
+
-0.01000055227585102
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
-4.490219645842903e-06,
|
|
61
|
+
-3.181063409649239e-06,
|
|
62
|
+
-0.999999999984859,
|
|
63
|
+
0.07663346037219607
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
-0.5000074225075973,
|
|
67
|
+
-0.8660211183408337,
|
|
68
|
+
5.00001124330122e-06,
|
|
69
|
+
0.03666008712637943
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
0.0,
|
|
73
|
+
0.0,
|
|
74
|
+
0.0,
|
|
75
|
+
1.0
|
|
76
|
+
]
|
|
77
|
+
],
|
|
78
|
+
"branch_position": [
|
|
79
|
+
0.00852381571767217,
|
|
80
|
+
0.028763668526131346,
|
|
81
|
+
1.183437210727778e-07
|
|
82
|
+
],
|
|
83
|
+
"limits": [
|
|
84
|
+
-3.141592653589793,
|
|
85
|
+
3.141592653589793
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"name": "stewart_3",
|
|
90
|
+
"branch_frame": "closing_3_2",
|
|
91
|
+
"offset": 0,
|
|
92
|
+
"solution": 0,
|
|
93
|
+
"T_motor_world": [
|
|
94
|
+
[
|
|
95
|
+
6.326794896519466e-06,
|
|
96
|
+
0.9999999999799852,
|
|
97
|
+
-7.0550646912150425e-12,
|
|
98
|
+
-0.009999884140839245
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
-1.0196153102346142e-06,
|
|
102
|
+
1.3505961633338446e-11,
|
|
103
|
+
0.9999999999994795,
|
|
104
|
+
-0.07663346037438698
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
0.9999999999794655,
|
|
108
|
+
-6.326794896940104e-06,
|
|
109
|
+
1.0196153098685706e-06,
|
|
110
|
+
0.036660683387545835
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
0.0,
|
|
114
|
+
0.0,
|
|
115
|
+
0.0,
|
|
116
|
+
1.0
|
|
117
|
+
]
|
|
118
|
+
],
|
|
119
|
+
"branch_position": [
|
|
120
|
+
-0.029172011376922807,
|
|
121
|
+
0.0069999429399361995,
|
|
122
|
+
4.0290270064691214e-08
|
|
123
|
+
],
|
|
124
|
+
"limits": [
|
|
125
|
+
-3.141592653589793,
|
|
126
|
+
3.141592653589793
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"name": "stewart_4",
|
|
131
|
+
"branch_frame": "closing_4_2",
|
|
132
|
+
"offset": 0,
|
|
133
|
+
"solution": 1,
|
|
134
|
+
"T_motor_world": [
|
|
135
|
+
[
|
|
136
|
+
-3.673205069955933e-06,
|
|
137
|
+
-0.9999999999932537,
|
|
138
|
+
-6.767968877969483e-14,
|
|
139
|
+
-0.010000000000897517
|
|
140
|
+
],
|
|
141
|
+
[
|
|
142
|
+
1.0196153102837198e-06,
|
|
143
|
+
-3.6775764393585005e-12,
|
|
144
|
+
-0.9999999999994795,
|
|
145
|
+
0.0766334603742898
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
0.9999999999927336,
|
|
149
|
+
-3.673205070385213e-06,
|
|
150
|
+
1.0196153102903487e-06,
|
|
151
|
+
0.03666065685180194
|
|
152
|
+
],
|
|
153
|
+
[
|
|
154
|
+
0.0,
|
|
155
|
+
0.0,
|
|
156
|
+
0.0,
|
|
157
|
+
1.0
|
|
158
|
+
]
|
|
159
|
+
],
|
|
160
|
+
"branch_position": [
|
|
161
|
+
-0.029172040355214434,
|
|
162
|
+
-0.0069999960097160766,
|
|
163
|
+
-3.1608172912367394e-08
|
|
164
|
+
],
|
|
165
|
+
"limits": [
|
|
166
|
+
-3.141592653589793,
|
|
167
|
+
3.141592653589793
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "stewart_5",
|
|
172
|
+
"branch_frame": "closing_5_2",
|
|
173
|
+
"offset": 0,
|
|
174
|
+
"solution": 0,
|
|
175
|
+
"T_motor_world": [
|
|
176
|
+
[
|
|
177
|
+
-0.8660284647694133,
|
|
178
|
+
-0.4999946981757419,
|
|
179
|
+
2.298079429767357e-06,
|
|
180
|
+
-0.010000231529504576
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
4.490172883391843e-06,
|
|
184
|
+
-3.1811099293773187e-06,
|
|
185
|
+
0.9999999999848591,
|
|
186
|
+
-0.07663346037246624
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
-0.4999946981608617,
|
|
190
|
+
0.8660284647666201,
|
|
191
|
+
4.999994384073154e-06,
|
|
192
|
+
0.03666016059492482
|
|
193
|
+
],
|
|
194
|
+
[
|
|
195
|
+
0.0,
|
|
196
|
+
0.0,
|
|
197
|
+
0.0,
|
|
198
|
+
1.0
|
|
199
|
+
]
|
|
200
|
+
],
|
|
201
|
+
"branch_position": [
|
|
202
|
+
0.008523809101930114,
|
|
203
|
+
-0.028763713010385224,
|
|
204
|
+
-1.4344916837716326e-07
|
|
205
|
+
],
|
|
206
|
+
"limits": [
|
|
207
|
+
-3.141592653589793,
|
|
208
|
+
3.141592653589793
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "stewart_6",
|
|
213
|
+
"branch_frame": "passive_7_link_y",
|
|
214
|
+
"offset": 0,
|
|
215
|
+
"solution": 1,
|
|
216
|
+
"T_motor_world": [
|
|
217
|
+
[
|
|
218
|
+
0.8660247915798897,
|
|
219
|
+
0.5000010603626025,
|
|
220
|
+
-2.298069644866714e-06,
|
|
221
|
+
-0.009999527331574583
|
|
222
|
+
],
|
|
223
|
+
[
|
|
224
|
+
-4.490196220318687e-06,
|
|
225
|
+
3.1810964558725514e-06,
|
|
226
|
+
-0.9999999999848591,
|
|
227
|
+
0.07663346037272492
|
|
228
|
+
],
|
|
229
|
+
[
|
|
230
|
+
-0.500001060347722,
|
|
231
|
+
0.8660247915770967,
|
|
232
|
+
5.000011266610794e-06,
|
|
233
|
+
0.036660231042625266
|
|
234
|
+
],
|
|
235
|
+
[
|
|
236
|
+
0.0,
|
|
237
|
+
0.0,
|
|
238
|
+
0.0,
|
|
239
|
+
1.0
|
|
240
|
+
]
|
|
241
|
+
],
|
|
242
|
+
"branch_position": [
|
|
243
|
+
0.020648186722822436,
|
|
244
|
+
-0.02176369606185343,
|
|
245
|
+
-8.957920105689965e-08
|
|
246
|
+
],
|
|
247
|
+
"limits": [
|
|
248
|
+
-3.141592653589793,
|
|
249
|
+
3.141592653589793
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
]
|
|
253
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Daemon for Reachy Mini."""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""FastAPI app initialization."""
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8">
|
|
6
|
+
<title>Apps Manager</title>
|
|
7
|
+
<link rel="stylesheet" href="style.css">
|
|
8
|
+
</head>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
<h2>Apps Manager</h2>
|
|
12
|
+
<div id="apps-list">
|
|
13
|
+
<h3>Available Apps</h3>
|
|
14
|
+
<ul id="available-apps"></ul>
|
|
15
|
+
</div>
|
|
16
|
+
<div id="installed-apps-list">
|
|
17
|
+
<h3>Installed Apps</h3>
|
|
18
|
+
<ul id="installed-apps"></ul>
|
|
19
|
+
</div>
|
|
20
|
+
<div id="job-status">
|
|
21
|
+
<h3>Job Status</h3>
|
|
22
|
+
<pre id="output"></pre>
|
|
23
|
+
</div>
|
|
24
|
+
<script>
|
|
25
|
+
let installedAppsCache = [];
|
|
26
|
+
let availableAppsCache = [];
|
|
27
|
+
let runningAppCache = null;
|
|
28
|
+
|
|
29
|
+
async function fetchApps() {
|
|
30
|
+
// Installed apps
|
|
31
|
+
const resInstalled = await fetch('/api/apps/list-available/installed');
|
|
32
|
+
installedAppsCache = await resInstalled.json();
|
|
33
|
+
const ulInstalled = document.getElementById('installed-apps');
|
|
34
|
+
ulInstalled.innerHTML = '';
|
|
35
|
+
installedAppsCache.forEach(app => {
|
|
36
|
+
const li = document.createElement('li');
|
|
37
|
+
li.innerHTML = renderAppInfo(app);
|
|
38
|
+
const uninstallBtn = document.createElement('button');
|
|
39
|
+
uninstallBtn.textContent = 'Uninstall';
|
|
40
|
+
uninstallBtn.onclick = () => runJob('remove', app);
|
|
41
|
+
if (runningAppCache && runningAppCache.name === app.name) {
|
|
42
|
+
uninstallBtn.disabled = true;
|
|
43
|
+
uninstallBtn.title = 'Cannot uninstall a running app';
|
|
44
|
+
}
|
|
45
|
+
li.appendChild(uninstallBtn);
|
|
46
|
+
ulInstalled.appendChild(li);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Available apps (exclude installed)
|
|
50
|
+
const resAvailable = await fetch('/api/apps/list-available');
|
|
51
|
+
availableAppsCache = await resAvailable.json();
|
|
52
|
+
const ulAvailable = document.getElementById('available-apps');
|
|
53
|
+
ulAvailable.innerHTML = '';
|
|
54
|
+
// Build a set of installed app names for fast lookup
|
|
55
|
+
const installedNames = new Set(installedAppsCache.map(app => app.name));
|
|
56
|
+
availableAppsCache.forEach(app => {
|
|
57
|
+
if (!installedNames.has(app.name)) {
|
|
58
|
+
const li = document.createElement('li');
|
|
59
|
+
li.innerHTML = renderAppInfo(app);
|
|
60
|
+
const installBtn = document.createElement('button');
|
|
61
|
+
installBtn.textContent = 'Install';
|
|
62
|
+
installBtn.onclick = () => runJob('install', app);
|
|
63
|
+
li.appendChild(installBtn);
|
|
64
|
+
ulAvailable.appendChild(li);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async function refreshCurrentAppStatus() {
|
|
70
|
+
let runningApp = null;
|
|
71
|
+
try {
|
|
72
|
+
const resStatus = await fetch('/api/apps/current-app-status');
|
|
73
|
+
runningApp = await resStatus.json();
|
|
74
|
+
} catch { }
|
|
75
|
+
runningAppCache = runningApp;
|
|
76
|
+
|
|
77
|
+
// Update installed apps controls only
|
|
78
|
+
const ulInstalled = document.getElementById('installed-apps');
|
|
79
|
+
ulInstalled.innerHTML = '';
|
|
80
|
+
installedAppsCache.forEach(app => {
|
|
81
|
+
const li = document.createElement('li');
|
|
82
|
+
li.innerHTML = renderAppInfo(app);
|
|
83
|
+
const uninstallBtn = document.createElement('button');
|
|
84
|
+
uninstallBtn.textContent = 'Uninstall';
|
|
85
|
+
uninstallBtn.onclick = () => runJob('remove', app);
|
|
86
|
+
if (runningApp && runningApp.info && runningApp.info.name === app.name) {
|
|
87
|
+
uninstallBtn.disabled = true;
|
|
88
|
+
uninstallBtn.title = 'Cannot uninstall a running app';
|
|
89
|
+
}
|
|
90
|
+
li.appendChild(uninstallBtn);
|
|
91
|
+
|
|
92
|
+
// App control buttons
|
|
93
|
+
if (!runningApp || !runningApp.info.name) {
|
|
94
|
+
// No app running, show start button
|
|
95
|
+
const startBtn = document.createElement('button');
|
|
96
|
+
startBtn.textContent = 'Start';
|
|
97
|
+
startBtn.onclick = () => runAppAction('start', app);
|
|
98
|
+
li.appendChild(startBtn);
|
|
99
|
+
} else if (runningApp.info.name === app.name) {
|
|
100
|
+
// This app is running, show restart/stop
|
|
101
|
+
const restartBtn = document.createElement('button');
|
|
102
|
+
restartBtn.textContent = 'Restart';
|
|
103
|
+
restartBtn.onclick = () => runAppAction('restart', app);
|
|
104
|
+
li.appendChild(restartBtn);
|
|
105
|
+
const stopBtn = document.createElement('button');
|
|
106
|
+
stopBtn.textContent = 'Stop';
|
|
107
|
+
stopBtn.onclick = () => runAppAction('stop', app);
|
|
108
|
+
li.appendChild(stopBtn);
|
|
109
|
+
} else {
|
|
110
|
+
// Another app is running, disable start/restart/stop
|
|
111
|
+
const runningLabel = document.createElement('span');
|
|
112
|
+
runningLabel.textContent = ' (Another app running)';
|
|
113
|
+
runningLabel.style.color = '#888';
|
|
114
|
+
li.appendChild(runningLabel);
|
|
115
|
+
}
|
|
116
|
+
ulInstalled.appendChild(li);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Periodically refresh running app status and update controls
|
|
121
|
+
setInterval(refreshCurrentAppStatus, 1000);
|
|
122
|
+
async function runAppAction(action, app) {
|
|
123
|
+
let res, jobId;
|
|
124
|
+
let endpoint = '';
|
|
125
|
+
if (action === 'start') {
|
|
126
|
+
endpoint = `/api/apps/start-app/${app.name}`;
|
|
127
|
+
} else if (action === 'restart') {
|
|
128
|
+
endpoint = `/api/apps/restart-current-app`;
|
|
129
|
+
} else if (action === 'stop') {
|
|
130
|
+
endpoint = `/api/apps/stop-current-app`;
|
|
131
|
+
}
|
|
132
|
+
res = await fetch(endpoint, { method: 'POST' });
|
|
133
|
+
// Optionally show feedback, refresh app status
|
|
134
|
+
fetchApps();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function renderAppInfo(app) {
|
|
138
|
+
let html = `<strong>${app.name}</strong> <span style="color: #888">[${app.source_kind}]</span>`;
|
|
139
|
+
if (app.description) html += `<br><em>${app.description}</em>`;
|
|
140
|
+
if (app.url) html += `<br><a href="${app.url}" target="_blank">${app.url}</a>`;
|
|
141
|
+
if (app.extra && Object.keys(app.extra).length > 0) {
|
|
142
|
+
html += `<br><details><summary>Extra Info</summary><pre>${JSON.stringify(app.extra, null, 2)}</pre></details>`;
|
|
143
|
+
}
|
|
144
|
+
return html;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
async function runJob(action, app) {
|
|
148
|
+
let res, jobId;
|
|
149
|
+
if (action === 'install') {
|
|
150
|
+
res = await fetch('/api/apps/install', {
|
|
151
|
+
method: 'POST',
|
|
152
|
+
headers: { 'Content-Type': 'application/json' },
|
|
153
|
+
body: JSON.stringify(app)
|
|
154
|
+
});
|
|
155
|
+
} else if (action === 'remove') {
|
|
156
|
+
res = await fetch(`/api/apps/remove/${app.name}`, { method: 'POST' });
|
|
157
|
+
}
|
|
158
|
+
const data = await res.json();
|
|
159
|
+
jobId = data.job_id;
|
|
160
|
+
logJobStatus(jobId);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function logJobStatus(jobId) {
|
|
164
|
+
const output = document.getElementById('output');
|
|
165
|
+
output.innerHTML = '';
|
|
166
|
+
const ws = new WebSocket(`ws://${location.host}/api/apps/ws/apps-manager/${jobId}`);
|
|
167
|
+
ws.onmessage = (event) => {
|
|
168
|
+
let data;
|
|
169
|
+
try {
|
|
170
|
+
data = JSON.parse(event.data);
|
|
171
|
+
} catch {
|
|
172
|
+
output.innerHTML += `<div class="log-line">${event.data}</div>`;
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
// Show command and status (only the real status value)
|
|
176
|
+
let statusValue = data.status;
|
|
177
|
+
// If status is a JSON string/object, extract the 'status' field
|
|
178
|
+
try {
|
|
179
|
+
const parsed = typeof statusValue === 'string' ? JSON.parse(statusValue) : statusValue;
|
|
180
|
+
if (parsed && typeof parsed === 'object' && 'status' in parsed) {
|
|
181
|
+
statusValue = parsed.status;
|
|
182
|
+
}
|
|
183
|
+
} catch { }
|
|
184
|
+
output.innerHTML = `<strong>Command:</strong> ${data.command}<br><strong>Status:</strong> ${statusValue}<br>`;
|
|
185
|
+
// Show logs as a list
|
|
186
|
+
if (data.logs && data.logs.length > 0) {
|
|
187
|
+
output.innerHTML += '<ul>' + data.logs.map(log => `<li>${log}</li>`).join('') + '</ul>';
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
ws.onclose = () => {
|
|
191
|
+
console.log("WebSocket connection closed");
|
|
192
|
+
output.innerHTML += "<div class='log-line'>[Connection closed]</div>";
|
|
193
|
+
// Refresh app lists after job is done
|
|
194
|
+
fetchApps();
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
fetchApps();
|
|
199
|
+
</script>
|
|
200
|
+
</body>
|
|
201
|
+
|
|
202
|
+
</html>
|