Commit 0b54cd3a authored by Andreas Schmidt's avatar Andreas Schmidt

Control demo is scripted.

parent bfecc19f
......@@ -26,6 +26,11 @@ The virtual machine is bridged to the physical interface where the hosts are att
### States
#### Demo
* Execute `demo.control` to deploy the control demo.
* Execute `demo.video` to deploy the video demo.
#### Gstreamer
Gstreamer is installed from the sources, which are fetched from GitHub. We are using `gst-uninstalled`, a environment system much as virtualenv for Python. As we are using many different gstreamer elements, we build all plugins together with Gstreamer.
......
Subproject commit e193e8e6af924689c946d1d6ad53e514519be6c5
Subproject commit 681398a0bc275b4122e1fa568bd3b4e5c8ec1bff
#!/bin/bash
rounds=180
killall python3
if [ "$1" != "plant" ] && [ "$1" != "controller" ]; then
echo "Usage: control_demo.sh [mode]"
echo " mode = plant, controller"
exit;
fi
while true; do
if [[ $1 == "controller" ]]; then
python3 /opt/rna/apps/sine.py ctrl -t 10.8.0.102 -c udp -r $rounds &
python3 /opt/rna/apps/sine.py ctrl -t 10.8.0.102 -c prrt -r $rounds &
wait
sleep 1;
fi
if [[ $1 == "plant" ]]; then
tmux new-session -d "python3 /opt/rna/apps/sine.py plant -t 10.8.0.102 -c prrt -r $rounds"
tmux split-window -h "python3 /opt/rna/apps/sine.py plant -t 10.8.0.102 -c udp -r $rounds"
tmux -2 attach-session -d
fi
sleep 1;
done
......@@ -9,3 +9,11 @@ rna_apps:
dependencies:
cmd.run:
- name: pip3 install drawille
demo_script:
file.managed:
- name: /home/rna/control_demo.sh
- source: salt://apps/files/control_demo.sh
- user: rna
- group: rna
- file_mode: keep
include:
- apps.deploy
#include:
# - video.deploy
include:
- video.deploy
demo_script:
file.managed:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment