diff --git a/CITATION.cff b/CITATION.cff index b0fcb66..391abc7 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -6,7 +6,7 @@ authors: orcid: "https://orcid.org/0000-0001-9346-5787" - family-names: "Maintz" given-names: "Tommy" -title: "My Research Software" +title: "ML-MoCap" version: 2.0.4 doi: 10.0000/FIXME date-released: 2021-07-30 @@ -23,11 +23,7 @@ preferred-citation: - family-names: "Geelen" given-names: "Jinne" orcid: "https://orcid.org/0000-0001-9346-5787" -# doi: "10.0000/00000" - title: "My awesome research software" - booktitle: "Booktitle" - series: "Series" + doi: "10.1109/EMBC46164.2021.9629749" + title: "MarkerLess Motion Capture: ML-MoCap, a low-cost modular multi-camera setup." year: 2021 - pages: "100-101" - publisher: "N" - address: "Nn" + publisher: "IEEE (EMBC)" diff --git a/Installation_CameraModules.md b/Installation_CameraModules.md index 833c6f2..20b6460 100644 --- a/Installation_CameraModules.md +++ b/Installation_CameraModules.md @@ -1,21 +1,35 @@ # Installation Camera Modules -1. Download the [custom camera image](4TU?) file to build the camera module operating system on the SD cart. -Note! The camera modules are installed one-by-one. Finish all steps for camA before you continue to install camB. -2. Add the custom image to one of the SD carts with [Raspberry Pi Imager](https://www.raspberrypi.com/software/) -3. Connect power supply and insert the SD cart into the Pi -4. Change the hostname from 'cameraX' to the preferred incremental name in order of installation. -5. Check/Choose/Fix the IP address of the module (TBD) -6. Choose prefererred username and password for your controller - 1. Enter `sudo raspi-config` in a terminal window - 2. Select `Change user password` - The default user on Raspberry Pi OS is `pi` with the password `raspberry`. You can change that here. - 3. Set the visible name for this Pi on a network -4. Add Remote Access - 1. Enter `sudo raspi-config` in a terminal window - 2. Select Interfacing Options - 3. Navigate to and select SSH - 4. Choose `Yes` - 5. Select `Ok` - 6. Choose `Finish` -5. Enable/disable the CSI camera interface. +1. Download the [custom camera image](SD_images/mlmocap_camera.img.gz) file to build the camera operating system on the SD card. +*Note!* The camera modules are installed one-by-one. Finish all steps for camera1 before you continue to install camera2, etc. +2. Add the custom image to one of the SD cards with [Raspberry Pi Imager](https://www.raspberrypi.com/software/), make sure to change the settings (gear icon) before choosing write, change [NR] for the current camera number that you want to install: + 1. Change hostname into `mlmocap-camera[NR]` + 2. Select SSH enabled + 3. Choose prefererred username and password for your controller, defaults are: `pi` and `raspberry` + 4. Optional: Fill in the credentials of your WiFi network (controller will provide the network including WiFi settings.) + 5. Save settings and now press write to flash the card, this takes a while wait for the progress to finish. +3. Insert the SD card into the camera module Pi and connect it to the power supply (via PoE, just insert the ethernet cable). +4. Set a static and unique IP address: + 1. Connect to new camera module via ssh in your terminal type: `ssh pi@mlmocap-camera[NR].local` + 2. When prompted "Are you sure you want to continue", type: `yes`, enter + 3. Fill in password chosen in settings of Pi Imager, default: `raspberry` + 4. Open network settings by typing: `sudo nano /etc/dhcpcd.conf` + 5. Scroll down untill you see the internet settings, change [CAMERA NUMBER] to an increasing number above 10 and below 24, like camera1 = 11, camera2 = 12 etc. replace this row: `static ip_address=10.1.1.[CAMERA NUMBER]/24` + 6. To close and save the changes in this file: + `Ctrl+x, then Y followed by Enter` + 7. Now reboot the camera module by typing: `sudo reboot` + 8. Reconnect to the camera with ssh, wait a few seconds for the module to finish restart: `ssh pi@mlmocap-camera[NR].local` +5. Add K3S to Camera module + 1. Open a second terminal, to connect to the controller: `ssh pi@mlmocap-controller.local` + 2. In this terminal (on the controller) get node-token, run following command: `sudo cat /var/lib/rancher/k3s/server/node-token` + 3. Copy the output + 4. Go to the terminal that is connected to the camera module. Add the copied token to the following command at [REPLACE WITH TOKEN]. Than paste the complete total to the current camera command line: + `curl -sfL https://get.k3s.io | K3S_URL=https://10.1.1.1:6443 K3S_TOKEN=[REPLACE WITH TOKEN] sh -` + 5. Finally, we will change the node role, via controller. Go to the terminal connected to the controller and run this command after changing the current camera number: `kubectl label node mlmocap-camera[NR] kubernetes.io/role=camera` + 6. Connect to the webapp to see if the camera's appear, this might take a while, be patient :) + + + + + + diff --git a/Installation_Controller.md b/Installation_Controller.md index 5f8ebcd..be885ae 100644 --- a/Installation_Controller.md +++ b/Installation_Controller.md @@ -1,23 +1,11 @@ # Installation Controller -1. Download the [custom controller image](4TU?) file to build the controller operating system on the SD cart. -2. Add the custom image to one of the SD carts with [Raspberry Pi Imager](https://www.raspberrypi.com/software/) -3. Connect power supply and insert the SD cart into the Pi -4. Choose prefererred username and password for your controller - 1. Enter `sudo raspi-config` in a terminal window - 2. Select `Change user password` - The default user on Raspberry Pi OS is `pi` with the password `raspberry`. You can change that here. - 3. Set the visible name for this Pi on a network -3. Add WiFi settings - 1. Enter `sudo raspi-config` in a terminal window - 2. Select Networking Options - 3. Navigate to and select WiFi Settings +1. Download the [custom controller image](SD_images/mlmocap_controller.img.gz) file to build the controller operating system on the SD card. +2. Add the custom image to one of the SD cards with [Raspberry Pi Imager](https://www.raspberrypi.com/software/), make sure to change the settings (gear icon) before choosing write: + 1. Change hostname into `mlmocap-controller` + 2. Select SSH enabled + 3. Choose prefererred username and password for your controller, defaults are: `pi` and `raspberry` 4. Fill in the credentials of your WiFi network -4. Add Remote Access - 1. Enter `sudo raspi-config` in a terminal window - 2. Select Interfacing Options - 3. Navigate to and select SSH - 4. Choose `Yes` - 5. Select `Ok` - 6. Choose `Finish` -5. Enable/disable the CSI camera interface. + 5. Save settings and now press write to flash the card, this takes a while wait for the progress to finish. +3. Insert the SD card into the controller Pi and connect the power supply + diff --git a/Makefile b/Makefile deleted file mode 100644 index 18ce5b1..0000000 --- a/Makefile +++ /dev/null @@ -1,102 +0,0 @@ -build_ui: - cd ui && ng build --output-path=dist --prod - cp ./ui/Dockerfile ./ui/dist - -rsync -avuzbh ui/dist/ picam-controller:ui/ - ssh pi@picam-controller 'docker build -t ui ./ui' - -restart_ui: - ssh pi@picam-controller 'sudo systemctl restart ui' - -deploy_ui: build_ui restart_ui - -upload_controller: - rsync -avuzbh --exclude '.venv' controller/ picam-controller:api/ - -upload_camera1: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam1:api/ -upload_camera2: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam2:api/ -upload_camera3: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam3:api/ -upload_camera4: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam4:api/ -upload_camera5: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam5:api/ -upload_camera6: - -rsync -avuzbh --exclude '.venv' camera/ picam-cam6:api/ - -restart_controller: - ssh pi@picam-controller 'sudo systemctl restart controller' - -stop_camera1: - -ssh picam-cam1 'sudo systemctl stop camera' -stop_camera2: - -ssh picam-cam2 'sudo systemctl stop camera' -stop_camera3: - -ssh picam-cam3 'sudo systemctl stop camera' -stop_camera4: - -ssh picam-cam4 'sudo systemctl stop camera' -stop_camera5: - -ssh picam-cam5 'sudo systemctl stop camera' -stop_camera6: - -ssh picam-cam6 'sudo systemctl stop camera' - -start_camera1: - -ssh picam-cam1 'sudo systemctl start camera' -start_camera2: - -ssh picam-cam2 'sudo systemctl start camera' -start_camera3: - -ssh picam-cam3 'sudo systemctl start camera' -start_camera4: - -ssh picam-cam4 'sudo systemctl start camera' -start_camera5: - -ssh picam-cam5 'sudo systemctl start camera' -start_camera6: - -ssh picam-cam6 'sudo systemctl start camera' - -restart_camera1: - -ssh picam-cam1 'sudo systemctl restart camera' -restart_camera2: - -ssh picam-cam2 'sudo systemctl restart camera' -restart_camera3: - -ssh picam-cam3 'sudo systemctl restart camera' -restart_camera4: - -ssh picam-cam4 'sudo systemctl restart camera' -restart_camera5: - -ssh picam-cam5 'sudo systemctl restart camera' -restart_camera6: - -ssh picam-cam6 'sudo systemctl restart camera' - -update_camera1: - -ssh picam-cam1 'cd api && pyenv activate camera && pipenv install && pipenv update' -update_camera2: - -ssh picam-cam2 'cd api && pyenv activate camera && pipenv install && pipenv update' -update_camera3: - -ssh picam-cam3 'cd api && pyenv activate camera && pipenv install && pipenv update' -update_camera4: - -ssh picam-cam4 'cd api && pyenv activate camera && pipenv install && pipenv update' -update_camera5: - -ssh picam-cam5 'cd api && pyenv activate camera && pipenv install && pipenv update' -update_camera6: - -ssh picam-cam6 'cd api && pyenv activate camera && pipenv install && pipenv update' - -upload_cameras: upload_camera1 upload_camera2 upload_camera3 upload_camera4 upload_camera5 upload_camera6 -stop_cameras: stop_camera1 stop_camera2 stop_camera3 stop_camera4 stop_camera5 stop_camera6 -start_cameras: start_camera1 start_camera2 start_camera3 start_camera4 start_camera5 start_camera6 -restart_cameras: restart_camera1 restart_camera2 restart_camera3 restart_camera4 restart_camera5 restart_camera6 -update_cameras: update_camera1 update_camera2 update_camera3 update_camera4 update_camera5 update_camera6 - -upload: upload_controller upload_camera -restart: restart_controller restart_camera - -deploy_camera1: upload_camera1 restart_camera1 -deploy_camera2: upload_camera2 restart_camera2 -deploy_camera3: upload_camera3 restart_camera3 -deploy_camera4: upload_camera4 restart_camera4 -deploy_camera5: upload_camera5 restart_camera5 -deploy_camera6: upload_camera6 restart_camera6 - -deploy_controller: upload_controller restart_controller -deploy_cameras: deploy_camera1 deploy_camera2 deploy_camera3 deploy_camera4 deploy_camera5 deploy_camera6 - -deploy: upload restart diff --git a/README.md b/README.md index 8c1fdeb..ba3d9eb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This project is work-in-progress. With the lessons learned from the first versio - [x] Transform from custom services to pre-build Docker applications - [x] Management by Kubernetes - [x] Transition from mountdrive to NFS and SMB -- [ ] Customized Raspberry Pi OS Image files +- [x] Customized Raspberry Pi OS Image files - [ ] New UI Design ## Getting started @@ -28,8 +28,8 @@ Depending on the application or goal the required hardware list will change. Her The operating system for the Raspberry Pi's will be installed with the Imager tool. Instead of the general Raspberry Pi OS we provide custum images including Docker installation of the required packages. Please follow the instruction documents for a set-by-step guided installation process. -1. [Installation Controller](https://github.com/JinneGeelen/ML-MoCap/blob/feature/v2/Installation_Controller.md) -2. [Installation Camera Modules](https://github.com/JinneGeelen/ML-MoCap/blob/feature/v2/Installation_CameraModules.md) +1. [Installation Controller](Installation_Controller.md) +2. [Installation Camera Modules](Installation_CameraModules.md) 3. [Using the Application](Manual_WebApplication.md) ## Code contributors: