add simple 'runServer.py' script, that lets you run a GUI shared memory server to connect to
This commit is contained in:
18
examples/pybullet/gym/pybullet_envs/examples/runServer.py
Normal file
18
examples/pybullet/gym/pybullet_envs/examples/runServer.py
Normal file
@@ -0,0 +1,18 @@
|
||||
#add parent dir to find package. Only needed for source code build, pip install doesn't need it.
|
||||
import os
|
||||
import inspect
|
||||
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||
parentdir = os.path.dirname(os.path.dirname(currentdir))
|
||||
os.sys.path.insert(0,parentdir)
|
||||
|
||||
import pybullet_data
|
||||
import pybullet as p
|
||||
import time
|
||||
|
||||
p.connect(p.GUI_SERVER)
|
||||
p.setAdditionalSearchPath(pybullet_data.getDataPath())
|
||||
|
||||
while(1):
|
||||
time.sleep(0.01)
|
||||
p.getNumBodies()
|
||||
|
||||
Reference in New Issue
Block a user