JIC-CSB / kilombo

Kilobot simulator in C
Other
43 stars 17 forks source link

Cannot run demo: Failed to parse kilombo.json #47

Closed theresa2403 closed 5 years ago

theresa2403 commented 5 years ago

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.

fjansson commented 5 years ago

It seems you run kilombo from a directory different from where the input file is located. The error message says unable to open kilombo.json - kilombo looks for this file in the current directory.

Try this:

theresa2403 commented 5 years ago

It helps, thank you. When I run ./orbit, it opens an empty window - so I can't see any kilobots in the simulation.

Here is the output from the terminal: Theresas-MacBook:orbit Theresa$ ./orbit Reading simulator parameters from kilombo.json Requested parameter: speedVariation is not a number. Using default value 0.000000. Requested parameter: turnOffsetVariation is not a number. Using default value 0.000000. Requested parameter: turnSlopeVariation is not a number. Using default value 0.000000. Requested parameter: pushDisplacement is not a number. Using default value 1.000000. Requested parameter: distanceCoefficient is not a number. Using default value 1.000000. Requested parameter: displayX is not a number. Using default value 0.000000. Requested parameter: displayY is not a number. Using default value 0.000000. Requested parameter: useGrid is not an integer. Using default value 1. Requested parameter: formation is not a string Size of kilobot structure : 248 Size of USERDATA structure: 24 Running 2 bots with timestep 0.041667 for total time 0.000000 0 s - 0 steps - 1 kilo_ticks 0.000 s. Simulation finished

I didn't change the code.

fjansson commented 5 years ago

I don't immediately know what's going on. The output looks normal.

You could try it on Linux, maybe in a virtualbox. We have used it on mac as well, but maybe not on the recent OS versions.

theresa2403 commented 5 years ago

I will try it on Linux in a vm.. perhaps it's working.

Thanks for your help and your quick answers! I will let you know, if it's working on Linux for me.

fjansson commented 5 years ago

Thanks for the screenshots. It seems the simulation is running but the graphics doesn't work.

I found an SDL issue with this version of MacOS, where the window is empty until you move or resize it. Could you please try to move and resize, and see if something appears? SDL is the graphics library we use. https://discourse.libsdl.org/t/macos-10-14-mojave-issues/25060

theresa2403 commented 5 years ago

I tried this, but nothing happens when moving the window.. And I can't resize the window. I think, I will try it on an ubuntu-based OS. (And I will let you know, if it's working)

Thank you very much for your responses. Unfortunately the problem doesn't sit in front of the computer 😉

theresa2403 commented 5 years ago

Works on my linux-vm! Thanks for your help.