stepjam / RLBench

A large-scale benchmark and learning environment.
https://sites.google.com/corp/view/rlbench
Other
1.11k stars 226 forks source link

Can not make two gym enviroments #161

Closed lazyhaotao closed 2 years ago

lazyhaotao commented 2 years ago

Dear Developers, Thanks for your contributions. In rlbench_gym.py, when I tyied to generate two gym environments as follows: env1 = gym.make('reach_target-state-v0', render_mode='human') env2 = gym.make('reach_target-state-v0', render_mode='human') there have been some errors: qt.qpa.xcb: QXcbConnection: XCB error: 145 (Unknown), sequence: 177, resource id: 0, major code: 139 (Unknown), minor code: 20 Attribute Qt::AA_UseDesktopOpenGL must be set before QCoreApplication is created. WARNING: QApplication was not created in the main() thread. (process:18254): GLib-CRITICAL **: 16:19:58.776: g_main_context_push_thread_default: assertion 'acquired_context' failed We successfully make env1, but then the code stays at env2 all the time. Do you know how to resolve this problem? Thanks again.

stepjam commented 2 years ago

Yes, but they need to be in separate processes. Please see here: https://github.com/stepjam/PyRep#running-multiple-pyrep-instances

qiwang067 commented 1 year ago

Hi, Stephen, I tried to make two gym environments and saw your provided example, but it's a bit difficult for me to implement, could you show me more details about making two gym environments?