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

29 lines
5.8 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>
<1A>i& <00><00>L<00>SSKrSSKrSSKrSSKJrJrJrJrJr "SS5r g)<05>N)<05>Motor<6F> MotorControl<6F> DM_Motor_Type<70> Control_Type<70> DM_variablec<00>P<00>\rSrSrSrS SjrSrSrSrSr Sr
S r SS
jr S r g )<0F>LegsController<65> u|
简单的达妙腿部/轮子控制类,只实现基本的初始化、使能、
失能、扭矩读取以及位置控制。
c<00>d<00>[R"XUS9Ul[UR5Ul[ [ RSS5Ul[ [ RSS5Ul [ [ RSS5Ul
[ [ RSS 5Ul [ [ RS
S 5Ul [ [ RS S 5Ul[ [ RSS5Ul[ [ RSS5UlURURURURURURURUR 4HnURR#U5 M g)uF打开串口、创建 MotorControl、实例化并注册所有电机。)<01>timeout<75><00><00><00><00><00><00><00><00><00><00><00><00><00><00><00>N)<12>serial<61>Serial<61> serial_devicer<00>mcrr<00>DM4340<34>motor1<72>motor2<72>motor3<72>motor4<72>DMH6215<31>wheel1<6C>wheel2<6C>wheel3<6C>wheel4<6C>addMotor)<05>self<6C>port<72>baudrater <00>ms <20>*/home/allenyuan/balance/Legs_controller.py<70>__init__<5F>LegsController.__init__s/<00><00>#<23>]<5D>]<5D>4<EFBFBD>7<EFBFBD>K<><04><1A><1E>t<EFBFBD>1<>1<>2<><04><07><1C>M<EFBFBD>0<>0<>$<24><04>=<3D><04> <0B><1B>M<EFBFBD>0<>0<>$<24><04>=<3D><04> <0B><1B>M<EFBFBD>0<>0<>$<24><04>=<3D><04> <0B><1B>M<EFBFBD>0<>0<>$<24><04>=<3D><04> <0B><1C>M<EFBFBD>1<>1<>4<EFBFBD><14>><3E><04> <0B><1B>M<EFBFBD>1<>1<>4<EFBFBD><14>><3E><04> <0B><1B>M<EFBFBD>1<>1<>4<EFBFBD><14>><3E><04> <0B><1B>M<EFBFBD>1<>1<>4<EFBFBD><14>><3E><04> <0B><17>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B><16>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B>F<01>A<EFBFBD> <10>G<EFBFBD>G<EFBFBD> <1C> <1C>Q<EFBFBD> <1F>F<01>c<00>p<00>URR(dURR5 gg)u3重新打开已关闭的串口如果需要。N)r<00>is_open<65>open<65>r,s r0<00> open_serial<61>LegsController.open_serial&s(<00><00><13>!<21>!<21>)<29>)<29> <10> <1E> <1E> #<23> #<23> %<25>*r3c<00>p<00>URR(aURR5 gg)u关闭串口释放资源。N)rr5<00>closer7s r0<00> close_serial<61>LegsController.close_serial+s(<00><00> <0F> <1D> <1D> %<25> %<25> <10> <1E> <1E> $<24> $<24> &<26> &r3c<00><><00>URURURUR4HnURR U5 M g)u使能四条腿电机。N)r"r#r$r%r <00>enable<6C>r,r/s r0<00> enable_legs<67>LegsController.enable_legs1<00>6<00><00><16>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B>E<>A<EFBFBD> <10>G<EFBFBD>G<EFBFBD>N<EFBFBD>N<EFBFBD>1<EFBFBD> <1D>Fr3c<00><><00>URURURUR4HnURR U5 M g)u使能四个轮子电机。N)r'r(r)r*r r?)r,<00>ws r0<00> enable_wheels<6C>LegsController.enable_wheels6rCr3c<00><><00>URURURURURUR
UR UR4HnURRU5 M g)u.一次性失能所有电机(腿+轮子。N)
r"r#r$r%r'r(r)r*r <00>disabler@s r0<00> disable_all<6C>LegsController.disable_all;sR<00><00><16>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B><16>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B>F<01>A<EFBFBD> <10>G<EFBFBD>G<EFBFBD>O<EFBFBD>O<EFBFBD>A<EFBFBD> <1E>Fr3c<00>n<00>URURURUR4HnURR U5 M URR 5URR 5URR 5URR 5/$)u9刷新四条腿的状态并返回它们的扭矩列表。)r"r#r$r%r <00>refresh_motor_status<75> getTorquer@s r0<00>get_legs_torque<75>LegsController.get_legs_torqueBs<><00><00><16>+<2B>+<2B>t<EFBFBD>{<7B>{<7B>D<EFBFBD>K<EFBFBD>K<EFBFBD><14><1B><1B>E<>A<EFBFBD> <10>G<EFBFBD>G<EFBFBD> (<28> (<28><11> +<2B>F<01> <11>K<EFBFBD>K<EFBFBD> !<21> !<21> #<23> <10>K<EFBFBD>K<EFBFBD> !<21> !<21> #<23> <10>K<EFBFBD>K<EFBFBD> !<21> !<21> #<23> <10>K<EFBFBD>K<EFBFBD> !<21> !<21> #<23> 
<EFBFBD>
r3c<00><<00>URRURU*U5 URRURX%5 URRURX55 URRUR
U*U5 g)u<>
使用位置‑速度模式控制四条腿。
参数:
pos1pos4: 目标位置(单位依据电机规格)
vel: 速度比例,默认 0.5
N)r <00>control_Pos_Velr"r#r$r%)r,<00>pos1<73>pos2<73>pos3<73>pos4<73>vels r0<00>control_legs_pos<6F>LegsController.control_legs_posNsl<00><00> <0A><07><07><1F><1F><04> <0B> <0B>d<EFBFBD>U<EFBFBD>C<EFBFBD>8<> <0C><07><07><1F><1F><04> <0B> <0B>d<EFBFBD>8<> <0C><07><07><1F><1F><04> <0B> <0B>d<EFBFBD>8<> <0C><07><07><1F><1F><04> <0B> <0B>d<EFBFBD>U<EFBFBD>C<EFBFBD>8r3)
r r"r#r$r%rr'r(r)r*N)z /dev/ttyACM1i<00><00>?)rZ)<0E>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__r1r8r<rArFrJrOrX<00>__static_attributes__<5F>r3r0r r s/<00><00><08>
 <20>.&<26>
'<27> <1E>
<1E>
<1F> 
<EFBFBD>
9r3r )
<EFBFBD>math<74>timer<00> u2can.DM_CANrrrrrr rar3r0<00><module>res$<00><01> <0B> <0B> <0A><02><02>
O9<>O9r3