/ar-debug-workbench

Augmented reality workbench for printed circuit board (PCB) debugging (UIST 2022).

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

ar-debug-workbench

Augmented reality workbench for printed circuit board (PCB) debugging.

For more details, please see open-access publication: Ishan Chatterjee, Tadeusz Pforte, Aspen Tng, Farshid Salemi Parizi, Chaoran Chen, and Shwetak Patel. 2022. ARDW: An Augmented Reality Workbench for Printed Circuit Board Debugging. In Proceedings of the 35th Annual ACM Symposium on User Interface Software and Technology (UIST '22). Association for Computing Machinery, New York, NY, USA, Article 37, 1–16. https://doi.org/10.1145/3526113.3545684

/ardw-plugin/ has the code for the KiCAD 5.X action plugin. To enable it, place the folder in the appropriate /scripting/plugins/ directory (see IBOM's installation instructions for details). To use it, open a project in EESchema and File>Plot all pages as svg into the folder ./ardw/ (must create the first time). Then, open the project in pcbnew and click the icon on the toolbar. Two json files will show up in the /ardw/ folder and the svgs will be updated. Copying these files to /ardw-app/data/ will allow the app to run with them.

/ardw-app/ has the code for the web application. The first time, you must run 'export FLASK_APP=application'. Any time you pull, you also need to refresh the python modules. If using a virtual environment (recommended), run './refresh_python_modules.sh'. Otherwise, manually install the necessary modules with 'pip install -r requirements.txt'. Now, the server can be started with 'python application.py' and accessed at http://localhost:5000 (NOTE: 'flask run' will not work anymore, because it does not support sockets). Optionally, you can specify a different port as the next argument (eg. 'python application.py 3000'), or change the default port in 'config.ini'.

To compile the app into a unix executable, run 'pyinstaller -w -F --add-data "templates:templates" --add-data "static:static" application.py' from /ardw-app/. Ideally this is done from a virtual environment (or with as few modules as possible; see /ardw-app/requirements.txt), to keep the file size small. The executable 'application' will appear in /ardw-app/dist/ and can be run from the terminal (with a populated data/ folder in the same directory).