Page 1 of 1

Setup zmqRemoteApi

Posted: 30 Sep 2021, 13:22
by kamtah

I want to use zmqRemoteApi in order to communicate with python. So I tried to set it up as indicated on the ZeroMQ-based remote API page.
For CoppeliaSim V4.2.0, follow this procedure: clone the ZeroMQ-based remote API repository into your CoppeliaSim/programming folder. Then use this compatibility add-on and that script, and place them into your CoppeliaSim/ and CoppeliaSim/Lua folders respectively.
When I follow this procedure, Coppelia adds ZMQ remote API in the add-ons list but with an (error)
And the command tab shows me the following error:

[string "ZMQ remote API@addOnScript"]:120: attempt to call a nil value (field '__raiseErrors')
stack traceback:
[string "ZMQ remote API@addOnScript"]:120: in function 'sysCall_init'
[ZMQ remote API@addOnScript:error] 142: read in arg 1 (socket): expected string (in function 'simZMQ.close@simExtZMQ')
stack traceback:
[C]: in function 'simZMQ-typecheck.close'
[string "ZMQ remote API@addOnScript"]:142: in function 'sysCall_cleanup'

To describe more precisely what I did:
- I cloned the ZeroMQ-based remote API repository in CoppeliaSim/programming
- I downloaded the add-on and the script and placed them in their corresponding folder
- I converted the add-on and the script from .txt to .lua files
- I launched Coppelia and I got the error I showed above, so I tried to follow the procedure from ZeroMQ-based remote API github.
$ mkdir zmqRemoteApi/build
$ cd zmqRemoteApi/build
$ cmake ..
$ cmake --build .
$ cmake --install .
- but I get the following error at the "cmake .." step:
CMake Error at C:/Program Files/CoppeliaRobotics/CoppeliaSimPro/programming/libPlugin/cmake/FindCoppeliaSim.cmake:17 (message):
Found CoppeliaSim version but required.
But obviously, 4.3.0 is not out yet, so something else should have gone wrong

I'm using v4.2.0 rev5 with windows 10.

Re: Setup zmqRemoteApi

Posted: 01 Oct 2021, 08:24
by coppelia

you are right, we recently modified something, and now a third file is required: simZMQ.lua
Just replace the existing simZMQ.lua with above one.

The ZeroMQ-based remote API page was updated.