@@ -107,6 +107,7 @@ LidarCenterPointNode::LidarCenterPointNode(const rclcpp::NodeOptions & node_opti
107
107
circle_nms_dist_threshold, yaw_norm_thresholds, has_variance_);
108
108
detector_ptr_ =
109
109
std::make_unique<CenterPointTRT>(encoder_param, head_param, densification_param, config);
110
+ diagnostics_module_ptr_ = std::make_unique<DiagnosticsModule>(this , " centerpoint_trt" );
110
111
111
112
pointcloud_sub_ = this ->create_subscription <sensor_msgs::msg::PointCloud2>(
112
113
" ~/input/pointcloud" , rclcpp::SensorDataQoS{}.keep_last (1 ),
@@ -145,11 +146,22 @@ void LidarCenterPointNode::pointCloudCallback(
145
146
stop_watch_ptr_->toc (" processing_time" , true );
146
147
}
147
148
149
+ diagnostics_module_ptr_->clear ();
150
+
148
151
std::vector<Box3D> det_boxes3d;
149
- bool is_success = detector_ptr_->detect (*input_pointcloud_msg, tf_buffer_, det_boxes3d);
152
+ bool is_num_pillars_within_range = true ;
153
+ bool is_success = detector_ptr_->detect (*input_pointcloud_msg, tf_buffer_, det_boxes3d, is_num_pillars_within_range);
150
154
if (!is_success) {
151
155
return ;
152
156
}
157
+ diagnostics_module_ptr_->add_key_value (" is_num_pillars_within_range" , is_num_pillars_within_range);
158
+ if (!is_num_pillars_within_range) {
159
+ std::stringstream message;
160
+ message << " CenterPointTRT::detect: The actual number of pillars exceeds its maximum value, "
161
+ << " which may limit the detection performance." ;
162
+ diagnostics_module_ptr_->update_level_and_message (
163
+ diagnostic_msgs::msg::DiagnosticStatus::WARN, message.str ());
164
+ }
153
165
154
166
std::vector<autoware_perception_msgs::msg::DetectedObject> raw_objects;
155
167
raw_objects.reserve (det_boxes3d.size ());
@@ -170,6 +182,8 @@ void LidarCenterPointNode::pointCloudCallback(
170
182
published_time_publisher_->publish_if_subscribed (objects_pub_, output_msg.header .stamp );
171
183
}
172
184
185
+ diagnostics_module_ptr_->publish (input_pointcloud_msg->header .stamp );
186
+
173
187
// add processing time for debug
174
188
if (debug_publisher_ptr_ && stop_watch_ptr_) {
175
189
const double cyclic_time_ms = stop_watch_ptr_->toc (" cyclic_time" , true );
0 commit comments