robot starts moving toward the goal,but it cannot identify the objects Infront of it!!
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
##costmap-common-params:
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
voxel_layer:
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
point_cloud_sensor:
data_type: PointCloud2
topic: /velodyne_points
marking: true
clearing: true
min_obstacle_height: 0.0
max_obstacle_height: 2.0
inflation_layer:
enabled: true
cost_scaling_factor: 1.58
inflation_radius: 0.9
...............................................................
...............................
#Move_base
<launch>
<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)" />
</node>
</launch>
#move-base_params:
#
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
recovery_behaviors:
- name:'super_conservative_reset1'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'conservative_reset1'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'aggressive_reset1'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'clearing_rotation1'
type:'rotate_recovery/RotateRecovery'
- name:'super_conservative_reset2'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'conservative_reset2'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'aggressive_reset2'
type:'clear_costmap_recovery/ClearCostmapRecovery'
- name:'clearing_rotation2'
type:'rotate_recovery/RotateRecovery'
super_conservative_reset1:
reset_distance:3.0
conservative_reset1:
reset_distance:1.5
aggressive_reset1:
reset_distance:0.0
super_conservative_reset2:
reset_distance:3.0
conservative_reset2:
reset_distance:1.5
aggressive_reset2:
reset_distance:0.0
#local-costmap
local_costmap:
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 ...
What is the configuration of your obstacle_layer? which sensor is it using? is this sensor able to see the obstacle?
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.
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.
hi everyone, would you please help me to find a solution?
hi @ matlabbe I have attached in the question the requested info. would you please guide me?thanks
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.