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
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号