Skip to content

Commit

Permalink
chore: better logs for debugging re-renders
Browse files Browse the repository at this point in the history
Signed-off-by: KhalilSelyan <[email protected]>
  • Loading branch information
KhalilSelyan committed May 24, 2024
1 parent 255c7f6 commit ec76a55
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase

void onInitialize() override
{
static int init_count = 0;
RCLCPP_INFO(
rclcpp::get_logger("autoware_auto_perception_plugin"), "onInitialize called %d times",
init_count++);

RosTopicDisplay::RTDClass::onInitialize();
m_marker_common.initialize(this->context_, this->scene_node_);
QString message_type = QString::fromStdString(rosidl_generator_traits::name<MsgT>());
Expand Down Expand Up @@ -264,6 +269,11 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase

void reset() override
{
static int reset_count = 0;
RCLCPP_INFO(
rclcpp::get_logger("autoware_auto_perception_plugin"), "reset called %d times",
reset_count++);

RosTopicDisplay::reset();
m_marker_common.clearMarkers();
point_cloud_common->reset();
Expand All @@ -281,6 +291,10 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase

void updateTopic() override
{
static int update_count = 0;
RCLCPP_INFO(
rclcpp::get_logger("autoware_auto_perception_plugin"), "updateTopic called %d times",
update_count++);
unsubscribe();
reset();
subscribe();
Expand Down Expand Up @@ -328,7 +342,10 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
{
RosTopicDisplay::unsubscribe();
pointcloud_subscription.reset();
RCLCPP_INFO(rclcpp::get_logger("autoware_auto_perception_plugin"), "Unsubscribe called");
static int unsubscribe_count = 0;
RCLCPP_INFO(
rclcpp::get_logger("autoware_auto_perception_plugin"), "Unsubscribe called %d times",
unsubscribe_count++);
}

void clear_markers() { m_marker_common.clearMarkers(); }
Expand Down Expand Up @@ -772,6 +789,7 @@ class AUTOWARE_AUTO_PERCEPTION_RVIZ_PLUGIN_PUBLIC ObjectPolygonDisplayBase
if (!m_publish_objs_pointcloud->getBool()) {
return;
}

pointCloudBuffer_mutex.lock();
pointCloudBuffer.push_front(input_pointcloud_msg);
if (pointCloudBuffer.size() > 5) {
Expand Down

0 comments on commit ec76a55

Please sign in to comment.