Kilobot Monte Carlo Simulation

Requests regarding how to set up experiments in ARGoS.
novothsz
Posts: 3
Joined: Tue Jan 08, 2019 6:28 pm

Kilobot Monte Carlo Simulation

Postby novothsz » Mon Feb 11, 2019 5:48 pm

Dear ARGoS community!

I have written a behaviour for the Kilobots but I want to tune some parameters.
I have seen, that there is an example for footbots using the GAlib library. Of course it would be nice to be able to implement it but I am not good enough in programming for that.

So I was thinking about a more simpler example to begin with.
Let’s imagine there is one stationary Kilobot (K1) on the field, and another which will be mooving (K2). The task would be the following:

1.A loop function places K2 to a new gridpoint, K1 is placed allways to the same gridpoint.
2.void loop() of the Kilobot is executed 5 times
3.At last, the loop function saves the coordinates of K1 and K2 ( or better: it saves a spec variable from the memory of K2, like “int my_last_distance_fromK1;” )

These steps should be re-run in the loop function many times, until the specified gridpoints are covered.

(After this I would be able to analyse the saved final distances in Matlab.)


I tried to do something similar deleting and changing some line from the GAlib example but it is not working and then I even struggled with the CMakeLists.

Has someone done something similar?

Thanks in advance!
Szilárd
Attachments
src.zip
(386.54 KiB) Downloaded 1 time

novothsz
Posts: 3
Joined: Tue Jan 08, 2019 6:28 pm

Re: Kilobot Monte Carlo Simulation

Postby novothsz » Tue Feb 12, 2019 11:10 pm

Dear ARGoS community!

Let me ask a simpler question:
After changing up the CMakeLists (pls. refer to the zip file) and simplifying the GAlib loop functions “src/examples/loop_functions/galib_phototaxis_loop_functions/galib_phototaxis_loop_functions.cpp” (and header, but these are currently not even called)

and the ”src/embedding/galib/main.cpp” file I compile the code with:

cd build
cmake -DCMAKE_BUILD_TYPE=Release ../src
make
make install
cd ..

Thereafter I would like to execute the compiled version of the ”src/embedding/galib/main.cpp” so I write in the Terminal:
build/embedding/galib/galib_phototaxis

The result I get is:

Error: build/embedding/galib/galib_phototaxis was given 1 arguments
ARG 0: build/embedding/galib/galib_phototaxis
Usage: <script> <pid> <robot_id> <tick_length> <random_seed>

I am confused by this message, because the file in theory should simply cout<< a message to the screen (in my current setup) and absolutely nothing else.
Any idea, where I went wrong?
Sorry for these obvious questions, but I am new to these things and have nobody else to ask..

Thanks in advance!
Szilárd
Attachments
src 2.zip
(346.66 KiB) Downloaded 1 time

novothsz
Posts: 3
Joined: Tue Jan 08, 2019 6:28 pm

Re: Kilobot Monte Carlo Simulation

Postby novothsz » Thu Feb 14, 2019 11:11 am

Hmmm... I believe I am onto something and will be able to do what I wanted to do! :)


Return to “How to... ?”



cron