mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-18 21:10:05 +00:00
Update vrhand.py
This commit is contained in:
parent
f1fa54ebe3
commit
9c773edd0e
@ -8,12 +8,15 @@
|
|||||||
import serial
|
import serial
|
||||||
import time
|
import time
|
||||||
import pybullet as p
|
import pybullet as p
|
||||||
|
import pybullet_data
|
||||||
|
|
||||||
#first try to connect to shared memory (VR), if it fails use local GUI
|
#first try to connect to shared memory (VR), if it fails use local GUI
|
||||||
c = p.connect(p.SHARED_MEMORY)
|
c = p.connect(p.SHARED_MEMORY)
|
||||||
if (c < 0):
|
if (c < 0):
|
||||||
c = p.connect(p.GUI)
|
c = p.connect(p.GUI)
|
||||||
#p.resetSimulation()
|
#p.resetSimulation()
|
||||||
|
|
||||||
|
p.setAdditionalSearchPath(pybullet_data.getDataPath())
|
||||||
p.setGravity(0, 0, -10)
|
p.setGravity(0, 0, -10)
|
||||||
print(c)
|
print(c)
|
||||||
if (c < 0):
|
if (c < 0):
|
||||||
|
Loading…
Reference in New Issue
Block a user