Hi everybody,
As nobody answered to my last question, I re-ask this question cause I am completely blocked!
currently, I'm working on 2D navigation with ROS nav_stack
and for this reason I'm using DWAL_local_planner
. The DWA_local_planner
works well but I'm facing an issue when I put an obstacle in its way (the obstacle is put in its global path before it starts to move). As you see in the following picture,
When the robot recognizes the obstacle, the DWA_local_planner
is not able to produce a path as the following error and it stuck.
[ WARN] [1510564078.318379963, 78.707000000]: DWA planner failed to produce path.
[ INFO] [1510564078.615916578,78.890000000]: Got new plan
[ WARN] [1510564078.683191056, 78.923000000]: DWA planner failed to produce path.
[ INFO] [1510564079.038445171, 79.090000000]: Got new plan
[ WARN] [1510564079.051915033, 79.128000000]: DWA planner failed to produce path.
I have already tried to solve this issue by changing the DWA_local_planner
parameters like path_distance_bias, goal_distance_bias, forward_point_distance, sim_time etc. but still I the local planner does not avoid the obstacle.
Do you have any idea why it behaves like this? I would appreciate if you look at this @David Lu. Thanks in advance,
You can find below the navigation parameters
Launch file:
<node pkg="topic_tools" type="relay" name="cmd_vel_to_nav_vel_relay" args="/cmd_vel /navigation/velocity" />
<!--- Run move_base -->
<node respawn="false" pkg="move_base" type="move_base" name="move_base" output="screen">
<rosparam file="$(find mule)/conf/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find mule)/conf/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find mule)/conf/local_costmap_params.yaml" command="load" />
<rosparam file="$(find mule)/conf/global_costmap_params.yaml" command="load" />
<rosparam file="$(find mule)/conf/base_local_planner_params_simulation.yaml" command="load" />
<!--Default local planner -->
<!--<param name="base_local_planner" value="base_local_planner/TrajectoryPlannerROS" /> -->
<!--<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" /> -->
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
<!--<param name="base_local_planner" value="eband_local_planner/EBandPlannerROS" /> -->
<param name="controller_frequency" value="5.0" />
<!--<param name="base_global_planner" value="karto_global_planner/KartoGlobalPathPlanner"/>-->
<param name="base_global_planner" value="global_planner/GlobalPlanner"/>
<!--<param name="base_global_planner" value="sbpl_lattice_planner/SBPLLatticePlanner"/> -->
<param name="SBPLLatticePlanner/primitive_filename" value="$(find mule)/conf/4mob_16.mprim" />
<param name="recovery_behavior_enabled" value="false"/>
<!--<rosparam param="recovery_behaviors"> [ { name: "backup_recovery", type: "backup_recovery_dwa/BackupRecovery" } ] </rosparam> -->
<!--<param name="recovery_behaviors" value="[]"/>-->
<param name="planner_patience" value="5.0"/>
<param name="controller_patience" value="15.0"/>
<param name="shutdown_costmaps" value="true"/>
<param name="oscillation_timeout" value="30.0"/>
<param name="oscillation_distance" value="0.4"/>
<param name="planner_frequency" value="0.0"/>
<param name="max_planning_retries" value="-1"/>
</node>
global_costmap:
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 1.0
track_unknown_space: true
static_map: true
transform_tolerance: 0.5
static_layer:
track_unknown_space: true
enabled: true
map_topic: "/map"
inflation_layer:
enabled: true
cost_scaling_factor: 10
inflation_radius: 2.0
track_unknown_space: true
plugins:
- {name: static_layer, type: "costmap_2d::StaticLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
Local_cost_map:
local_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 5.0
publish_frequency: 1.0
static_map: false
rolling_window: true
width: 4.0
height: 4.0
resolution: 0.02
transform_tolerance: 0.5 #0.5
obstacle_layer:
enabled: true
obstacle_range: 5.0
raytrace_range: 4.5
inflation_radius: 0.5
track_unknown_space: true
combination_method: 1
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true,
expected_update_rate: 0.25, obstacle_range: 19.0, raytrace_range: 19.0}
inflation_layer:
enabled: true
cost_scaling_factor: 10 # exponential rate at which the obstacle cost drops off (default: 10)
inflation_radius: 0.5 # max. distance from an obstacle at which costs are incurred for planning paths.
track_unknown_space: true
plugins:
- {name: obstacle_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflation_layer, type: "costmap_2d::InflationLayer"}
Common_costçmap:
footprint: [[0.725, -0.4], [0.725, 0.4], [-0.725, 0.4], [-0.725,-0.4]]
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: /scan, marking: true, clearing: true}
transform_tolerance: 0.2
map_type: costmap
DWA_local_planner:
DWAPlannerROS:
# Robot Configuration Parameters
max_vel_x: 1
max_vel_x_backwards: 0.2
min_vel_x: 0.1
max_trans_vel: 1
min_trans_vel: 0.1
max_vel_y: 0.0
min_vel_y: 0.0
max_trans_vel: 1.0
min_trans_vel: 0.0
max_rot_vel: 0.4 # 1.0
min_rot_vel: 0.2 # could set this lower
acc_lim_x: 0.2
acc_lim_th: 0.05 # 1.0
acc_lim_y: 0.0 # diff drive robot
# Goal Tolerance Parameters
yaw_goal_tolerance: 0.15
xy_goal_tolerance: 0.5
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 3
sim_granularity: 0.025
vx_samples: 20
vy_samples: 0
vtheta_samples: 30
controller_frequency: 5
#meter_scoring: true
#penalize_negative_x: false
# Trajectory Scoring Parameters
path_distance_bias: 32.0
goal_distance_bias: 20.0
occdist_scale: 0.01
forward_point_distance: 0 # Default 0.325
stop_time_buffer: 0.5
scaling_speed: 0.25
max_scaling_factor: 0.2
#cheat_factor: 2
#scaled_path_factor: 0.75
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
# Global Plan Parameters
prune_plan: true
Originally posted by Mobile_robot on ROS Answers with karma: 264 on 2017-11-22
Post score: 1
Original comments
Comment by Humpelstilzchen on 2017-11-23:
Did you tried that with a smaller obstacle? Or by moving the obstacle more to the site?
Comment by Mobile_robot on 2017-11-23:
Thank you for your comment. Yes, I have tried different obstacle size with different position but nothing has been changed.
Comment by Humpelstilzchen on 2017-11-23:
Can you include a picture with both costmaps? (local & global)
Comment by Mobile_robot on 2017-11-23:
I have changed the figure by the one including the global_costmap
.
Comment by Humpelstilzchen on 2017-11-24:
Do you see anything on the cmd_vel topic?