The obstacle layer cannot be detected by the robot

asked 2023-04-13 09:34:29 -0500

furkan_ gravatar image

updated 2023-04-14 00:52:32 -0500

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 retag flag offensive close merge delete

Comments

edit your answer with costmap configurations. No way for us to answer this without seeing your config

chased11 gravatar image chased11  ( 2023-04-13 14:26:57 -0500 )edit

Question has been updated.

furkan_ gravatar image furkan_  ( 2023-04-14 00:11:57 -0500 )edit

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

frans gravatar image frans  ( 2023-04-15 05:26:58 -0500 )edit

Maybe add your local planner parameters, the issue might be in there.

chased11 gravatar image chased11  ( 2023-04-16 13:18:14 -0500 )edit

I tried with global planner parameters but it didn't work

furkan_ gravatar image furkan_  ( 2023-04-17 02:42:22 -0500 )edit

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

chased11 gravatar image chased11  ( 2023-04-17 18:28:06 -0500 )edit