Cant get Simulation working on Pi3

4 posts / 0 new
Last post
Cant get Simulation working on Pi3

We have set up a new SD card following the instructions on the FormulaPi website
(OpenCV, zeroborg, source forge for the code etc)....

No camera or zeroborg attached.

So far so good.

But we wanted to get the simulation running before we did anything else.

We cant get it running at all..... embarrassingly we have failed at point 1 of the suggested sequence
"1. Load the simulation (simulation.bat on windows)"

We are running on a Pi3 and have entered:-
java -jar sim.jar
In the terminal window and get the following error:-

pi@raspberrypi:~/formulapi/Simulation $ java -jar Sim.jar
Screen: [1920x1200]
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /home/pi/formulapi/Simulation/natives/linux-armv6hf//
at java.lang.ClassLoader.loadLibrary(
at java.lang.Runtime.load0(
at java.lang.System.load(
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibraryInternal(
at com.jogamp.common.jvm.JNILibLoaderBase.access$000(
at com.jogamp.common.jvm.JNILibLoaderBase$DefaultAction.loadLibrary(
at com.jogamp.common.jvm.JNILibLoaderBase.loadLibrary(
at com.jogamp.common.os.DynamicLibraryBundle$GlueJNILibLoader.loadLibrary(
at com.jogamp.common.os.Platform$
at Method)
at com.jogamp.common.os.Platform.(
at com.jogamp.opengl.GLProfile.(
pi@raspberrypi:~/formulapi/Simulation $

Not sure what to try next...

Any suggestions please on how to start the simulation on a Pi please ?

(I noticed in the simulation instructions it stated it would only work on a Pi if the ZeroBorg was not attached, its not but I have followed the instructoins re setup and install)



piborg's picture
Simulation on the Raspberry Pi

We would recommend running the Java part of the simulation on a different machine, either a Linux or Windows machine that supports OpenGL 3.2 is preferable.

We have not tested to see if the simulation will actually run on a Raspberry Pi or not.

The error you are seeing is because the libraries for running on Linux with an ARM processor (like the Raspberry Pi uses) have not been included.
If you want to test if it works you will need these missing files.

I have attached a zip file with the missing libraries to the bottom of this post.
You will need to unzip the contents into the ~/formulapi/Simulation/Sim_lib directory.

Comment Attachments: 
Same Error

Thank you for the reply

Downloaded and unzipped the file to the location you specified but still no go.

In fact we got exactly the same error as above unfortunately.

The way the instructions sounded I thought this had been tested on a Pi.

Any other suggestions please ?

I dont know anything about Java but I did notice when I unzipped the files, I got a series of files (with box icons) that were Java archie files. Do I have to unpack these in any way ? If I double click one, a version of Green Foot java opens up, when this happens a folder is created in the same sim.lib directory that contains the files that are mentioned in the error above. Ive tried creating a path the same as the error above. but the sim code still doesnt pick it up....

Also Im a little confused, when you say run the java part of the simulation on a PC, how do I then attached the race code ?


piborg's picture
Running the simulation

I think there is a bit of confusion here about what the simulation is.

The simulation comes in two parts:

  1. Simulation/Sim.jar written in Java.
    This part generates the camera image using a 3D model of the track and moves the YetiBorg based on the commands sent to the ZeroBorg.
    We would highly recommend running this on a different machine from the Raspberry Pi.
  2. written in Python.
    This part runs the actual Race Code as though it were driving the YetiBorg for real.
    It mimics the Raspberry Pi Camera and the ZeroBorg by using the other half of the simulation instead.
    This should be run on the Raspberry Pi itself.

These two halves use networking code to talk to each other via Ethernet or WiFi.
See the [] section in Guides/Simulation modes.txt for instructions on how to tell which machine it needs to talk to.

We generally recommend running the Java half on a Windows machine with a graphics card supporting OpenGL 3.2 or later (most Nvidia or ATI cards do).

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre>
  • Syntax highlight code surrounded by the <pre class="brush: lang">...</pre> tags, where lang is one of the following language brushes: bash, cpp, perl, python.
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Comment Images
Files must be less than 10 MB.
Allowed file types: png gif jpg jpeg.
Comment Attachments
Files must be less than 10 MB.
Allowed file types: txt pdf nfo doc docx rtf jpg png gif bmp zip tar gz csv xls.
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.