Hi there ajmena,
It is possible there could be mechanical complications when performing a scan using an inverted scanner. Hopefully @Tyson can weigh in on that.
As for the error messages you're seeing...
Traceback (most recent call last):
File "/home/pi/code/scanse/sweep-3d-scanner/scanner/scanner.py", line 330, in
File "/home/pi/code/scanse/sweep-3d-scanner/scanner/scanner.py", line 290, in main
File "usr/lib/python2.7/contextlib.py", line 36, in __ exit __
This error represents a failure when calling
scanner.idle() at the very end of the scan process... see here: https://github.com/scanse/sweep-3d-scanner/blob/c26da21659703513b47c8f836e359e014077c848/scanner/scanner.py#L290
Does this error present itself immediately when starting a scan, or does the scan proceed normally with this error presenting itself after the scan is complete? Typically, if there is any issue communicating with the scanner, an error would have occurred much much earlier in the scan process.... so this is bizarre to say the least. Are you perhaps unplugging the sweep sensor before the green success popup displays after a scan is complete?
In this case, is the file from the failed scan present in the file manager? If so, is the scan data corrupt or valid?
Failed to connect to sweep device... make sure it is plugged in.
This error typically occurs if the sweep sensor is not plugged into the Pi. Whenever you're about to start a new scan, try the following:
- Unplug the sweep from the Pi (This will reset the sweep in case it was stuck from some previous error.)
- Plug the sweep back into the Pi
- Allow a few seconds for the sweep to spin up (LED visible through the hole in the top of the scanner should turn from green to blue).
- Then go ahead and start the scan.
The error could also be caused by outdated sweep firmware. Make sure you are using the latest (
v1.4 at the time of writing this).
If none of that helps, I'd recommend checking the log file (
/home/pi/scanner_output.log) on the Pi. Currently this file is overwritten every time the Pi restarts, so you'll have to ssh into the Pi after witnessing the error, but before turning off the Pi. This file might provide more information about when the error occurs during the scan process.
Hope that helps,