Copyright (C) 2021 Anatole Hernot (github.com/ahernot), Mines Paris (PSL Research University). All rights reserved.
Controller program for SmartPixels' Omni-Directional Object Pictures (ODOP) automated scanner.
Built for ahernot/ODOP-controller.
- 0.1. Specify the serial communication port (variable
PORT
) inpreferences.py
. - 0.2. Specify the DigiCamControl communication preferences in
preferences.py
.
- 1.1. With the motors unpowered, position the swing on its lowest position.
- 1.2. Mount the camera on the sliding platform.
- 1.3. Adjust the camera's distance from the object by sliding the platform.
- 1.4. Adjust the counterweights so that the camera lifts up lightly from the lowest resting point of the swing.
- 1.5. Point the camera towards the intersection between the vertical axis (of the turntable) and the horizontal axis (of the swing).
- 1.6. Mount the front horizontal wire (the one closest to the camera) onto the frame.
- 1.7. Adjust the camera's horizontal inclination to match the wire's.
- 2.1. Turn on power to the motors.
Create a newODOP
object. - 2.2. Run the calibration process (method
ODOP.calibrate()
).- 2.2.1. Let the swing move to its lowest position and then back up to the specified calibration point.
- 2.2.2. Mount the back horizontal wire onto the frame.
- 2.2.3. Enter manual rotation commands (e.g. "
-1.8
" for -1.8°) until the two wires overlap on the camera's screen. - 2.2.4. Type "
go
" to validate and set the zero point. The camera should be horizontal with respect to the machine.
- 2.3. Remove all calibration wires from the machine.
- 3.1. Specify the number of vertical and horizontal shots to be taken.
Create a newComposition
object. - 3.2. Run the composition. (method
Composition.run()
).
- Time windows (in
Controller.execute()
) must be set large enough to avoid backlogging commands. Otherwise, the completion success message of the previous command could trigger the end of the next one. - ODOP needs to be recalibrated every time a new
ODOP
object is created, due to the fact that the locally-stored positional information is reset inODOP.__init__()
.
- Python 3 (tested with Python 3.9.0; should work with Python 3.6.0 and newer)
- PySerial module (run "
pip install pyserial
")