Created
March 2, 2020 14:20
-
-
Save wkentaro/036886feb9f9934bccd3a26e07f637c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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