This is a node-js based intelligence to be used in the Eurobot and Coupe de France de Robotique contests. It is designed to be used on a rasberryPi, but is also used on Win/Mac/Linux for debug purposes.
It can be interfaced with microcontrollers through serial ports or wathever available on the host board.
Most of the command bellow will be addressed for a rapberryPi installation, on other plaforms read the text and use google, nothing is tricky.
- Run
uname -mto get your arch, andwgetthe corresponding file of the download page - To uncompress, you might need
xz -d file.tar.gz.xzandtar -xzf file.tar.gzortar -xf file.tar cdin the extracted folder and install withsudo cp -R * /usr/local/- voilà
- Move to the desired folder and
git clonethe repository, or download it.
The project requires a fex dependencies to run properly (it's a npm project!). One of them opencv4nodejs will take an extra long time to install on machines (hours on a raspberry pi)
- If you are on a raspberry, create a temporary swap file. A swap creates a virtual RAM file on your disk/SD card to temporarly let big programs run (required for the openCV compilation to succeed).
sudo dphys-swapfile swapoffsudo nano /etc/dphys-swapfileand edit toCONF_SWAPSIZE=2048sudo dphys-swapfile setupsudo dphys-swapfile swapon
- Install compilation and execution requirments with
sudo apt install -y build-essential cmake libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev mpg321 - INstal npm compilation helper
npm install -g node-gyp - From the repositry root, install npm packages with
npm i(This will be long, a few errors might appear, but unless its stops it's OK!) - A few packets need an extra compilation step, to do so, run:
npm install serialport --build-from-source