Errors when running extrinsics calibration by Driveworks 1.2.400

Dear,

We use DriveWorks 1.2.400 and PX 2 to do the surround view camera calibration. When running the calibration-graph-cli tool, an error occurs saying that"Terminating app due to unexpected exception: type must be number, but is null."

Is there any possible reason to it?

Thanks a lot!

Hi,

Could you share the command you used with us?

Please remember that you will need to extract feature points with ./calibration-intrinsics-constraints first.
And it’s required to input the pattern type when extracting:

Checkerboard

./calibration-intrinsics-constraints 
<b>  --use-checkerboard=11x8 </b>
  --input-video=<video_path>/camera-0.h264
  --output=<calib_data_path>/intrinsics/camera-0.json

AprilTag

./calibration-intrinsics-constraints
<b>  --targetDB=<calib_data_path>/targets.json</b>
  --input-video=<video_path>/camera-0.h264
  --output=<calib_data_path>/intrinsics/camera-0.json

You can find the detail calibration steps in our document:

NVIDIA DRIVE AV SDK Reference Documentation
Tutorials
Camera Calibration step-by-step

Thanks.

Hi,

Thanks for the reply.

For intrinsics calibration, we used the command(using AprilTag) as the tutorial. After that, we copied the pictures of SVC and external camera to the corresponding folder as the tutorial. After that, we run the calibration toll with the command: ./calibration-graph-cli --dir= and it will automatically generate the cali-data.json file. And such an error will appear when SDK release NvMedia2D(Info from Ubuntu Terminal)

Hi,

Guess that you want to run ./calibration-graph-cli with the cali-data.json?

Please noticed that the cali-data.json only contains the path of calibrated data.
And the refined graph is stored in the calibrated-graph.json.

They have similar name but different.

1) If you want to apply the calibration again, please try this command:

$ ./calibration-graph-cli_bk --dir=[data_path]

or

$ ./calibration-graph-cli_bk --data=[data_path]/calib-data.json --targetDB=[data_path]/targets.json

2) If you just want to generate some validation data, please try this one:

$ ./calibration-graph-cli --data=[data_path]/calib-data.json

3) If you want to generate a rig file after calibration, please use ./calibration-graph-to-rig instead.

Thanks.

Hi,

Sorry for any misunderstanding.

We totally followed the tutorial, and used the command: ./calibration-graph-cli --dir=/home/nvidia/Desktop/B8Calibration

The folder"B8Calibration" is the calib-data folder.

The info on the terminal window can be found in the link:https://devtalk.nvidia.com/default/topic/1048140/driveworks/nvmedia2d-release-error-when-extrinsics-calibration-on-driveworks-1-2-4/

So is there any potential reason to this error?

Hi,

It’s much clearer with the log information now.
We will check the possible cause and update with you soon.

Thanks.

Hi,

It looks like that error occurs when paring the targets.json file.

Do you modify it from the /usr/local/driveworks-1.2/data/tools/calibration/aprilTargets/targets.json?
Could you share your file with us for further checking?

Thanks.

Hi,

We modified the targets.json file directory from the url you mentioned.Such a file can be found via the link:

https://pan.baidu.com/s/14EZqF4OZmzVto9Et9rwmpg
PW:2yY0

ID s of the AprilTag we used for extrinsics calibration are: 89,90,91,92,97,98,100,101, and ID:99 is used for intrinsics calibration.

Special-targets.json file can also be found via the link above.

Thanks a lot for your reply!!!

Hi,

It looks like the link you shared is broken.
Could you help to check it?

Thanks.

Hi,

Sorry for the link.

I will attach the parts we modified to you:
{
“barLength”: 0.337,
“id”: 89,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
179,
179,
179,
179,
179
],
[
179,
179,
179,
179,
179
],
[
179,
179,
179,
179,
179
],
[
179,
179,
178,
179,
179
],
[
179,
179,
179,
179,
179
],
[
179,
179,
179,
179,
179
],
[
179,
179,
179,
179,
179
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 90,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
181,
181,
181,
181,
181
],
[
181,
181,
181,
181,
181
],
[
181,
181,
181,
181,
181
],
[
181,
181,
180,
181,
181
],
[
181,
181,
181,
181,
181
],
[
181,
181,
181,
181,
181
],
[
181,
181,
181,
181,
181
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 91,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
183,
183,
183,
183,
183
],
[
183,
183,
183,
183,
183
],
[
183,
183,
183,
183,
183
],
[
183,
183,
182,
183,
183
],
[
183,
183,
183,
183,
183
],
[
183,
183,
183,
183,
183
],
[
183,
183,
183,
183,
183
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 92,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
185,
185,
185,
185,
185
],
[
185,
185,
185,
185,
185
],
[
185,
185,
185,
185,
185
],
[
185,
185,
184,
185,
185
],
[
185,
185,
185,
185,
185
],
[
185,
185,
185,
185,
185
],
[
185,
185,
185,
185,
185
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 97,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
195,
195,
195,
195,
195
],
[
195,
195,
195,
195,
195
],
[
195,
195,
195,
195,
195
],
[
195,
195,
194,
195,
195
],
[
195,
195,
195,
195,
195
],
[
195,
195,
195,
195,
195
],
[
195,
195,
195,
195,
195
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 98,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
197,
197,
197,
197,
197
],
[
197,
197,
197,
197,
197
],
[
197,
197,
197,
197,
197
],
[
197,
197,
196,
197,
197
],
[
197,
197,
197,
197,
197
],
[
197,
197,
197,
197,
197
],
[
197,
197,
197,
197,
197
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 99,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
199,
199,
199,
199,
199
],
[
199,
199,
199,
199,
199
],
[
199,
199,
199,
199,
199
],
[
199,
199,
198,
199,
199
],
[
199,
199,
199,
199,
199
],
[
199,
199,
199,
199,
199
],
[
199,
199,
199,
199,
199
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 100,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
201,
201,
201,
201,
201
],
[
201,
201,
201,
201,
201
],
[
201,
201,
201,
201,
201
],
[
201,
201,
200,
201,
201
],
[
201,
201,
201,
201,
201
],
[
201,
201,
201,
201,
201
],
[
201,
201,
201,
201,
201
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.337,
“id”: 101,
“pixelsInBar”: 29.5358657836914,
“tags”: {
“cols”: [
[
203,
203,
203,
203,
203
],
[
203,
203,
203,
203,
203
],
[
203,
203,
203,
203,
203
],
[
203,
203,
202,
203,
203
],
[
203,
203,
203,
203,
203
],
[
203,
203,
203,
203,
203
],
[
203,
203,
203,
203,
203
]
],
“size”: [
7,
5
]
}
},
{
“barLength”: 0.1,
“id”: 180,
“pixelsInBar”: 17.6470584869385,
“tags”: {
“cols”: [
[
361,
361,
361
],
[
361,
360,
361
],
[
361,
361,
361
]
],
“size”: [
3,
3
]
}
},
{
“barLength”: 0.1,
“id”: 181,
“pixelsInBar”: 17.6470584869385,
“tags”: {
“cols”: [
[
363,
363,
363
],
[
363,
362,
363
],
[
363,
363,
363
]
],
“size”: [
3,
3
]
}
},
{
“barLength”: 0.1,
“id”: 182,
“pixelsInBar”: 17.6470584869385,
“tags”: {
“cols”: [
[
365,
365,
365
],
[
365,
364,
365
],
[
365,
365,
365
]
],
“size”: [
3,
3
]
}
},
{
“barLength”:0.1,
“id”: 183,
“pixelsInBar”: 17.6470584869385,
“tags”: {
“cols”: [
[
367,
367,
367
],
[
367,
366,
367
],
[
367,
367,
367
]
],
“size”: [
3,
3
]
}
},

And for the special-targets.json:
{
“ground_targets”:[90,92],
“ignore_targets”:[91,98],
“wheel_targets”:
{
“rearLeft”:180,
“rearRtight”:183,
“frontLeft”:181,
“frontRight”:182
}
}

Thanks a lot for your reply!!!

Hi,

Could you share full targets.json with us?
Maybe you can attach it directly on your comment.

We can reproduce a similar error when “tagFamily” is missing:

[11-2-2016 16:31:47] Terminating app due to unexpected exception: 
type must be string, but is null

Thanks.

Hi,

Full targets.json and special-targets.json file can be found in the attachment

target config.zip (6.5 KB)

Hi,

This error is caused by a type in special-targets.json.
Calibration can run well after correcting it.

--- a/special-targets.json
+++ b/special-targets.json
@@ -4,7 +4,7 @@
        "wheel_targets":
        {
                "rearLeft":180,
-               "rearRtight":183,
+               "rearRight":183,
                "frontLeft":181,
                "frontRight":182
        }

Thanks.