ros2 costmap 超声波层不更新
-
设置了超声波层,在实际使用的时候,不能及时更新,还会在车体附件生成障碍物
我使用的参数如下:global_costmap: global_costmap: ros__parameters: update_frequency: 1.0 publish_frequency: 1.0 global_frame: map robot_base_frame: base_link use_sim_time: True #robot_radius: 0.22 footprint: "[ [0.35, 0.31], [0.35, -0.31], [-0.35, -0.31], [-0.35, 0.31] ]" #"[ [0.35, 0.30], [0.35, -0.30], [-0.35, -0.30], [-0.35, 0.30] ]" resolution: 0.05 footprint_padding: 0.032 #0.052 track_unknown_space: true plugins: ["static_layer", "obstacle_layer","range_sensor_layer", "inflation_layer"] obstacle_layer: plugin: "nav2_costmap_2d::ObstacleLayer" enabled: True footprint_clearing_enabled: true observation_sources: scan scan_front scan: topic: /laser_back_scan max_obstacle_height: 2.0 clearing: True marking: True inf_is_valid: True data_type: "LaserScan" raytrace_max_range: 3.0 raytrace_min_range: 0.0 obstacle_max_range: 2.5 obstacle_min_range: 0.0 scan_front: topic: /laser_front_scan max_obstacle_height: 2.0 clearing: True marking: True inf_is_valid: True data_type: "LaserScan" raytrace_max_range: 3.0 raytrace_min_range: 0.0 obstacle_max_range: 2.5 obstacle_min_range: 0.0 static_layer: plugin: "nav2_costmap_2d::StaticLayer" map_subscribe_transient_local: True inflation_layer: plugin: "nav2_costmap_2d::InflationLayer" cost_scaling_factor: 3.0 inflation_radius: 0.55 range_sensor_layer: plugin: "nav2_costmap_2d::RangeSensorLayer" enabled: True topics: ["/range"] phi: 1.2 inflate_cone: 15.0 no_readings_timeout: 0.0 clear_threshold: 0.2 mark_threshold: 0.8 clear_on_max_reading: True input_sensor_type: ALL always_send_full_costmap: True```