来自bulletphysics/bullet3(pybullet库)的kuka_grasp_block_playback.py未在我的系统上运行。

问题描述:

我从https://github.com/bulletphysics/bullet3.git下载了bullet3 github存储库(Bullet Physics SDK),其中包含用于运行增强学习算法的OpenAI Gym示例的python绑定。 我试着运行以下目录中的kuka_grasp_block_playback.py示例:bullet3-master/examples/pybullet/examples/ 我的系统不支持pybullet.GUI,因此我继续使用pybullet.DIRECT。 但是,使用python kuka_grasp_block_playback.py运行它,它给我以下错误:来自bulletphysics/bullet3(pybullet库)的kuka_grasp_block_playback.py未在我的系统上运行。

Traceback (most recent call last): 
    File "kuka_grasp_block_playback.py", line 92, in <module> 
stepIndex = int(p.readUserDebugParameter(stepIndexId)) 
pybullet.error: Failed to read parameter. 

如何面对呢?

这是一个过时的问题,但以防万一:。最新版本的pybullet包含与OpenAI Gym环境类似的库卡抓取实现。只需运行'sudo pip install pybullet'就可以得到它。

这个健身房环境可以运行没有GUI没有问题。请参阅http://pybullet.org上的快速入门指南以获取有关用于深度加固学习的pybullet健身房环境的更多信息。

readUserDebugParameter仅在使用GUI模式时执行,它在DIRECT模式下失败,因此只需将其注释掉即可。