Temporality removing robots from simulation

Requests regarding how to set up experiments in ARGoS.
jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Temporality removing robots from simulation

Postby jharwell » Thu Dec 12, 2019 6:42 pm

Hi Carlo,

I'm currently investigating how swarm performance changes (or doesn't) as the swarm population size changes dynamically, and am wondering if there is a way to temporarily remove robots from simulation (or alternatively, just move them out of sight for a period of time) ? I want to be able to do this to simulate robots being removed for repair before being reintroduced back into service once they are fixed.

I can disable their controllers so they don't move, but right now the entity is still in the arena, acting as a movable obstacle. If I try to move a robot out of bounds somewhere, I get a physics engine error with what I've tried so far.

Thanks!

- John

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

Re: Temporality removing robots from simulation

Postby pincy » Thu Dec 12, 2019 7:45 pm

The way I have done in the past is by making the arena larger and put robots outside. It's just enough to have boundary walls that prevent the robots inside from colliding with the robots outside.

A possible patch I can add is that, when robots are disabled, they also get removed from the physics engines and the media. This way they won't be simulated at all. Then, when the robots are added back, they get added at the last location they occupied.
I made ARGoS.

jharwell
Posts: 67
Joined: Thu Jan 25, 2018 4:12 am

Re: Temporality removing robots from simulation

Postby jharwell » Thu Dec 12, 2019 9:14 pm

The second way sounds like the "correct" way to provide this functionality--is this a simple patch that I could implement, if you point me to where things needs to be changed, or will it require more extensive modifications?

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

Re: Temporality removing robots from simulation

Postby pincy » Fri Jan 03, 2020 7:03 am

I'll try to find some time to study this in the weekend.
I made ARGoS.

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

Re: Temporality removing robots from simulation

Postby pincy » Fri Jan 10, 2020 7:05 am

There are two ways to implement this functionality.

The first is to add specific behavior to CEmbodiedEntity when SetEnabled(false) is called. The new behavior should physically remove the entity from the physics engine. This has a the added benefit of being "generic", meaning that we don't need to implement any engine-specific logic to make it work. This requires quite a bit of work, because at the moment things are not designed to support this use case.

The second option is to disable the physics model in the physics engine. This might the "correct" way for some physics engines, but not all physics engines support this use case. Also, the drawback of this method is that this feature must be implemented for each physics engine individually.
I made ARGoS.


Return to “How to... ?”