How to set up a nest!

Requests regarding how to set up experiments in ARGoS.
Wleo
Posts: 7
Joined: Fri Feb 05, 2016 8:15 pm

How to set up a nest!

Postby Wleo » Fri Feb 05, 2016 10:58 pm

Hello guys,

I have been using ARGoS quite a while now running through the examples. I have a project to do about swarm Robotics doing a foraging task.
So I was trying to change the foraging example to place the nest (grey area) in different places, change the size too. I think it needs to do with the foraging_loop_function documents, I have change some stuff but I havent find any way to change the place or size of the nest, I have spend a lot of time in this!!!

I know it needs to do with the colour of the floor, so I used an .png image, this did not fix the problem. The food (black dots) did not show in the image but the footbot pick up the food anyway....then they return to the initial position after the search which it was not the nest I set up.

Any help will be appreciated, I may be doing it wrong, but I cant see another way!
Great work with ARGoS very interesting simulator.

Thanks in advance,
Leonardo.

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: How to set up a nest!

Postby pincy » Fri Feb 05, 2016 11:14 pm

Hi Leonardo,
I think it needs to do with the foraging_loop_function documents
Yes, that is the reference example for your needs.
to place the nest (grey area) in different places, change the size too [...]
I know it needs to do with the colour of the floor, so I used an .png image, this did not fix the problem.
Using a .png sets a static color for the floor. If you need to have dynamic color changes, you need to implement the method 'GetFloorColor()' in your loop functions so that it reflects the current color of the floor. An example of this is indeed offered in the foraging source files. Check that method out, and look at how the floor status is changed in the PreStep() method: every time a robot picks up an 'object' (a black patch), the method m_pcFloor->SetChanged() is called.

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”