Skip to content

Commit

Permalink
Fix the issue of acquiring color intrinsic parameters in topic
Browse files Browse the repository at this point in the history
  • Loading branch information
lixby03 committed Jan 18, 2024
1 parent 4247a61 commit 7b94b97
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/ob_camera_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,8 @@ void OBCameraNode::publishDepthPointCloud(const std::shared_ptr<ob::FrameSet>& f
return;
}

if (!camera_params_ && depth_registration_) {
if(!camera_params_) {
camera_params_ = pipeline_->getCameraParam();
} else if (!camera_params_) {
camera_params_ = getCameraDepthParam();
}

if (!camera_params_) {
Expand Down Expand Up @@ -1005,12 +1003,8 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame>& frame,
int height = static_cast<int>(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 =
Expand Down

0 comments on commit 7b94b97

Please sign in to comment.