ways to communicate robots controlled by remote API

Typically: "How do I... ", "How can I... " questions
Post Reply
djav
Posts: 2
Joined: 27 Jan 2019, 01:26

ways to communicate robots controlled by remote API

Post by djav » 11 Feb 2019, 04:05

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
Last edited by djav on 13 Feb 2019, 00:14, edited 1 time in total.

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

Re: ways to communicate robots controlled by remote API

Post by coppelia » 12 Feb 2019, 10:08

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

djav
Posts: 2
Joined: 27 Jan 2019, 01:26

Re: ways to communicate robots controlled by remote API

Post by djav » 14 Feb 2019, 00:52

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?

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

Re: ways to communicate robots controlled by remote API

Post by coppelia » 20 Feb 2019, 13:35

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

Post Reply