summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-12-10 17:12:06 +0100
committerTimotej Lazar <timotej.lazar@fri.uni-lj.si>2015-12-10 17:12:06 +0100
commit54402dafb6781679cadffcbc06f4c4dac325887f (patch)
tree25dbad8140dd7cfe08de32f6e47d5ce4aef47453
parenta8f071742762cd135dc2c121cd6be72795efb73e (diff)
Add instructions for setting up the robot
-rw-r--r--readme.md57
1 files changed, 42 insertions, 15 deletions
diff --git a/readme.md b/readme.md
index 982e4cf..5e0053b 100644
--- a/readme.md
+++ b/readme.md
@@ -15,19 +15,19 @@ SWI prolog
----------
To use the correct SWI prolog package (>= 7.3) on Debian, add a custom
-repository by creating the file /etc/apt/sources.list.d/prolog.list
-containing the following 2 lines:
+repository by creating the file /etc/apt/sources.list.d/prolog.list containing
+the following lines:
-deb http://ppa.launchpad.net/swi-prolog/devel/ubuntu trusty main
-deb-src http://ppa.launchpad.net/swi-prolog/devel/ubuntu trusty main
+ deb http://ppa.launchpad.net/swi-prolog/devel/ubuntu trusty main
+ deb-src http://ppa.launchpad.net/swi-prolog/devel/ubuntu trusty main
-After that run the following sequence of shell statements to update
-the package cache, register the new repository's key, and again refresh
-the package cache using the additional key:
+After that run the following sequence of shell statements to update the package
+cache, register the new repository's key, and again refresh the package cache
+using the additional key:
-apt-get update
-apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EF8406856DBFCA18
-apt-get update
+ apt-get update
+ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EF8406856DBFCA18
+ apt-get update
libseccomp
----------
@@ -36,8 +36,8 @@ A new version of libseccomp (≥ 2.2) with Python bindings is needed to sandbox
Python interpreters. This is not available yet in most distributions. You can
download custom-built packages for Debian Jessie at
- http://codeq.si/libseccomp2_2.2.3-2_amd64.deb
- http://codeq.si/seccomp_2.2.3-2_amd64.deb
+ https://codeq.si/libseccomp2_2.2.3-2_amd64.deb
+ https://codeq.si/seccomp_2.2.3-2_amd64.deb
and install them using
@@ -79,7 +79,10 @@ Set environment variables:
CODEQ_DB_USER=<database user, default is 'codeq'>
CODEQ_DB_PASS=<database password, default is 'c0d3q'>
-Set up apache:
+Apache
+------
+
+Enable required modules:
a2enmod proxy proxy_http proxy_wstunnel rewrite
@@ -97,6 +100,27 @@ Add the following directives to the VirtualHost configuration:
ProxyPass /ws/ http://localhost:8083/ws/
ProxyPassReverse /ws/ http://localhost:8083/ws/
+Robot
+-----
+
+A Python server on the EV3 brick allows communication between the robot and the
+CodeQ application. First install the ev3dev environment on a microSD card by
+following the steps on http://www.ev3dev.org/docs/getting-started/.
+
+Copy robot/main.py to the ev3dev environment:
+
+ scp robot/main.py root@<robot's address>:/root
+
+SSH into the ev3dev environment and install the required packages:
+
+ apt install python3 libboost-python1.55.0 python3-setuptools python3-pil
+ easy_install3 --user eventlet python-engineio python-ev3dev==0.2.2
+
+Finally, ensure the server is run when the robot is powered on. Add the
+following line to /etc/rc.local just before `exit 0`:
+
+ python3 /root/main.py &
+
Running
=======
@@ -105,8 +129,11 @@ Running
- run the session daemon: python3 daemon.py
- run the web server for client communication: node web/main.js
+Notes
+=====
+
Testing
-=======
+-------
You can test stuff in a python interpreter:
@@ -127,7 +154,7 @@ To check for errors in hint definitions you can use the problem_html script:
python3 -m scripts.problem_html python introduction ballistics sl > out.html
Traces
-======
+------
Actions and corresponding additional attributes are specified here.