Problem with load and tune navigation stack params
Hi, I'm using the navigation stack of ROS with Rviz to autonomous navigation of my dual drive robot.
I'm tring to tune costmap and planner's params but I the robot is not able to avoid obstacles and walls.
For example, the global planner create a good path to follow but the local plane doesn't follow it, also tuning path_distance_bias
.
And I don't know why sometimes it reach the goal but other times it doesn't start to "walk" and after that the SW starts with in place rotation or recovery action.
Sometimes I find Trajectory Planner more reliable than DWAPlanner but It doesn't avoid obstacles.
This is my move_base launcher:
<launch>
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
<rosparam file="$(find robot)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find robot)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find robot)/param/global_costmap_params.yaml" command="load" />
<rosparam file="$(find robot)/param/local_costmap_params.yaml" command="load" />
<!--I tried to comment and uncomment this for selecting Planner-->
<param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />
<param name="base_global_planner" value="navfn/NavfnROS"/>
<rosparam file="$(find robot)/param/trajectory_planner_params.yaml" command="load" />
<rosparam file="$(find robot)/param/dwa_local_planner_params.yaml" command="load" />
<remap from="cmd_vel" to="/cmd_vel"/>
<remap from="odom" to="odom"/>
</node>
</launch>
This is my cost_map_common_params:
obstacle_range: 2.5 #aggiornamento della mappa solo all'interno di 2.5 metri, quindi gli ostacoli vengono considerati solo entro 2.5 metri
raytrace_range: 3.5 #spazio libero davanti al robot
# Obstacle Cost Shaping (http://wiki.ros.org/costmap_2d/hydro/inflation)
robot_radius: 0.25 # forma che visualizzo in rviz - distance a circular robot should be clear of the obstacle (kobuki: 0.18)
inflation_radius: 1.0 #distanza massima da un ostacolo che mi minimizza un certo costo: ovvero tutti i percorsi che si trovoano a distanza di un metro da un ostacolo hanno costi uguali tra loro
cost_scaling_factor: 3.0 # maggiore è il valore, minore sara' il costo della mappa (default: 10)
subscribe_to_update: true #aggiorna la mappa
map_type: costmap #mappa dei costi
observation_source: scan #tipo di sensore che passa i dati alla mappa nel nostro caso il LaserScan
scan: {sensor_frame: camera_link, data_type: LaserScan, topic: scan, marking: true, clearing: true}
This is my global costmap param:
global_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 1.0
publish_frequency: 0.5
static_map: true
transform_tolerance: 0.5
This is my local costmap param:
local_costmap:
global_frame: map
robot_base_frame: base_footprint
update_frequency: 5.0
publish_frequency: 2.0
static_map: false
rolling_window: true
width: 4.0
height: 4.0
resolution: 0.05
transform_tolerance: 0.5
This is my dwa planner params:
DWAPlannerROS:
# Robot Configuration Parameters - Kobuki
max_vel_x: 0.45 # 0.55
min_vel_x: 0.0
max_vel_y: 0.0 # diff drive robot
min_vel_y: 0.0 # diff drive robot
max_vel_trans: 0.45 # choose slightly less than the base's capability
min_vel_trans: 0.1 # this is the min trans velocity when there is negligible rotational velocity
trans_stopped_vel: 0 ...