Robot communications

Typically: "How do I... ", "How can I... " questions
Post Reply
dilysmoore
Posts: 1
Joined: 19 Aug 2024, 09:13

Robot communications

Post 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?

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

Re: Robot communications

Post 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

Post Reply