Page 1 of 1

SetChanged()

Posted: Wed Jul 03, 2019 1:28 pm
by badri86
I'm using SetChanged() function to update floor texture, but the simulation becomes slow and heavy when NBR of targets > 100 :!: :?:

Re: SetChanged()

Posted: Wed Jul 03, 2019 4:07 pm
by pincy
Every time you use SetChanged(), a new texture is created. This makes the simulation slow. If you run ARGoS without visualization, there is no need for a new texture and the simulation is very fast.

Re: SetChanged()

Posted: Wed Jul 03, 2019 6:20 pm
by badri86
there is no another methods to replace stchange() in foraging example??

Re: SetChanged()

Posted: Wed Jul 03, 2019 6:24 pm
by pincy
If you tell me what you're trying to accomplish, I can try and help you.

Re: SetChanged()

Posted: Wed Jul 03, 2019 6:37 pm
by badri86
I'm devloping an algorithm of foragin with multi-nest and distribution, I'm starting with modified foraging example of ARGoS but when I use plus of 100 targets and 24 robots, the simulation will be slow

Re: SetChanged()

Posted: Wed Jul 03, 2019 6:41 pm
by pincy
There really isn't a way around this if you want to visualize the simulation. Without the GUI, ARGoS is extremely fast because no texture needs to be generated. You can make the textures less heavy to generate by working on the resolution - check the inline help of "argos3 -q floor" and read the part about "pixels_per_meter".

Re: SetChanged()

Posted: Wed Jul 03, 2019 6:55 pm
by badri86
thank you, i'm changed value of pixels_per_meter to 25, :idea: