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,116 @@
|
|
|
1
|
+
"""Script to reflash Reachy Mini's motors firmware."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
from importlib.resources import files
|
|
5
|
+
from typing import Optional
|
|
6
|
+
|
|
7
|
+
import questionary
|
|
8
|
+
from rich.console import Console
|
|
9
|
+
|
|
10
|
+
import reachy_mini
|
|
11
|
+
from reachy_mini.daemon.utils import find_serial_port
|
|
12
|
+
from reachy_mini.tools.setup_motor import (
|
|
13
|
+
check_configuration,
|
|
14
|
+
light_led_down,
|
|
15
|
+
light_led_up,
|
|
16
|
+
setup_motor,
|
|
17
|
+
)
|
|
18
|
+
from reachy_mini.utils.hardware_config.parser import parse_yaml_config
|
|
19
|
+
|
|
20
|
+
BAUDRATE = 1000000
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> None:
|
|
24
|
+
"""Entry point for the reflash_motors script."""
|
|
25
|
+
parser = argparse.ArgumentParser(
|
|
26
|
+
description="Reflash Reachy Mini motors' firmware.",
|
|
27
|
+
)
|
|
28
|
+
parser.add_argument(
|
|
29
|
+
"--serialport",
|
|
30
|
+
type=str,
|
|
31
|
+
required=False,
|
|
32
|
+
default=None,
|
|
33
|
+
help="Serial port of the Reachy Mini (e.g. /dev/ttyUSB0 or COM3). "
|
|
34
|
+
"If not specified, the script will try to automatically find it.",
|
|
35
|
+
)
|
|
36
|
+
args = parser.parse_args()
|
|
37
|
+
reflash_motors(args.serialport)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def reflash_motors(
|
|
41
|
+
serialport: Optional[str] = None, dont_light_up: bool = False
|
|
42
|
+
) -> None:
|
|
43
|
+
"""Reflash Reachy Mini's motors."""
|
|
44
|
+
console = Console()
|
|
45
|
+
|
|
46
|
+
config_file_path = str(
|
|
47
|
+
files(reachy_mini).joinpath("assets/config/hardware_config.yaml")
|
|
48
|
+
)
|
|
49
|
+
config = parse_yaml_config(config_file_path)
|
|
50
|
+
motors = list(config.motors.keys())
|
|
51
|
+
if serialport is None:
|
|
52
|
+
console.print(
|
|
53
|
+
"Which version of Reachy Mini are you using?",
|
|
54
|
+
)
|
|
55
|
+
wireless_choice = questionary.select(
|
|
56
|
+
">",
|
|
57
|
+
[
|
|
58
|
+
questionary.Choice("Lite", value=False),
|
|
59
|
+
questionary.Choice("Wireless", value=True),
|
|
60
|
+
],
|
|
61
|
+
).ask()
|
|
62
|
+
ports = find_serial_port(wireless_version=wireless_choice)
|
|
63
|
+
|
|
64
|
+
if len(ports) == 0:
|
|
65
|
+
raise RuntimeError(
|
|
66
|
+
"No Reachy Mini serial port found. "
|
|
67
|
+
"Check USB connection and permissions. "
|
|
68
|
+
"Or directly specify the serial port using --serialport."
|
|
69
|
+
)
|
|
70
|
+
elif len(ports) > 1:
|
|
71
|
+
raise RuntimeError(
|
|
72
|
+
f"Multiple Reachy Mini serial ports found {ports}."
|
|
73
|
+
"Please specify the serial port using --serialport."
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
serialport = ports[0]
|
|
77
|
+
console.print(f"Found Reachy Mini serial port: {serialport}", style="green")
|
|
78
|
+
|
|
79
|
+
for motor_name in motors:
|
|
80
|
+
motor_config = config.motors[motor_name]
|
|
81
|
+
|
|
82
|
+
from_id = motor_config.id
|
|
83
|
+
|
|
84
|
+
setup_motor(
|
|
85
|
+
motor_config,
|
|
86
|
+
serialport,
|
|
87
|
+
from_id=from_id,
|
|
88
|
+
from_baudrate=config.serial.baudrate,
|
|
89
|
+
target_baudrate=config.serial.baudrate,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
try:
|
|
93
|
+
check_configuration(
|
|
94
|
+
motor_config,
|
|
95
|
+
serialport,
|
|
96
|
+
baudrate=config.serial.baudrate,
|
|
97
|
+
)
|
|
98
|
+
except RuntimeError as e:
|
|
99
|
+
console.print(
|
|
100
|
+
f"❌ Configuration check failed for motor '{motor_name}': {e}",
|
|
101
|
+
style="red",
|
|
102
|
+
)
|
|
103
|
+
return
|
|
104
|
+
|
|
105
|
+
light_led_up(
|
|
106
|
+
serialport,
|
|
107
|
+
motor_config.id,
|
|
108
|
+
baudrate=config.serial.baudrate,
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
if dont_light_up:
|
|
112
|
+
light_led_down(
|
|
113
|
+
serialport,
|
|
114
|
+
motor_config.id,
|
|
115
|
+
baudrate=config.serial.baudrate,
|
|
116
|
+
)
|
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
"""Motor setup script for the Reachy Mini robot.
|
|
2
|
+
|
|
3
|
+
This script allows to configure the motors of the Reachy Mini robot by setting their ID, baudrate, offset, angle limits, return delay time, and removing the input voltage error.
|
|
4
|
+
|
|
5
|
+
The motor needs to be configured one by one, so you will need to connect only one motor at a time to the serial port. You can specify which motor to configure by passing its name as an argument.
|
|
6
|
+
|
|
7
|
+
If not specified, it assumes the motor is in the factory settings (ID 1 and baudrate 57600). If it's not the case, you will need to use a tool like Dynamixel Wizard to first reset it or manually specify the ID and baudrate.
|
|
8
|
+
|
|
9
|
+
Please note that all values given in the configuration file are in the motor's raw units.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import argparse
|
|
13
|
+
import time
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from rustypot import Xl330PyController
|
|
17
|
+
|
|
18
|
+
from reachy_mini.utils.hardware_config.parser import MotorConfig, parse_yaml_config
|
|
19
|
+
|
|
20
|
+
FACTORY_DEFAULT_ID = 1
|
|
21
|
+
FACTORY_DEFAULT_BAUDRATE = 57600
|
|
22
|
+
SERIAL_TIMEOUT = 0.01 # seconds
|
|
23
|
+
MOTOR_SETUP_DELAY = 0.1 # seconds
|
|
24
|
+
|
|
25
|
+
XL_BAUDRATE_CONV_TABLE = {
|
|
26
|
+
9600: 0,
|
|
27
|
+
57600: 1,
|
|
28
|
+
115200: 2,
|
|
29
|
+
1000000: 3,
|
|
30
|
+
2000000: 4,
|
|
31
|
+
3000000: 5,
|
|
32
|
+
4000000: 6,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def setup_motor(
|
|
37
|
+
motor_config: MotorConfig,
|
|
38
|
+
serial_port: str,
|
|
39
|
+
from_baudrate: int,
|
|
40
|
+
target_baudrate: int,
|
|
41
|
+
from_id: int,
|
|
42
|
+
) -> None:
|
|
43
|
+
"""Set up the motor with the given configuration."""
|
|
44
|
+
if not lookup_for_motor(
|
|
45
|
+
serial_port,
|
|
46
|
+
from_id,
|
|
47
|
+
from_baudrate,
|
|
48
|
+
):
|
|
49
|
+
raise RuntimeError(
|
|
50
|
+
f"No motor found on port {serial_port}. "
|
|
51
|
+
f"Make sure the motor is in factory settings (ID {from_id} and baudrate {from_baudrate}) and connected to the specified port."
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
# Make sure the torque is disabled to be able to write EEPROM
|
|
55
|
+
disable_torque(serial_port, from_id, from_baudrate)
|
|
56
|
+
try:
|
|
57
|
+
if from_baudrate != target_baudrate:
|
|
58
|
+
change_baudrate(
|
|
59
|
+
serial_port,
|
|
60
|
+
id=from_id,
|
|
61
|
+
base_baudrate=from_baudrate,
|
|
62
|
+
target_baudrate=target_baudrate,
|
|
63
|
+
)
|
|
64
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
65
|
+
|
|
66
|
+
if from_id != motor_config.id:
|
|
67
|
+
change_id(
|
|
68
|
+
serial_port,
|
|
69
|
+
current_id=from_id,
|
|
70
|
+
new_id=motor_config.id,
|
|
71
|
+
baudrate=target_baudrate,
|
|
72
|
+
)
|
|
73
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
74
|
+
|
|
75
|
+
change_offset(
|
|
76
|
+
serial_port,
|
|
77
|
+
id=motor_config.id,
|
|
78
|
+
offset=motor_config.offset,
|
|
79
|
+
baudrate=target_baudrate,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
83
|
+
|
|
84
|
+
change_angle_limits(
|
|
85
|
+
serial_port,
|
|
86
|
+
id=motor_config.id,
|
|
87
|
+
angle_limit_min=motor_config.angle_limit_min,
|
|
88
|
+
angle_limit_max=motor_config.angle_limit_max,
|
|
89
|
+
baudrate=target_baudrate,
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
93
|
+
|
|
94
|
+
change_shutdown_error(
|
|
95
|
+
serial_port,
|
|
96
|
+
id=motor_config.id,
|
|
97
|
+
baudrate=target_baudrate,
|
|
98
|
+
shutdown_error=motor_config.shutdown_error,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
102
|
+
|
|
103
|
+
change_return_delay_time(
|
|
104
|
+
serial_port,
|
|
105
|
+
id=motor_config.id,
|
|
106
|
+
return_delay_time=motor_config.return_delay_time,
|
|
107
|
+
baudrate=target_baudrate,
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
111
|
+
|
|
112
|
+
change_operating_mode(
|
|
113
|
+
serial_port,
|
|
114
|
+
id=motor_config.id,
|
|
115
|
+
operating_mode=motor_config.operating_mode,
|
|
116
|
+
baudrate=target_baudrate,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
time.sleep(MOTOR_SETUP_DELAY)
|
|
120
|
+
except Exception as e:
|
|
121
|
+
print(f"Error while setting up motor ID {from_id}: {e}")
|
|
122
|
+
raise e
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
def lookup_for_motor(
|
|
126
|
+
serial_port: str, id: int, baudrate: int, silent: bool = False
|
|
127
|
+
) -> bool:
|
|
128
|
+
"""Check if a motor with the given ID is reachable on the specified serial port."""
|
|
129
|
+
if not silent:
|
|
130
|
+
print(
|
|
131
|
+
f"Looking for motor with ID {id} on port {serial_port}...",
|
|
132
|
+
end="",
|
|
133
|
+
flush=True,
|
|
134
|
+
)
|
|
135
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
136
|
+
ret = c.ping(id)
|
|
137
|
+
if not silent:
|
|
138
|
+
print(f"{'✅' if ret else '❌'}")
|
|
139
|
+
return ret
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def disable_torque(serial_port: str, id: int, baudrate: int) -> None:
|
|
143
|
+
"""Disable the torque of the motor with the given ID on the specified serial port."""
|
|
144
|
+
print(f"Disabling torque for motor with ID {id}...", end="", flush=True)
|
|
145
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
146
|
+
c.write_torque_enable(id, False)
|
|
147
|
+
print("✅")
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def change_baudrate(
|
|
151
|
+
serial_port: str, id: int, base_baudrate: int, target_baudrate: int
|
|
152
|
+
) -> None:
|
|
153
|
+
"""Change the baudrate of the motor with the given ID on the specified serial port."""
|
|
154
|
+
print(f"Changing baudrate to {target_baudrate}...", end="", flush=True)
|
|
155
|
+
c = Xl330PyController(serial_port, baudrate=base_baudrate, timeout=SERIAL_TIMEOUT)
|
|
156
|
+
c.write_baud_rate(id, XL_BAUDRATE_CONV_TABLE[target_baudrate])
|
|
157
|
+
print("✅")
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def change_id(serial_port: str, current_id: int, new_id: int, baudrate: int) -> None:
|
|
161
|
+
"""Change the ID of the motor with the given current ID on the specified serial port."""
|
|
162
|
+
print(f"Changing ID from {current_id} to {new_id}...", end="", flush=True)
|
|
163
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
164
|
+
c.write_id(current_id, new_id)
|
|
165
|
+
print("✅")
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def change_offset(serial_port: str, id: int, offset: int, baudrate: int) -> None:
|
|
169
|
+
"""Change the offset of the motor with the given ID on the specified serial port."""
|
|
170
|
+
print(f"Changing offset for motor with ID {id} to {offset}...", end="", flush=True)
|
|
171
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
172
|
+
c.write_homing_offset(id, offset)
|
|
173
|
+
print("✅")
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
def change_operating_mode(
|
|
177
|
+
serial_port: str, id: int, operating_mode: int, baudrate: int
|
|
178
|
+
) -> None:
|
|
179
|
+
"""Change the operating mode of the motor with the given ID on the specified serial port."""
|
|
180
|
+
print(
|
|
181
|
+
f"Changing operating mode for motor with ID {id} to {operating_mode}...",
|
|
182
|
+
end="",
|
|
183
|
+
flush=True,
|
|
184
|
+
)
|
|
185
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
186
|
+
c.write_operating_mode(id, operating_mode)
|
|
187
|
+
print("✅")
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def change_angle_limits(
|
|
191
|
+
serial_port: str,
|
|
192
|
+
id: int,
|
|
193
|
+
angle_limit_min: int,
|
|
194
|
+
angle_limit_max: int,
|
|
195
|
+
baudrate: int,
|
|
196
|
+
) -> None:
|
|
197
|
+
"""Change the angle limits of the motor with the given ID on the specified serial port."""
|
|
198
|
+
print(
|
|
199
|
+
f"Changing angle limits for motor with ID {id} to [{angle_limit_min}, {angle_limit_max}]...",
|
|
200
|
+
end="",
|
|
201
|
+
flush=True,
|
|
202
|
+
)
|
|
203
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
204
|
+
c.write_raw_min_position_limit(id, angle_limit_min)
|
|
205
|
+
c.write_raw_max_position_limit(id, angle_limit_max)
|
|
206
|
+
print("✅")
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
def change_shutdown_error(
|
|
210
|
+
serial_port: str, id: int, baudrate: int, shutdown_error: int
|
|
211
|
+
) -> None:
|
|
212
|
+
"""Change the shutdown error of the motor with the given ID on the specified serial port."""
|
|
213
|
+
print(
|
|
214
|
+
f"Changing shutdown error for motor with ID {id} to {shutdown_error}...",
|
|
215
|
+
end="",
|
|
216
|
+
flush=True,
|
|
217
|
+
)
|
|
218
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
219
|
+
c.write_shutdown(id, shutdown_error)
|
|
220
|
+
print("✅")
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def change_return_delay_time(
|
|
224
|
+
serial_port: str, id: int, return_delay_time: int, baudrate: int
|
|
225
|
+
) -> None:
|
|
226
|
+
"""Change the return delay time of the motor with the given ID on the specified serial port."""
|
|
227
|
+
print(
|
|
228
|
+
f"Changing return delay time for motor with ID {id} to {return_delay_time}...",
|
|
229
|
+
end="",
|
|
230
|
+
flush=True,
|
|
231
|
+
)
|
|
232
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
233
|
+
c.write_return_delay_time(id, return_delay_time)
|
|
234
|
+
print("✅")
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
def light_led_up(serial_port: str, id: int, baudrate: int) -> None:
|
|
238
|
+
"""Light the LED of the motor with the given ID on the specified serial port."""
|
|
239
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
240
|
+
|
|
241
|
+
trials = 0
|
|
242
|
+
|
|
243
|
+
while trials < 3:
|
|
244
|
+
try:
|
|
245
|
+
c.write_led(id, 1)
|
|
246
|
+
break
|
|
247
|
+
except RuntimeError as e:
|
|
248
|
+
print(f"Error while turning on LED for motor ID {id}: {e}")
|
|
249
|
+
trials += 1
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def light_led_down(serial_port: str, id: int, baudrate: int) -> None:
|
|
253
|
+
"""Light the LED of the motor with the given ID on the specified serial port."""
|
|
254
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
255
|
+
trials = 0
|
|
256
|
+
|
|
257
|
+
while trials < 3:
|
|
258
|
+
try:
|
|
259
|
+
c.write_led(id, 0)
|
|
260
|
+
break
|
|
261
|
+
except RuntimeError as e:
|
|
262
|
+
print(f"Error while turning off LED for motor ID {id}: {e}")
|
|
263
|
+
trials += 1
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
def check_configuration(
|
|
267
|
+
motor_config: MotorConfig, serial_port: str, baudrate: int
|
|
268
|
+
) -> None:
|
|
269
|
+
"""Check the configuration of the motor with the given ID on the specified serial port."""
|
|
270
|
+
c = Xl330PyController(serial_port, baudrate=baudrate, timeout=SERIAL_TIMEOUT)
|
|
271
|
+
|
|
272
|
+
print("Checking configuration...")
|
|
273
|
+
|
|
274
|
+
# Check if there is a motor with the desired ID
|
|
275
|
+
if not c.ping(motor_config.id):
|
|
276
|
+
raise RuntimeError(f"No motor with ID {motor_config.id} found, cannot proceed")
|
|
277
|
+
print(f"Found motor with ID {motor_config.id} ✅.")
|
|
278
|
+
|
|
279
|
+
# Read return delay time
|
|
280
|
+
return_delay = c.read_return_delay_time(motor_config.id)[0]
|
|
281
|
+
if return_delay != motor_config.return_delay_time:
|
|
282
|
+
raise RuntimeError(
|
|
283
|
+
f"Return delay time is {return_delay}, expected {motor_config.return_delay_time}"
|
|
284
|
+
)
|
|
285
|
+
print(f"Return delay time is correct: {return_delay} ✅.")
|
|
286
|
+
|
|
287
|
+
# Read operating mode
|
|
288
|
+
operating_mode = c.read_operating_mode(motor_config.id)[0]
|
|
289
|
+
if operating_mode != motor_config.operating_mode:
|
|
290
|
+
raise RuntimeError(
|
|
291
|
+
f"Operating mode is {operating_mode}, expected {motor_config.operating_mode}"
|
|
292
|
+
)
|
|
293
|
+
print(f"Operating mode is correct: {operating_mode} ✅.")
|
|
294
|
+
|
|
295
|
+
# Read angle limits
|
|
296
|
+
angle_limit_min = c.read_raw_min_position_limit(motor_config.id)[0]
|
|
297
|
+
angle_limit_max = c.read_raw_max_position_limit(motor_config.id)[0]
|
|
298
|
+
if angle_limit_min != motor_config.angle_limit_min:
|
|
299
|
+
raise RuntimeError(
|
|
300
|
+
f"Angle limit min is {angle_limit_min}, expected {motor_config.angle_limit_min}"
|
|
301
|
+
)
|
|
302
|
+
if angle_limit_max != motor_config.angle_limit_max:
|
|
303
|
+
raise RuntimeError(
|
|
304
|
+
f"Angle limit max is {angle_limit_max}, expected {motor_config.angle_limit_max}"
|
|
305
|
+
)
|
|
306
|
+
print(
|
|
307
|
+
f"Angle limits are correct: [{motor_config.angle_limit_min}, {motor_config.angle_limit_max}] ✅."
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# Read homing offset
|
|
311
|
+
offset = c.read_homing_offset(motor_config.id)[0]
|
|
312
|
+
if offset != motor_config.offset:
|
|
313
|
+
raise RuntimeError(f"Homing offset is {offset}, expected {motor_config.offset}")
|
|
314
|
+
print(f"Homing offset is correct: {offset} ✅.")
|
|
315
|
+
|
|
316
|
+
# Read shutdown
|
|
317
|
+
shutdown = c.read_shutdown(motor_config.id)[0]
|
|
318
|
+
if shutdown != motor_config.shutdown_error:
|
|
319
|
+
raise RuntimeError(
|
|
320
|
+
f"Shutdown is {shutdown}, expected {motor_config.shutdown_error}"
|
|
321
|
+
)
|
|
322
|
+
print(f"Shutdown error is correct: {shutdown} ✅.")
|
|
323
|
+
|
|
324
|
+
print("Configuration is correct ✅!")
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
def run(args: argparse.Namespace) -> None:
|
|
328
|
+
"""Entry point for the Reachy Mini motor configuration tool."""
|
|
329
|
+
config = parse_yaml_config(args.config_file)
|
|
330
|
+
|
|
331
|
+
if args.motor_name == "all":
|
|
332
|
+
motors = list(config.motors.keys())
|
|
333
|
+
else:
|
|
334
|
+
motors = [args.motor_name]
|
|
335
|
+
|
|
336
|
+
for motor_name in motors:
|
|
337
|
+
motor_config = config.motors[motor_name]
|
|
338
|
+
|
|
339
|
+
if args.update_config:
|
|
340
|
+
args.from_id = motor_config.id
|
|
341
|
+
args.from_baudrate = config.serial.baudrate
|
|
342
|
+
|
|
343
|
+
if not args.check_only:
|
|
344
|
+
setup_motor(
|
|
345
|
+
motor_config,
|
|
346
|
+
args.serialport,
|
|
347
|
+
from_id=args.from_id,
|
|
348
|
+
from_baudrate=args.from_baudrate,
|
|
349
|
+
target_baudrate=config.serial.baudrate,
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
try:
|
|
353
|
+
check_configuration(
|
|
354
|
+
motor_config,
|
|
355
|
+
args.serialport,
|
|
356
|
+
baudrate=config.serial.baudrate,
|
|
357
|
+
)
|
|
358
|
+
except RuntimeError as e:
|
|
359
|
+
print(f"❌ Configuration check failed for motor '{motor_name}': {e}")
|
|
360
|
+
return
|
|
361
|
+
|
|
362
|
+
light_led_up(
|
|
363
|
+
args.serialport,
|
|
364
|
+
motor_config.id,
|
|
365
|
+
baudrate=config.serial.baudrate,
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
if __name__ == "__main__":
|
|
370
|
+
"""Entry point for the Reachy Mini motor configuration tool."""
|
|
371
|
+
parser = argparse.ArgumentParser(description="Motor Configuration tool")
|
|
372
|
+
parser.add_argument(
|
|
373
|
+
"config_file",
|
|
374
|
+
type=Path,
|
|
375
|
+
help="Path to the hardware configuration file (default: hardware_config.yaml).",
|
|
376
|
+
)
|
|
377
|
+
parser.add_argument(
|
|
378
|
+
"motor_name",
|
|
379
|
+
type=str,
|
|
380
|
+
help="Name of the motor to configure.",
|
|
381
|
+
choices=[
|
|
382
|
+
"body_rotation",
|
|
383
|
+
"stewart_1",
|
|
384
|
+
"stewart_2",
|
|
385
|
+
"stewart_3",
|
|
386
|
+
"stewart_4",
|
|
387
|
+
"stewart_5",
|
|
388
|
+
"stewart_6",
|
|
389
|
+
"right_antenna",
|
|
390
|
+
"left_antenna",
|
|
391
|
+
"all",
|
|
392
|
+
],
|
|
393
|
+
)
|
|
394
|
+
parser.add_argument(
|
|
395
|
+
"serialport",
|
|
396
|
+
type=str,
|
|
397
|
+
help="Serial port for communication with the motor.",
|
|
398
|
+
)
|
|
399
|
+
parser.add_argument(
|
|
400
|
+
"--check-only",
|
|
401
|
+
action="store_true",
|
|
402
|
+
help="Only check the configuration without applying changes.",
|
|
403
|
+
)
|
|
404
|
+
parser.add_argument(
|
|
405
|
+
"--from-id",
|
|
406
|
+
type=int,
|
|
407
|
+
default=FACTORY_DEFAULT_ID,
|
|
408
|
+
help=f"Current ID of the motor (default: {FACTORY_DEFAULT_ID}).",
|
|
409
|
+
)
|
|
410
|
+
parser.add_argument(
|
|
411
|
+
"--from-baudrate",
|
|
412
|
+
type=int,
|
|
413
|
+
default=FACTORY_DEFAULT_BAUDRATE,
|
|
414
|
+
help=f"Current baudrate of the motor (default: {FACTORY_DEFAULT_BAUDRATE}).",
|
|
415
|
+
)
|
|
416
|
+
parser.add_argument(
|
|
417
|
+
"--update-config",
|
|
418
|
+
action="store_true",
|
|
419
|
+
help="Update a specific motor (assumes it already has the correct id and baudrate).",
|
|
420
|
+
)
|
|
421
|
+
args = parser.parse_args()
|
|
422
|
+
run(args)
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"""You need to `pip install gpiozero lgpio`."""
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import os
|
|
5
|
+
import time
|
|
6
|
+
from typing import List
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
from gpiozero import DigitalOutputDevice
|
|
10
|
+
from setup_motor import (
|
|
11
|
+
FACTORY_DEFAULT_BAUDRATE,
|
|
12
|
+
FACTORY_DEFAULT_ID,
|
|
13
|
+
light_led_down,
|
|
14
|
+
lookup_for_motor,
|
|
15
|
+
parse_yaml_config,
|
|
16
|
+
run,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
assets_root_path = "../src/reachy_mini/assets/"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
UART_PORT = "/dev/ttyAMA3"
|
|
23
|
+
CONFIG_FILE_PATH = os.path.join(assets_root_path, "config", "hardware_config.yaml")
|
|
24
|
+
|
|
25
|
+
ID_TO_CHANNEL = {
|
|
26
|
+
10: 0,
|
|
27
|
+
11: 1,
|
|
28
|
+
12: 2,
|
|
29
|
+
13: 3,
|
|
30
|
+
14: 4,
|
|
31
|
+
15: 5,
|
|
32
|
+
16: 6,
|
|
33
|
+
17: 7,
|
|
34
|
+
18: 8,
|
|
35
|
+
}
|
|
36
|
+
CHANNEL_TO_ID = {v: k for k, v in ID_TO_CHANNEL.items()}
|
|
37
|
+
|
|
38
|
+
S0 = DigitalOutputDevice(25)
|
|
39
|
+
S1 = DigitalOutputDevice(8)
|
|
40
|
+
S2 = DigitalOutputDevice(7)
|
|
41
|
+
S3 = DigitalOutputDevice(1)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def get_channel_binary(channel: int) -> List[int]:
|
|
45
|
+
"""Convert channel number (0-8) to 4-bit binary representation."""
|
|
46
|
+
assert channel in np.arange(9), "Channel must be between 0 and 8"
|
|
47
|
+
bits = [int(b) for b in f"{channel:04b}"] # 4-bit binary
|
|
48
|
+
return bits[::-1] # flip the order
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def select_channel(channel: int) -> None:
|
|
52
|
+
"""Select a channel on the multiplexer."""
|
|
53
|
+
bits = get_channel_binary(channel)
|
|
54
|
+
S0.on() if bits[0] else S0.off()
|
|
55
|
+
S1.on() if bits[1] else S1.off()
|
|
56
|
+
S2.on() if bits[2] else S2.off()
|
|
57
|
+
S3.on() if bits[3] else S3.off()
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def main() -> None:
|
|
61
|
+
"""Scan all channels of the multiplexer to find motors in factory default state, and set them up one by one."""
|
|
62
|
+
config = parse_yaml_config(CONFIG_FILE_PATH)
|
|
63
|
+
motor_name_to_id = {m: config.motors[m].id for m in config.motors}
|
|
64
|
+
id_to_motor_name = {v: k for k, v in motor_name_to_id.items()}
|
|
65
|
+
|
|
66
|
+
print("Starting motor setup...")
|
|
67
|
+
current_channel = 0
|
|
68
|
+
while True:
|
|
69
|
+
current_channel = (current_channel + 1) % 9
|
|
70
|
+
select_channel(current_channel)
|
|
71
|
+
target_id = CHANNEL_TO_ID[current_channel]
|
|
72
|
+
target_name = id_to_motor_name[target_id]
|
|
73
|
+
if lookup_for_motor(
|
|
74
|
+
UART_PORT, FACTORY_DEFAULT_ID, FACTORY_DEFAULT_BAUDRATE, silent=True
|
|
75
|
+
):
|
|
76
|
+
print(f"Found motor on channel {current_channel}!")
|
|
77
|
+
args = argparse.Namespace(
|
|
78
|
+
config_file=CONFIG_FILE_PATH,
|
|
79
|
+
motor_name=target_name,
|
|
80
|
+
serialport=UART_PORT,
|
|
81
|
+
check_only=False,
|
|
82
|
+
from_id=FACTORY_DEFAULT_ID,
|
|
83
|
+
from_baudrate=FACTORY_DEFAULT_BAUDRATE,
|
|
84
|
+
update_config=False,
|
|
85
|
+
)
|
|
86
|
+
run(args)
|
|
87
|
+
|
|
88
|
+
elif lookup_for_motor(UART_PORT, current_channel + 10, 1000000, silent=True):
|
|
89
|
+
print(f"Motor on channel {current_channel} already set up.")
|
|
90
|
+
# light_led_up(UART_PORT, current_channel+10, 1000000)
|
|
91
|
+
light_led_down(UART_PORT, current_channel + 10, 1000000)
|
|
92
|
+
args = argparse.Namespace(
|
|
93
|
+
config_file=CONFIG_FILE_PATH,
|
|
94
|
+
motor_name=target_name,
|
|
95
|
+
serialport=UART_PORT,
|
|
96
|
+
check_only=False,
|
|
97
|
+
from_id=current_channel + 10,
|
|
98
|
+
from_baudrate=1000000,
|
|
99
|
+
update_config=False,
|
|
100
|
+
)
|
|
101
|
+
run(args)
|
|
102
|
+
time.sleep(2)
|
|
103
|
+
|
|
104
|
+
time.sleep(0.01)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
if __name__ == "__main__":
|
|
108
|
+
main()
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Utility functions for Reachy Mini.
|
|
2
|
+
|
|
3
|
+
These functions provide various utilities such as creating head poses, performing minimum jerk interpolation,
|
|
4
|
+
checking if the Reachy Mini daemon is running, and performing linear pose interpolation.
|
|
5
|
+
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import numpy as np
|
|
9
|
+
import numpy.typing as npt
|
|
10
|
+
from scipy.spatial.transform import Rotation as R
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def create_head_pose(
|
|
14
|
+
x: float = 0,
|
|
15
|
+
y: float = 0,
|
|
16
|
+
z: float = 0,
|
|
17
|
+
roll: float = 0,
|
|
18
|
+
pitch: float = 0,
|
|
19
|
+
yaw: float = 0,
|
|
20
|
+
mm: bool = False,
|
|
21
|
+
degrees: bool = True,
|
|
22
|
+
) -> npt.NDArray[np.float64]:
|
|
23
|
+
"""Create a homogeneous transformation matrix representing a pose in 6D space (position and orientation).
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
x (float): X coordinate of the position.
|
|
27
|
+
y (float): Y coordinate of the position.
|
|
28
|
+
z (float): Z coordinate of the position.
|
|
29
|
+
roll (float): Roll angle
|
|
30
|
+
pitch (float): Pitch angle
|
|
31
|
+
yaw (float): Yaw angle
|
|
32
|
+
mm (bool): If True, convert position from millimeters to meters.
|
|
33
|
+
degrees (bool): If True, interpret roll, pitch, and yaw as degrees; otherwise as radians.
|
|
34
|
+
|
|
35
|
+
Returns:
|
|
36
|
+
np.ndarray: A 4x4 homogeneous transformation matrix representing the pose.
|
|
37
|
+
|
|
38
|
+
"""
|
|
39
|
+
pose = np.eye(4)
|
|
40
|
+
rot = R.from_euler("xyz", [roll, pitch, yaw], degrees=degrees).as_matrix()
|
|
41
|
+
pose[:3, :3] = rot
|
|
42
|
+
pose[:, 3] = [x, y, z, 1]
|
|
43
|
+
if mm:
|
|
44
|
+
pose[:3, 3] /= 1000
|
|
45
|
+
|
|
46
|
+
return pose
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Utility constants for the reachy_mini package."""
|
|
2
|
+
|
|
3
|
+
from importlib.resources import files
|
|
4
|
+
|
|
5
|
+
import reachy_mini
|
|
6
|
+
|
|
7
|
+
URDF_ROOT_PATH: str = str(files(reachy_mini).joinpath("descriptions/reachy_mini/urdf"))
|
|
8
|
+
ASSETS_ROOT_PATH: str = str(files(reachy_mini).joinpath("assets/"))
|
|
9
|
+
MODELS_ROOT_PATH: str = str(files(reachy_mini).joinpath("assets/models"))
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Hardware configuration utilities."""
|