+ [ true = true ] + echo --sonar + python -m profile_alignment --result /working/result.json --sonar --write-shape /working/shape.json /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data/laser.ptd.dat fit 2026-08-04T00:07:05 - INFO: Profile Alignment 0.0.42 2026-08-04T00:07:05 - INFO: Alignment track will be output to /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data 2026-08-04T00:07:05 - INFO: The pipe shape track is not found in /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data/pipe_shape.track.json 2026-08-04T00:07:05 - INFO: Falling back to the 3 built-in reference shapes. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2026-08-04T00:07:05 - INFO: Input: /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data/laser.ptd.dat 2026-08-04T00:07:05 - INFO: Sonar: True 2026-08-04T00:07:05 - INFO: Method: fit 2026-08-04T00:07:05 - INFO: Shape: [PosixPath('/app/profile_alignment/ref_shapes/circle.shape.json'), PosixPath('/app/profile_alignment/ref_shapes/egg.shape.json'), PosixPath('/app/profile_alignment/ref_shapes/square.shape.json')] 2026-08-04T00:07:05 - INFO: Shape info: /working/shape.json =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 2026-08-04T00:07:05 - INFO: Track format: json Reading PTD file in binary format... Completed! =-=-=-=-=-Adding Sonar points -=-=-=-=-=-=- 2026-08-04T00:07:07 - INFO: Reading sonar track took 0.09889507293701172 sec! 2026-08-04T00:07:07 - INFO: Reading sonar alignment track took {0.007827043533325195} sec! =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Testing {%s} reference shapes to find the best match ... 3 0%| | 0/3 [00:00 Match Report: shape 1 is /app/profile_alignment/ref_shapes/circle.shape.json: 97.08% shape 2 is /app/profile_alignment/ref_shapes/egg.shape.json: 84.69% shape 3 is /app/profile_alignment/ref_shapes/square.shape.json: 18.24% The shape %s is being selected! Loading ... /app/profile_alignment/ref_shapes/circle.shape.json =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 2026-08-04T00:07:32 - INFO: Reference shape is detected as CIRCLE, forcing rotation to zero 2026-08-04T00:07:32 - INFO: Calculating the size for all frames ... 2026-08-04T00:07:36 - INFO: 200 frames are processed in 4.62 seconds. rate: 43.26 fp/s 2026-08-04T00:07:36 - INFO: Median Scale of 200 frame found to be: 0.8942626248686032 2026-08-04T00:07:36 - INFO: The selected reference shape JSON to: {/working/shape.json} 2026-08-04T00:07:36 - INFO: Fit to reference shape ... Optimization failed for a frame: {ABNORMAL: } 2026-08-04T00:08:07 - INFO: {3775} frames are processed in {30.34} seconds. Rate: 124.41 fp/s Track data saved to /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data/alignment.track.json Writing PTD file in binary format... Completed! PTD file is written to: /working/d7edc23b-7051-4918-b431-e5fb65799ea9/processing/data/laser_aligned.ptd.dat