Skip to content

Commit ec76a55

Browse files
author
KhalilSelyan
committed
chore: better logs for debugging re-renders
Signed-off-by: KhalilSelyan <khalil@leodrive.ai>
1 parent 255c7f6 commit ec76a55

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

common/autoware_auto_perception_rviz_plugin/include/autoware_auto_perception_rviz_plugin/object_detection/object_polygon_display_base.hpp

+19-1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
220220

221221
void onInitialize() override
222222
{
223+
static int init_count = 0;
224+
RCLCPP_INFO(
225+
rclcpp::get_logger("autoware_auto_perception_plugin"), "onInitialize called %d times",
226+
init_count++);
227+
223228
RosTopicDisplay::RTDClass::onInitialize();
224229
m_marker_common.initialize(this->context_, this->scene_node_);
225230
QString message_type = QString::fromStdString(rosidl_generator_traits::name<MsgT>());
@@ -264,6 +269,11 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
264269

265270
void reset() override
266271
{
272+
static int reset_count = 0;
273+
RCLCPP_INFO(
274+
rclcpp::get_logger("autoware_auto_perception_plugin"), "reset called %d times",
275+
reset_count++);
276+
267277
RosTopicDisplay::reset();
268278
m_marker_common.clearMarkers();
269279
point_cloud_common->reset();
@@ -281,6 +291,10 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
281291

282292
void updateTopic() override
283293
{
294+
static int update_count = 0;
295+
RCLCPP_INFO(
296+
rclcpp::get_logger("autoware_auto_perception_plugin"), "updateTopic called %d times",
297+
update_count++);
284298
unsubscribe();
285299
reset();
286300
subscribe();
@@ -328,7 +342,10 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
328342
{
329343
RosTopicDisplay::unsubscribe();
330344
pointcloud_subscription.reset();
331-
RCLCPP_INFO(rclcpp::get_logger("autoware_auto_perception_plugin"), "Unsubscribe called");
345+
static int unsubscribe_count = 0;
346+
RCLCPP_INFO(
347+
rclcpp::get_logger("autoware_auto_perception_plugin"), "Unsubscribe called %d times",
348+
unsubscribe_count++);
332349
}
333350

334351
void clear_markers() { m_marker_common.clearMarkers(); }
@@ -772,6 +789,7 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
772789
if (!m_publish_objs_pointcloud->getBool()) {
773790
return;
774791
}
792+
775793
pointCloudBuffer_mutex.lock();
776794
pointCloudBuffer.push_front(input_pointcloud_msg);
777795
if (pointCloudBuffer.size() > 5) {

0 commit comments

Comments
 (0)