Page 1 of 1

is it possible to SetExperimentFileName multiple times

Posted: Tue Apr 27, 2021 10:26 am
by AshwinRaviraj
I'm trying to run multiple different .agrog setup. For example in one of my setups there are no obstacles and in another one there are obstacles.

What I have done is create a main.cpp where I load an experiment, but when I try to call SetExperimentFileName, after the first experiment is finished, I cannot place the amount of robots that I want to. But when I run the one .argos file that gives me an error alone, it works just fine.

So, I believe the issue is from the way I'm using SetExperimentFileName.

Re: is it possible to SetExperimentFileName multiple times

Posted: Tue Apr 27, 2021 11:36 am
by pincy
You can't use SetExperimentFileName multiple times. You have two options: either you create multiple files and load them in a sequence - not in the main.cpp, but using a Bash script; or you write your obstacle placement logic in the loop functions (see the "custom distributions" example).

Re: is it possible to SetExperimentFileName multiple times

Posted: Tue Apr 27, 2021 1:16 pm
by AshwinRaviraj
Alright, thx!