reachy-mini 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of reachy-mini might be problematic. Click here for more details.
- reachy_mini/__init__.py +4 -0
- reachy_mini/apps/__init__.py +24 -0
- reachy_mini/apps/app.py +121 -0
- reachy_mini/apps/manager.py +183 -0
- reachy_mini/apps/sources/__init__.py +4 -0
- reachy_mini/apps/sources/hf_space.py +25 -0
- reachy_mini/apps/sources/local_common_venv.py +44 -0
- reachy_mini/apps/templates/README.md.j2 +1 -0
- reachy_mini/apps/templates/main.py.j2 +46 -0
- reachy_mini/apps/templates/pyproject.toml.j2 +18 -0
- reachy_mini/apps/utils.py +30 -0
- reachy_mini/assets/config/hardware_config.yaml +119 -0
- reachy_mini/assets/confused1.wav +0 -0
- reachy_mini/assets/count.wav +0 -0
- reachy_mini/assets/dance1.wav +0 -0
- reachy_mini/assets/go_sleep.wav +0 -0
- reachy_mini/assets/impatient1.wav +0 -0
- reachy_mini/assets/kinematics_data.json +253 -0
- reachy_mini/assets/models/fknetwork.dynamic.onnx +0 -0
- reachy_mini/assets/models/fknetwork.onnx +0 -0
- reachy_mini/assets/models/fknetwork_int8.onnx +0 -0
- reachy_mini/assets/models/iknetwork.onnx +0 -0
- reachy_mini/assets/wake_up.wav +0 -0
- reachy_mini/daemon/__init__.py +1 -0
- reachy_mini/daemon/app/__init__.py +1 -0
- reachy_mini/daemon/app/bg_job_register.py +142 -0
- reachy_mini/daemon/app/dashboard/static/assets/KO-cartoon-static.svg +40 -0
- reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon-static.svg +42 -0
- reachy_mini/daemon/app/dashboard/static/assets/awake-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/go-to-sleep-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon-static.svg +50 -0
- reachy_mini/daemon/app/dashboard/static/assets/no-wifi-cartoon.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-awake.svg +18 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-connection-lost-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-go-to-sleep-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-ko.svg +22 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping-static.svg +41 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-sleeping.svg +18 -0
- reachy_mini/daemon/app/dashboard/static/assets/reachy-mini-wake-up-animation.svg +6 -0
- reachy_mini/daemon/app/dashboard/static/js/3rdparty/gstwebrtc-api-2.0.0.min.js +5 -0
- reachy_mini/daemon/app/dashboard/static/js/apps.js +304 -0
- reachy_mini/daemon/app/dashboard/static/js/appstore.js +150 -0
- reachy_mini/daemon/app/dashboard/static/js/daemon.js +163 -0
- reachy_mini/daemon/app/dashboard/static/js/move_player.js +132 -0
- reachy_mini/daemon/app/dashboard/static/js/setup_wifi.js +94 -0
- reachy_mini/daemon/app/dashboard/static/js/update.js +80 -0
- reachy_mini/daemon/app/dashboard/static/style.css +83 -0
- reachy_mini/daemon/app/dashboard/templates/base.html +23 -0
- reachy_mini/daemon/app/dashboard/templates/index.html +17 -0
- reachy_mini/daemon/app/dashboard/templates/sections/apps.html +8 -0
- reachy_mini/daemon/app/dashboard/templates/sections/appstore.html +29 -0
- reachy_mini/daemon/app/dashboard/templates/sections/daemon.html +36 -0
- reachy_mini/daemon/app/dashboard/templates/sections/move_player.html +27 -0
- reachy_mini/daemon/app/dashboard/update.html +22 -0
- reachy_mini/daemon/app/dashboard/wifi_config.html +41 -0
- reachy_mini/daemon/app/dependencies.py +41 -0
- reachy_mini/daemon/app/main.py +262 -0
- reachy_mini/daemon/app/models.py +147 -0
- reachy_mini/daemon/app/routers/apps.py +114 -0
- reachy_mini/daemon/app/routers/daemon.py +80 -0
- reachy_mini/daemon/app/routers/kinematics.py +57 -0
- reachy_mini/daemon/app/routers/motors.py +41 -0
- reachy_mini/daemon/app/routers/move.py +257 -0
- reachy_mini/daemon/app/routers/state.py +146 -0
- reachy_mini/daemon/backend/__init__.py +1 -0
- reachy_mini/daemon/backend/abstract.py +750 -0
- reachy_mini/daemon/backend/mujoco/__init__.py +36 -0
- reachy_mini/daemon/backend/mujoco/backend.py +304 -0
- reachy_mini/daemon/backend/mujoco/utils.py +59 -0
- reachy_mini/daemon/backend/mujoco/video_udp.py +53 -0
- reachy_mini/daemon/backend/robot/__init__.py +8 -0
- reachy_mini/daemon/backend/robot/backend.py +535 -0
- reachy_mini/daemon/daemon.py +444 -0
- reachy_mini/daemon/utils.py +114 -0
- reachy_mini/descriptions/reachy_mini/mjcf/additional.xml +6 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/5w_speaker.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_body_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_l_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_holder_r_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/antenna_interface_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/arducam.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/b3b_eh_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bearing_85x110x13.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/big_lens_d40.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_down_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_foot_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_top_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/body_turning_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/bts2_m2_6x8.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/croissant_1k.obj +5021 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/croissant_1k.blend/textures/croissant_diff_1k.png +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_b_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_f_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_case_m_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_horn_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/food_apple_01_1k.obj +18045 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/food_apple_01_1k.blend/textures/food_apple_01_diff_1k.png +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/glasses_dolder_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_back_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_front_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/head_mic_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d30_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/lens_cap_d40_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/mp01062_stewart_arm_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/neck_reference_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/pp01102_arducam_carter.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/rubber_duck_toy_1k.obj +8940 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/rubber_duck_toy_1k.blend/textures/rubber_duck_toy_diff_1k.png +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/small_lens_d30.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_ball__2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_link_rod.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_main_plate_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/stewart_tricap_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/textures/wooden_table_02_diff_1k.png +0 -0
- reachy_mini/descriptions/reachy_mini/mjcf/assets/wooden_table_02_1k.blend/wooden_table_02_1k.obj +485 -0
- reachy_mini/descriptions/reachy_mini/mjcf/config.json +21 -0
- reachy_mini/descriptions/reachy_mini/mjcf/joints_properties.xml +29 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml +613 -0
- reachy_mini/descriptions/reachy_mini/mjcf/reachy_mini.xml.bak +442 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scene.xml +24 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/empty.xml +27 -0
- reachy_mini/descriptions/reachy_mini/mjcf/scenes/minimal.xml +131 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/5w_speaker.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_body_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_l_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_holder_r_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/antenna_interface_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arducam.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/arm.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/b3b_eh_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/ball.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bearing_85x110x13.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/big_lens_d40.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_down_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_foot_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_top_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/body_turning_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bottom_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/bts2_m2_6x8.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_b_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_f_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_case_m_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_horn_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/dc15_a01_led_cap2_dummy.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_default.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/drive_palonier__configuration_simple_axe.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/eye_support.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/foot.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/glasses_dolder_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_back_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_front_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_head_back.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_interface.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_mic_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/head_shell_front.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d30_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/lens_cap_d40_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_fisheye_lens_1_8mm.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/m12_lens.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/main_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mid_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/mp01062_stewart_arm_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/neck_reference_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_1.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/phs_1_7x20_5_dc10_3.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/plateform.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp00xxx_stewart_rod.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01062_stewart_arm.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01063_stewart_plateform.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01064_stewart_main_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01065_stewart_side_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01066_stewart_mid_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01067_bottom_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01068_top_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01069_head_shell_front.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01070_head_head_back.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01071_turning_bowl.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01072_turning_end.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01078_glasses.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01079_back_big_eye.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01080_back_small_eye.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/pp01102_arducam_carter.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/rod.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/shape.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/side_plate.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/small_lens_d30.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_ball__2.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_link_rod.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_main_plate_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/stewart_tricap_3dprint.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/test_antenna_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/top_body.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/turning_bowl.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.part +13 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/uc_a37_rev_a_step.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_default.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0122topcabinetcase_95__configuration_simple_axe.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_default.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0123middlecase_56__configuration_simple_axe.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_default.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.part +14 -0
- reachy_mini/descriptions/reachy_mini/urdf/assets/wj_wk00_0124bottomcase_45__configuration_simple_axe.stl +0 -0
- reachy_mini/descriptions/reachy_mini/urdf/config.json +18 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf +3281 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot.urdf.bak +3282 -0
- reachy_mini/descriptions/reachy_mini/urdf/robot_no_collision.urdf +2316 -0
- reachy_mini/io/__init__.py +1 -0
- reachy_mini/io/abstract.py +70 -0
- reachy_mini/io/protocol.py +44 -0
- reachy_mini/io/zenoh_client.py +258 -0
- reachy_mini/io/zenoh_server.py +183 -0
- reachy_mini/kinematics/__init__.py +68 -0
- reachy_mini/kinematics/analytical_kinematics.py +102 -0
- reachy_mini/kinematics/nn_kinematics.py +100 -0
- reachy_mini/kinematics/placo_kinematics.py +666 -0
- reachy_mini/media/__init__.py +1 -0
- reachy_mini/media/audio_base.py +163 -0
- reachy_mini/media/audio_gstreamer.py +195 -0
- reachy_mini/media/audio_sounddevice.py +226 -0
- reachy_mini/media/audio_utils.py +27 -0
- reachy_mini/media/camera_base.py +63 -0
- reachy_mini/media/camera_constants.py +13 -0
- reachy_mini/media/camera_gstreamer.py +162 -0
- reachy_mini/media/camera_opencv.py +61 -0
- reachy_mini/media/camera_utils.py +60 -0
- reachy_mini/media/media_manager.py +194 -0
- reachy_mini/motion/__init__.py +4 -0
- reachy_mini/motion/goto.py +71 -0
- reachy_mini/motion/move.py +36 -0
- reachy_mini/motion/recorded_move.py +132 -0
- reachy_mini/reachy_mini.py +705 -0
- reachy_mini/utils/__init__.py +46 -0
- reachy_mini/utils/constants.py +9 -0
- reachy_mini/utils/interpolation.py +227 -0
- reachy_mini/utils/parse_urdf_for_kinematics.py +110 -0
- reachy_mini/utils/rerun.py +546 -0
- reachy_mini-1.0.0.dist-info/METADATA +286 -0
- reachy_mini-1.0.0.dist-info/RECORD +385 -0
- reachy_mini-1.0.0.dist-info/WHEEL +5 -0
- reachy_mini-1.0.0.dist-info/entry_points.txt +3 -0
- reachy_mini-1.0.0.dist-info/licenses/LICENSE +201 -0
- reachy_mini-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
"""Rerun logging for Reachy Mini.
|
|
2
|
+
|
|
3
|
+
This module provides functionality to log the state of the Reachy Mini robot to Rerun,
|
|
4
|
+
a tool for visualizing and debugging robotic systems.
|
|
5
|
+
|
|
6
|
+
It includes methods to log joint positions, camera images, and other relevant data.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import json
|
|
10
|
+
import logging
|
|
11
|
+
import os
|
|
12
|
+
import tempfile
|
|
13
|
+
import time
|
|
14
|
+
from threading import Event, Thread
|
|
15
|
+
from typing import List, Optional
|
|
16
|
+
|
|
17
|
+
import cv2
|
|
18
|
+
import numpy as np
|
|
19
|
+
import requests
|
|
20
|
+
import rerun as rr
|
|
21
|
+
|
|
22
|
+
try:
|
|
23
|
+
from rerun_loader_urdf import URDFLogger
|
|
24
|
+
except ImportError:
|
|
25
|
+
raise ImportError(
|
|
26
|
+
"The 'rerun-loader-urdf' package is required for this module. "
|
|
27
|
+
"Please install it from the GitHub repository: "
|
|
28
|
+
"pip install git+https://github.com/rerun-io/rerun-loader-python-example-urdf.git"
|
|
29
|
+
)
|
|
30
|
+
from urdf_parser_py import urdf
|
|
31
|
+
|
|
32
|
+
from reachy_mini.kinematics.placo_kinematics import PlacoKinematics
|
|
33
|
+
from reachy_mini.media.media_manager import MediaBackend
|
|
34
|
+
from reachy_mini.reachy_mini import ReachyMini
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class Rerun:
|
|
38
|
+
"""Rerun logging for Reachy Mini."""
|
|
39
|
+
|
|
40
|
+
def __init__(
|
|
41
|
+
self,
|
|
42
|
+
reachymini: ReachyMini,
|
|
43
|
+
app_id: str = "reachy_mini_rerun",
|
|
44
|
+
spawn: bool = True,
|
|
45
|
+
):
|
|
46
|
+
"""Initialize the Rerun logging for Reachy Mini.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
reachymini (ReachyMini): The Reachy Mini instance to log.
|
|
50
|
+
app_id (str): The application ID for Rerun. Defaults to reachy_mini_daemon.
|
|
51
|
+
spawn (bool): If True, spawn the Rerun server. Defaults to True.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
rr.init(app_id, spawn=spawn)
|
|
55
|
+
self.app_id = app_id
|
|
56
|
+
self._reachymini = reachymini
|
|
57
|
+
self.logger = logging.getLogger(__name__)
|
|
58
|
+
self.logger.setLevel(reachymini.logger.getEffectiveLevel())
|
|
59
|
+
|
|
60
|
+
self._robot_ip = "localhost"
|
|
61
|
+
if self._reachymini.client.get_status()["wireless_version"]:
|
|
62
|
+
self._robot_ip = self._reachymini.client.get_status()["wlan_ip"]
|
|
63
|
+
|
|
64
|
+
self.recording = rr.get_global_data_recording()
|
|
65
|
+
|
|
66
|
+
script_dir = os.path.dirname(os.path.abspath(__file__))
|
|
67
|
+
|
|
68
|
+
urdf_path = os.path.join(
|
|
69
|
+
script_dir, "../descriptions/reachy_mini/urdf/robot.urdf"
|
|
70
|
+
)
|
|
71
|
+
asset_path = os.path.join(script_dir, "../descriptions/reachy_mini/urdf")
|
|
72
|
+
|
|
73
|
+
fixed_urdf = self.set_absolute_path_to_urdf(urdf_path, asset_path)
|
|
74
|
+
self.logger.debug(
|
|
75
|
+
f"Using URDF file: {fixed_urdf} with absolute paths for Rerun."
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
self.head_kinematics = PlacoKinematics(fixed_urdf)
|
|
79
|
+
|
|
80
|
+
self.urdf_logger = URDFLogger(fixed_urdf, "ReachyMini")
|
|
81
|
+
self.urdf_logger.log(recording=self.recording)
|
|
82
|
+
|
|
83
|
+
self.running = Event()
|
|
84
|
+
self.thread_log_camera: Optional[Thread] = None
|
|
85
|
+
if (
|
|
86
|
+
reachymini.media.backend == MediaBackend.GSTREAMER
|
|
87
|
+
or reachymini.media.backend == MediaBackend.DEFAULT
|
|
88
|
+
):
|
|
89
|
+
self.thread_log_camera = Thread(target=self.log_camera, daemon=True)
|
|
90
|
+
self.thread_log_movements = Thread(target=self.log_movements, daemon=True)
|
|
91
|
+
|
|
92
|
+
def set_absolute_path_to_urdf(self, urdf_path: str, abs_path: str) -> str:
|
|
93
|
+
"""Set the absolute paths in the URDF file. Rerun cannot read the "package://" paths."""
|
|
94
|
+
with open(urdf_path, "r") as f:
|
|
95
|
+
urdf_content = f.read()
|
|
96
|
+
urdf_content_mod = urdf_content.replace("package://", f"file://{abs_path}/")
|
|
97
|
+
|
|
98
|
+
with tempfile.NamedTemporaryFile("w", delete=False, suffix=".urdf") as tmp_file:
|
|
99
|
+
tmp_file.write(urdf_content_mod)
|
|
100
|
+
return tmp_file.name
|
|
101
|
+
|
|
102
|
+
def start(self) -> None:
|
|
103
|
+
"""Start the Rerun logging thread."""
|
|
104
|
+
if self.thread_log_camera is not None:
|
|
105
|
+
self.thread_log_camera.start()
|
|
106
|
+
self.thread_log_movements.start()
|
|
107
|
+
|
|
108
|
+
def stop(self) -> None:
|
|
109
|
+
"""Stop the Rerun logging thread."""
|
|
110
|
+
self.running.set()
|
|
111
|
+
|
|
112
|
+
def _get_joint(self, joint_name: str) -> urdf.Joint:
|
|
113
|
+
for j in self.urdf_logger.urdf.joints:
|
|
114
|
+
if j.name == joint_name:
|
|
115
|
+
return j
|
|
116
|
+
raise RuntimeError("Invalid joint name")
|
|
117
|
+
|
|
118
|
+
def _set_rod_rotation(
|
|
119
|
+
self,
|
|
120
|
+
joint_rot: float,
|
|
121
|
+
joint: urdf.Joint,
|
|
122
|
+
joint_path: str,
|
|
123
|
+
urdf_offset: List[float],
|
|
124
|
+
id_rotation: int,
|
|
125
|
+
) -> None:
|
|
126
|
+
urdf_offset[id_rotation] += joint_rot
|
|
127
|
+
joint.origin.rotation = urdf_offset
|
|
128
|
+
|
|
129
|
+
self.urdf_logger.log_joint(joint_path, joint=joint, recording=self.recording)
|
|
130
|
+
|
|
131
|
+
def log_camera(self) -> None:
|
|
132
|
+
"""Log the camera image to Rerun."""
|
|
133
|
+
if self._reachymini.media.camera is None:
|
|
134
|
+
self.logger.warning("Camera is not initialized.")
|
|
135
|
+
return
|
|
136
|
+
|
|
137
|
+
self.logger.info("Starting camera logging to Rerun.")
|
|
138
|
+
|
|
139
|
+
while not self.running.is_set():
|
|
140
|
+
rr.set_time("reachymini", timestamp=time.time(), recording=self.recording)
|
|
141
|
+
frame = self._reachymini.media.get_frame()
|
|
142
|
+
if frame is not None:
|
|
143
|
+
if isinstance(frame, bytes):
|
|
144
|
+
self.logger.warning(
|
|
145
|
+
"Received frame is jpeg. Please use default backend."
|
|
146
|
+
)
|
|
147
|
+
return
|
|
148
|
+
|
|
149
|
+
cam_name = self._get_joint("camera_optical_frame")
|
|
150
|
+
cam_joint = self.urdf_logger.joint_entity_path(cam_name)
|
|
151
|
+
else:
|
|
152
|
+
return
|
|
153
|
+
|
|
154
|
+
K = np.array(
|
|
155
|
+
[
|
|
156
|
+
[550.3564, 0.0, 638.0112],
|
|
157
|
+
[0.0, 549.1653, 364.589],
|
|
158
|
+
[0.0, 0.0, 1.0],
|
|
159
|
+
]
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
# camera optical frame from URDF
|
|
163
|
+
cam_name.origin.rotation = [2.92045, 1.01151, 1.9102]
|
|
164
|
+
cam_name.origin.position = [-0.0321159, -0.05047, 0.00257878]
|
|
165
|
+
self.urdf_logger.log_joint(
|
|
166
|
+
cam_joint, joint=cam_name, recording=self.recording
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
rr.log(
|
|
170
|
+
f"{cam_joint}/image",
|
|
171
|
+
rr.Pinhole(
|
|
172
|
+
image_from_camera=rr.datatypes.Mat3x3(K),
|
|
173
|
+
width=frame.shape[1],
|
|
174
|
+
height=frame.shape[0],
|
|
175
|
+
image_plane_distance=0.8,
|
|
176
|
+
camera_xyz=rr.ViewCoordinates.RDF,
|
|
177
|
+
),
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
ret, encoded_image = cv2.imencode(".jpg", frame)
|
|
181
|
+
if ret:
|
|
182
|
+
rr.log(
|
|
183
|
+
f"{cam_joint}/image",
|
|
184
|
+
rr.EncodedImage(contents=encoded_image, media_type="image/jpeg"),
|
|
185
|
+
)
|
|
186
|
+
else:
|
|
187
|
+
self.logger.error("Failed to encode frame to JPEG.")
|
|
188
|
+
|
|
189
|
+
time.sleep(0.3) # ~30fps
|
|
190
|
+
|
|
191
|
+
def log_movements(self) -> None:
|
|
192
|
+
"""Log the movement data to Rerun."""
|
|
193
|
+
antenna_left = self._get_joint("left_antenna")
|
|
194
|
+
antenna_left_joint = self.urdf_logger.joint_entity_path(antenna_left)
|
|
195
|
+
antenna_right = self._get_joint("right_antenna")
|
|
196
|
+
antenna_right_joint = self.urdf_logger.joint_entity_path(antenna_right)
|
|
197
|
+
|
|
198
|
+
motor_1 = self._get_joint("stewart_1")
|
|
199
|
+
motor_1_joint = self.urdf_logger.joint_entity_path(motor_1)
|
|
200
|
+
motor_2 = self._get_joint("stewart_2")
|
|
201
|
+
motor_2_joint = self.urdf_logger.joint_entity_path(motor_2)
|
|
202
|
+
motor_3 = self._get_joint("stewart_3")
|
|
203
|
+
motor_3_joint = self.urdf_logger.joint_entity_path(motor_3)
|
|
204
|
+
motor_4 = self._get_joint("stewart_4")
|
|
205
|
+
motor_4_joint = self.urdf_logger.joint_entity_path(motor_4)
|
|
206
|
+
motor_5 = self._get_joint("stewart_5")
|
|
207
|
+
motor_5_joint = self.urdf_logger.joint_entity_path(motor_5)
|
|
208
|
+
motor_6 = self._get_joint("stewart_6")
|
|
209
|
+
motor_6_joint = self.urdf_logger.joint_entity_path(motor_6)
|
|
210
|
+
motor_yaw = self._get_joint("yaw_body")
|
|
211
|
+
motor_yaw_joint = self.urdf_logger.joint_entity_path(motor_yaw)
|
|
212
|
+
|
|
213
|
+
passive_1_x = self._get_joint("passive_1_x")
|
|
214
|
+
passive_1_x_joint = self.urdf_logger.joint_entity_path(passive_1_x)
|
|
215
|
+
passive_1_y = self._get_joint("passive_1_y")
|
|
216
|
+
passive_1_y_joint = self.urdf_logger.joint_entity_path(passive_1_y)
|
|
217
|
+
passive_1_z = self._get_joint("passive_1_z")
|
|
218
|
+
passive_1_z_joint = self.urdf_logger.joint_entity_path(passive_1_z)
|
|
219
|
+
|
|
220
|
+
passive_2_x = self._get_joint("passive_2_x")
|
|
221
|
+
passive_2_x_joint = self.urdf_logger.joint_entity_path(passive_2_x)
|
|
222
|
+
passive_2_y = self._get_joint("passive_2_y")
|
|
223
|
+
passive_2_y_joint = self.urdf_logger.joint_entity_path(passive_2_y)
|
|
224
|
+
passive_2_z = self._get_joint("passive_2_z")
|
|
225
|
+
passive_2_z_joint = self.urdf_logger.joint_entity_path(passive_2_z)
|
|
226
|
+
|
|
227
|
+
passive_3_x = self._get_joint("passive_3_x")
|
|
228
|
+
passive_3_x_joint = self.urdf_logger.joint_entity_path(passive_3_x)
|
|
229
|
+
passive_3_y = self._get_joint("passive_3_y")
|
|
230
|
+
passive_3_y_joint = self.urdf_logger.joint_entity_path(passive_3_y)
|
|
231
|
+
passive_3_z = self._get_joint("passive_3_z")
|
|
232
|
+
passive_3_z_joint = self.urdf_logger.joint_entity_path(passive_3_z)
|
|
233
|
+
|
|
234
|
+
passive_4_x = self._get_joint("passive_4_x")
|
|
235
|
+
passive_4_x_joint = self.urdf_logger.joint_entity_path(passive_4_x)
|
|
236
|
+
passive_4_y = self._get_joint("passive_4_y")
|
|
237
|
+
passive_4_y_joint = self.urdf_logger.joint_entity_path(passive_4_y)
|
|
238
|
+
passive_4_z = self._get_joint("passive_4_z")
|
|
239
|
+
passive_4_z_joint = self.urdf_logger.joint_entity_path(passive_4_z)
|
|
240
|
+
|
|
241
|
+
passive_5_x = self._get_joint("passive_5_x")
|
|
242
|
+
passive_5_x_joint = self.urdf_logger.joint_entity_path(passive_5_x)
|
|
243
|
+
passive_5_y = self._get_joint("passive_5_y")
|
|
244
|
+
passive_5_y_joint = self.urdf_logger.joint_entity_path(passive_5_y)
|
|
245
|
+
passive_5_z = self._get_joint("passive_5_z")
|
|
246
|
+
passive_5_z_joint = self.urdf_logger.joint_entity_path(passive_5_z)
|
|
247
|
+
|
|
248
|
+
passive_6_x = self._get_joint("passive_6_x")
|
|
249
|
+
passive_6_x_joint = self.urdf_logger.joint_entity_path(passive_6_x)
|
|
250
|
+
passive_6_y = self._get_joint("passive_6_y")
|
|
251
|
+
passive_6_y_joint = self.urdf_logger.joint_entity_path(passive_6_y)
|
|
252
|
+
passive_6_z = self._get_joint("passive_6_z")
|
|
253
|
+
passive_6_z_joint = self.urdf_logger.joint_entity_path(passive_6_z)
|
|
254
|
+
|
|
255
|
+
passive_7_x = self._get_joint("passive_7_x")
|
|
256
|
+
passive_7_x_joint = self.urdf_logger.joint_entity_path(passive_7_x)
|
|
257
|
+
passive_7_y = self._get_joint("passive_7_y")
|
|
258
|
+
passive_7_y_joint = self.urdf_logger.joint_entity_path(passive_7_y)
|
|
259
|
+
passive_7_z = self._get_joint("passive_7_z")
|
|
260
|
+
passive_7_z_joint = self.urdf_logger.joint_entity_path(passive_7_z)
|
|
261
|
+
|
|
262
|
+
url = f"http://{self._robot_ip}:8000/api/state/full"
|
|
263
|
+
|
|
264
|
+
params = {
|
|
265
|
+
"with_control_mode": "false",
|
|
266
|
+
"with_head_pose": "false",
|
|
267
|
+
"with_target_head_pose": "false",
|
|
268
|
+
"with_head_joints": "true",
|
|
269
|
+
"with_target_head_joints": "false",
|
|
270
|
+
"with_body_yaw": "false", # already in head_joints
|
|
271
|
+
"with_target_body_yaw": "false",
|
|
272
|
+
"with_antenna_positions": "true",
|
|
273
|
+
"with_target_antenna_positions": "false",
|
|
274
|
+
"use_pose_matrix": "false",
|
|
275
|
+
"with_passive_joints": "true",
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
while not self.running.is_set():
|
|
279
|
+
msg = requests.get(url, params=params)
|
|
280
|
+
|
|
281
|
+
if msg.status_code != 200:
|
|
282
|
+
self.logger.error(
|
|
283
|
+
f"Request failed with status {msg.status_code}: {msg.text}"
|
|
284
|
+
)
|
|
285
|
+
time.sleep(0.1)
|
|
286
|
+
continue
|
|
287
|
+
try:
|
|
288
|
+
data = json.loads(msg.text)
|
|
289
|
+
self.logger.debug(f"Data: {data}")
|
|
290
|
+
except Exception:
|
|
291
|
+
continue
|
|
292
|
+
|
|
293
|
+
rr.set_time("reachymini", timestamp=time.time(), recording=self.recording)
|
|
294
|
+
|
|
295
|
+
# hardcoded offsets are from the URDF file
|
|
296
|
+
if "antennas_position" in data and data["antennas_position"] is not None:
|
|
297
|
+
antennas = data["antennas_position"]
|
|
298
|
+
if antennas is not None:
|
|
299
|
+
antenna_left.origin.rotation = [
|
|
300
|
+
2.93649,
|
|
301
|
+
0.508471,
|
|
302
|
+
2.10225 + antennas[0],
|
|
303
|
+
]
|
|
304
|
+
self.urdf_logger.log_joint(
|
|
305
|
+
antenna_left_joint,
|
|
306
|
+
joint=antenna_left,
|
|
307
|
+
recording=self.recording,
|
|
308
|
+
)
|
|
309
|
+
antenna_right.origin.rotation = [
|
|
310
|
+
1.63922,
|
|
311
|
+
1.39152 + antennas[1],
|
|
312
|
+
0.701924,
|
|
313
|
+
]
|
|
314
|
+
self.urdf_logger.log_joint(
|
|
315
|
+
antenna_right_joint,
|
|
316
|
+
joint=antenna_right,
|
|
317
|
+
recording=self.recording,
|
|
318
|
+
)
|
|
319
|
+
if "head_joints" in data and data["head_joints"] is not None:
|
|
320
|
+
head_joints = data["head_joints"]
|
|
321
|
+
motor_1.origin.rotation = [
|
|
322
|
+
1.5708,
|
|
323
|
+
5.91241e-14 - head_joints[1],
|
|
324
|
+
1.0472,
|
|
325
|
+
]
|
|
326
|
+
self.urdf_logger.log_joint(
|
|
327
|
+
motor_1_joint, joint=motor_1, recording=self.recording
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
motor_2.origin.rotation = [
|
|
331
|
+
-1.5708,
|
|
332
|
+
1.47282e-13 + head_joints[2],
|
|
333
|
+
-2.0944,
|
|
334
|
+
]
|
|
335
|
+
self.urdf_logger.log_joint(
|
|
336
|
+
motor_2_joint, joint=motor_2, recording=self.recording
|
|
337
|
+
)
|
|
338
|
+
|
|
339
|
+
motor_3.origin.rotation = [
|
|
340
|
+
1.5708,
|
|
341
|
+
5.72146e-14 - head_joints[3],
|
|
342
|
+
3.14159,
|
|
343
|
+
]
|
|
344
|
+
self.urdf_logger.log_joint(
|
|
345
|
+
motor_3_joint, joint=motor_3, recording=self.recording
|
|
346
|
+
)
|
|
347
|
+
motor_4.origin.rotation = [
|
|
348
|
+
-1.5708,
|
|
349
|
+
-7.49452e-14 + head_joints[4],
|
|
350
|
+
3.47181e-14,
|
|
351
|
+
]
|
|
352
|
+
self.urdf_logger.log_joint(
|
|
353
|
+
motor_4_joint, joint=motor_4, recording=self.recording
|
|
354
|
+
)
|
|
355
|
+
motor_5.origin.rotation = [
|
|
356
|
+
1.5708,
|
|
357
|
+
-1.79054e-13 - head_joints[5],
|
|
358
|
+
-1.0472,
|
|
359
|
+
]
|
|
360
|
+
self.urdf_logger.log_joint(
|
|
361
|
+
motor_5_joint, joint=motor_5, recording=self.recording
|
|
362
|
+
)
|
|
363
|
+
motor_6.origin.rotation = [
|
|
364
|
+
-1.5708,
|
|
365
|
+
-5.32144e-14 + head_joints[6],
|
|
366
|
+
2.0944,
|
|
367
|
+
]
|
|
368
|
+
self.urdf_logger.log_joint(
|
|
369
|
+
motor_6_joint, joint=motor_6, recording=self.recording
|
|
370
|
+
)
|
|
371
|
+
|
|
372
|
+
motor_yaw.origin.rotation = [
|
|
373
|
+
-3.74039e-16,
|
|
374
|
+
1.77636e-15,
|
|
375
|
+
1.5708 - head_joints[0],
|
|
376
|
+
]
|
|
377
|
+
self.urdf_logger.log_joint(
|
|
378
|
+
motor_yaw_joint, joint=motor_yaw, recording=self.recording
|
|
379
|
+
)
|
|
380
|
+
|
|
381
|
+
if "passive_joints" in data and data["passive_joints"] is not None:
|
|
382
|
+
passive_joints = data["passive_joints"]
|
|
383
|
+
self._set_rod_rotation(
|
|
384
|
+
passive_joints[0], # "passive_1_x",
|
|
385
|
+
passive_1_x,
|
|
386
|
+
passive_1_x_joint,
|
|
387
|
+
[-0.13754, -0.0882156, 2.10349],
|
|
388
|
+
0,
|
|
389
|
+
)
|
|
390
|
+
self._set_rod_rotation(
|
|
391
|
+
passive_joints[1], # "passive_1_y",
|
|
392
|
+
passive_1_y,
|
|
393
|
+
passive_1_y_joint,
|
|
394
|
+
[-4.80812e-17, 3.69195e-17, -3.11194e-17],
|
|
395
|
+
1,
|
|
396
|
+
)
|
|
397
|
+
self._set_rod_rotation(
|
|
398
|
+
passive_joints[2], # "passive_1_z",
|
|
399
|
+
passive_1_z,
|
|
400
|
+
passive_1_z_joint,
|
|
401
|
+
[-4.80812e-17, 3.69195e-17, -3.11194e-17],
|
|
402
|
+
2,
|
|
403
|
+
)
|
|
404
|
+
|
|
405
|
+
self._set_rod_rotation(
|
|
406
|
+
passive_joints[3], # "passive_2_x",
|
|
407
|
+
passive_2_x,
|
|
408
|
+
passive_2_x_joint,
|
|
409
|
+
[-3.14159, 5.37396e-16, -3.14159],
|
|
410
|
+
0,
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
self._set_rod_rotation(
|
|
414
|
+
passive_joints[4], # "passive_2_y",
|
|
415
|
+
passive_2_y,
|
|
416
|
+
passive_2_y_joint,
|
|
417
|
+
[-4.29816e-30, 7.32263e-17, -8.42229e-30],
|
|
418
|
+
1,
|
|
419
|
+
)
|
|
420
|
+
self._set_rod_rotation(
|
|
421
|
+
passive_joints[5], # "passive_2_z",
|
|
422
|
+
passive_2_z,
|
|
423
|
+
passive_2_z_joint,
|
|
424
|
+
[-4.29816e-30, 7.32263e-17, -8.42229e-30],
|
|
425
|
+
2,
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
self._set_rod_rotation(
|
|
429
|
+
passive_joints[6], # "passive_3_x",
|
|
430
|
+
passive_3_x,
|
|
431
|
+
passive_3_x_joint,
|
|
432
|
+
[0.373569, 0.0882156, -1.0381],
|
|
433
|
+
0,
|
|
434
|
+
)
|
|
435
|
+
self._set_rod_rotation(
|
|
436
|
+
passive_joints[7], # "passive_3_y",
|
|
437
|
+
passive_3_y,
|
|
438
|
+
passive_3_y_joint,
|
|
439
|
+
[-4.71809e-17, -7.61919e-18, 5.54539e-17],
|
|
440
|
+
1,
|
|
441
|
+
)
|
|
442
|
+
self._set_rod_rotation(
|
|
443
|
+
passive_joints[8], # "passive_3_z",
|
|
444
|
+
passive_3_z,
|
|
445
|
+
passive_3_z_joint,
|
|
446
|
+
[-4.71809e-17, -7.61919e-18, 5.54539e-17],
|
|
447
|
+
2,
|
|
448
|
+
)
|
|
449
|
+
|
|
450
|
+
self._set_rod_rotation(
|
|
451
|
+
passive_joints[9], # "passive_4_x",
|
|
452
|
+
passive_4_x,
|
|
453
|
+
passive_4_x_joint,
|
|
454
|
+
[-0.0860846, 0.0882156, 1.0381],
|
|
455
|
+
0,
|
|
456
|
+
)
|
|
457
|
+
|
|
458
|
+
self._set_rod_rotation(
|
|
459
|
+
passive_joints[10], # "passive_4_y",
|
|
460
|
+
passive_4_y,
|
|
461
|
+
passive_4_y_joint,
|
|
462
|
+
[-3.54762e-18, 2.76754e-18, -1.40989e-17],
|
|
463
|
+
1,
|
|
464
|
+
)
|
|
465
|
+
|
|
466
|
+
self._set_rod_rotation(
|
|
467
|
+
passive_joints[11], # "passive_4_z",
|
|
468
|
+
passive_4_z,
|
|
469
|
+
passive_4_z_joint,
|
|
470
|
+
[-3.54762e-18, 2.76754e-18, -1.40989e-17],
|
|
471
|
+
2,
|
|
472
|
+
)
|
|
473
|
+
|
|
474
|
+
self._set_rod_rotation(
|
|
475
|
+
passive_joints[12], # "passive_5_x",
|
|
476
|
+
passive_5_x,
|
|
477
|
+
passive_5_x_joint,
|
|
478
|
+
[0.123977, 0.0882156, -1.0381],
|
|
479
|
+
0,
|
|
480
|
+
)
|
|
481
|
+
|
|
482
|
+
self._set_rod_rotation(
|
|
483
|
+
passive_joints[13], # "passive_5_y",
|
|
484
|
+
passive_5_y,
|
|
485
|
+
passive_5_y_joint,
|
|
486
|
+
[-1.10888e-16, -3.21444e-17, 3.55033e-17],
|
|
487
|
+
1,
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
self._set_rod_rotation(
|
|
491
|
+
passive_joints[14], # "passive_5_z",
|
|
492
|
+
passive_5_z,
|
|
493
|
+
passive_5_z_joint,
|
|
494
|
+
[-1.10888e-16, -3.21444e-17, 3.55033e-17],
|
|
495
|
+
2,
|
|
496
|
+
)
|
|
497
|
+
|
|
498
|
+
self._set_rod_rotation(
|
|
499
|
+
passive_joints[15], # "passive_6_x",
|
|
500
|
+
passive_6_x,
|
|
501
|
+
passive_6_x_joint,
|
|
502
|
+
[3.0613, 0.0882156, 1.0381],
|
|
503
|
+
0,
|
|
504
|
+
)
|
|
505
|
+
|
|
506
|
+
self._set_rod_rotation(
|
|
507
|
+
passive_joints[16], # "passive_6_y",
|
|
508
|
+
passive_6_y,
|
|
509
|
+
passive_6_y_joint,
|
|
510
|
+
[-7.27418e-17, 2.10388e-17, 4.15523e-17],
|
|
511
|
+
1,
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
self._set_rod_rotation(
|
|
515
|
+
passive_joints[17], # "passive_6_z",
|
|
516
|
+
passive_6_z,
|
|
517
|
+
passive_6_z_joint,
|
|
518
|
+
[-7.27418e-17, 2.10388e-17, 4.15523e-17],
|
|
519
|
+
2,
|
|
520
|
+
)
|
|
521
|
+
|
|
522
|
+
self._set_rod_rotation(
|
|
523
|
+
passive_joints[18], # "passive_7_x",
|
|
524
|
+
passive_7_x,
|
|
525
|
+
passive_7_x_joint,
|
|
526
|
+
[3.14159, 2.10388e-17, 4.15523e-17],
|
|
527
|
+
0,
|
|
528
|
+
)
|
|
529
|
+
|
|
530
|
+
self._set_rod_rotation(
|
|
531
|
+
passive_joints[19], # "passive_7_y",
|
|
532
|
+
passive_7_y,
|
|
533
|
+
passive_7_y_joint,
|
|
534
|
+
[-7.27418e-17, -2.10388e-17, -4.15523e-17],
|
|
535
|
+
1,
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
self._set_rod_rotation(
|
|
539
|
+
passive_joints[20], # "passive_7_z",
|
|
540
|
+
passive_7_z,
|
|
541
|
+
passive_7_z_joint,
|
|
542
|
+
[-7.27418e-17, -2.10388e-17, -4.15523e-17],
|
|
543
|
+
2,
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
time.sleep(0.1)
|