Azure_Kinect_ROS_Driver
Azure_Kinect_ROS_Driver copied to clipboard
Switched camera_info for rect image data pub
Hi, this is just regarding about the ros camera_info data pub issue. I have noticed that the camera_info is switched in here while publishing it with the rectified topics.
calibration_data_.getDepthCameraInfo(rgb_rect_camera_info);
calibration_data_.getRgbCameraInfo(depth_rect_camera_info);
Refer to here
While the raw images topics are publishing the "correct" camera_info, the rectified images seems to be switched. I supposed it should be the other way as such
calibration_data_.getDepthCameraInfo(depth_rect_camera_info);
calibration_data_.getRgbCameraInfo(rgb_rect_camera_info);
I am also quite unsure, please correct me if I am wrong with this.
It looks like this was an oversight during the implementation. Good catch! How does this bug manifest for you?
This is not significant to people who directly subcribe to the published pointcloud. For me, it doesnt affect my application. But if anyone is planning to use the camera_info
of rect images, this will be confusing to them. Cheers!
I am using the camera intrinsics to do the projection myself. Since the sensor is factory calibrated, there is only a single set of intrinsic parameters per camera ({rgb,ir}/camera_info
). The remaining intrinsics should be derived from the registration into the respective camera frames:
- depth ← ir (depth is derived from the IR image)
- depth_to_rgb ← rgb (depth data is assigned to pixels in the colour frame)
- rgb_to_depth ← rgb (colour data is assigned to pixels in the depth/ir frame)
The rgb/camera_info
and ir/camera_info
are correctly assigned from getRgbCameraInfo
and getDepthCameraInfo
respectively.
rgb_to_depth
, which registers the colour in the depth frame (assigns colour to depth data), uses getDepthCameraInfo
which is correct. depth_to_rgb
, which registered the depth in the colour frame (assigns depth to the colour data), uses getRgbCameraInfo
which is also correct.
All this seems correct. But I agree that the "rect" variable naming is very confusing because depth_rect_camera_info
is actually the calibrated RGB image and rgb_rect_camera_info
is actually the calibrated IR image.
You could simply assign the "rect" intrinsics from the original rgb
and ir
intrinsics, leaving a comment why this is done.
@ooeygui Any chance that his variable naming gets fixed?