Setup zmqRemoteApi

Report crashes, strange behaviour, or apparent bugs
Post Reply
kamtah
Posts: 12
Joined: 31 Aug 2021, 09:56

Setup zmqRemoteApi

Post by kamtah »

Hello,

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 4.2.0.5 but 4.3.0.0 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.

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

Re: Setup zmqRemoteApi

Post by coppelia »

Hello,

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.

Cheers

r_dhak
Posts: 9
Joined: 02 Jan 2019, 15:10

Re: Setup zmqRemoteApi

Post by r_dhak »

Hello,
I am also trying to install the zmqRemoteApi, however I am also getting the same error.
CMake Error at /home/rohit/rohit/CoppeliaSim_4.2.0_rev5/CoppeliaSim_Edu_V4_2_0_Ubuntu18_04/programming/libPlugin/cmake/FindCoppeliaSim.cmake:17 (message):
Found CoppeliaSim version 4.2.0.5 but 4.3.0.0 required.
Call Stack (most recent call first):
/home/rohit/rohit/CoppeliaSim_4.2.0_rev5/CoppeliaSim_Edu_V4_2_0_Ubuntu18_04/programming/libPlugin/cmake/FindCoppeliaSim.cmake:136 (coppeliasim_find_error)
CMakeLists.txt:15 (find_package)
I checked the requirements for libPlugin

Minimum versions:

C++17 compiler (Visual C++ 2019, gcc-7, clang-3.9) ------ gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake 3.16.3 ---------------------------------------- cmake version 3.22.1
Python 3.8 ------------------------------------------ Python 3.9.7

I followed the exact steps:
$ git clone --recursive https://github.com/CoppeliaRobotics/zmqRemoteApi
$ mkdir zmqRemoteApi/build
$ cd zmqRemoteApi/build
$ cmake .. -------------------> Where error is occuring
$ cmake --build .
$ cmake --install .

Not sure what the problem is.
Any suggestion is greatly appreciated.

Thank You.

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

Re: Setup zmqRemoteApi

Post by coppelia »

Hello,

you do not need to compile the repository. You actually only need the repository for the client side Python items (i.e. in programming/zmqRemoteApi/clients/python)
But make sure you download the other required items, for CoppeliaSim V4.2.0 as explained on this page.

You can also have a look at the beta version of next CoppeliaSim. It should already have everything in place.

Cheers

Post Reply