Receiving timeout after long time running when calling vrep.simxSynchronousTrigger

Typically: "How do I... ", "How can I... " questions
Post Reply
jetyau
Posts: 2
Joined: 13 Nov 2018, 06:54

Receiving timeout after long time running when calling vrep.simxSynchronousTrigger

Post by jetyau » 29 Nov 2018, 09:31

Hello,

I am using python API to communicate with VREP to train my reinforcement learning algorithm.
However, I found that it would return a timeout flag after a few hours (about 6 hours) training when resetting environment .

I am totally new to VREP, and the information I offered might be not enough to judge where this problem is. Could you please give me some hints about this problem? What factors might cause this issue or what kind of information should I collect to figure this issue?

The following is a part of the error log.

File "/usr/local/lib/python3.5/dist-packages/vrep_env/vrep_env.py", line 170, in step_simulation
self.RAPI_rc(vrep.simxSynchronousTrigger(self.cID))
File "/usr/local/lib/python3.5/dist-packages/vrep_env/vrep_env.py", line 50, in RAPI_rc
raise RuntimeError('Remote API return code: ('+str(ret)+': '+self.str_simx_return[ret.bit_length()]+')')
RuntimeError: Remote API return code: (3: simx_return_timeout_flag)


Thanks a lot

coppelia
Site Admin
Posts: 6867
Joined: 14 Dec 2012, 00:25

Re: Receiving timeout after long time running when calling vrep.simxSynchronousTrigger

Post by coppelia » 03 Dec 2018, 06:57

Hello,

this is difficult to say. Does the server (i.e. V-REP) crash at that time? Can you reconnect to the server by simply restarting the client side?

Cheers

jetyau
Posts: 2
Joined: 13 Nov 2018, 06:54

Re: Receiving timeout after long time running when calling vrep.simxSynchronousTrigger

Post by jetyau » 05 Dec 2018, 01:33

V-REP doesn't crash. However, I cannot control/communicate with VREP whether through API or GUI. There is simply no response from VREP after timeout flag.
I can reconnect to VREP if I restart both client and VREP, but it won't work if I don't restart VREP.

Thanks

coppelia
Site Admin
Posts: 6867
Joined: 14 Dec 2012, 00:25

Re: Receiving timeout after long time running when calling vrep.simxSynchronousTrigger

Post by coppelia » 05 Dec 2018, 11:34

Mmmh, difficult to say. At simulation end, are you discontinuing the data streaming (with simx_opmode_discontinue) that you started with simx_opmode_streaming? If not, it could be that more and more data is being streamed to your client, sometimes even if that data doesn't exist andymore, or doesn't make sense.

Cheers

Post Reply