NvMedia2D Release Error when Extrinsics Calibration on DriveWorks 1.2.4

Dear,

I use a PX 2 and DriveWorks 1.2.4 to run the surround view camera calibration.

According to the tutorials, we do the whole process in the steps below:

  1. We use AprilTag ID99 as a target to record a video from each camera. Command: ./calibration-intrinsics-constraints --targetDB=/home/nvidia/Desktop/B8Calibration/targets.json --input-video=/home/nvidia/Desktop/B8Calibration/intrinsics/.h264 --output=/home/nvidia/Desktop/B8Calibration/intrinsics/.json

  2. We took pics. from both svc and external camera and copied the images to the corresponding folder as told in tutorials(Also the same name as the json file in intrinsics folder). Meanwhile, we created the special-targets.json file as required in tutorials.

  3. We run the command: ./calibration-graph-cli --dir=/home/nvidia/Desktop/B8Calibration

After that, we found the error in terminal as you can find below:

root@tegra-ubuntu:/usr/local/driveworks-1.2/tools/calibration# ./calibration-graph-cli --dir=/home/nvidia/Desktop/B8Calibration
Arguments:
–data=
–dir=/home/nvidia/Desktop/B8Calibration
–graph=
–offscreen=1
–showDebug=1
–targetDB=
WindowEGL: find EGL devices
WindowEGL: found 2 EGL devices
WindowEGL: init EGL with GLES3 context
WindowEGL: bind OpenGLES3 API
WindowEGL: offscreen mode -> use EGL PBuffer surface 1280x800
WindowEGL: create EGL context
WindowEGL: assign EGL context to current thread
[5-3-2019 17:5:28] Initialize DriveWorks SDK v1.2.400
[5-3-2019 17:5:28] Release build with GNU 4.9.4 from v1.2.0-rc11-0-ga7f5475 against Vibrante PDK v5.0.10.3
[5-3-2019 17:5:28] Platform: Detected Drive PX2 - Tegra A
[5-3-2019 17:5:28] TimeSource: monotonic epoch time offset is 1551763541122723
[5-3-2019 17:5:28] TimeSource: PTP ioctl returned error. Synchronized time will not be available.
[5-3-2019 17:5:28] TimeSource: Could not detect valid PTP time source at ‘eth0’. Fallback to CLOCK_MONOTONIC.
[5-3-2019 17:5:28] Platform: number of GPU devices detected 2
[5-3-2019 17:5:28] Platform: currently selected GPU device discrete ID 0
[5-3-2019 17:5:28] SDK: Resources mounted from …/…/data/resources
[5-3-2019 17:5:28] SDK: Create NvMediaDevice
[5-3-2019 17:5:28] SDK: Create NvMediaIPPManager
[5-3-2019 17:5:28] SDK: use EGL display as provided
[5-3-2019 17:5:28] Loading calibration data from directory structure, dir=/home/nvidia/Desktop/B8Calibration
[5-3-2019 17:5:28] Target database loaded
Cameras found: svc-rear svc-left svc-right svc-front
[5-3-2019 17:5:28] Saving calibration data description to /home/nvidia/Desktop/B8Calibration/calib-data.json
Parsing intrinsics
Camera svc-rear
Camera svc-left
Camera svc-right
Camera svc-front
Camera external
Image size=4032 3024
/home/nvidia/Desktop/B8Calibration/external/IMG_4717.JPG: targets 181(9 tags) 101(35 tags) 91(35 tags) 90(35 tags) 89(35 tags), 5 invalid tags
/home/nvidia/Desktop/B8Calibration/external/IMG_4710.JPG: targets 181(9 tags) 180(9 tags) 98(28 tags) 90(35 tags)
^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~^[[6~/home/nvidia/Desktop/B8Calibration/external/IMG_4707.JPG: targets 180(9 tags) 100(35 tags)
/home/nvidia/Desktop/B8Calibration/external/IMG_4698.JPG: targets 98(35 tags) 97(35 tags) 92(35 tags), 7 invalid tags
/home/nvidia/Desktop/B8Calibration/external/IMG_4718.JPG: targets 181(9 tags) 91(35 tags) 90(35 tags) 89(35 tags)
(…)
/home/nvidia/Desktop/B8Calibration/external/IMG_4713.JPG: targets 180(8 tags) 101(19 tags) 90(35 tags), 6 invalid tags
/home/nvidia/Desktop/B8Calibration/external/IMG_4711.JPG: targets 181(9 tags) 180(9 tags) 98(35 tags) 90(34 tags)
/home/nvidia/Desktop/B8Calibration/external/IMG_4694.JPG: targets 98(31 tags) 97(35 tags), 2 invalid tags
Parsing extrinsics’ constraints
New pose for camera svc-rear
Found constraint between [svc-rear, target-100]: 140 points
New pose for camera svc-left
Found constraint between [svc-left, target-101]: 140 points
Found constraint between [svc-left, target-90]: 108 points
New pose for camera svc-right
Found constraint between [svc-right, target-97]: 132 points
Found constraint between [svc-right, target-92]: 116 points
New pose for camera svc-front
Found constraint between [svc-front, target-89]: 132 points
New pose for camera external
Found constraint between [external, target-181]: 36 points
Found constraint between [external, target-101]: 140 points
Found constraint between [external, target-90]: 140 points
Found constraint between [external, target-89]: 140 points
Found constraint between [external, target-181]: 36 points
(…)
Found constraint between [external, target-181]: 36 points
Found constraint between [external, target-180]: 36 points
Found constraint between [external, target-90]: 136 points
Found constraint between [external, target-97]: 140 points
[5-3-2019 17:8:14] SDK: Release NvMediaDevice
[5-3-2019 17:8:14] Driveworks SDK released
[5-3-2019 17:8:14] SDK: Release NvMedia2D
[5-3-2019 17:8:14] Terminating app due to unexpected exception:
type must be number, but is null

So what can be the potential reason to it?

Thanks a lot for your support!!!

Dear weicheng.exe,
Is it duplicate of thread https://devtalk.nvidia.com/default/topic/1048089/driveworks/errors-when-running-extrinsics-calibration-by-driveworks-1-2-400 . If so, can you follow up issue from that thread