Running several scenes in parallel, is possible?
-
- Posts: 14
- Joined: 13 Sep 2022, 17:22
Running several scenes in parallel, is possible?
Hello!
I would like to know if there is the possibility of running several scenes in parallel?
I'm currently using:
- version 4.6.0 of Coppelia;
- python 3.11.5;
- ZeroMQ remote API;
I would like to know if there is the possibility of running several scenes in parallel?
I'm currently using:
- version 4.6.0 of Coppelia;
- python 3.11.5;
- ZeroMQ remote API;
Re: Running several scenes in parallel, is possible?
Hello,
yes, you can run several simulations in parallel, you will however need to run several instances of CoppeliaSim. Each one should then use a different ZeroMQ remote APi server port. You can do this by starting CoppeliaSim as follows:
you might however need to append 2 dummy chars as in following example, depending on your CoppeliaSim version/revision (see also this reply):
Cheers
yes, you can run several simulations in parallel, you will however need to run several instances of CoppeliaSim. Each one should then use a different ZeroMQ remote APi server port. You can do this by starting CoppeliaSim as follows:
Code: Select all
coppeliaSim -GzmqRemoteApi.rpcPort=portNb
Code: Select all
coppeliaSim -GxxzmqRemoteApi.rpcPort=portNb
-
- Posts: 14
- Joined: 13 Sep 2022, 17:22
Re: Running several scenes in parallel, is possible?
Well, I need more information to understand this.
- I updated my Coppelia to: V4.6.0 rev14.
- I use ZeroMQ remote API.
- I currently connect to Coppelia like this:
client = RemoteAPIClient()
sim = client.require('sim')
sim.setStepping(True)
sim.startSimulation()
sim.setBoolParam(sim.boolparam_display_enabled,False)
- To connect multiple scenes in parallel, what do I need to do? What do I need to change? Is there a step-by-step guide explaining how to do this?
- I updated my Coppelia to: V4.6.0 rev14.
- I use ZeroMQ remote API.
- I currently connect to Coppelia like this:
client = RemoteAPIClient()
sim = client.require('sim')
sim.setStepping(True)
sim.startSimulation()
sim.setBoolParam(sim.boolparam_display_enabled,False)
- To connect multiple scenes in parallel, what do I need to do? What do I need to change? Is there a step-by-step guide explaining how to do this?
Re: Running several scenes in parallel, is possible?
With CoppeliaSim V4.6.0 rev14 and later, you need to start each instance's ZeroMQ remote API server on a different port:
On the ZeroMQ remote API client side, you need to explicitly connect to one of the ports from above:
Cheers
Code: Select all
coppeliaSim -GzmqRemoteApi.rpcPort=portNb
Code: Select all
client = RemoteAPIClient('localhost', portNb)
-
- Posts: 14
- Joined: 13 Sep 2022, 17:22
Re: Running several scenes in parallel, is possible?
Right. What values for "portNb" can I use? Could you give me some examples? Is there a list of recommended values?
Re: Running several scenes in parallel, is possible?
e.g. 23001, 23002, 23003, etc.
Cheers
Cheers
-
- Posts: 14
- Joined: 13 Sep 2022, 17:22
Re: Running several scenes in parallel, is possible?
Ok!
Just one more question. Should this command line "coppeliaSim -GzmqRemoteApi.rpcPort=portNb" be used in the Linux terminal to open Coppelia? Why don't I open Copppelia through the terminal. I looked for this on the internet and I didn't find anything.
Just one more question. Should this command line "coppeliaSim -GzmqRemoteApi.rpcPort=portNb" be used in the Linux terminal to open Coppelia? Why don't I open Copppelia through the terminal. I looked for this on the internet and I didn't find anything.
-
- Posts: 14
- Joined: 13 Sep 2022, 17:22
Re: Running several scenes in parallel, is possible?
Ok, I think everything is fine here! The correct command line is ".\coppeliaSim.sh -GzmqRemoteApi.rpcPort=portNb".
Thank so much!!!!
Thank you for helping me! I am very grateful!
Thank so much!!!!
Thank you for helping me! I am very grateful!
Re: Running several scenes in parallel, is possible?
Hi,
I wonder if I use coppeliasim.bridge.load() to open several instances in different threads. Do I still need to set the port for different instances? If it is needed, how to set that? Thanks!
Best,
Kz
I wonder if I use coppeliasim.bridge.load() to open several instances in different threads. Do I still need to set the port for different instances? If it is needed, how to set that? Thanks!
Best,
Kz
Re: Running several scenes in parallel, is possible?
No, coppeliasim.bridge doesn't use ZMQ remote API.