Robotics StackExchange | Archived questions

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"}

Asked by furkan_ on 2023-04-13 09:34:29 UTC

Comments

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

Asked by chased11 on 2023-04-13 14:26:57 UTC

Question has been updated.

Asked by furkan_ on 2023-04-14 00:11:57 UTC

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

Asked by frans on 2023-04-15 05:26:58 UTC

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

Asked by chased11 on 2023-04-16 13:18:14 UTC

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

Asked by furkan_ on 2023-04-17 02:42:22 UTC

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

Asked by chased11 on 2023-04-17 18:28:06 UTC

Answers