Hi PyBullet community!
Sorry for the newb question, but after a serious 3 hour Googling session have not been able to answer this question by myself.
Am currently experiencing issues getting PyBullet to render meshes in the example browser. Have been following the quickstart guides code from page 3. Copy/pasted it into Pycharm.
however upon running the example script, it does not load the model & this is all I see:
System infomation
macOS x 10.14.3 Mojave
python 3.7
pybullet build time: Feb 24 2019 17:55:02
Version = 3.3 INTEL-10.4.14
Vendor = Intel Inc.
Renderer = Intel HD Graphics 3000 OpenGL Engine
b3Printf: Selected demo: Physics Server
startThreads creating 1 threads.
starting thread 0
started thread 0
MotionThreadFunc thread started
Pybullet not rendering correctly
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Pybullet not rendering correctly
Last edited by paulscon on Sun Feb 24, 2019 10:12 am, edited 1 time in total.
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
python code from the Quickstart guide is as follows:
Code: Select all
import pybullet as p
import time
import pybullet_data
physicsClient = p.connect(p.GUI)#or p.DIRECT for non-graphical version
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #optionally
p.setGravity(0,0,-10)
planeId = p.loadURDF("plane.urdf")
cubeStartPos = [0,0,1]
cubeStartOrientation = p.getQuaternionFromEuler([0,0,0])
boxId = p.loadURDF("r2d2.urdf",cubeStartPos, cubeStartOrientation)
for i in range (10000):
p.stepSimulation()
time.sleep(1./240.)
cubePos, cubeOrn = p.getBasePositionAndOrientation(boxId)
print(cubePos,cubeOrn)
p.disconnect()
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
proof the URDF files are there:
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
more system info:
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
My understanding is that I should see R2D2 just chilling there- if that is not correct?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Pybullet not rendering correctly
Do the regular Bullet examples work? For example, what do you see if you run
~~~~~~~
python3 -m pybullet_envs.examples.testBike
~~~~~~~
(its implementation is testBike.py)
I see this, on Mojave 10.14.3:
When I run your script, it shows the R2D2 indeed, on the ground plane.
~~~~~~~
python3 -m pybullet_envs.examples.testBike
~~~~~~~
(its implementation is testBike.py)
I see this, on Mojave 10.14.3:
When I run your script, it shows the R2D2 indeed, on the ground plane.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
Hi Erwin,
On my system, running your example script yields the following result :
With the camera panning from left to right.
~
Since the last post have also tried a few things:
-Containerising Pybullet - learnt from your Github post this is not currently possible!
-Created a conda virtual env running python 3.6 on OS X Mojave, including all the relevant packages to run pybullet. Unfortunately no luck here either!
-Dual booted into Ubuntu 18, installed Pybullet (on a python 3.6 env) and it worked perfectly!
Thinking it might be some kind of OS x mojave issue. Not smart enough to solve this I am afraid!
Going to continue development in Ubuntu & appreciate your help mate!
On my system, running your example script yields the following result :
With the camera panning from left to right.
~
Since the last post have also tried a few things:
-Containerising Pybullet - learnt from your Github post this is not currently possible!
-Created a conda virtual env running python 3.6 on OS X Mojave, including all the relevant packages to run pybullet. Unfortunately no luck here either!
-Dual booted into Ubuntu 18, installed Pybullet (on a python 3.6 env) and it worked perfectly!
Thinking it might be some kind of OS x mojave issue. Not smart enough to solve this I am afraid!
Going to continue development in Ubuntu & appreciate your help mate!
Last edited by paulscon on Wed Feb 27, 2019 4:58 am, edited 2 times in total.
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
As a quick question, might there be someway to turn off hardware acceleration (If this is currently the case) as thinking this might have something to do with it?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Pybullet not rendering correctly
This is likely some Intel OpenGL driver issue
~~~~~~
Version = 3.3 INTEL-10.4.14
Vendor = Intel Inc.
Renderer = Intel HD Graphics 3000 OpenGL Engine
~~~~~~~
~~~~~~
Version = 3.3 INTEL-10.4.14
Vendor = Intel Inc.
Renderer = Intel HD Graphics 3000 OpenGL Engine
~~~~~~~
-
- Posts: 8
- Joined: Sun Feb 24, 2019 9:41 am
Re: Pybullet not rendering correctly
just posting this here for anyone else that experiences the issue.
The workaround for me at least was to run it on Ubuntu on my mac in dual boot.
Works perfectly as can be seen here
The workaround for me at least was to run it on Ubuntu on my mac in dual boot.
Works perfectly as can be seen here