< >
Home » OpenDuckMini快速入门教程 » OpenDuckMini快速入门教程-设置关节偏移

OpenDuckMini快速入门教程-设置关节偏移

文章说明

  • 本教程主要介绍如何进行设置关节偏移的操作
  • 欢迎加入我们的openduckmini交流群,微信扫描右侧二维码立即进群交流

相关设备

示例图片

前提准备

  • 使用纸箱或者支架从底部中间将鸭子架高

请输入图片描述

  • 提前了解舵机位置图

请输入图片描述

操作步骤

  • 调整关节偏移的目的为能使鸭子能稳定站立

  • 通常情况下,两腿应处于平行状态

  • 启动调整关节偏移的脚本

$ ~/open_duck_mini_ws/Open_Duck_Mini_Runtime/scripts
$ python find_soft_offsets.py

Warning : didn't provide a config json path, using default values
======
Warning : this script will move the robot to its zero position quiclky, make sure it is safe to do so
======

Press any key to start. The robot will move to its zero position. Make sure it is safe to do so. At any time, press ctrl+c to stop, the motors will be turned off.
d_coefficient: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
turn on : low KPS set
turn on : init pos set
d_coefficient: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
turn on : high kps





 === Setting up left_hip_yaw === (Y/(s)kip : y
left_hip_yaw is now turned off. Move it to the desired zero position and press any key to confirm the offset
 ---> Offset is -0.1
Press any key to move the motor to its zero position with offset taken into account
Is that ok ? (Y/n)y
Ok, setting offset
------
Current offsets :
left_hip_yaw : -0.1
left_hip_roll : -0.0
left_hip_pitch : -0.0
left_knee : -0.0
left_ankle : -0.0
neck_pitch : 0.0
head_pitch : 0.0
head_yaw : 0.0
head_roll : 0.0
right_hip_yaw : 0.0
right_hip_roll : 0.0
right_hip_pitch : 0.0
right_knee : 0.0
right_ankle : -0.0
------

  • 首先设置left_hip_roll舵机的零位,按y键进入设置,s键跳过设置
  • 进入设置后舵机会处于解除扭矩状态,你可以随意转动舵机到目标零位的位置,然后按任意键确定
  • 此时终端会输出当前舵机的偏移值---> Offset is -0.1
  • 再按任意键后,舵机会移动到应用偏移量后的零点位置
  • 最后确认是否满意当前舵机的位置,按y键继续下个设置,n键返回
  • 将得出的偏移值保存在根目录下duck_config.json文件上
测试
  • 运行turn_on脚本
$ cd ~/open_duck_mini_ws/Open_Duck_Mini_Runtime/scripts
$ python turn_on.py
  • 启动脚本后,鸭子应处于舵机扭矩锁定的曲腿姿态

请输入图片描述

  • 解除舵机扭矩锁定
$ cd ~/open_duck_mini_ws/Open_Duck_Mini_Runtime/scripts
$ python turn_off.py

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: openduckmini