fix: 修复路径执行精度问题,增加仿真迭代次数让控制器充分收敛
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
63b7cfaca9
commit
2b84a9d541
@ -117,8 +117,9 @@ def debug_path_execution():
|
||||
# 设置插值位置
|
||||
arm_controller.set_joint_positions(interpolated.tolist())
|
||||
|
||||
# 执行仿真步进(关键修复:让PyBullet执行控制命令)
|
||||
p.stepSimulation(physicsClientId=physics_client)
|
||||
# 执行多次仿真步进让控制器充分收敛
|
||||
for _ in range(10):
|
||||
p.stepSimulation(physicsClientId=physics_client)
|
||||
|
||||
# 等待timestep时间(和主程序相同)
|
||||
time.sleep(timestep)
|
||||
@ -150,7 +151,8 @@ def debug_path_execution():
|
||||
break
|
||||
|
||||
# 执行仿真步进让机械臂继续收敛
|
||||
p.stepSimulation(physicsClientId=physics_client)
|
||||
for _ in range(10):
|
||||
p.stepSimulation(physicsClientId=physics_client)
|
||||
time.sleep(timestep)
|
||||
|
||||
# 记录最终实际位置
|
||||
|
||||
Loading…
Reference in New Issue
Block a user