Skip to content

Instantly share code, notes, and snippets.

@ikeyasu
Created June 15, 2019 07:13
Show Gist options
  • Save ikeyasu/81d4178ce18ba2b1463e7c9dc079a4b3 to your computer and use it in GitHub Desktop.
Save ikeyasu/81d4178ce18ba2b1463e7c9dc079a4b3 to your computer and use it in GitHub Desktop.
When you face error of `ModuleNotFoundError: No module named 'robot_bases'`

If you face a error of ModuleNotFoundError: No module named 'robot_bases' on pybullet 2.5.0, you should modify a source code of pybullet. This issue may be fixed on future release because the pybullet source code is updated on github.

If you are using anaconda, you need to modify /anaconda3/envs/XXXX/lib/python3.6/site-packages/pybullet_envs/robot_locomotors.py.

Please open robot_locomotors.py. You can see...

 from robot_bases import XmlBasedRobot, MJCFBasedRobot, URDFBasedRobot
 import numpy as np
 import pybullet
 import os
 import pybullet_data
 from robot_bases import BodyPart

You need to add pybullet_envs. for robot_bases like follows.

 from pybullet_envs.robot_bases import XmlBasedRobot, MJCFBasedRobot, URDFBasedRobot
 import numpy as np
 import pybullet
 import os
 import pybullet_data
 from pybullet_envs.robot_bases import BodyPart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment