When I use -nic I get the following error:
Flashing Calibration data into
EEPROM VERSION being flashed is -> 7
EEPROM VERSION being flashed is -> 7
Device closed in exception..
No PROTECTED permissions to override protected EEPROM fields
Traceback (most recent call last):
File "/home/shivam157/depthai/calibrate.py", line 1124, in calibrate
self.device.flashCalibration2(calibration_handler)
RuntimeError: No PROTECTED permissions to override protected EEPROM fields
Also, now I also get the following error when I run cam_test.py:
shivam157@ubuntu:~/depthai-python/utilities$ python3 cam_test.py --cameras left,m right,m
DepthAI version: 2.21.2.0
DepthAI path: /home/shivam157/.local/lib/python3.10/site-packages/depthai.cpython-310-aarch64-linux-gnu.so
Traceback (most recent call last):
File "/home/shivam157/depthai-python/utilities/cam_test.py", line 186, in <module>
'1012': dai.ColorCameraProperties.SensorResolution.THE_1352X1012,
AttributeError: type object 'depthai.SensorResolution' has no attribute 'THE_1352X1012'
I was not getting this error before. After flashing without
Update: Not getting the second error above probably because I flashed without -nic.
@jakaskerl A correct calibration flash will most probably solve the bad depth in ROS2. I might just need to switch sockets in config. I checked the camera information topics and saw that the projection matrix was wrong. So if the baseline is being calculated from the projection matrix, then the depth will be bad. This is the calibration it is getting from device. Please fix the calibration.py file so that I can flash it, or tell me how to not use the device calibration data and use the external files in the camera. yaml. Right now, if I use the external files, then both of the calibration sources are publishing to the same info topic.
Btw, this time the saved calibration file with -nic looks correct, it is just not flashed because of the error I pasted above.
The calibration file saved:
{
"batchName": "",
"batchTime": 0,
"boardConf": "",
"boardCustom": "",
"boardName": "Custom FFC",
"boardOptions": 0,
"boardRev": "R1M0E3",
"cameraData": [
[
1,
{
"cameraType": 0,
"distortionCoeff": [
-1.8108996152877808,
0.5892674922943115,
0.00020837810006923974,
0.0008147237240336835,
-0.4694308340549469,
-1.8531672954559326,
0.7104603052139282,
-0.5547073483467102,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"height": 800,
"intrinsicMatrix": [
[
906.6533813476563,
0.0,
625.2329711914063
],
[
0.0,
906.753662109375,
399.9358825683594
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 75.0,
"width": 1280
}
],
[
2,
{
"cameraType": 0,
"distortionCoeff": [
-1.1144567728042603,
0.4457603096961975,
-0.00030109440558589995,
0.000643925741314888,
1.2683645486831665,
-1.1590780019760132,
0.5456246733665466,
1.2029682397842407,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"extrinsics": {
"rotationMatrix": [
[
0.9946930408477783,
0.10237327218055725,
-0.010269088670611382
],
[
-0.1015079990029335,
0.9927471876144409,
0.06441415846347809
],
[
0.016788896173238754,
-0.06302992254495621,
0.9978703856468201
]
],
"specTranslation": {
"x": 9.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": 1,
"translation": {
"x": -8.774820327758789,
"y": 0.4384150207042694,
"z": -0.33474013209342957
}
},
"height": 800,
"intrinsicMatrix": [
[
910.39697265625,
0.0,
646.8530883789063
],
[
0.0,
910.701904296875,
386.07025146484375
],
[
0.0,
0.0,
1.0
]
],
"lensPosition": 0,
"specHfovDeg": 75.0,
"width": 1280
}
]
],
"hardwareConf": "",
"imuExtrinsics": {
"rotationMatrix": [],
"specTranslation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
},
"toCameraSocket": -1,
"translation": {
"x": 0.0,
"y": 0.0,
"z": 0.0
}
},
"miscellaneousData": [],
"productName": "",
"stereoRectificationData": {
"leftCameraSocket": 1,
"rectifiedRotationLeft": [
[
0.9980300664901733,
-0.049864426255226135,
0.03807265684008598
],
[
0.051083534955978394,
0.9981896281242371,
-0.03174852952361107
],
[
-0.036420609802007675,
0.03363087400794029,
0.9987704753875732
]
],
"rectifiedRotationRight": [
[
0.9984344244003296,
0.05026911944150925,
0.024530746042728424
],
[
-0.05104481801390648,
0.998180627822876,
0.03209204599261284
],
[
-0.02287287451326847,
-0.03329396992921829,
0.9991838335990906
]
],
"rightCameraSocket": 2
},
"version": 7
}