FabScanPi
FabScan F.A.Q
$ sudo dd if=Downloads/fabscanpi_basic_stretch_v.2018-04-04-07-00.img of=/dev/mmcblk0 status=progress bs=1M conv=fsync
github.com/mariolukas/FabScanPi-Frontend, The web interface of the FabScanPi Server backend
github.com/mariolukas/FabScanPi-Server, FabScan Pi Open Source 3D Laser Scanner – Server application
github.com/mariolukas/FabScanPi-Build-Raspbian
github.com/watterott/RPi-FabScan-HAT/, Watterott RPi-FabScan-HAT
github.com/mariolukas/FabScanPi-Firmware/releases, Firmware of FabScanPi 3D Laser Scanner
Keyboard Configuration / Layout
Keyboard configuration in console
What is VC keymap?
mismatch of keyboard keys after booting onto LFS
Keyboard Settings
Keyboard Settings
Where are the keymaps in Debian? (Using loadkeys to change keymap.)
localectl list-keymaps: “Couldn’t find any console keymaps”?
Chaning keyboard layout
$ localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: n/a
X11 Layout: ch
X11 Model: pc105
X11 Variant: legacy
FabScan
$ sudo /etc/init.d/fabscanpi-server stop
$ sudo /usr/bin/python /usr/bin/fabscanpi-server \
> --config=/etc/fabscanpi/default.config.json \
> --settings=/etc/fabscanpi/default.settings.json \
> --logfile=/var/log/fabscanpi/fabscanpi.log \
> --debug
Wifi
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
#pre-up iw dev wlan0 set power_save off
#post-down iw dev wlan0 set power_save on
ctrl_interface=/var/run/wpa_supplicant
update_config=1
ap_scan=1
network={
ssid="FabLab_Winti"
scan_ssid=1
psk="PASSWORD"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
auth_alg=OPEN
}
Old
FabScan: The 100-Euro 3D Laser Scanner
FabScan CUBE
GitHub: FabScan-Shield
GitHub: FabScan 1.5
Anleitung: FabScan benutzen
Assembly Instructions
Bang good
650nm 5mW Focusable Red Line Laser Module Laser Generator Diode
Tools
VisiCut – a userfriendly tool for laser-cutting
GitHub: VisiCut
FAQ
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json
Traceback (most recent call last):
File "fabscanpi-server", line 8, in <module>
import fabscan
File "/home/pi/FabScanPi-Server/src/fabscan/__init__.py", line 7, in <module>
from fabscan.server import FSServer
File "/home/pi/FabScanPi-Server/src/fabscan/server/__init__.py", line 13, in <module>
from fabscan.FSVersion import __version__
ImportError: No module named FSVersion
$ cp /usr/lib/python2.7/dist-packages/fabscan/FSVersion.py /home/pi/FabScanPi-Server/src/fabscan
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json
2016-09-08 17:15:27,031 - fabscan.server - INFO - FabScanPi-Server v.0.2.1
2016-09-08 17:15:28,248 - fabscan.server.websockets - INFO - Websocket Server started on port 8010
2016-09-08 17:15:28,264 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Latest available firmware version is: v.20160620
2016-09-08 17:15:28,526 - fabscan.scanner.laserscanner.FSCamera - INFO - Camera module ready...
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
avrdude-original done. Thank you.
2016-09-08 17:15:30,425 - fabscan.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2016-09-08 17:15:30,946 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2016-09-08 17:15:32,952 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Installed firmware version: v.20160620
2016-09-08 17:15:32,953 - fabscan.scanner.laserscanner.FSSerial - INFO - FabScanPi is connected to Arduino or FabScanPi HAT on port: /dev/ttyAMA0
2016-09-08 17:15:35,063 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2016-09-08 17:15:35,067 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...
2016-09-08 17:15:35,073 - fabscan.FSScanner - INFO - Scanner initialized...
2016-09-08 17:15:35,074 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2016-09-08 17:15:49,246 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET / HTTP/1.1" 200 -
2016-09-08 17:15:49,322 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/lib.css HTTP/1.1" 200 -
2016-09-08 17:15:49,374 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/app.css HTTP/1.1" 200 -
2016-09-08 17:15:49,380 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/lib.js HTTP/1.1" 200 -
2016-09-08 17:15:49,388 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/locales/en/i18n.js HTTP/1.1" 200 -
2016-09-08 17:15:49,396 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/app.js HTTP/1.1" 200 -
2016-09-08 17:15:49,455 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/icon_scan.svg HTTP/1.1" 200 -
2016-09-08 17:15:51,259 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /fonts/fontawesome-webfont.woff2?v=4.3.0 HTTP/1.1" 200 -
2016-09-08 17:15:51,369 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /api/v1/filters HTTP/1.1" 200 -
2016-09-08 17:15:51,481 - fabscan.server.websockets.FSWebSocket - DEBUG - New client connected
2016-09-08 17:15:52,108 - fabscan.FSScanner - DEBUG - Upgrade available:True
DEBUG:fabscan.FSScanner:Upgrade available:True
2016-09-08 17:15:53,195 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Checking Hardware connections
2016-09-08 17:16:22,572 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
2016-09-08 17:16:22,577 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
2016-09-08 17:20:55,570 - fabscan.FSScanner - DEBUG - Close Settings
DEBUG:fabscan.FSScanner:Close Settings
eth0 Link encap:Ethernet HWaddr b8:27:eb:83:80:63
inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2001:8e0:9ff:1428:ba27:ebff:fe83:8063/64 Scope:Global
inet6 addr: fd00:1::ba27:ebff:fe83:8063/64 Scope:Global
inet6 addr: fe80::ba27:ebff:fe83:8063/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:449155 errors:0 dropped:0 overruns:0 frame:0
TX packets:110572 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:122088557 (116.4 MiB) TX bytes:95758002 (91.3 MiB)
$ sudo python fabscanpi-server --config=fabscan/config/default.config.json --settings=fabscan/config/default.settings.json
[sudo] password for pi:
2016-09-08 18:39:43,245 - fabscan.server - INFO - FabScanPi-Server v.0.2.1
2016-09-08 18:39:44,329 - fabscan.server.websockets - INFO - Websocket Server started on port 8010
2016-09-08 18:39:44,347 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Latest available firmware version is: v.20160620
2016-09-08 18:39:44,608 - fabscan.scanner.laserscanner.FSCamera - INFO - Camera module ready...
avrdude-original: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude-original: Device signature = 0x1e950f
avrdude-original: safemode: Fuses OK (E:00, H:00, L:00)
avrdude-original done. Thank you.
2016-09-08 18:39:46,509 - fabscan.util.FSUtil - DEBUG - avrdude-original: Using autoreset DTR on GPIO Pin 7
2016-09-08 18:39:47,029 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Trying to connect Arduino on port: /dev/ttyAMA0
2016-09-08 18:39:48,544 - fabscan.scanner.laserscanner.FSCamera - DEBUG - PI Camera Moule ready.
2016-09-08 18:39:49,036 - fabscan.scanner.laserscanner.FSSerial - DEBUG - Installed firmware version: v.20160620
2016-09-08 18:39:49,037 - fabscan.scanner.laserscanner.FSSerial - INFO - FabScanPi is connected to Arduino or FabScanPi HAT on port: /dev/ttyAMA0
2016-09-08 18:39:51,147 - fabscan.scanner.laserscanner.FSHardwareController - DEBUG - Hardware controller initialized...
2016-09-08 18:39:51,152 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Laser Scan Processor initilized...
2016-09-08 18:39:51,158 - fabscan.FSScanner - INFO - Scanner initialized...
2016-09-08 18:39:51,159 - fabscan.FSScanner - INFO - Number of cpu cores: 4
2016-09-08 18:40:14,505 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET / HTTP/1.1" 200 -
2016-09-08 18:40:14,536 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/locales/en/i18n.js HTTP/1.1" 200 -
2016-09-08 18:40:14,549 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/app.js HTTP/1.1" 200 -
2016-09-08 18:40:14,558 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/lib.css HTTP/1.1" 200 -
2016-09-08 18:40:14,568 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /style/app.css HTTP/1.1" 200 -
2016-09-08 18:40:14,571 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /js/lib.js HTTP/1.1" 200 -
2016-09-08 18:40:14,579 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/icon_scan.svg HTTP/1.1" 200 -
2016-09-08 18:40:15,362 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /fonts/fontawesome-webfont.woff2?v=4.3.0 HTTP/1.1" 200 -
2016-09-08 18:40:15,441 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /api/v1/filters HTTP/1.1" 200 -
2016-09-08 18:40:15,542 - fabscan.server.websockets.FSWebSocket - DEBUG - New client connected
2016-09-08 18:40:16,115 - fabscan.FSScanner - DEBUG - Upgrade available:True
DEBUG:fabscan.FSScanner:Upgrade available:True
2016-09-08 18:40:17,219 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Checking Hardware connections
DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Checking Hardware connections
2016-09-08 18:40:17,356 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET /stream/laser.mjpeg HTTP/1.1" 200 -
2016-09-08 18:40:17,362 - fabscan.server.FSHttpRequestHandler - DEBUG - 127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:127.0.0.1 - "GET /icons/spinner.gif HTTP/1.1" 200 -
2016-09-08 18:40:23,177 - fabscan.FSScanner - INFO - Start command received...
INFO:fabscan.FSScanner:Start command received...
2016-09-08 18:40:23,202 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Scan started
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Scan started
2016-09-08 18:40:23,288 - fabscan.vision.FSImageWorker - INFO - Creating 4 image worker processes.
INFO:fabscan.vision.FSImageWorker:Creating 4 image worker processes.
2016-09-08 18:40:23,721 - fabscan.server.FSHttpRequestHandler - ERROR - [Errno 32] Broken pipe
ERROR:fabscan.server.FSHttpRequestHandler:[Errno 32] Broken pipe
2016-09-08 18:40:28,859 - fabscan.server.FSHttpRequestHandler - DEBUG - 192.168.1.199 - "GET //stream/texture.mjpeg HTTP/1.1" 200 -
DEBUG:fabscan.server.FSHttpRequestHandler:192.168.1.199 - "GET //stream/texture.mjpeg HTTP/1.1" 200 -
2016-09-08 18:42:40,316 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Finishing texture scan.
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Finishing texture scan.
2016-09-08 18:42:40,354 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Started object scan initialisation
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Started object scan initialisation
2016-09-08 18:42:40,462 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 814
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 814
2016-09-08 18:42:40,468 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 815
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 815
2016-09-08 18:42:40,479 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 812
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 812
2016-09-08 18:42:40,636 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 813
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 813
2016-09-08 18:42:46,545 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - 259.2
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:259.2
2016-09-08 18:42:46,549 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - Laser on backwall detected at x-pixel position: 317
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:Laser on backwall detected at x-pixel position: 317
2016-09-08 18:42:46,553 - fabscan.scanner.laserscanner.FSImageProcessor - DEBUG - Found a point for laser angle calculation
DEBUG:fabscan.scanner.laserscanner.FSImageProcessor:Found a point for laser angle calculation
2016-09-08 18:42:46,555 - fabscan.scanner.laserscanner.FSScanProcessor - DEBUG - Detected Laser Angle at: 33.012678 deg
DEBUG:fabscan.scanner.laserscanner.FSScanProcessor:Detected Laser Angle at: 33.012678 deg
2016-09-08 18:42:46,556 - fabscan.vision.FSImageWorker - INFO - Creating 4 image worker processes.
INFO:fabscan.vision.FSImageWorker:Creating 4 image worker processes.
Process FSImageWorkerProcess-8:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 135, in run
self.image.save_image(image_task.image, image_task.progress, image_task.prefix, dir_name=image_task.prefix+'/laser_'+image_task.raw_dir)
File "/home/pi/FabScanPi-Server/src/fabscan/file/FSImage.py", line 34, in save_image
Process FSImageWorkerProcess-5:
Traceback (most recent call last):
os.makedirs(dir_name)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
mkdir(name, mode)
OSError: [Errno 17] File exists: '/usr/local/fabscanpi/scans/20160908-184023/laser_raw'
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 135, in run
self.image.save_image(image_task.image, image_task.progress, image_task.prefix, dir_name=image_task.prefix+'/laser_'+image_task.raw_dir)
File "/home/pi/FabScanPi-Server/src/fabscan/file/FSImage.py", line 34, in save_image
os.makedirs(dir_name)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 17] File exists: '/usr/local/fabscanpi/scans/20160908-184023/laser_raw'
2016-09-08 18:42:50,665 - fabscan.server.FSHttpRequestHandler - ERROR - [Errno 32] Broken pipe
ERROR:fabscan.server.FSHttpRequestHandler:[Errno 32] Broken pipe
Process FSImageWorkerProcess-6:
Traceback (most recent call last):
File "/usr/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/home/pi/FabScanPi-Server/src/fabscan/vision/FSImageWorker.py", line 138, in run
points = self.image_processor.process_image(angle, image_task.image, color_image)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 87, in process_image
points = self.process_line(pixels, angle , color_image)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 272, in process_line
line1 = self.computeLineFromPoints(camera_position, point)
File "/home/pi/FabScanPi-Server/src/fabscan/scanner/laserscanner/FSImageProcessor.py", line 326, in computeLineFromPoints
line.a = (p2.z-p1.z)/(p2.x-p1.x)
ZeroDivisionError: float division by zero
2016-09-08 18:48:08,641 - fabscan.scanner.laserscanner.FSScanProcessor - INFO - Finishing object scan.
INFO:fabscan.scanner.laserscanner.FSScanProcessor:Finishing object scan.
2016-09-08 18:48:17,749 - fabscan.vision.FSImageWorker - DEBUG - Killed Worker Process with PID 828
DEBUG:fabscan.vision.FSImageWorker:Killed Worker Process with PID 828
2016-09-08 18:49:40,068 - fabscan.server.websockets.FSWebSocket - DEBUG - Client disconnected
DEBUG:fabscan.server.websockets.FSWebSocket:Client disconnected
$ cat /etc/fabscanpi/default.config.json
{
"folders": {
"www": "/usr/share/fabscanpi/",
"scans": "/home/pi/scans/"
},
"laser": {
"numbers": 1
},
"scanner_type": "laserscanner",
"calibration": {
"weight_matrix": [],
"dist_camera_matrix": [],
"pattern": {
"square_size": 11,
"rows": 6,
"columns": 8,
"origin_distance": 35
},
"camera_matrix": [],
"distortion_vector": [],
"laser_planes": [
{
"deviation": 0,
"distance": 0,
"normal": []
}
],
"platform_translation": [],
"platform_rotation": []
},
"meshlab": {
"path": "/usr/bin/"
},
"process_numbers": 4,
"turntable": {
"steps": 6400,
"radius": 70
},
"camera": {
"resolution": {
"width": 1640,
"height": 1232
},
"preview_resolution": {
"width": 320,
"height": 240
},
"rotate": "True",
"hflip": "True",
"vflip": "False",
"type": "PICAM"
},
"serial": {
"baudrate": 57600,
"autoflash": "True",
"port": "/dev/ttyAMA0"
},
"texture_illumination": 140