mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-12 23:39:50 +08:00
Optimize frame processing sequence in onNewColorFrameCallback to reduce color topic latency
This commit is contained in:
@@ -2805,8 +2805,8 @@ void OBCameraNode::onNewColorFrameCallback() {
|
|||||||
}
|
}
|
||||||
std::shared_ptr<ob::FrameSet> frameSet = color_frame_queue_.front();
|
std::shared_ptr<ob::FrameSet> frameSet = color_frame_queue_.front();
|
||||||
is_color_frame_decoded_ = decodeColorFrameToBuffer(frameSet->colorFrame(), rgb_buffer_);
|
is_color_frame_decoded_ = decodeColorFrameToBuffer(frameSet->colorFrame(), rgb_buffer_);
|
||||||
publishPointCloud(frameSet);
|
|
||||||
onNewFrameCallback(frameSet->colorFrame(), COLOR);
|
onNewFrameCallback(frameSet->colorFrame(), COLOR);
|
||||||
|
publishPointCloud(frameSet);
|
||||||
color_frame_queue_.pop();
|
color_frame_queue_.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user