Sensor origin, out of map bounds. The costmap can't raytrace it
Hello,
I am trying to setup the costmaps using Navigation 2 package. Below is my yaml file for the params. I have not included the other parameters but everything is working. Costmaps are plotting. However I keep getting this warning
[planner_server-3] [WARN] [1624509660.675015414] [global_costmap.global_costmap]: Sensor origin: (0.14, 0.00, 0.95), out
of map bounds. The costmap can't raytrace for it.
Please let me know what is causing this warning and if I can ignore it all together. I am using Ubuntu 20.04 and ROS Foxy
local_costmap:
local_costmap:
ros__parameters:
update_frequency: 5.0
publish_frequency: 2.0
global_frame: odom
robot_base_frame: chassis
use_sim_time: True
rolling_window: true
width: 20
height: 20
resolution: 0.05
footprint: "[[0.5,0.5], [0.5,-0.5], [-0.5,-0.5], [-0.5,0.5]]"
plugins: ["nonpersisting_obstacle_layer", "inflation_layer"]
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.55
nonpersisting_obstacle_layer:
plugin: "nav2_costmap_2d/NonPersistentVoxelLayer"
enabled: True
track_unknown_space: true
max_obstacle_height: 1.5
publish_voxel_map: True
origin_z: 0.0
z_resolution: 0.05
z_voxels: 16
unknown_threshold: 15
mark_threshold: 0
combination_method: 1
obstacle_range: 10.0
observation_sources: rgbd
rgbd:
data_type: PointCloud2
topic: /gazebo/realsense/custom_points
marking: true
min_obstacle_height: 0.5
max_obstacle_height: 1.5
always_send_full_costmap: True
local_costmap_client:
ros__parameters:
use_sim_time: True
local_costmap_rclcpp_node:
ros__parameters:
use_sim_time: True
global_costmap:
global_costmap:
ros__parameters:
update_frequency: 1.0
publish_frequency: 1.0
global_frame: odom
robot_base_frame: chassis
use_sim_time: True
footprint: "[[0.5,0.5], [0.5,-0.5], [-0.5,-0.5], [-0.5,0.5]]"
width: 500
height: 500
resolution: 0.05
track_unknown_space: true
plugins: ["static_layer", "obstacle_layer", "inflation_layer"]
# plugins: ["obstacle_layer", "inflation_layer"]
obstacle_layer:
plugin: "nav2_costmap_2d::VoxelLayer"
enabled: True
footprint_clearing_enabled: true
max_obstacle_height: 2.0
publish_voxel_map: True
origin_z: 0.0
z_resolution: 0.05
z_voxels: 10
mark_threshold: 0
unknown_threshold: 15
observation_sources: pointcloud
combination_method: 1
pointcloud:
topic: /gazebo/realsense/custom_points
obstacle_max_range: 2.5
obstacle_min_range: 0.0
raytrace_max_range: 5.0
raytrace_min_range: 0.3
max_obstacle_height: 2.0
min_obstacle_height: 0.5
clearing: True
marking: True
data_type: "PointCloud2"
always_send_full_costmap: True
static_layer:
plugin: "nav2_costmap_2d::StaticLayer"
map_subscribe_transient_local: True
enabled: True
subscribe_to_updates: true
transform_tolerance: 10.0
inflation_layer:
plugin: "nav2_costmap_2d::InflationLayer"
cost_scaling_factor: 3.0
inflation_radius: 0.55
global_costmap_client:
ros__parameters:
use_sim_time: True
global_costmap_rclcpp_node:
ros__parameters:
use_sim_time: True
map_server:
ros__parameters:
use_sim_time: True
yaml_filename: "map.yaml"
map_saver:
ros__parameters:
use_sim_time: True
save_map_timeout: 5000
free_thresh_default: 0.25
occupied_thresh_default: 0.65
map_subscribe_transient_local: False
lifecycle_manager:
ros__parameters:
use_sim_time: True
autostart: True
node_names: ['planner_server', 'controller_server', 'bt_navigator', 'recoveries_server', 'map_server']
lifecycle_manager_service_client:
ros__parameters:
use_sim_time: True
lifecycle_manager_client_service_client:
ros__parameters:
use_sim_time: True
I'm having the same warning too, some help would be nice!
Hey, I got a sort of hack for it. I was getting this message only when I was using STVL in the global costmap so I used NPVL instead in the global costmap as well and it solved the problem