I have a very similar question to: [ROS2][Nav2] Is there a way to expand the global costmap? and Nav2 to navigate to space outside of global cost map when using static layer
I am working on ros2 jazzy in ubuntu 24.04 custom diff-robot.
I want to set goal poses outside the unknown area, specifically beyond the static layer of the global costmap. However, when I try to do this, the planner server fails to generate a plan because the goal is out of bounds (seams logic).
I've enabled track_unknown_space: true and adjusted the width and height of the global costmap so that the goal should be within bounds, but still unable to plan. I feel like I'm missing something obvious, as I haven't found others encountering this issue.
global_costmap:
global_costmap:
ros__parameters:
update_frequency: 1.0
publish_frequency: 1.0
global_frame: map
robot_base_frame: base_link
width: 50
height: 50
use_sim_time: true
footprint: "[ [0.2, 0.5], [0.2, -0.5], [-1.1, -0.5] , [-1.1, 0.5] ]"
resolution: 0.05
track_unknown_space: true
plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
obstacle_layer:
plugin: "nav2_costmap_2d::ObstacleLayer"
enabled: true
observation_sources: scan
scan:
topic: /scan
max_obstacle_height: 2.0
clearing: true
marking: true
data_type: "LaserScan"
static_layer:
plugin: "nav2_costmap_2d::StaticLayer"
enabled: true
map_subscribe_transient_local: true
subscribe_to_updates: true
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
enabled: true
cost_scaling_factor: 3.0
inflation_radius: 1.2
always_send_full_costmap: true
What I observe is that the costmap is set initially but then resized by the static layer. During startup, I can briefly see the map, set by the params, in RViz before it gets resized. If anyone could provide guidance, it would be greatly appreciated.