mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 03:57:46 +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();
|
||||
is_color_frame_decoded_ = decodeColorFrameToBuffer(frameSet->colorFrame(), rgb_buffer_);
|
||||
publishPointCloud(frameSet);
|
||||
onNewFrameCallback(frameSet->colorFrame(), COLOR);
|
||||
publishPointCloud(frameSet);
|
||||
color_frame_queue_.pop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user