mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
Fixed wrong ir frame id
This commit is contained in:
@@ -1768,8 +1768,10 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame> &frame,
|
|||||||
distortion = stream_index.first == OB_STREAM_COLOR ? camera_params.rgbDistortion
|
distortion = stream_index.first == OB_STREAM_COLOR ? camera_params.rgbDistortion
|
||||||
: camera_params.depthDistortion;
|
: camera_params.depthDistortion;
|
||||||
}
|
}
|
||||||
std::string frame_id =
|
std::string frame_id = optical_frame_id_[stream_index];
|
||||||
depth_registration_ ? depth_aligned_frame_id_[stream_index] : optical_frame_id_[stream_index];
|
if (depth_registration_ && stream_index == DEPTH) {
|
||||||
|
frame_id = depth_aligned_frame_id_[stream_index];
|
||||||
|
}
|
||||||
auto camera_info = convertToCameraInfo(intrinsic, distortion, width);
|
auto camera_info = convertToCameraInfo(intrinsic, distortion, width);
|
||||||
camera_info.header.stamp = timestamp;
|
camera_info.header.stamp = timestamp;
|
||||||
camera_info.header.frame_id = frame_id;
|
camera_info.header.frame_id = frame_id;
|
||||||
|
|||||||
Reference in New Issue
Block a user