Using hardware timestamp when not OpenNI device

This commit is contained in:
Joe Dong
2024-03-15 13:58:00 +08:00
parent 9a58a10820
commit 982b60cebd
2 changed files with 11 additions and 3 deletions
+8
View File
@@ -606,6 +606,14 @@ void OBCameraNode::getParameters() {
setAndGetNodeParameter<int>(max_save_images_count_, "max_save_images_count", 10);
setAndGetNodeParameter<bool>(use_hardware_time_, "use_hardware_time", false);
setAndGetNodeParameter<bool>(enable_depth_scale_, "enable_depth_scale", true);
auto info = device_->getDeviceInfo();
is_openni_device_ = isOpenNIDevice(info->pid());
if (is_openni_device_) {
RCLCPP_INFO_STREAM(logger_, "OpenNI device detected.");
use_hardware_time_ = false;
}else {
use_hardware_time_ = true;
}
}
void OBCameraNode::setupTopics() {