robot starts moving toward the goal,but it cannot identify the objects Infront of it!!

asked 2022-02-07 05:50:51 -0500

Delbina gravatar image

updated 2022-02-09 09:21:00 -0500

hi everyone,

my problem is about object detection and collision avoidance. when the robot starts moving toward the goal, it cannot identify the objects in Infront of it and hit them. I have defined the inflation_layer, obstacle_height, and footprint of the robot in cost-common-params. we are using 'navfn/NavfnROS' as global_planner and 'dwa_local_planner/DWAPlannerROS' as local_planner. I have attached the related move-base params. I am using rtabmap in mapping mode (SLAM) and i have activated rolling-window as well. so I would be grateful if anybody can help?! thanks

image description image description


max_obstacle_height: 2.2  
footprint: [[-0.76, -0.69], [-0.76, 0.69], [0.76, 0.69], [0.76, -0.69]] 

footprint_padding: 0.55
map_type: voxel

  enabled:              true
  max_obstacle_height:  2.2
  origin_z:             0.0
  z_resolution:         0.5
  z_voxels:             22
  unknown_threshold:    15
  mark_threshold:       0
  combination_method:   1
  track_unknown_space:  true    
  obstacle_range: 5.0
  raytrace_range: 3.0
  publish_voxel_map: true

  observation_sources: point_cloud_sensor 
    data_type: PointCloud2
    topic: /velodyne_points
    marking: true
    clearing: true
    min_obstacle_height: 0.0
    max_obstacle_height: 2.0

  enabled:              true
  cost_scaling_factor:  1.58  
  inflation_radius:     0.9


      <arg name="odom_frame_id"   default="icp_odom"/>
      <arg name="base_frame_id"   default="base_link"/>
      <arg name="global_frame_id" default="map"/>
      <arg name="odom_topic" default="/rtabmap/odom" />            

      <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/costmap_common_params.yaml" command="load" ns="global_costmap" />
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/costmap_common_params.yaml" command="load" ns="local_costmap" />   
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/local_costmap_params.yaml" command="load" /> 
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/global_costmap_params.yaml" command="load" />
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/move_base_params.yaml" command="load" />

        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/navfn_global_planner_params.yaml" command="load" />
        <rosparam file="$(find warthog_sim_2dnav)/para_dynamic_indoor/dwa_local_planner_params.yaml" command="load" />

        <!-- reset frame_id parameters using user input data -->
        <param name="global_costmap/global_frame" value="$(arg global_frame_id)" />
        <param name="global_costmap/robot_base_frame" value="$(arg base_frame_id)" />
        <param name="local_costmap/global_frame" value="$(arg odom_frame_id)" />
        <param name="local_costmap/robot_base_frame" value="$(arg base_frame_id)" />
        <param name="DWAPlannerROS/global_frame_id" value="$(arg odom_frame_id)" />

        <param name="base_global_planner" value="navfn/NavfnROS" />
        <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />

        <param name="controller_frequency" value="8.0" />
        <param name="controller_patience" value="2.0" />
        <remap from="odom" to="$(arg odom_topic)" />

shutdown_costmaps: false

controller_frequency: 8.0
controller_patience: 2.0

planner_frequency: 5.0 
planner_patience: 1.0   

oscillation_timeout: 10.0
oscillation_distance: 0.2

# local planner - default is trajectory rollout
base_local_planner: "dwa_local_planner/DWAPlannerROS"

base_global_planner: "navfn/NavfnROS" #alternatives:global_planner/GlobalPlanner, carrot_planner/CarrotPlanner

recovery_behavior_enabled: true

  - name:'super_conservative_reset1'
  - name:'conservative_reset1'
  - name:'aggressive_reset1'
  - name:'clearing_rotation1'
  - name:'super_conservative_reset2'
  - name:'conservative_reset2'
  - name:'aggressive_reset2'
  - name:'clearing_rotation2'


   global_frame: icp_odom
   robot_base_frame: base_link
   update_frequency: 1.0     
   publish_frequency: 2.0     
   static_map: false
   rolling_window: true
   width: 5.0
   height: 5.0
   resolution: 0 ...
edit retag flag offensive close merge delete


What is the configuration of your obstacle_layer? which sensor is it using? is this sensor able to see the obstacle?

matlabbe gravatar image matlabbe  ( 2022-02-07 21:44:56 -0500 )edit

hi @matlabbe , thanks for replying i am using 3d lidar, imu, wheel odometer. yeah it can see it, i have attached a pic as well. in the pic you can see that it hits the object, but could not identfy that. I have voxel layer, i donot know i need to define obstacle layer or not!? as i read in websites, voxel layer will be defined for global costmap and obstacle layer will be define for local-costamp( as i defined them as plugin in both costmaps). I have added costmap-common-params to my question.

Delbina gravatar image Delbina  ( 2022-02-08 02:37:10 -0500 )edit

Dear @matlabbe, would you please help me to find the solution? are these parameters defined correctly? I have used rolling-window in true mode for global cost-map as well. I have also defined footprint but i cannot see any changes in the output.

Delbina gravatar image Delbina  ( 2022-02-08 14:12:02 -0500 )edit

hi everyone, would you please help me to find a solution?

Delbina gravatar image Delbina  ( 2022-02-09 09:21:40 -0500 )edit

hi @ matlabbe I have attached in the question the requested info. would you please guide me?thanks

Delbina gravatar image Delbina  ( 2022-02-12 09:19:03 -0500 )edit

your local costmap doesn't use the voxel_layer, so change obstacles_layer to voxel_layer like in your global costmap parameters. For the order of the layer, I think you should put the voxel_layer before the inflation_layer.

matlabbe gravatar image matlabbe  ( 2022-02-14 12:42:22 -0500 )edit