Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove eye_movement detector and Windows C++ docs #1828

Merged
merged 6 commits into from Mar 24, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/dependencies-macos.md
Expand Up @@ -87,8 +87,6 @@ pip install git+https://github.com/pupil-labs/PyAV
pip install git+https://github.com/pupil-labs/pyuvc
pip install git+https://github.com/pupil-labs/pyndsi
pip install git+https://github.com/pupil-labs/pyglui
pip install git+https://github.com/pupil-labs/nslr
pip install git+https://github.com/pupil-labs/nslr-hmm
```

**NOTE:** Installing **pyglui** might fail on newer versions of **macOS** due to missing OpenGL headers. In this case, you need to install Xcode which comes with the required header files.
Expand Down
2 changes: 0 additions & 2 deletions docs/dependencies-ubuntu17.md
Expand Up @@ -168,8 +168,6 @@ pip install git+https://github.com/pupil-labs/PyAV
pip install git+https://github.com/pupil-labs/pyuvc
pip install git+https://github.com/pupil-labs/pyndsi
pip install git+https://github.com/pupil-labs/pyglui
pip install git+https://github.com/pupil-labs/nslr
pip install git+https://github.com/pupil-labs/nslr-hmm
```

**NOTE**: If you get the error `ImportError: No module named 'cv2'` when trying to run Pupil, please refer to the section [OpenCV Troubleshooting](#opencv-troubleshooting) above.
Expand Down
2 changes: 0 additions & 2 deletions docs/dependencies-ubuntu18.md
Expand Up @@ -73,8 +73,6 @@ pip install git+https://github.com/pupil-labs/PyAV
pip install git+https://github.com/pupil-labs/pyuvc
pip install git+https://github.com/pupil-labs/pyndsi
pip install git+https://github.com/pupil-labs/pyglui
pip install git+https://github.com/pupil-labs/nslr
pip install git+https://github.com/pupil-labs/nslr-hmm
```

### OpenCV Troubleshooting
Expand Down
81 changes: 6 additions & 75 deletions docs/dependencies-windows.md
Expand Up @@ -8,27 +8,9 @@ Therefore we can only debug and support issues for **Windows 10**.

## Notes Before Starting

### Modularization Work in Progress

We are currently working on modularizing parts of Pupil, which will make running from source a lot easier on Windows, since the modules (including their dependencies) can be externalized. So far we already extracted one large module (the **pupil-detectors**). However we decided to clean up the dependency install instructions only after also having externalized the **optimization-calibration** module. This means that some of the following instructions may no longer be required to run Pupil from source. However, until we have cleaned up the instructions, we still recommend to go through the whole setup.

### Work Directory - Very Important!

We will make a directory called `work` at `C:\work` and will use this directory for all build processes and setup scripts. Whenever we refer to the `work` directory, it will refer to `C:\work`. You can change this to whatever is convenient for you, but note that many setup files have hardcoded references to `C:\work`, so changing this won't run without a lot of adjustments.

If for whatever reason you still don't want to use `C:\work`, you might want to consider creating a symbolic link at `C:\work` to your actual development folder. This might save you some work.

### Command Prompt

We will **always** be using `x64 Native Tools Command Prompt for VS 2017` as our command prompt. Make sure to only use this command prompt. Unlike unix systems, windows has many possible "terminals" or "cmd prompts". We are targeting `x64` systems and require the `x64` command prompt. You can access this cmd prompt from the Visual Studio 2017 shortcut in your Start menu.

### 64 Bit
You should be using a 64 bit system and therefore all downloads, builds, and libraries should be for `x64` unless otherwise specified.

### Windows Paths and Python

Windows uses backslashes `\` as path separators. In Python, this is a special "escape" character. When specifying Windows paths in a Python string you must either use `\\` instead of `\` or use [Python raw strings](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals), e.g. `r"\"`.

### System Environment Variables

You will need to check to see that Python was added to your system PATH variables. You will also need to manually add other entries to the system PATH later in the setup process.
Expand All @@ -46,38 +28,16 @@ To access your System Environment Variables:

For discussion or questions on Windows head over to our [#pupil Discord channel](https://discord.gg/gKmmGqy). If you run into trouble please raise an [issue on github](https://github.com/pupil-labs/pupil)!

## Install Visual Studio

Download Visual Studio 2017 Community version 15.8 from [visualstudio.com](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community)

- Run the Visual Studio bootstrapper `.exe`.
- Navigate to the `Workloads` tab
- In the `Workloads` tab, choose `Desktop Development with C++`. This will install all runtimes and components we need for development. Here is a list of what you should see `checked` in the `Desktop development with C++` in the `Summary` view:
- VC++ 2017 v141 toolset (x86,x64)
- C++ profiling tools
- Windows 10 SDK (10.0.15063.0) for Desktop C++ x86 and x64
- Visual C++ tools for CMAKE
- Visual C++ ATL support
- MFC and ATL support (x86, x64)
- Standard Library Modules
- VC++ 2015.3 v140 toolset for desktop (x86, x64)
- Navigate to the `Individual Components` tab
- In the `Individual Components` tab check `Git`. This will install `git` on your system. In the Summary Panel for `Individual Components` you should see:
- `Git for Windows`
- Click `Install`

**Note:** You can always re-run the Visual Studio bootstrapper to modify your Visual Studio installation.

## 7-Zip
Install [7-zip](http://www.7-zip.org/download.html) to extract files.

## Python

You will need a **64 bit version** of Python 3.6 or above, e.g. download [Python 3.6.8](https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe). If you install any other version, make sure to install the **64 bit version!**
You will need a **64 bit version** of Python 3.6, e.g. download [Python 3.6.8](https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe). If you install any other version, make sure to install the **64 bit version!**

**NOTE:** Currently our build process for WIndows does not yet support Python 3.7 as pyaudio does not yet have prebuild wheels for Windows available for Python 3.7. You are thus highly encouraged to use the latest stable version of Python 3.6.

If you downloaded to linked installer:
If you downloaded the linked installer:

- Run the Python installer.
- Check the box `Add Python to PATH`. This will add Python to your System PATH Environment Variable.
Expand Down Expand Up @@ -107,8 +67,6 @@ pip install git+https://github.com/zeromq/pyre

pip install pupil-apriltags
pip install pupil-detectors
pip install git+https://github.com/pupil-labs/nslr
pip install git+https://github.com/pupil-labs/nslr-hmm
```

## Pupil Labs Python Wheels
Expand All @@ -129,34 +87,23 @@ Open your command prompt and `Run as administrator` in the directory where the w
- Install all wheels with `pip install X` (where X is the name of the `.whl` file)
- You can check that libs are installed with `python import X` statements in the command prompt where `X` is the name of the lib.

## Ceres for Windows
Navigate to your work directory

- `git clone --recursive https://github.com/tbennun/ceres-windows.git`
- Download [Eigen 3.3.3](https://bitbucket.org/eigen/eigen/downloads/?tab=tags)
- Unzip Eigen and rename the extracted `eigen-eigen-67e894c6cd8f` directory to `Eigen`
- Copy the `Eigen` directory into `ceres-windows`
- Copy `C:\work\ceres-windows\ceres-solver\config\ceres\internal\config.h` to `C:\work\ceres-windows\ceres-solver\include\ceres\internal`
- Open `ceres-2015.sln` and with Visual Studio 2017 and agree to update to 2017.
- Set configurations to `Release` and `x64`
- Right click on `libglog_static` and `Build`
- Right click on `ceres_static` and `Build`

## Modifying Pupil to Work with Windows

Before you can start using Pupil from source on Windows, you will have to make a few additional changes to the repository.

### Clone Pupil Repository

Open a command prompt in your work dir and:
Open a command prompt where you want to clone the git repository, e.g. `C:\work\pupil`
Make sure you don't have spaces in your path to the repository as this has been repeatedly causing issues for users.
Then run:
```sh
git clone https://github.com/pupil-labs/pupil.git
```

### Include pupil_external in PATH Variable

- Follow the instructions under the System Environment Variables section above to add a new environment variable to PATH
- Add the following folder: `C:\work\pupil\pupil_external`
- Add the full path the `pupil_external` folder of the repository that you just cloned, e.g. `C:\work\pupil\pupil_external`
pfaion marked this conversation as resolved.
Show resolved Hide resolved
- You might have to restart your computer so that the PATH variable is refreshed

### Setup pupil_external Dependencies
Expand Down Expand Up @@ -188,22 +135,6 @@ The following steps require you to store dynamic libraries in the `pupil_externa
- `swresample-3.dll`
- `swscale-5.dll`

#### OpenCV

- Download opencv 3.4.5 exe installer from [sourceforge](https://sourceforge.net/projects/opencvlibrary/files/3.4.5/opencv-3.4.5-vc14_vc15.exe/download)
- Unzip OpenCV to your work dir and rename dir to `opencv`
- Copy `opencv\build\x64\vc14\bin\opencv_world345.dll` to `pupil_external`

### Modify optimization_calibration setup.py

- Open `pupil\pupil_src\shared_modules\calibration_routines\optimization_calibration\setup.py`
- Go to the `if platform.system() == 'Windows'` block
- Check that paths for `opencv`, `Eigen` and `ceres-windows` are correctly specified. The installed opencv lib is `opencv_world345.lib`.
- Edit paths if necessary
- Save and close setup.py

**Note:** When starting run_capture.bat, it will build the optimization_calibration module. However, if you are debugging, you may want to try building explicitly. From within `pupil/pupil_src/shared_modules/calibration_routines/optimization_calibration` run `python setup.py build` to build the optimization_calibration module.

## Start Pupil

To start either of the applications -- Capture, Player, or Service -- you can to execute the respective `run_*.bat` file (e.g. by double clicking), i.e. `run_capture.bat`, `run_player.bat`, or `run_service.bat`.
Expand Down
13 changes: 0 additions & 13 deletions pupil_src/shared_modules/eye_movement/__init__.py

This file was deleted.

16 changes: 0 additions & 16 deletions pupil_src/shared_modules/eye_movement/controller/__init__.py

This file was deleted.

This file was deleted.