connect python to the simulator's remote API

Report crashes, strange behaviour, or apparent bugs
Post Reply
Phil
Posts: 2
Joined: 11 Mar 2024, 18:00

connect python to the simulator's remote API

Post 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

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

Re: connect python to the simulator's remote API

Post 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

Phil
Posts: 2
Joined: 11 Mar 2024, 18:00

Re: connect python to the simulator's remote API

Post by Phil »

I installed the latest version and it works now, thanks!

Post Reply