Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Wed Feb 15, 2017 12:43 pm 
Offline

Joined: Wed Feb 15, 2017 12:22 pm
Posts: 3
Hi,

I have issues loading models in pybullets DIRECT and GUI mode but have no issues in running them in SHARED_MEMORY after starting the example browser.
Seemingly arbitrary objects just cannot be displayed in the interface. Most of the urdf-models that come in the data-directory can not be displayed as well.
An example:
Code:
import pybullet as p
p.connect(p.GUI)
p.loadURDF('data/quadruped/quadruped.urdf') # displays only a tiny black cube at (0,0,0)

Furthermore, checking all links world positions with getLinkPosition(...), they all are centered at (0,0,0).
The same example works perfectly fine when I initially connect to the example browser via SHARED_MEMORY.
Similar issues occur when loading other objects:
  • data/sphere_small.urdf: Nothing is displayed
  • data/mjcf/humanoid.xml: Nothing is displayed
  • data/r2d2.urdf: Only the claw is rendered at (0,0,0)
  • data/kuka_lwr/kuka.urdf: Seems to load each link at (0,0,0)
Loading the plane.urdf works without issues though!

I have tested and confirmed this issue on 2 different computers with Ubuntu 14.04 and 15.10.

What is happening?
I want to use pybullet in DIRECT or GUI mode to use it in conjunction with reinforcement learning, thus do not want to leave the example browser running.

Thanks in advance!


Attachments:
File comment: Visualization of quadruped.urdf after connecting via p.SHARED_MEMORY to the example browser
success_pshared.png
success_pshared.png [ 29.57 KiB | Viewed 158 times ]
File comment: Visualization of quadruped.urdf after connecting via p.GUI
failed_pgui.png
failed_pgui.png [ 15.89 KiB | Viewed 158 times ]


Last edited by mlosch on Tue Feb 21, 2017 1:21 pm, edited 1 time in total.
Top
 Profile  
 
PostPosted: Thu Feb 16, 2017 10:31 am 
Offline

Joined: Wed Feb 15, 2017 12:22 pm
Posts: 3
Can anybody test and confirm this issue?


Top
 Profile  
 
PostPosted: Sun Feb 19, 2017 1:38 pm 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 4041
Location: California, USA
First of all, there are a few alternatives that still work with SHARED_MEMORY. For example App_SharedMemoryPhysics, which is a small executable that has no OpenGL/GUI. In addition, there is a UDP physics server, headless (without GUI/Graphics etc), you can use pybullet.connect(p.UDP,"127.0.0.1")

I have never seen this issue, pybullet should just work fine using p.GUI or any of the other modes (p.DIRECT, p.UDP, p.SHARED_MEMORY).

From what folder do you run pybullet? You don't need the 'data' prefix, as long as you start pybullet within the Bullet directories, I usually use 'p.loadURDF("quadruped/quadruped.urdf")

How did you compile pybullet? What operating system and compiler version?
On Mac OSX or Linux, can you try using the most up-to-date Bullet revision, preferably using git clone http://github.com/bulletphysics/bullet3 or get latest from https://github.com/bulletphysics/bullet3/releases

build_and_run_cmake_pybullet_double.sh
cd build_cmake/examples/pybullet
python
Code:
import pybullet as p
p.connect(p.GUI)
p.loadURDF("quadruped/quadruped.urdf")


Top
 Profile  
 
PostPosted: Sun Feb 19, 2017 2:47 pm 
Offline

Joined: Sat Jul 04, 2015 10:33 am
Posts: 343
Location: Bern, Switzerland
Can not confirm this issue. I am using pybullet since day one and I usually made the mistakes by compiling a messed up version (not up-to-date etc.), pybullet was always working fine.


Top
 Profile  
 
PostPosted: Mon Feb 20, 2017 12:48 pm 
Offline

Joined: Wed Feb 15, 2017 12:22 pm
Posts: 3
Thanks for the helpful comments!
I found the issue: I had used the bpython interpreter (with python 2.7). If I use the regular python interpreter everything works fine!
Very surprised by this issue.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group