Page 1 of 1

ways to communicate robots controlled by remote API

Posted: 11 Feb 2019, 04:05
by djav
Hello, I´m aware of Signals but I´m asking because I have two robots controlled with c/c++ remote API, I want that the two robots be able to pass data to each other.

After a little research seems that I can´t use wireless communication with a remote API (correct me if I´m wrong) and there is no documentation and functions in the remote API that let me control a transceiver to send and receive data (again, correct me if I´m wrong)

I´m getting a hard time trying to use the simxGetStringSignal and I can´t find any examples of how use these functions. It would be of great help to have some example and having some other way to communicate these two robots using remote API

Re: ways to communicate robots controlled by remote API

Posted: 12 Feb 2019, 10:08
by coppelia
Hello,

maybe the best and easiest would be to simply use simxCallScriptFunction: using that function, you can call a script function, that itself can call various local API function (i.e. within V-REP).
You can find an example in programming/remoteApiBindings/lib/complexCommandTest.cpp

Cheers

Re: ways to communicate robots controlled by remote API

Posted: 14 Feb 2019, 00:52
by djav
But I need the data on the remote API, I can call a script but if I don´t have the information on remote API side it´s useless. Working with signals may do trick.

Maybe I can make a transceiver to create the signals and get them in the remote API or simxCallScriptFunction with them.

Thanks for the answer, there is any info about transceiver and how they work?

Re: ways to communicate robots controlled by remote API

Posted: 20 Feb 2019, 13:35
by coppelia
If you need the data on the remote API client side, you can still use simxCallScriptFunction: but make sure that the function returns the desired data. If you use that function call with the streaming operation mode, that function will automatically be called in each simulation step, and you can collect the latest data with it.

Cheers