The obstacle layer cannot be detected by the robot
Hello,
I am creating cost map with point cloud data with stereo vision camera. The cost map I created appears in the rviz environment. However, my robot ignores them and crashes into the obstacle. What might be the cause?
common_costmap.yaml
obstacle_range: 3.0
raytrace_range: 3.5
footprint: [[-0.432,-0.432],[-0.432,0.432],[0.432,0.432],[0.432,-0.432]]
footprint_padding: 0.08
resolution: 0.05
inflation_layer:
inflation_radius: 0.8
cost_scaling_factor: 50.0
obstacle_layer:
map_type: costmap
observation_sources: point_cloud_sensor
point_cloud_sensor: {sensor_frame: camera_link, data_type: PointCloud2, topic: /voxel_grid/output, marking: true, clearing: true}
global_costmap.yaml
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.5
static_map: true
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
local_costmap.yaml
local_costmap:
global_frame: odom
robot_base_frame: base_footprint
update_frequency: 10.0
publish_frequency: 10.0
transform_tolerance: 0.1
static_map: false
width: 7
height: 7
plugins:
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
edit your answer with costmap configurations. No way for us to answer this without seeing your config
Question has been updated.
It seems your robot are not ignore your obstacle but the local planner has bad configuration for obstacle avoidance. Maybe you should try global planner to avoid the obstacle
Maybe add your local planner parameters, the issue might be in there.
I tried with global planner parameters but it didn't work
Post your global and local parameters, we can't help with no information. btw your cost scaling factor is very high. I never set mine higher than 3