Code Monkey home page Code Monkey logo

kilombo's People

Contributors

davxy avatar fjansson avatar islavkov avatar jorrenbosga avatar mhinsch avatar mrmh2 avatar ncarher avatar tjelvar-olsson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kilombo's Issues

compiler warnings

Currently there are plenty of warnings during compilation (mostly unused variables). Before release these should be fixed.

incremental state data output

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

  • it means there is at least some output if the program crashes
  • for frequent data collection memory use can become an issue.

Potential problems:

  • efficiency (needs to be tested)
  • incremental output of a single json object might not be supported by jansson, so either the output format would have to change (multiple json objects instead of one big array) or be faked.

Put two lights

Hello, is it possible to put two lights at the same time ?

Not installing on Ubuntu 16.04

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.

straight motion not working on kilombo

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!

install error

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.

Cannot run demo: Failed to parse kilombo.json

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.

setup hook

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.

nicer implementation for userdata and other simulator-specific stuff

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?

minor issues with parameter docs

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.

rename mydata and/or make it customizable

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.

Trouble finding dependencies while installing

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!

store kilobots in contiguous memory

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).

Passing in parameters to kilobots from command line.

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?

rename library binaries

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.

auto-versioning

Implement the automatic versioning as shown by Matthew. Ideally also provide a simple way to do the same for user code.

multiple definitions of 'call_back_json' error

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!

default parameter file name is unexpected

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.

inter-bot variation

Bots differ significantly WRT movement behaviour. Might be nice to have in the simulator.

Blank simulator window

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!

Screen Shot 2019-06-14 at 8 39 51 PM

brew install avr-libc fails to run on Mac OS High Sierra

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.

documentation of sim parameters

The documentation of parameters for the simulator could be improved:

  • Currently parameters are listed in essentially random order which makes it difficult to find info on a specific parameter. List them by section or alphabetically instead.
  • Each parameter should have its default value clearly indicated in a standard format (e.g. in []).

macroify callback system

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).

Installation fails on OSX Sierra

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.