Page 1 of 1

Robot communications

Posted: 19 Aug 2024, 09:16
by dilysmoore
what is the best way to allow small robots in vrep to communicate with each other, for example, 4 robots, theyre given a task, what is the best way to give the task to one of them and it will transmit the task to the other 3 so they can make a formation?

Re: Robot communications

Posted: 19 Aug 2024, 09:24
by coppelia
Hello,

you can use sim.broadcastMsg to broadcast the message, and in the receiving scripts, use a msg callback function:

Code: Select all

function sysCall_msg(msg, origin)
    print(msg, origin)
end
Cheers