Exchange information between ePucks

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 39
Joined: 21 Sep 2017, 17:27

Exchange information between ePucks

Post by DavideIng »

I have set up a scene where a swarm of ePuck have to to exchange informations between closer neighbor like position or a color vector read from vision sensor ( there is a screen in front of all vision sensors painted with a uniform color).
Any suggestions?

Many thanks

Site Admin
Posts: 7857
Joined: 14 Dec 2012, 00:25

Re: Exchange information between ePucks

Post by coppelia »


you have several possibilities for that. For instance:

Code: Select all

--in script 1:

--in script 2:
local data=simReadCustomDataBlock(objectHandle,'myData')
local myLuaVariable=simUnpackTable(data)
in above example, myLuaVariable can be a variable of any complexity (e.g. table of table of map of random elements, etc.). Tables, maps, Boolean, nil, numbers, and strings are supported.


Post Reply