File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -922,12 +922,16 @@ void OBCameraNode::setupDiagnosticUpdater() {
922922 if (diagnostic_period_ <= 0.0 ) {
923923 return ;
924924 }
925+ try {
925926 RCLCPP_INFO_STREAM (logger_, " Publish diagnostics every " << diagnostic_period_ << " seconds" );
926927 auto info = device_->getDeviceInfo ();
927928 std::string serial_number = info->serialNumber ();
928929 diagnostic_updater_ = std::make_unique<diagnostic_updater::Updater>(node_, diagnostic_period_);
929930 diagnostic_updater_->setHardwareID (serial_number);
930931 diagnostic_updater_->add (" Temperatures" , this , &OBCameraNode::onTemperatureUpdate);
932+ } catch (const std::exception &e) {
933+ RCLCPP_ERROR_STREAM (logger_, " Failed to setup diagnostic updater: " << e.what ());
934+ }
931935}
932936
933937void OBCameraNode::setupPipelineConfig () {
You can’t perform that action at this time.
0 commit comments