Skip to content

Commit 6c83ed1

Browse files
committed
always keep global counter up to date
1 parent c34724f commit 6c83ed1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mesh_map/src/mesh_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ MeshMap::MeshMap(tf2_ros::Buffer& tf, const rclcpp::Node::SharedPtr& node)
138138
if (count > vertex_costs_sub_count_)
139139
{
140140
RCLCPP_INFO(node->get_logger(), "New cost layer subscriber detected. Publishing vertex costs once...");
141-
vertex_costs_sub_count_ = count;
142141
publishCostLayers(node->now());
143142
}
143+
vertex_costs_sub_count_ = count;
144144
});
145145
vertex_costs_update_pub_ = node->create_publisher<mesh_msgs::msg::MeshVertexCostsSparseStamped>(std::string(vertex_costs_pub->get_topic_name()) + "/updates", rclcpp::QoS(10).transient_local());
146146
vertex_colors_pub = node->create_publisher<mesh_msgs::msg::MeshVertexColorsStamped>("~/vertex_colors", rclcpp::QoS(1).transient_local());

0 commit comments

Comments
 (0)