mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-12 03:00:20 +08:00
fix: update Camera Info Publishing Conditions
This commit is contained in:
@@ -365,8 +365,7 @@ void OBCameraNode::setupDevices() {
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting heartbeat to " << (enable_heartbeat_ ? "ON" : "OFF"));
|
||||
TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_HEARTBEAT_BOOL, enable_heartbeat_);
|
||||
}
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting firmware log to "
|
||||
<< (enable_firmware_log_ ? "ON" : "OFF"));
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting firmware log to " << (enable_firmware_log_ ? "ON" : "OFF"));
|
||||
device_->enableFirmwareLog(enable_firmware_log_);
|
||||
if (max_depth_limit_ > 0 &&
|
||||
device_->isPropertySupported(OB_PROP_MAX_DEPTH_INT, OB_PERMISSION_READ_WRITE)) {
|
||||
@@ -3750,7 +3749,7 @@ void OBCameraNode::onNewFrameCallback(const std::shared_ptr<ob::Frame> &frame,
|
||||
camera_info.p.at(7) = -fy * ex.trans[1] / 1000.0 + 0.0;
|
||||
}
|
||||
CHECK_NOTNULL(image_publishers_[stream_index]);
|
||||
if (!has_raw_image_subscriber && !enable_undistortion_publish) {
|
||||
if (!has_raw_image_subscriber && !enable_undistortion_publish && !has_subscriber) {
|
||||
return;
|
||||
}
|
||||
if (image.empty() || image.cols != width || image.rows != height) {
|
||||
|
||||
Reference in New Issue
Block a user