Skip to content

Instantly share code, notes, and snippets.

@wkentaro
Created March 2, 2020 14:20
Show Gist options
  • Save wkentaro/036886feb9f9934bccd3a26e07f637c7 to your computer and use it in GitHub Desktop.
Save wkentaro/036886feb9f9934bccd3a26e07f637c7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import pyrep
from multiprocessing import Process
from grasp_xyg_env import GraspXYGEnv
import pickpp
import morefusion
# def run():
# pr = pyrep.PyRep()
# with pyrep.backend.utils.suppress_std_out_and_err():
# pr.launch()
#
# config = pickpp.simulation.ObjectConfiguration(
# pyrep=pr,
# models=morefusion.datasets.YCBVideoModels(),
# )
# while True:
# config.spawn_a_model(class_id=2)
def run():
env = GraspXYGEnv()
env.launch()
while True:
env.reset()
env.close()
PROCESSES = 10
processes = [Process(target=run, args=()) for i in range(PROCESSES)]
[p.start() for p in processes]
[p.join() for p in processes]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment