Python remote API calls gets slower and slower

Typically: "How do I... ", "How can I... " questions
Post Reply
JoakimMagnusson
Posts: 2
Joined: 09 May 2018, 10:31

Python remote API calls gets slower and slower

Post by JoakimMagnusson » 15 May 2018, 12:44

Hi!

I'm writing a python script using the python remote API. When running my script i noticed it got slower and slower with time so I tried timing a remote API function call and could see the call taking longer and longer time the longer my script was running. Is it possible that I'm doing something wrong and causing this behavior, or this is a known problem perhaps?

For example, I timed my synchronoustrigger call like this:

Code: Select all

	dt = time.time()
        vrep.simxSynchronousTrigger(clientID) #Do one step in simulation
        dt = time.time() - dt
        print(1000*dt) #Convert to milliseconds 
At first the call takes approximately 10 ms but after a while(maybe 10 minutes) it takes 20 ms and it just keep increasing.

Any suggestion or explanation is appreciated.

Edit: I commented out my simxSetJointTargetPosition calls and the problem disappeared. But I need to use this call. Any ideas why this call is causing problems?

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

Re: Python remote API calls gets slower and slower

Post by coppelia » 18 May 2018, 13:51

Hello,

can you show us how and in which context you are calling simxSetJointTargetPosition?

Cheers

Post Reply