mariolukas / FabScanPi-Server

FabScan Pi Open Source 3D Scanner - Server application
https://www.fabscan.org
GNU General Public License v2.0
184 stars 68 forks source link

Scanning stops at Position 51 #115

Closed brummbaer closed 5 years ago

brummbaer commented 7 years ago

I tried to calibrate the scanner but it stops at Postion 51. Here is the log, nothing happens after this step for an hour.

2017-08-23 16:29:41,700 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Calibration Position 48 of 74
2017-08-23 16:29:43,307 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Pose detected...  
2017-08-23 16:29:43,813 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M05 R50 G50 B50;
2017-08-23 16:29:45,639 - fabscan.scanner.laserscanner.FSSerial - DEBUG - G04 T-44.4444444444 F900;
2017-08-23 16:29:45,640 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Calibration Position 49 of 74
2017-08-23 16:29:47,366 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Pose detected...  
2017-08-23 16:29:47,872 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M05 R50 G50 B50;
2017-08-23 16:29:49,696 - fabscan.scanner.laserscanner.FSSerial - DEBUG - G04 T-44.4444444444 F900;
2017-08-23 16:29:49,697 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Calibration Position 50 of 74
2017-08-23 16:29:53,886 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Pose detected...  
2017-08-23 16:29:55,238 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M05 R0 G0 B0;
2017-08-23 16:29:55,240 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Starting laser capture...
2017-08-23 16:29:55,744 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M21;
2017-08-23 16:30:00,775 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M22;
2017-08-23 16:30:04,935 - fabscan.scanner.laserscanner.FSSerial - DEBUG - M05 R50 G50 B50;
2017-08-23 16:30:06,565 - fabscan.scanner.laserscanner.FSSerial - DEBUG - G04 T-44.4444444444 F900;
2017-08-23 16:30:06,572 - fabscan.scanner.laserscanner.FSCalibration - DEBUG - Calibration Position 51 of 74
mariolukas commented 7 years ago

Which software Version are you using, and which version of the calibration sheet ? Can you post a picture of your calibration sheet here ?

brummbaer commented 7 years ago

Hope this is the right calibration sheet with 6x8 edges. The settings are in the config also.

Version: FabScanPi-Server 0.4.3

Fresh fabscanpi_basic_jessie_v.2017-07-26-20-00.zip.

img_1890

mariolukas commented 7 years ago

Yes this is the correct sheet. Can you have a look into your default.config.json. Check the number of columns and rows 6x8 there. Keep in mind to let the lid closed during the calibration.

brummbaer commented 7 years ago

I have no FabScanPi HAT, so no security switch. The switch is hardware based? Not implemented in firmware?

"calibration": {
        "weight_matrix": [],
        "dist_camera_matrix": [],
        "pattern": {
            "square_size": 11,
            "rows": 6,
            "columns": 8,
            "origin_distance": 35
        },
brummbaer commented 7 years ago

Ok, i played around with the sheet, sometimes it is working... sometimes not. I can not figure it out. I think it is best to start with a little bit more on the right. But what is the best position? The scanning result is always bad and not the same. Do i have to push the sheet up, as in your picture? http://mariolukas.github.io/FabScanPi-Server/images/Manual_2b.jpg

This is the result, when the calibration worked:

bildschirmfoto 2017-08-31 um 20 59 45

This is the object:

bildschirmfoto 2017-08-31 um 21 04 11

Could it be the position of the camera? On your photo above, the camera seems to point to the middle from the right and we can see the whole table! This can be seen at the oblique line of the case. My pi-camera lens with your LEDs is not aligned to the center of the table, because of the FabScanPi-Case.

        "camera_matrix": [
            [
                1768.212,
                0.0,
                748.21299999999997
            ],
            [
                0.0,
                1745.287,
                821.06399999999996
            ],
            [
                0.0,
                0.0,
                1.0
            ]
        ],
        "distortion_vector": [
            -0.014999999999999999,
            3.6059999999999999,
            0.001,
            0.066000000000000003,
            -11.893000000000001
        ],
        "laser_planes": [
            {
                "deviation": 0.046724040891254842,
                "distance": 28.359928844806507,
                "normal": [
                    0.96895160332379604,
                    -0.0089925400352935947,
                    0.24708687670525736
                ]
            }
        ],
        "platform_translation": [
            -29.021412800001109,
            53.978475337290547,
            176.24132421146706
        ],
        "platform_rotation": [
            [
                0.0,
                0.99983716674803658,
                0.018045497755921232
            ],
            [
                0.00035853076536297772,
                0.018045496596098172,
                -0.99983710248634516
            ],
            [
                -0.99999993572784307,
                6.4698661217863379e-06,
                -0.0003584723846325247
            ]
        ]
    },
mariolukas commented 6 years ago

Yes, try to adjust the cam. Use some cardboard or something else to tilt the cam to a center position.