Hi, when I do the ROS topic, echo on the camera info topic, I get different values of the projection matrix in the messages:
Right camera topic:
---
header:
stamp:
sec: 1718923245
nanosec: 746549891
frame_id: oak_right_camera_optical_frame
height: 800
width: 1280
distortion_model: plumb_bob
d:
- -1.1144567728042603
- 0.4457603096961975
- -0.00030109440558589995
- 0.000643925741314888
- 1.2683645486831665
k:
- 910.39697265625
- 0.0
- 646.8530883789062
- 0.0
- 910.701904296875
- 386.07025146484375
- 0.0
- 0.0
- 1.0
r:
- 0.9984344244003296
- 0.05026911944150925
- 0.024530746042728424
- -0.05104481801390648
- 0.998180627822876
- 0.03209204599261284
- -0.02287287451326847
- -0.03329396992921829
- 0.9991838335990906
p:
- 916.425482
- 52.429217
- 636.126594
- -8205.09755
- -85.9618346
- 879.762776
- 443.910167
- 270.032187
- 0.0167888962
- -0.0630299225
- 0.997870386
- -0.334740132
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false
---
header:
stamp:
sec: 1718923245
nanosec: 346532658
frame_id: oak_right_camera_optical_frame
height: 800
width: 1280
distortion_model: rational_polynomial
d:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
k:
- 910.39697265625
- 0.0
- 646.8530883789062
- 0.0
- 910.701904296875
- 386.07025146484375
- 0.0
- 0.0
- 1.0
r:
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
p:
- 910.39697265625
- 0.0
- 646.8530883789062
- 79.88569861994125
- 0.0
- 910.701904296875
- 386.07025146484375
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false
---
Similarly left camera topic:
---
header:
stamp:
sec: 1718923330
nanosec: 280492777
frame_id: oak_left_camera_optical_frame
height: 800
width: 1280
distortion_model: plumb_bob
d:
- -1.8108996152877808
- 0.5892674922943115
- 0.00020837810006923974
- 0.0008147237240336835
- -0.4694308340549469
k:
- 906.6533813476562
- 0.0
- 625.2329711914062
- 0.0
- 906.753662109375
- 399.9358825683594
- 0.0
- 0.0
- 1.0
r:
- 0.9980300664901733
- -0.049864426255226135
- 0.03807265684008598
- 0.051083534955978394
- 0.9981896281242371
- -0.03174852952361107
- -0.036420609802007675
- 0.03363087400794029
- 0.9987704753875732
p:
- 906.65338135
- 0.0
- 625.23297119
- 0.0
- 0.0
- 906.75366211
- 399.93588257
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false
---
header:
stamp:
sec: 1718923330
nanosec: 313811443
frame_id: oak_left_camera_optical_frame
height: 800
width: 1280
distortion_model: rational_polynomial
d:
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
- 0.0
k:
- 906.6533813476562
- 0.0
- 625.2329711914062
- 0.0
- 906.753662109375
- 399.9358825683594
- 0.0
- 0.0
- 1.0
r:
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
- 0.0
- 0.0
- 1.0
p:
- 910.39697265625
- 0.0
- 646.8530883789062
- 0.0
- 0.0
- 910.701904296875
- 386.07025146484375
- 0.0
- 0.0
- 0.0
- 1.0
- 0.0
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: false
Is this supposed to happen if I specify rectified images in the camera.yaml file? I can't get RtabMap to work with this because P(0,3) is positive in some messages for the right camera. It should be negative. I am specifying calibration files, but the second message you see in each topic with distortion zero is not exactly the calib file I am using.
I think the driver is publishing two camera info on the same topic. When I removed my calibration file from camera.yaml, I only saw one message being repeated, which is the second one in the message above. How do I only use the files that I am specifying in the YAML?
Why is the following hard coding being done?:
Also, where is the service set_camera_info and how can I use it to give calibration data?
Update:
Okay, so the hardcoding is because the images are undistorted and rectified in that stream.
Edit1:
If I am changing the socket order in camera.yaml, then P(0,3) or Tx should change in the projection matrix, but it is not. The baseline is wrong in the info topic. It is -Tx/Fx = 5.2 in cm, which is wrong and is from previous calibration. The baseline I am using is 8.77 cm.
I think a correct calibration flash will solve all of my problems.