@@ -186,6 +186,8 @@ PointPaintingFusionNode::PointPaintingFusionNode(const rclcpp::NodeOptions & opt
186
186
// create detector
187
187
detector_ptr_ = std::make_unique<image_projection_based_fusion::PointPaintingTRT>(
188
188
encoder_param, head_param, densification_param, config);
189
+ diagnostics_interface_ptr_ =
190
+ std::make_unique<autoware::universe_utils::DiagnosticsInterface>(this , " pointpainting_trt" );
189
191
190
192
obj_pub_ptr_ = this ->create_publisher <DetectedObjects>(" ~/output/objects" , rclcpp::QoS{1 });
191
193
@@ -389,6 +391,7 @@ void PointPaintingFusionNode::postprocess(sensor_msgs::msg::PointCloud2 & painte
389
391
{
390
392
std::unique_ptr<ScopedTimeTrack> st_ptr;
391
393
if (time_keeper_) st_ptr = std::make_unique<ScopedTimeTrack>(__func__, *time_keeper_);
394
+ diagnostics_interface_ptr_->clear ();
392
395
393
396
const auto objects_sub_count =
394
397
obj_pub_ptr_->get_subscription_count () + obj_pub_ptr_->get_intra_process_subscription_count ();
@@ -403,10 +406,21 @@ void PointPaintingFusionNode::postprocess(sensor_msgs::msg::PointCloud2 & painte
403
406
}
404
407
405
408
std::vector<autoware::lidar_centerpoint::Box3D> det_boxes3d;
406
- bool is_success = detector_ptr_->detect (painted_pointcloud_msg, tf_buffer_, det_boxes3d);
409
+ bool is_num_pillars_within_range = true ;
410
+ bool is_success = detector_ptr_->detect (
411
+ painted_pointcloud_msg, tf_buffer_, det_boxes3d, is_num_pillars_within_range);
407
412
if (!is_success) {
408
413
return ;
409
414
}
415
+ diagnostics_interface_ptr_->add_key_value (
416
+ " is_num_pillars_within_range" , is_num_pillars_within_range);
417
+ if (!is_num_pillars_within_range) {
418
+ std::stringstream message;
419
+ message << " PointPaintingTRT::detect: The actual number of pillars exceeds its maximum value, "
420
+ << " which may limit the detection performance." ;
421
+ diagnostics_interface_ptr_->update_level_and_message (
422
+ diagnostic_msgs::msg::DiagnosticStatus::WARN, message.str ());
423
+ }
410
424
411
425
std::vector<autoware_perception_msgs::msg::DetectedObject> raw_objects;
412
426
raw_objects.reserve (det_boxes3d.size ());
@@ -425,6 +439,7 @@ void PointPaintingFusionNode::postprocess(sensor_msgs::msg::PointCloud2 & painte
425
439
if (objects_sub_count > 0 ) {
426
440
obj_pub_ptr_->publish (output_msg);
427
441
}
442
+ diagnostics_interface_ptr_->publish (painted_pointcloud_msg.header .stamp );
428
443
}
429
444
430
445
bool PointPaintingFusionNode::out_of_scope (__attribute__((unused)) const DetectedObjects & obj)
0 commit comments