Skip to content

Commit

Permalink
fixed merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
mariolukas committed Nov 25, 2018
2 parents 17b7dda + 08924b3 commit bb447bc
Show file tree
Hide file tree
Showing 75 changed files with 2,171 additions and 2,550 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
dist: trusty
group: deprecated-2017Q4
group: edge
language: python
#virtualenv:
# system_site_packages: true
python:
- 2.7_with_system_site_packages
- "2.7.13"
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y build-essential python-setuptools debhelper cdbs dh-python fakeroot
python-pip rsync
before_script:
- CURRENT_DATE=$(date +%Y%m%d%H%M)
- pip install mkdocs
- VERSION=$(head -1 debian/changelog | awk -F'[()]' '{print $2}')
- if [ -z ${TRAVIS_TAG} ]; then sed -i -e 's/'"$VERSION"'/'"$VERSION"'-b'"$TRAVIS_BUILD_NUMBER"'/g'
- if [ -z ${TRAVIS_TAG} ]; then sed -i -e 's/'"$VERSION"'/'"$VERSION"'+'"$CURRENT_DATE"'/g'
debian/changelog; fi
- echo $TRAVIS_TAG
script: sudo make deb
Expand Down
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- fixed camera driver (pi and usb)
- fixed random artifacts at the beginning of object scan

## [0.5.0] - 2018-04-04
### Added

### Changed

### Fixed

## [0.6.0] - 2018-11-23
### Added
- introduced Tornado Web Framework
- added new version of frontend with some fixes
- added swapping support for high res scans
- added new refactored firmware v.20181123

### Changed
- refactored Websocket Server
- refactored Web Server
- refactored Streaming Handler
- refactored project structure

### Fixed
- Turntable Blocking mode
- Image Ring Buffer Flushing
- removed random artifacts at the beginning of object scan
- stepper missing steps bug (aka stepper wobble)
- avrdude bug
- gap at the beginning/end of a scan

## [0.5.0] - 2018-04-04
### Added
- new documentation parts (tnx to jens hackel)
Expand Down
15 changes: 15 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
fabscanpi-server (0.6.0) UNRELEASED; urgency=medium
* refactored webserver backend code
* introduced Tornado web framework
* fixed calibration non blocking bug.
* fixed flushing camera buffer
* fixed camera settings
* better camera stream performance (nearby live now)
* fixed gap at the beginning/end of a scan
* added swapping support for high res scans
* fixed avrdude bug
* fixed stepper missing steps bug (aka stepper wobble)
* added new version of frontend with some fixes

-- Mario Lukas <info@fabscan.org> Sat, 24 Nov 2018 15:47:00 +0100

fabscanpi-server (0.5.0) UNRELEASED; urgency=medium
* fixed pykka aktor threading bug in streams
* fixed bug realated to 400 step motors
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Package: fabscanpi-server
Architecture: all
Homepage: http://fabscan.org
X-Python-Version: ${python:Versions}
Depends: ${misc:Depends}, ${python:Depends}, python-opencv, libtbb2, python-pil, python-serial, python-pykka, python-picamera, python-rpi.gpio, python-semver, xvfb, meshlab, strace, avrdude, python-scipy
Depends: ${misc:Depends}, ${python:Depends}, python-opencv, python-tornado, libtbb2, python-pil, python-serial, python-pykka, python-picamera, python-rpi.gpio, python-semver, xvfb, meshlab, strace, avrdude, python-scipy
Description:
FabScanPi Server ist the backend of the Stand-alone, Web-enabled, Open Source 3D laser scanner.
2 changes: 1 addition & 1 deletion debian/fabscanpi-server.init
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ do_start() {

RETVAL="$?"
if [ $RETVAL != 0 ]; then
avrdude -c arduino -p m328p -P /dev/ttyAMA0 -b 57600 -l /dev/null
avrdude-autoreset -c arduino -p m328p -P /dev/ttyAMA0 -b 57600 -l /dev/null
/sbin/start-stop-daemon --start --user $DAEMONUSER \
--make-pidfile --pidfile $PIDFILE --background \
--exec /bin/bash -- -c "$DAEMON $DAEMON_ARGS"
Expand Down
55 changes: 55 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ NOTE: For details and specifications please consult the hardware chapter.

- **No connection to Arduino, how can i fix that?**

When your FabScanPi-Server version is 0.5.0 and your avrdude version is Version 6.3-20171130 ( check for version with avrdude -v )
then edit the file `/usr/bin/avrdude-autoreset` and replace all `avrdude-original` with `avrdude`. Upgrade to the newest FabScanpi-Server
version >= 0.6.0 and you are done. After a restart it should work like usual.
Keep in mind that it is more recommended to use the newest version of the image which will include a working fix.

First you need to find out more about the problem. Have a look to the log file (see "How can i view the log file?" in F.A.Q.).
Find the section where the init sequence of the server starts. Look for the folowing line ...

Expand Down Expand Up @@ -249,6 +254,7 @@ NOTE: For details and specifications please consult the hardware chapter.

----


- **How to flash the FabScanPi HAT Bootloader?**


Expand Down Expand Up @@ -326,6 +332,55 @@ or

#### Scanning issues<a name="scanningIssues"></a>

- **My scan looks like a cylinder**

|![drawing_400](images/problem_2.png) | ![drawing_400](images/problem_2b.png) |
|---|---|
| This is the object. | This is the scan. |

The problem occurs when the laser is not aligned vertically. The following pictures show
the disalignment (blue) and how it should be aligned (red).


|![drawing_400](images/problem_2c.png) | ![drawing_400](images/problem_2d.png) |
|---|---|
| Disaligned Laser line | Aligned Laser line. |

The solution for this problem is turning the laser module as long as the line hits
the back wall of the scanner vertically. Be sure that the laser also passes the center
of the turntable ( this can be reached by turning the laser mount)


- **My scan looks doubled**

|![drawing_400](images/problem_1.png) | ![drawing_400](images/problem_1b.png) |
|---|---|
| This is the object. | This is the scan. The scan looks double. |


In this case check the label on your motor. Since the end of 2017 the stepper motor has 400
steps per full turn. The default config is set to 16x 400 = 6400 steps. If the scan looks like
on the picture, change the motor steps in the default config to 3200.

"turntable": {
"steps": 3200,
"radius": 70
}
| ![drawing_200](images/motor_1.png) | ![drawing_200](images/motor_2.png) |
|---|---|
| Motor with 400 steps. | Motor with 200 steps. |











- **The turntable is jerking during the scan process what can I do?**

This behavior is quite normal because every time a new image has been shot the table just moves to the next position. If the table is turning smoothly (clockwise) during scan preview everything should be fine.
Expand Down
Binary file added docs/images/motor_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/motor_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_1b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_2b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_2c.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/problem_2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions docs/news.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
### FabScanPi 0.6.0 release. (2018-11-25)
This release mainly fixes a lot of bugs and the Tornado Framework is introduced. This brings more
stability to the webserver part. The whole webserver code was refactored. Since AVRDude was upgraded
in Raspbian stretch, version 0.5.0 does not work anymore. The AVRDude bug was responsible for serial
connection and firmware flashing problems (it is not a bootloader problem as described in the F.A.Q).

Changelog for this version:

* refactored webserver backend code
* introduced Tornado web framework
* fixed calibration non blocking bug.
* fixed flushing camera buffer
* fixed camera settings
* better camera stream performance (nearby live now)
* fixed gap at the beginning/end of a scan
* added swapping support for high res scans
* fixed avrdude bug
* fixed stepper missing steps bug (aka stepper wobble)
* added new version of frontend with some fixes


### FabScanPi 0.5.0 release. (2018-04-04)
The new release brings a better camera performance and also the USB cam module back.
We switched to a newer version of OpenCV which leads also to a better performance
and a more stable calibration process.

Changelog for this version:

* fixed pykka aktor threading bug in streams
* fixed bug realated to 400 step motors
* replaced magic numbers by config values (tnx to jwalt)
* fixed typo in documentation (tnx to kradrat)
* new documentation parts (tnx to jens hackel)
* fixed green cam bug
* added deleting old calibration data before new calibration
* refactored camera driver ( much faster than before )
* added abort sequence when scanner is not calibrated
* added new handlers for gracefull application shutdown
* fixed start stop init script and added better logging to it

### FabScanPi 0.4.3 and updated documentation. (2017-07-26)
First of all i would like to thank all FabScanPi builders/users/community members for
reporting bugs and sharing experiences. Special thanks goes to Jens Hackel for his
Expand Down
1 change: 1 addition & 0 deletions docs/software.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ INFO: To get a perfectly flat and stable surface glue the calibration sheet on a

[Download calibration mount and sheet!](https://github.com/mariolukas/FabScan-Case/tree/master/calibration)

Version V1 and V2 have the same size. Both will fit. But V2 is more printer friendly.

Note: Please check if your print of the calibration sheet has the correct scale. Each black square should have the same side length as stated on the calibration sheet (e.g.11 mm (1,1 cm). If the size is not correct please correct the parameter "pattern square size" in the configuration file.

Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ pillow
Pykka
numpy
semver
tornado
mock
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
def version_number():
with open('debian/changelog', 'r') as changelog_file:
first_line = changelog_file.readline(100)
result = re.match("fabscanpi-server \(([0-9\.a-z\-]+)\) ([a-zA-Z]+); urgency=([a-z]+)", first_line)
result = re.match("fabscanpi-server \(([0-9\.a-z\+]+)\) ([a-zA-Z]+); urgency=([a-z]+)", first_line)
if result is None:
return '0.0.0'
return result.group(1)


def create_version_file():
with open("src/fabscan/FSVersion.py","w+") as version_file:
with open("src/fabscan/FSVersion.py", "w+") as version_file:
version_file.write('__version__ = "%s"\n ' % str(version_number()))

create_version_file()
Expand Down
2 changes: 1 addition & 1 deletion src/fabscan/FSConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os
import json
from fabscan.util.FSInject import singleton
from fabscan.lib.util.FSInject import singleton
import io
import numpy as np

Expand Down
2 changes: 1 addition & 1 deletion src/fabscan/FSEvents.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import multiprocessing
from Queue import Empty
from fabscan.util.FSInject import singleton
from fabscan.lib.util.FSInject import singleton
import logging

class FSEvent():
Expand Down
6 changes: 3 additions & 3 deletions src/fabscan/FSScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

from fabscan.FSVersion import __version__
from fabscan.FSEvents import FSEventManagerInterface, FSEvents
from fabscan.vision.FSMeshlab import FSMeshlabTask
from fabscan.worker.FSMeshlab import FSMeshlabTask
from fabscan.FSConfig import ConfigInterface
from fabscan.FSSettings import SettingsInterface
from fabscan.scanner.interfaces.FSScanProcessor import FSScanProcessorCommand, FSScanProcessorInterface
from fabscan.util.FSInject import inject, singleton
from fabscan.util.FSUpdate import upgrade_is_available, do_upgrade
from fabscan.lib.util.FSInject import inject, singleton
from fabscan.lib.util.FSUpdate import upgrade_is_available, do_upgrade

class FSState(object):
IDLE = "IDLE"
Expand Down
2 changes: 1 addition & 1 deletion src/fabscan/FSSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import os
import json
from fabscan.util.FSInject import inject, singleton
from fabscan.lib.util.FSInject import inject, singleton

class SettingsInterface(object):
def __init__(self, settings, first=True):
Expand Down
10 changes: 5 additions & 5 deletions src/fabscan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__maintainer__ = "Mario Lukas"
__email__ = "info@mariolukas.de"

from fabscan.server import FSServer
from fabscan.server import FSScanServer
from fabscan.daemon import Daemon
from fabscan.FSVersion import __version__
import logging
Expand All @@ -28,10 +28,10 @@ def __init__(self, pidfile, configfile, basedir, host, port, debug, allowRoot, l


def run(self):
#server = FSServer(config_file)
#fabscan = FSServer(self._configfile, self._basedir, self._host, self._port, self._debug, self._allowRoot)
#server = FSScanServer(config_file)
#fabscan = FSScanServer(self._configfile, self._basedir, self._host, self._port, self._debug, self._allowRoot)

fabscan = FSServer(self._configfile)
fabscan = FSScanServer(self._configfile)
fabscan.run()

def main():
Expand Down Expand Up @@ -130,7 +130,7 @@ def main():
elif "restart" == args.daemon:
daemon.restart()
else:
fabscan = FSServer(args.config, args.settings)
fabscan = FSScanServer(args.config, args.settings)
fabscan.run()
except Exception, e:
logger.fatal("Fatal error: %s", e)
Expand Down
9 changes: 5 additions & 4 deletions src/fabscan/config/default.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"square_size": 11,
"rows": 6,
"columns": 8,
"origin_distance": 35
"origin_distance": 37.2
},
"camera_matrix": [],
"distortion_vector": [],
Expand Down Expand Up @@ -51,9 +51,10 @@
"type": "PICAM"
},
"serial": {
"baudrate": 57600,
"baudrate": 115200,
"autoflash": "True",
"port": "/dev/ttyAMA0"
},
"texture_illumination": 140
}
"texture_illumination": 140,
"keep_raw_images": "True"
}
11 changes: 6 additions & 5 deletions src/fabscan/config/dev.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"square_size": 11,
"rows": 6,
"columns": 8,
"origin_distance": 35
"origin_distance": 37.2
},
"camera_matrix": [],
"distortion_vector": [],
Expand All @@ -31,9 +31,9 @@
"meshlab": {
"path": "/usr/bin/"
},
"process_numbers": 8,
"process_numbers": 4,
"turntable": {
"steps": 6400,
"steps": 3200,
"radius": 70
},
"camera": {
Expand All @@ -51,9 +51,10 @@
"type": "PICAM"
},
"serial": {
"baudrate": 57600,
"baudrate": 115200,
"autoflash": "True",
"port": "/dev/ttyAMA0"
},
"texture_illumination": 140
"texture_illumination": 140,
"keep_raw_images": "True"
}
Loading

0 comments on commit bb447bc

Please sign in to comment.