diff --git a/src/ob_camera_node.cpp b/src/ob_camera_node.cpp index b63d4d03..c92aa218 100644 --- a/src/ob_camera_node.cpp +++ b/src/ob_camera_node.cpp @@ -528,10 +528,8 @@ void OBCameraNode::publishDepthPointCloud(const std::shared_ptr& f return; } - if (!camera_params_ && depth_registration_) { + if(!camera_params_) { camera_params_ = pipeline_->getCameraParam(); - } else if (!camera_params_) { - camera_params_ = getCameraDepthParam(); } if (!camera_params_) { @@ -1005,12 +1003,8 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr& frame, int height = static_cast(video_frame->height()); auto timestamp = frameTimeStampToROSTime(video_frame->systemTimeStamp()); - if (!camera_params_ && depth_registration_) { + if (!camera_params_) { camera_params_ = pipeline_->getCameraParam(); - } else if (!camera_params_ && stream_index == COLOR) { - camera_params_ = getCameraColorParam(); - } else if (!camera_params_ && (stream_index == DEPTH || stream_index == INFRA0)) { - camera_params_ = getCameraDepthParam(); } std::string frame_id =