b0RemoteApi + synchronous mode

Typically: "How do I... ", "How can I... " questions
Post Reply
LauFe
Posts: 2
Joined: 12 Mar 2020, 12:20

b0RemoteApi + synchronous mode

Post by LauFe » 25 Mar 2020, 12:40

Hello!
I am having issues with B0-based remote API. At the moment, to make things simple and understand how the api works I am using Matlab, and if I run the following command obj = b0RemoteApi() it seems to get stucked at line 131 of b0RemoteApi.m:

Code: Select all

calllib(obj.libName,'b0_node_init',obj.node);
I though it was a library issue, so I checked b0 library, matlab paths etc and everything seems fine (e.g. no building errors, or not found libs).
Also, before running obj = b0RemoteApi() I ticked the checkbox b0RemoteApiServer is Coppelia sim.
Could you suggest any other way to see what is the issue?

I was using the RemoteApi, but I might have issues with synchronous operations, so I wanted to explore B0 API as well. Regarding sync operations, does B0 API provide any advantage over the standard API?
To set up the sync mode with RemoteApi I did the following:

Code: Select all

clientID = simxStart('127.0.0.1',19997,true,true,5000,5);
simxSynchronous(clientID,true);
Is there anything else I am missing?

Sorry for the many questions. Thank you a lot.

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

Re: b0RemoteApi + synchronous mode

Post by coppelia » 26 Mar 2020, 10:07

Hello, my guess is that you are using the wrong channel name. When using the B0-based remote API server via the add-on, then your channel name should be b0RemoteApiAddOn instead of b0RemoteApi.
Try with:

Code: Select all

client=b0RemoteApi('b0RemoteApi_matlabClient','b0RemoteApiAddOn');
Cheers

LauFe
Posts: 2
Joined: 12 Mar 2020, 12:20

Re: b0RemoteApi + synchronous mode

Post by LauFe » 26 Mar 2020, 10:32

Thank you, that worked perfectly! It was a bit confusing since as far as I understood the default channel name (line 68) is 'b0RemoteApi' if not argin is provided.
Thanks.

Post Reply