set color_fps to 60 to output the color stream

This commit is contained in:
datean
2024-12-16 03:30:30 -05:00
parent 5c14ab1dd1
commit 981a855aac
2 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ enable_3d_reconstruction_mode: false
enable_color: true
color_width: 640
color_height: 480
color_fps: 30
color_fps: 60
color_format: "MJPG"
enable_color_auto_exposure: false
color_exposure: 50 # 5ms
+11 -11
View File
@@ -2193,17 +2193,17 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame> &frame,
}
std::shared_ptr<ob::VideoFrame> video_frame;
if (frame->getType() == OB_FRAME_COLOR) {
updateStreamInfo(frame, color_stream_info_);
// if (interleave_frame_enable_ && interleave_skip_enable_) {
// interleave_skip_color_index_++;
// RCLCPP_DEBUG(logger_, "interleave filter skip interleave_skip_color_index_: %d",
// interleave_skip_color_index_);
// if (interleave_skip_color_index_ % 2 == 0) {
// RCLCPP_DEBUG(logger_, "interleave filter skip frame type: %d", frame->getType());
// return;
// }
// updateStreamInfo(frame, color_stream_info_);
// }
// updateStreamInfo(frame, color_stream_info_);
if (interleave_frame_enable_ && interleave_skip_enable_) {
interleave_skip_color_index_++;
RCLCPP_DEBUG(logger_, "interleave filter skip interleave_skip_color_index_: %d",
interleave_skip_color_index_);
if (interleave_skip_color_index_ % 2 == 0) {
RCLCPP_DEBUG(logger_, "interleave filter skip frame type: %d", frame->getType());
return;
}
updateStreamInfo(frame, color_stream_info_);
}
video_frame = frame->as<ob::ColorFrame>();
} else if (frame->getType() == OB_FRAME_DEPTH) {
video_frame = frame->as<ob::DepthFrame>();