Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename depth/image_raw to depth_raw/image #140

Merged
merged 1 commit into from
Aug 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions openni2_camera/src/openni2_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void OpenNI2Driver::advertiseROSTopics()
};
rmw_qos_profile_t custom_qos = rmw_qos_profile_default;
custom_qos.depth = 1;
pub_depth_raw_ = image_transport::create_camera_publisher(this, "depth/image_raw", custom_qos, pub_options);
pub_depth_raw_ = image_transport::create_camera_publisher(this, "depth_raw/image", custom_qos, pub_options);
pub_depth_ = image_transport::create_camera_publisher(this, "depth/image", custom_qos, pub_options);
pub_projector_info_ = this->create_publisher<sensor_msgs::msg::CameraInfo>("projector/camera_info", 1);
}
Expand Down Expand Up @@ -398,7 +398,6 @@ void OpenNI2Driver::colorConnectCb()
}
std::lock_guard<std::mutex> lock(connect_mutex_);

// This does not appear to work
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these comments were left over and should have been removed when lazy subscribers were implemented

color_subscribers_ = pub_color_.getNumSubscribers() > 0;

if (color_subscribers_ && !device_->isColorStreamStarted())
Expand Down Expand Up @@ -451,7 +450,6 @@ void OpenNI2Driver::depthConnectCb()
}
std::lock_guard<std::mutex> lock(connect_mutex_);

// These does not appear to work
depth_subscribers_ = pub_depth_.getNumSubscribers() > 0;
depth_raw_subscribers_ = pub_depth_raw_.getNumSubscribers() > 0;
projector_info_subscribers_ = pub_projector_info_->get_subscription_count() > 0;
Expand Down Expand Up @@ -481,8 +479,6 @@ void OpenNI2Driver::irConnectCb()
}
std::lock_guard<std::mutex> lock(connect_mutex_);

// This does not appear to work
// ir_subscribers_ = pub_ir_.getNumSubscribers() > 0;
ir_subscribers_ = this->count_subscribers("ir/image") > 0 ||
this->count_subscribers("ir/camera_info") > 0;

Expand Down
Loading