Costmap sends updates on costmap_update althought the map doesn't change
Hello everyone!
I am using costmap_2d but without move_base.
Here is the launch file:
<launch>
<node pkg="costmap_2d" type="costmap_2d_node" name="global_costmap" output="screen">
<rosparam file="$(find rikobot_nav)/param/my_global_costmap_params.yaml" command="load" ns="/global_costmap/costmap"/>
<rosparam file="$(find rikobot_nav)/param/my_common_costmap_params.yaml" command="load" ns="/global_costmap/costmap"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="basefootprint_to_baselink" args="0 0 0.065 0 0 0 1 base_footprint base_link 100" />
</launch>
my_global_costmap_params.yaml:
global_frame: /map
robot_base_frame: /base_footprint
update_frequency: 1.0
publish_frequency: 0.5
static_map: true
transform_tolerance: 0.5
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: obstacle_layer, type: "costmap_2d::VoxelLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
I was able to successfully use the costmap_2d in navigation through static environments. However, when I tried to subscribe in addition to the costmap_updates topic, I found that data is being sent periodically on the costmap_updates topic even though the costmap in RVIZ doesn't change and even the robot is not moving.
Is there something wrong with my setup?
Here is my code for interfacing with the costmap:
https://github.com/MohamedAfifii/SLAM-and-navigation-using-ROS/blob/presentation/src/rikobot_nav/include/costmap.h
If I should provide more information, please tell me. And thank's in advance.
So is the problem you're trying to solve that Rviz isn't updating, or what you think costmap_updates shouldn't be published?