Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,6 @@ on: push

jobs:

test_installer:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.VEDC_PRIVATE_KEY }}
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Run installer
run: python installer/install_ved_capture.py -y -v -b ${GITHUB_REF##*/} --no_ssh --no_version_check

test_app:
runs-on: ubuntu-18.04
steps:
Expand All @@ -30,24 +16,14 @@ jobs:
run: |
conda --version
which python
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
id: extract_branch
- name: Create environment
env:
VEDC_DEV: true
VEDC_PIN: ${{ steps.extract_branch.outputs.branch }}
run: |
conda install -y -c conda-forge conda-devenv
conda devenv
- name: Copy paths.json
run: |
mkdir -p /home/runner/.config/vedc
cp tests/test_data/config/paths.json /home/runner/.config/vedc
conda install -y -c conda-forge mamba
mamba env create
- name: Run pytest
run: |
source activate vedc
mamba install -c conda-forge pytest
pytest

lint:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
environment.yml
**/out/
tests/test_data/user_config
scratch
Expand Down
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,41 @@

# ved-capture

**ved-capture** is the app for simultaneous recording of video, gaze and head
tracking data for the Visual Experience Database.
**ved-capture** is the app for simultaneous recording of video, gaze and head tracking data for the Visual Experience Database.

## Installation

The app can be installed on most Linux systems with a single Python script that
can be downloaded [here](https://github.com/vedb/ved-capture/blob/master/installer/install_ved_capture.py)
by right clicking on the "Raw" button and then "Save target as"
or on the [Releases page](https://github.com/vedb/ved-capture/releases).
The following instructions assume that you have installed an Anaconda/Miniconda Python distribution and have set up and SSH keypair with GitHub. If you haven't, please refer to the [installation instructions in the wiki](https://github.com/vedb/ved-capture/wiki/Installation).

$ python3 install_ved_capture.py
Clone the repository:

$ git clone ssh://[email protected]:vedb/ved-capture
$ cd ved-capture

Set up the environment:

$ conda env create

Configure system:

$ bash configure.sh

Reload `.bashrc` (or the appropriate rc file for your shell) and check installation:

The script will guide you through the setup process and instruct you what to
do. Since the app isolates all of its dependencies in a dedicated
environment, the installation has a size of about 3.5 GB, so make sure you
have enough space.
$ source ~/.bashrc
$ vedc check_install

## Usage

The central tool of this app is the command line tool `vedc`. You can use it
to generate recording configurations, make recordings, update the app and more.
The central tool of this app is the command line tool `vedc`. You can use it to generate recording configurations, make recordings and more.

### Generating a configuration

Plug in your hardware (Pupil core system, RealSense T265, FLIR camera) and run:

$ vedc auto_config

This will check your connected devices and auto-generate a configuration for
your current setup.
This will check your connected devices and auto-generate a configuration for your current setup.

### Streaming video

Expand All @@ -43,5 +48,4 @@ To show all camera streams, run:

### Other commands

Check out the [wiki](https://github.com/vedb/ved-capture/wiki) for a
comprehensive list of available commands.
Check out the [wiki](https://github.com/vedb/ved-capture/wiki) for a comprehensive list of available commands.
42 changes: 42 additions & 0 deletions configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# configure Pupil udev rules
sudo usermod -a -G plugdev $USER
echo 'SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="plugdev", MODE="0664"' | sudo tee /etc/udev/rules.d/10-libuvc.rules > /dev/null
sudo udevadm trigger

# configure Spinnaker udev rules
sudo groupadd -f flirimaging
sudo usermod -a -G flirimaging $USER
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="1e10", GROUP="flirimaging"' | sudo tee /etc/udev/rules.d/40-flir-spinnaker.rules > /dev/null
sudo /etc/init.d/udev restart

# increase USBFS memory
sudo sed -i s/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000"/ /etc/default/grub
sudo update-grub

# remove old vedc executable
sudo rm -f /usr/local/bin/vedc

# create alias
CLI_CMD="vedc-cli () { if [[ \$CONDA_DEFAULT_ENV = vedc ]]; then vedc \$@; else conda activate vedc; vedc \$@; conda deactivate; fi }"
ALIAS_CMD="alias vedc=vedc-cli"

if [[ "$SHELL" == *bash ]] ; then
RC_FILE="$HOME/.bashrc"
elif [[ "$SHELL" == *zsh ]] ; then
RC_FILE="$HOME/.zshrc"
else
echo "Could not determine shell type, add the following commands to your shell's rc file manually:"
echo "${CLI_CMD}"
echo "${ALIAS_CMD}"
exit 1
fi

if ! grep -Fxq "${CLI_CMD}" "${RC_FILE}"; then
echo "${CLI_CMD}" >> "${RC_FILE}"
fi

if ! grep -Fxq "${ALIAS_CMD}" "${RC_FILE}"; then
echo "${ALIAS_CMD}" >> "${RC_FILE}"
fi
34 changes: 3 additions & 31 deletions environment.devenv.yml → environment.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
{{ min_conda_devenv_version("2.1.1") }}

# set library version
{% set pri_version = "0.4.1" %}

# version and config dir can be overridden by env vars
{% set pri_pin = os.environ.get("PRI_PIN", pri_version) %}
{% if "VEDCDIR" in os.environ %}
environment:
VEDCDIR: {{ os.environ["VEDCDIR"] }}
{% endif %}

name: vedc

channels:
- conda-forge
- loopbio
- vedb

dependencies:
- python=3.6
- pip=20.1
Expand All @@ -29,7 +15,6 @@ dependencies:
# video
- opencv=4.2.0
- ffmpeg=3.4.2=x265_0
- av=6.2.0
- x264=1!152.20180806
- x265=2.8
# pupil
Expand All @@ -38,7 +23,8 @@ dependencies:
- libjpeg-turbo=2.0.5
- pyuvc=0.14
- msgpack-python=0.6.2
- pupil-detectors=1.0.5
- pupil-detectors=1.1.1
- pupil_recording_interface=0.5.0
# realsense
- librealsense=2.42.0
- pyrealsense2=2.42.0.2849
Expand All @@ -52,24 +38,10 @@ dependencies:
- click=7.1.1
# other
- matplotlib=3.1.1
- gitpython=3.1.0
- tqdm=4.46.0
- simpleaudio=1.0.2
- blessed=1.17.12
- multiprocessing-logging=0.3.1
# install local editable version of PRI if "PRI_PATH" is set
{% if "PRI_PATH" in os.environ %}
- pip:
- "--editable {{ os.environ['PRI_PATH'] }}"
{% else %}
- pupil_recording_interface={{ pri_pin }}
{% endif %}
# install local editable version of ved-capture
- pip:
- "--editable {{ root }}"
# development
{% if "VEDC_DEV" in os.environ %}
- pytest
- bump2version
- setproctitle
{% endif %}
- -e .
8 changes: 7 additions & 1 deletion installer/install_ved_capture.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
""" Installation script for ved-capture.

WARNING: THIS INSTALLER IS DEPRECATED AND WILL LIKELY NOT WORK!

This script will set up ved-capture including all of its dependencies as
well as the `vedc` command line interface.

Expand Down Expand Up @@ -28,7 +30,7 @@
import re


__installer_version = "1.4.4"
__installer_version = "1.4.5"

# -- LOGGING -- #
logger = logging.getLogger(Path(__file__).stem)
Expand Down Expand Up @@ -70,6 +72,8 @@ def show_welcome_message(yes=False):
"# Welcome to the VED capture installation script. #\n"
"###################################################\n"
"\n"
"WARNING: THIS INSTALLER IS DEPRECATED AND WILL LIKELY NOT WORK!\n"
"\n"
"This script will guide you through the setup process for VED "
"capture.\n"
"\n"
Expand All @@ -91,6 +95,8 @@ def show_welcome_message(yes=False):
"###################################################\n"
"# VED capture installation - auto-mode. #\n"
"###################################################"
"\n"
"WARNING: THIS INSTALLER IS DEPRECATED AND WILL LIKELY NOT WORK!\n"
)
return True

Expand Down
109 changes: 0 additions & 109 deletions installer/test_installer.py

This file was deleted.

25 changes: 0 additions & 25 deletions tests/test_cli.py

This file was deleted.

Loading