Hi fellow,
I'm trying to train a reinforcement learning agent, and the simulation environment was constructed using CoppeliaSim. To accelerate the training process, I want to run multiple environments simultaneously. I have already figured out how to run several CS and establish a connection using ZMQRemoteAPI using different port numbers, like this:
in terminal: ./coppeliaSim.sh -GzmqRemoteApi.rpcPort=23001 -h
in Python script:
client = RemoteAPIClient(host='localhost',port = port)
self.sim = client.getObject('sim')
However, the problem is that after running the second environment, this error message showed up:
[sandboxScript:info] Simulator launched, welcome!
[Connectivity >> WebSocket remote API server@addOnScript:error] 124: in sim.genericFunctionHandler: Address already in use
stack traceback:
[C]: in function 'simWS.start'
[string "Connectivity >> WebSocket remote API server@a..."]:124: in function 'sysCall_init'
Since the info is shown as an error, I thought I should not ignore it.
Is there any solution?
Thanks
Running Multiple Headless Simulation
Re: Running Multiple Headless Simulation
If you don't use the WebSockets Remote API nor the WebSockets (simWS) plugin, you can safely ignore that error.
You can pass command line option
You can pass command line option
-GwsRemoteApi.autoStart=false
to disable the WebSockets Remote API Server if you don't want to see that error.