| name | physics-simulation |
| description | PyBullet 物理仿真技能 - 刚体动力学、碰撞检测、约束配置 |
| argument-hint | PyBullet物理 OR 碰撞检测 OR 约束配置 |
| user-invocable | true |
PyBullet Physics Simulation Skill
用于 PyBullet 物理仿真配置
何时使用
当需要以下帮助时使用此技能:
快速参考
连接
import pybullet as p
import pybullet_data
client = p.connect(p.GUI)
p.setAdditionalSearchPath(pybullet_data.getDataPath())
物理配置
重力和时间步
p.setGravity(0, 0, -9.81)
p.setTimeStep(1/240)
约束
关节约束
constraint = p.createConstraint(
parentBodyUniqueId,
parentLinkIndex,
childBodyUniqueId,
childLinkIndex,
p.JOINT_POINT2POINT,
[0, 0, 0],
[0, 0, 0],
[0, 0, 0]
)
另见