Files
balance/__pycache__/gradio.cpython-313.pyc

26 lines
5.0 KiB
Plaintext
Raw Normal View History

new file: .vscode/settings.json new file: Legs_controller.py modified: README.md new file: __pycache__/Legs_controller.cpython-310.pyc new file: __pycache__/Legs_controller.cpython-313.pyc new file: __pycache__/balance.cpython-310.pyc new file: __pycache__/gradio.cpython-310.pyc new file: __pycache__/gradio.cpython-313.pyc new file: app_ui.py new file: balance.py new file: build/.cmake/api/v1/query/client-vscode/query.json new file: build/.cmake/api/v1/reply/cache-v2-ae4a9db768b4bbb36baa.json new file: build/.cmake/api/v1/reply/cmakeFiles-v1-389eb8769a8295e7571d.json new file: build/.cmake/api/v1/reply/codemodel-v2-5ea8cfc0b9263cbe5ae5.json new file: build/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json new file: build/.cmake/api/v1/reply/index-2025-09-11T04-53-20-0515.json new file: build/.cmake/api/v1/reply/target-imu_py-Debug-3913d741f2156d7faae9.json new file: build/.cmake/api/v1/reply/toolchains-v1-3105704d088db7adbfb5.json new file: build/CMakeCache.txt new file: build/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake new file: build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin new file: build/CMakeFiles/3.22.1/CMakeSystem.cmake new file: build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file: build/CMakeFiles/3.22.1/CompilerIdCXX/a.out new file: build/CMakeFiles/CMakeDirectoryInformation.cmake new file: build/CMakeFiles/CMakeOutput.log new file: build/CMakeFiles/Makefile.cmake new file: build/CMakeFiles/Makefile2 new file: build/CMakeFiles/TargetDirectories.txt new file: build/CMakeFiles/cmake.check_cache new file: build/CMakeFiles/imu_py.dir/DependInfo.cmake new file: build/CMakeFiles/imu_py.dir/build.make new file: build/CMakeFiles/imu_py.dir/cmake_clean.cmake new file: build/CMakeFiles/imu_py.dir/compiler_depend.make new file: build/CMakeFiles/imu_py.dir/compiler_depend.ts new file: build/CMakeFiles/imu_py.dir/depend.make new file: build/CMakeFiles/imu_py.dir/flags.make new file: build/CMakeFiles/imu_py.dir/link.txt new file: build/CMakeFiles/imu_py.dir/progress.make new file: build/CMakeFiles/progress.marks new file: build/Makefile new file: build/cmake_install.cmake new file: build/compile_commands.json new file: dm_imu/bsp_crc.cpp new file: dm_imu/bsp_crc.h new file: dm_imu/imu_data.csv new file: dm_imu/imu_driver.cpp new file: dm_imu/imu_driver.h new file: dm_imu/imu_plot.png new file: dm_imu/plot_imu.py new file: dm_imu/test_imu.cpp new file: imu_data.csv new file: pybind_imu/CMakeLists.txt new file: pybind_imu/README.md new file: pybind_imu/build/CMakeCache.txt new file: pybind_imu/build/CMakeFiles/3.22.1/CMakeCXXCompiler.cmake new file: pybind_imu/build/CMakeFiles/3.22.1/CMakeDetermineCompilerABI_CXX.bin new file: pybind_imu/build/CMakeFiles/3.22.1/CMakeSystem.cmake new file: pybind_imu/build/CMakeFiles/3.22.1/CompilerIdCXX/CMakeCXXCompilerId.cpp new file: pybind_imu/build/CMakeFiles/3.22.1/CompilerIdCXX/a.out new file: pybind_imu/build/CMakeFiles/CMakeDirectoryInformation.cmake new file: pybind_imu/build/CMakeFiles/CMakeOutput.log new file: pybind_imu/build/CMakeFiles/Makefile.cmake new file: pybind_imu/build/CMakeFiles/Makefile2 new file: pybind_imu/build/CMakeFiles/TargetDirectories.txt new file: pybind_imu/build/CMakeFiles/cmake.check_cache new file: pybind_imu/build/CMakeFiles/imu_py.dir/DependInfo.cmake new file: pybind_imu/build/CMakeFiles/imu_py.dir/build.make new file: pybind_imu/build/CMakeFiles/imu_py.dir/cmake_clean.cmake new file: pybind_imu/build/CMakeFiles/imu_py.dir/compiler_depend.make new file: pybind_imu/build/CMakeFiles/imu_py.dir/compiler_depend.ts new file: pybind_imu/build/CMakeFiles/imu_py.dir/depend.make new file: pybind_imu/build/CMakeFiles/imu_py.dir/flags.make new file: pybind_imu/build/CMakeFiles/imu_py.dir/home/allenyuan/balance/dm_imu/bsp_crc.cpp.o new file: pybind_imu/build/CMakeFiles/imu_py.dir/home/allenyuan/balance/dm_imu/bsp_crc.cpp.o.d new file: pybind_imu/build/CMakeFiles/imu_py.dir/home/allenyuan/balance/dm_imu/imu_driver.cpp.o new file: pybind_imu/build/CMakeFiles/imu_py.dir/home/allenyuan/balance/dm_imu/imu_driver.cpp.o.d new file: pybind_imu/build/CMakeFiles/imu_py.dir/link.txt new file: pybind_imu/build/CMakeFiles/imu_py.dir/progress.make new file: pybind_imu/build/CMakeFiles/imu_py.dir/pybind_imu.cpp.o new file: pybind_imu/build/CMakeFiles/imu_py.dir/pybind_imu.cpp.o.d new file: pybind_imu/build/CMakeFiles/progress.marks new file: pybind_imu/build/Makefile new file: pybind_imu/build/cmake_install.cmake new file: pybind_imu/build/imu_py.cpython-310-aarch64-linux-gnu.so new file: pybind_imu/example.py new file: pybind_imu/pybind_imu.cpp new file: src/example.py new file: test_imu new file: u2can/DM_CAN.py new file: u2can/DM_Motor_Test.py new file: u2can/LICENSE new file: u2can/README.md new file: u2can/__pycache__/DM_CAN.cpython-310.pyc new file: u2can/__pycache__/DM_CAN.cpython-312.pyc new file: u2can/__pycache__/DM_CAN.cpython-313.pyc new file: u2can/__pycache__/gradio.cpython-313.pyc new file: u2can/__pycache__/motor_interface.cpython-313.pyc new file: u2can/motor_interface.py new file: u2can/requirements.txt new file: ui.log
2025-12-06 22:47:57 +08:00
<EFBFBD>
<00><>i<><00> <00><><00>SSKrSSKJr \"5rSrSrSrSrSr \R"SS 9r \R"S
5 \R"5 \R"5 \R"S 5 \R"S 5r\R"S 5r\R"S5r\R&"SSS9r\R+\S\S9 \R+\S\S9 \R+\S\S9 SSS5 \R"5 \R"S5 \R,"SSSSS9r\R,"SSSSS9r\R,"SSSSS9r\R,"SSSSS9r\R,"SSSSSS9r\R"S 5r\R&"S!SS9r\R+\\\\\\/\S9 SSS5 \R"5 \R"S"5 \R&"S#SS9r\R&"S$SS9r\R&"S%SS9r \R&"S&SS9r!S'r"\ RG\"S\\\ \!/S(S)9 SSS5 SSS5 SSS5 \ RIS*S+S,S-9 g!,(df  GN=f!,(df  N<>=f!,(df  NS=f!,(df  N\=f!,(df  Ne=f).<2E>N)<01>LegsControllerc<00>,<00>[R5 g)u-使能四条腿电机并返回提示信息。u腿部已使能)<02>
controller<EFBFBD> enable_legs<67><00><00>!/home/allenyuan/balance/gradio.pyrrs<00><00><0E><1A><1A><1C> rc<00>,<00>[R5 g)u0使能四个轮子电机并返回提示信息。u轮子已使能)r<00> enable_wheelsrrr r r s<00><00><0E><1C><1C><1E> rc<00>,<00>[R5 g)u3一次性失能所有电机并返回提示信息。u所有电机已失能)r<00> disable_allrrr r r s<00><00><0E><1A><1A><1C> "rc <00>T<00>[RXX#U5 SUSUSUSUSUS3 $)u<>
使用位置‑速度模式控制四条腿。
参数:
pos1pos4: 目标位置(范围 -5000 ~ 5000单位依据电机规格
vel: 速度比例,范围 0.1 ~ 1.0,默认 0.5
u已设置位置: z, u(速度比例 u)r<00>control_legs_pos)<05>pos1<73>pos2<73>pos3<73>pos4<73>vels r <00> set_positionrs?<00><00><0F><1F><1F><04>D<EFBFBD><03><<3C> <1E>t<EFBFBD>f<EFBFBD>B<EFBFBD>t<EFBFBD>f<EFBFBD>B<EFBFBD>t<EFBFBD>f<EFBFBD>B<EFBFBD>t<EFBFBD>f<EFBFBD><L<>S<EFBFBD>E<EFBFBD>QT<51> U<>Urc<00>f<00>[R5nUVs/sH obUSOSPM sn$s snf)u@读取四条腿的扭矩,返回字符串列表供 UI 显示。z.2fzN/A)r<00>get_legs_torque)<02>torques<65>ts r <00>
get_torquer%s3<00><00><18>(<28>(<28>*<2A>G<EFBFBD><C<> D<>G<EFBFBD>q<EFBFBD>-<2D>q<EFBFBD><13>g<EFBFBD>U<EFBFBD> 2<>G<EFBFBD> D<>D<><44> Ds<00>.z<>
.gradio-container {font-family: 'Arial', sans-serif; background: #f0f4f8;}
.gr-button {border-radius: 8px; margin: 5px;}
.gr-slider {border-radius: 8px;}
)<01>cssu+# 🤖 机器人腿部 & 轮子控制面板u## 电机控制u🦵 使能腿部u🚗 使能轮子u❌ 全部失能u状态F)<02>label<65> interactive)<03>fn<66>inputs<74>outputsu## 位置控制ix<69><78><EFBFBD>i<EFBFBD>u 腿 1 位置)<02>valueru 腿 2 位置u 腿 3 位置u 腿 4 位置g<E7BDAE><67><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?g<00>?g<00>?u 速度比例)r!<00>stepru📍 设置位置u位置设置结果u## 扭矩实时显示u 腿 1 扭矩u 腿 2 扭矩u 腿 3 扭矩u 腿 4 扭矩c<00>:<00>[5nUSUSUSUS4$)Nr<00><00><00>)r)rs r <00>update_torquesr']s(<00><00><1E>L<EFBFBD><01><18><11>t<EFBFBD>Q<EFBFBD>q<EFBFBD>T<EFBFBD>1<EFBFBD>Q<EFBFBD>4<EFBFBD><11>1<EFBFBD><14>-<2D>-rr$)rrr <00>everyz0.0.0.0i<EFBFBD>T)<03> server_name<6D> server_port<72>debug)%<25>gradio<69>gr<67>Legs_controllerrrrr r rr<00>Blocks<6B>demo<6D>Markdown<77>Row<6F>Column<6D>Button<6F>enable_legs_btn<74>enable_wheels_btn<74>disable_all_btn<74>Textbox<6F>
status_box<EFBFBD>click<63>Sliderrrrrr<00> set_pos_btn<74>
pos_status<EFBFBD>torque1<65>torque2<65>torque3<65>torque4r'<00>load<61>launchrrr <00><module>rDs<><00><01><13>*<2A><1C> <1D>
<EFBFBD><1D> <1D> #<23> V<01>E<01><08>Y<EFBFBD>Y<EFBFBD> <08><02> 
<EFBFBD><06>K<EFBFBD>K<EFBFBD>=<3D>><3E> <0B><16><16><18> <0F>Y<EFBFBD>Y<EFBFBD>[<5B> <0E>K<EFBFBD>K<EFBFBD>)<29> *<2A> <20>i<EFBFBD>i<EFBFBD>(;<3B><<3C>O<EFBFBD> "<22> <09> <09>*=<3D> ><3E> <1D> <20>i<EFBFBD>i<EFBFBD>(:<3A>;<3B>O<EFBFBD><1B><1A><1A>(<28><05>F<>J<EFBFBD> <1B> !<21> !<21>[<5B><14>z<EFBFBD> !<21> R<> <1D> #<23> #<23>}<7D>T<EFBFBD>:<3A> #<23> V<> <1B> !<21> !<21>[<5B><14>z<EFBFBD> !<21> R<><19><10>Y<EFBFBD>Y<EFBFBD>[<5B> <0E>K<EFBFBD>K<EFBFBD>)<29> *<2A><15>9<EFBFBD>9<EFBFBD>U<EFBFBD>D<EFBFBD><01><1E>H<>D<EFBFBD><15>9<EFBFBD>9<EFBFBD>U<EFBFBD>D<EFBFBD><01><1E>H<>D<EFBFBD><15>9<EFBFBD>9<EFBFBD>U<EFBFBD>D<EFBFBD><01><1E>H<>D<EFBFBD><15>9<EFBFBD>9<EFBFBD>U<EFBFBD>D<EFBFBD><01><1E>H<>D<EFBFBD><14>)<29>)<29>C<EFBFBD><13>C<EFBFBD>c<EFBFBD><1E>P<>C<EFBFBD><1C>)<29>)<29>$7<>8<>K<EFBFBD><1B><1A><1A>*><3E>E<EFBFBD>R<>J<EFBFBD> <17> <1D> <1D><1F><1C>d<EFBFBD>D<EFBFBD>$<24><03>4<>"<22> <1E> <0E><19>"<10>Y<EFBFBD>Y<EFBFBD>[<5B> <0E>K<EFBFBD>K<EFBFBD>/<2F> 0<><18>j<EFBFBD>j<EFBFBD>~<7E>5<EFBFBD>I<>G<EFBFBD><18>j<EFBFBD>j<EFBFBD>~<7E>5<EFBFBD>I<>G<EFBFBD><18>j<EFBFBD>j<EFBFBD>~<7E>5<EFBFBD>I<>G<EFBFBD><18>j<EFBFBD>j<EFBFBD>~<7E>5<EFBFBD>I<>G<EFBFBD> .<2E> <11>I<EFBFBD>I<EFBFBD><1E><04>&<26><07><17>'<27>B<><1D> <16> <1F><19>?
<12><02>r<05> <0B> <0B> <09>t<EFBFBD>4<EFBFBD> <0B>@<40>]<19>[<5B><><19>[<5B><>"<19>[<5B><>?
<12><18><><02><02>sn<00>$J1<03>J <05>'B I,<07>4J <05> B,I><07>9J <05>A0J<07>J <05>
J1<03>,
I; <0B>6J <05>>
J <0B>J <05>
J <0B>J <05>
J. <09>*J1<03>1
J?