Page 1 of 1

connect python to the simulator's remote API

Posted: 11 Mar 2024, 18:04
by Phil
Hi!

When I Trying to communicate with the remote API of the V-REP/CoppeliaSim simulator, it gives me wrong message,like:

Traceback (most recent call last):
File "run.py", line 75, in <module>
environment.connect() # Connect python to the simulator's remote API
File "env.py", line 107, in connect
self.set_boolean_parameter(0, False)
File "env.py", line 184, in set_boolean_parameter
vrep.simxSetBooleanParameter(self.client_id,
File "/libs/sim/sim.py", line 665, in simxSetBooleanParameter
return c_SetBooleanParameter(clientID, paramIdentifier, paramValue, operationMode)
ctypes.ArgumentError: argument 1: <class 'TypeError'>: wrong type

I use macOS 14 intel chip and with CoppeliaSim 4.5.1EDU, could you help me solve this problem? thanks!

Best regards,
Phil

Re: connect python to the simulator's remote API

Posted: 12 Mar 2024, 16:33
by coppelia
Hello,

make sure to use the newest CoppeliaSim version (i.e. V4.6) and the ZeroMQ remote API (instead of the legacy remote API, which is deprecated)

Cheers

Re: connect python to the simulator's remote API

Posted: 12 Mar 2024, 22:53
by Phil
I installed the latest version and it works now, thanks!