mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-12 19:20:20 +08:00
Merge branch 'fix/bug' into merge/sdk_2.8.1
This commit is contained in:
@@ -252,7 +252,6 @@ class OBLidarNode {
|
||||
std::string time_domain_ = "device"; // device, system, global
|
||||
bool enable_scan_to_point_ = false;
|
||||
bool enable_heartbeat_ = false;
|
||||
bool enable_firmware_log_ = false;
|
||||
bool use_intra_process_ = false;
|
||||
|
||||
// lidar
|
||||
|
||||
@@ -186,11 +186,6 @@ def generate_launch_description():
|
||||
default_value='false',
|
||||
description='Send heartbeat to device.'
|
||||
),
|
||||
DeclareLaunchArgument(
|
||||
'enable_firmware_log',
|
||||
default_value='false',
|
||||
description='Enable device firmware log output.'
|
||||
),
|
||||
DeclareLaunchArgument(
|
||||
'enable_imu',
|
||||
default_value='false',
|
||||
|
||||
@@ -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)) {
|
||||
@@ -2770,7 +2769,6 @@ void OBCameraNode::publishRawDepthImage(const std::shared_ptr<ob::Frame> &depth_
|
||||
}
|
||||
|
||||
void OBCameraNode::publishDepthPointCloud(const std::shared_ptr<ob::FrameSet> &frame_set) {
|
||||
(void)frame_set;
|
||||
if (!depth_cloud_pub_ || depth_cloud_pub_->get_subscription_count() == 0 ||
|
||||
!enable_point_cloud_) {
|
||||
return;
|
||||
@@ -3105,7 +3103,7 @@ std::shared_ptr<ob::Frame> OBCameraNode::processDepthFrameFilter(
|
||||
if (filter->isEnabled() && frame != nullptr) {
|
||||
frame = filter->process(frame);
|
||||
if (frame == nullptr) {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Depth filter process failed");
|
||||
RCLCPP_WARN_STREAM(logger_, "Depth filter process failed, frame is null");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -3261,8 +3259,10 @@ void OBCameraNode::onNewFrameSetCallback(std::shared_ptr<ob::FrameSet> frame_set
|
||||
setDisparitySearchOffset();
|
||||
setDepthAutoExposureROI();
|
||||
depth_frame = processDepthFrameFilter(depth_frame);
|
||||
frame_set->pushFrame(depth_frame);
|
||||
fps_counter_depth_->tick();
|
||||
if (depth_frame) {
|
||||
frame_set->pushFrame(depth_frame);
|
||||
fps_counter_depth_->tick();
|
||||
}
|
||||
}
|
||||
if (color_frame) {
|
||||
setColorAutoExposureROI();
|
||||
@@ -3750,9 +3750,6 @@ 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) {
|
||||
return;
|
||||
}
|
||||
if (image.empty() || image.cols != width || image.rows != height) {
|
||||
image.create(height, width, image_format_[stream_index]);
|
||||
}
|
||||
|
||||
@@ -1041,6 +1041,20 @@ void OBCameraNodeDriver::initializeDevice(const std::shared_ptr<ob::Device> &dev
|
||||
RCLCPP_INFO_STREAM(logger_, "ROS Wrapper version: " << OB_ROS_VERSION_STR);
|
||||
RCLCPP_INFO_STREAM(logger_, "SDK version: " << getObSDKVersion());
|
||||
RCLCPP_INFO_STREAM(logger_, "Hardware version: " << device_info_->getHardwareVersion());
|
||||
try {
|
||||
std::string isp_fw_version = device_->getExtensionInfo("IspFwVer");
|
||||
if (!isp_fw_version.empty()) {
|
||||
RCLCPP_INFO_STREAM(logger_, "ISP firmware version: " << isp_fw_version);
|
||||
}
|
||||
std::string isp_need_version = device_->getExtensionInfo("IspNeedVer");
|
||||
if (!isp_need_version.empty()) {
|
||||
RCLCPP_INFO_STREAM(logger_, "ISP needed version: " << isp_need_version);
|
||||
}
|
||||
} catch (ob::Error &e) {
|
||||
// Some devices don't support ISP firmware version query
|
||||
RCLCPP_DEBUG_STREAM(
|
||||
logger_, "Current device not support ISP firmware version query: " << e.getMessage());
|
||||
}
|
||||
RCLCPP_INFO_STREAM(logger_, "usb connect type: " << device_info_->getConnectionType());
|
||||
});
|
||||
RCLCPP_INFO_STREAM(logger_, "device unique id: " << device_unique_id_);
|
||||
|
||||
@@ -131,7 +131,6 @@ void OBLidarNode::getParameters() {
|
||||
setAndGetNodeParameter<double>(tf_publish_rate_, "tf_publish_rate", 0.0);
|
||||
setAndGetNodeParameter<std::string>(time_domain_, "time_domain", "global");
|
||||
setAndGetNodeParameter<bool>(enable_heartbeat_, "enable_heartbeat", false);
|
||||
setAndGetNodeParameter<bool>(enable_firmware_log_, "enable_firmware_log", false);
|
||||
setAndGetNodeParameter<std::string>(echo_mode_, "echo_mode", "");
|
||||
setAndGetNodeParameter<std::string>(point_cloud_qos_, "point_cloud_qos", "default");
|
||||
setAndGetNodeParameter<float>(min_angle_, "min_angle", -135.0);
|
||||
@@ -207,9 +206,6 @@ void OBLidarNode::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"));
|
||||
device_->enableFirmwareLog(enable_firmware_log_);
|
||||
if (!echo_mode_.empty() &&
|
||||
device_->isPropertySupported(OB_PROP_LIDAR_SPECIFIC_MODE_INT, OB_PERMISSION_READ_WRITE)) {
|
||||
if (echo_mode_ == "Last Echo") {
|
||||
|
||||
Reference in New Issue
Block a user