The obstacle is not on my cost map.
If I give a goal for the robot, it will bump into the obstacle. I am using Humble and NAV2.
global_costmap: global_costmap:
ros__parameters: update_frequency: 2.0
publish_frequency: 2.0 global_frame:
map robot_base_frame: base_link
use_sim_time: True robot_radius: 0.1
resolution: 0.05 track_unknown_space:
true plugins: [“static_layer”, “obstacle_layer”, “inflation_layer”]
static_layer: enabled: True plugin: “nav2_costmap_2d::StaticLayer”
map_subscribe_transient_local: True
obstacle_layer: plugin: “nav2_costmap_2d::ObstacleLayer”
enabled: True
observation_sources:
scan scan: topic: /scan
sensor_frame: “base_scan”
max_obstacle_height: 2.0
clearing: True marking: True
data_type: “LaserScan”
expected_update_rate: 1.0
raytrace_max_range: 3.0
raytrace_min_range: 0.0
obstacle_max_range: 2.5
obstacle_min_range: 0.0
inflation_layer: plugin: “nav2_costmap_2d::InflationLayer”
cost_scaling_factor: 1.0
inflation_radius: 0.55
always_send_full_costmap: True
global_costmap_client:
ros__parameters:
use_sim_time: True
global_costmap_rclcpp_node:
ros__parameters:
use_sim_time: True
local_costmap:
local_costmap:
ros__parameters: update_frequency: 5.0
publish_frequency: 5.0 global_frame: odom
robot_base_frame: base_link
use_sim_time: True
rolling_window: true
width: 3
height: 3
resolution: 0.05
robot_radius: 0.1
always_send_full_costmap: True
plugins: [“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”
expected_update_rate: 1.0
inflation_layer:
plugin: “nav2_costmap_2d::InflationLayer”
cost_scaling_factor: 3.0
inflation_radius: 1.0
always_send_full_costmap: True
local_costmap_client:
ros__parameters:
use_sim_time: True
local_costmap_rclcpp_node:
ros__parameters: use_sim_time: True