jic-csb / kilombo Goto Github PK
View Code? Open in Web Editor NEWKilobot simulator in C
License: Other
Kilobot simulator in C
License: Other
Can we restrict the motion area of kilobot to a bounded area?
Is it possible to compile the code on Windows?
With macro concatenation all callback setters can be unified to one function. Even better - the macro can be conditionally defined so that it resolves to an empty statement when compiling for the bots (another '#ifdef' less in user code).
Just a matter of politeness...
Includes into subdirectory?
For the simulation it would be nice to be able to supply a function that is called before the simulation starts (but only once, not once per bot). That could be used for example to read in simulation-specific parameters.
I'm trying to install kilombo on my Mac. But during make install
the following error occurs:
[ 96%] Building C object src/tests/CMakeFiles/check_skilobot.dir/__/neighbors.c.o
[100%] Linking C executable check_skilobot
Undefined symbols for architecture x86_64:
"_bot_sq_dist", referenced from:
_update_interactions in skilobot.c.o
_update_interactions_grid in neighbors.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/tests/CMakeFiles/check_skilobot.dir/build.make:172: recipe for target 'src/tests/check_skilobot' failed
make[2]: *** [src/tests/check_skilobot] Error 1
CMakeFiles/Makefile2:181: recipe for target 'src/tests/CMakeFiles/check_skilobot.dir/all' failed
make[1]: *** [src/tests/CMakeFiles/check_skilobot.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
There should be a way for the gui to display lighting.
The makefiles in the examples reference the swarmbots directory as the location for kilolib.
Currently there are plenty of warnings during compilation (mostly unused variables). Before release these should be fixed.
It seems currently use of the grid cache is hard-coded. It would be nice if the simulator could switch to the non-grid cache code below a certain (ideally configurable) threshold in pop size.
How to set the initial position of the robot in a fixed position?
Hello, is it possible to put two lights at the same time ?
Easy to put back in, but maybe this would be an opportunity to unify all collision mechanics.
My suggestion: add up all dx,dy resulting from push back by collsions with other bots and obstacles int the main collisions loop, then apply afterwards.
The name of the parameter file defaulting to EXEC.json might be handy but is IMHO unexpected for most users and can lead to surprising and unintuitive behaviour (e.g. if calling ../../my_bot).
I think the behaviour should be changed to a more conventional one: Automatically load parameter files with a fixed default name (e.g. "ckbsim.json") in the CWD, otherwise complain.
Hi all,
I worked through the manual to install and start Kilombo, but when I want to run an example I get the following error while executing the created orbit-file:
Theresas-MacBook:~ Theresa$ /Users/Theresa/Documents/Development/Studienarbeit/kilombo/examples/orbit/orbit ; exit;
Reading simulator parameters from kilombo.json
Failed to parse kilombo.json.
Line -1: unable to open kilombo.json: No such file or directory
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
Could you please help me? I think I've done something wrong.
Hi!
I installed kilombo in linux, but when I try to compile a program I get this error:
make #
gcc -lsim -lSDL -lm -ljansson -o orbit orbit.o
/usr/bin/ld: /usr/local/lib/libsim.a(stateio.c.o):/home/ju/kilombo/src/stateio.c:14: multiple definition of `callback_json_state'; /usr/local/lib/libsim.a(skilobot.c.o):/home/ju/kilombo/src/skilobot.c:31: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:110: orbit] Error 1
I had kilombo installed in my previous laptop (with same linux system) and it worked fine.
Hope you can help me!
Is there a way to pass in parameters to the Kilobot simulation from the command line.
Essentially I am wanting to pass in parameters which I plan to set as global variables for that particular simulation. I couldn't see a way to do this in the manual and I have tried passing params in from the command line, however, I can't seem to locate them within argv.
I am trying to optimise a problem by means of an evolutionary algorithm. I was planning on having a python script which would call the simulator as a subprocess, passing in a few parameters. I would then like the subprocess to return a fitness value, declaring how well that swarm performed on that particular simulation. Do you have any suggestions on how I can pass in params, which I get then set as const variables before execution?
Possibly remove these options.
The documentation of parameters for the simulator could be improved:
Hi, I got an error when I execute sudo make install, and the error is
[ 3%] Building C object src/CMakeFiles/headless.dir/skilobot.c.o /Users/suyu/research/kilombo-master/src/skilobot.c:8:10: fatal error: 'jansson.h' file not found
My system is Mac OS. I have installed xcode, and installed cmake, check, and sdl using brew. I also installed jansson, which is of version 2.13.1. The error means that it cannot find jansson.h but there is a file called jansson.h in /usr/local/include, and I added the C_INCLUDE_PATH to the bash_profile.
Implement the automatic versioning as shown by Matthew. Ideally also provide a simple way to do the same for user code.
I think the mydata pointer that is provided by the framework should either have a name that reflects that it is part of that framework (kmydata, kilo_data, etc.) or it should be possible to set a custom name. The default name (apart from being a bit lame) is so generic it will clash with user programs.
Hi,
I am using kilombo as my chosen simulator for kilobots (very good, by the way!) but i have one issue:
The set_motion() function for going straight is not working on the examples (follow and orbit), although they turn right and left with the same function.
I looked into the src code files, and could be related to the variable and function declaration for straight motion on skilobot.c and kbapi.c , but i just can’t figure it out.
Is this a general bug or is just me that has this issue?
Thanks!
The BMP screenshots are big and clumsy, unfortunately it is the only format SDL saves directly.
PNG support could be added, using libpng through this small SDL extension library:
https://github.com/driedfruit/SDL_SavePNG
http://forums.libsdl.org/viewtopic.php?t=9049&sid=7bcf78199f9ad2542579e3e56c53af1c
In order to get rid of the awkward include-after-USERDATA-declaration we could instead declare a macro that does what the #ifdef in userdata.h does right now. Then we could just include one header (e.g. simulator.h) that itself includes kilolib.h and stdlib.h and takes care of all the simulator-specific admin stuff. The first lines of user code would then look like this:
#include <simulator.h>
struct {
....
} MyStuff;
REGISTER_USERDATA(MyStuff);
Opinions?
Hi all,
I'm trying to install Kilombo on my Mac running High Sierra. I made it to the sudo make install
command, but run into this problem:
[ 3%] Building C object src/CMakeFiles/headless.dir/skilobot.c.o
/Users/joemacinnes/kilobots/kilombo/src/skilobot.c:8:10: fatal error:
'jansson.h' file not found
#include <jansson.h>
^~~~~~~~~~~
1 error generated.
make[2]: *** [src/CMakeFiles/headless.dir/skilobot.c.o] Error 1
make[1]: *** [src/CMakeFiles/headless.dir/all] Error 2
make: *** [all] Error 2
I definitely installed the jansson library using Brew, but it seems like it can't find it. Any ideas on how I should solve this? Thanks!
Currently kilobot objects are created and stored separately (as an array of kilobot *). Storing them contiguously (as array of kilobot) might increase speed (needs to be tested though).
It would be handy if parameter values from the json file could be overriden on the commandline (e.g. for easy parameter sweeps).
I'm trying to install Kilombo and when running the command sudo make install I get these errors:
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x584): undefined reference to `subunit_test_start'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x63f): undefined reference to `subunit_test_fail'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x654): undefined reference to `subunit_test_pass'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libcheck.a(check_log.o): In function `subunit_lfun':
(.text+0x66f): undefined reference to `subunit_test_error'
collect2: error: ld returned 1 exit status
src/tests/CMakeFiles/check_skilobot.dir/build.make:172: recipe for target 'src/tests/check_skilobot' failed
make[2]: *** [src/tests/check_skilobot] Error 1
CMakeFiles/Makefile2:181: recipe for target 'src/tests/CMakeFiles/check_skilobot.dir/all' failed
make[1]: *** [src/tests/CMakeFiles/check_skilobot.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Not sure if I'm doing something silly or if I'm missing something obvious.
Add a nice page with pictures.
new and old callbacks should be settable via the same/a similar API
Bots differ significantly WRT movement behaviour. Might be nice to have in the simulator.
missing:
turn_rate (should also be turnRate to stay consistent)
speed
unclear:
timeStep (after looking through the code I realized that this is actually the integration step and thus belongs into the 'simulation' category)
typos:
The names of the noise parameter are actually camelCase.
Hello,
I've been using Kilombo for a while now, but then something went wrong (possibly after an Xcode update). Whenever I run, the attached picture is what I get (just blank). I tried running the example code given, but still get the blank screen (this issue was not there before, only happens when I recompile now - even if it is the same code that was working before).
I tried installing Kilombo again and compiling and running the example codes, but I get the same issue. Any ideas on what went wrong?
Thanks!
State data is currently collected into one huge json object and dumped in one go at the end of the simulation.
It would be nice if output were incremental, since
Potential problems:
Greetings Kilombo Team,
I'm trying to install Kilombo on my Mac running OS High Sierra looking at the Instructions given by the Readme under OSX systems. When running the command, brew install avr-libc, I get these errors:
Error: No available formula with the name "avr-libc"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
==> Searching local taps...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
All the previous brew commands completed successfully, only at this point is when the setup becomes unsuccessful.
At the same time, when trying yo run cmake .. under ~/build directory, I am getting this error:
CMake Error: The source directory "/Users/galvez" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
Could this error also be tied to the unsuccessful run by install avr-libc?
Thank you and hope to hear from you soon.
If I set commsRadius to 100, estimate_distance very rarely (3 times in a sim with 200 bots over 10k ticks) produces 101.
Obstacles should be visible in the GUI.
Currently they are called libheadless and libsim which is a) pretty generic (and thus likely to clash) and b) not very meaningful. I suggest using libkilombo and libkilombo_hl instead.
I think it might even be nice to have that done before release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.