move_base not avoiding obstacles
I have implemented the move_base
correctly i guess, in a predefined map move_base is working fine it's creating path correctly but when i drag and drop a obstacles from gazebo it's not avoiding that though the laser is scanning the object but its not avoiding
And i also implemented the move_base
with robot_localization
for outdoor using GPS. I'm spawning the model with an empty map everything is working fine but the same problem, move_base
is not avoiding obstacles
base_local planar:
TrajectoryPlannerROS:
max_vel_x: 0.18
min_vel_x: 0.08
max_vel_theta: 1.0
min_in_place_vel_theta: -1.0
acc_lim_theta: 0.6
acc_lim_x: 1.0
acc_lim_y: 0.5
xy_goal_tolerance: 0.10
yaw_goal_tolerance: 0.05
holonomic_robot: false
sim_time: 0.8
vx_samples: 18
vtheta_samples: 20
sim_granularity: 0.05
costmap:
obstacle_range: 2.0
raytrace_range: 3.0
robot_radius: 0.34
inflation_radius: 5.0
map_type: costmap
observation_sources: laser_scan_sensor
laser_scan_sensor: {sensor_frame: hokuyo, data_type: LaserScan, topic: /sk/laser/scan, marking: true, clearing: true}
dwa_local_planner:
DWAPlannerROS:
# Robot Configuration Parameters
max_vel_x: 0.22
min_vel_x: -0.22
max_vel_y: 0.0
min_vel_y: 0.0
# The velocity when robot is moving in a straight line
max_trans_vel: 0.2
min_trans_vel: 0.11
max_rot_vel: 2.75
min_rot_vel: 1.37
acc_lim_x: 2.5
acc_lim_y: 0.0
acc_lim_theta: 3.2
# Goal Tolerance Parametes
xy_goal_tolerance: 0.05
yaw_goal_tolerance: 0.17
latch_xy_goal_tolerance: false
# Forward Simulation Parameters
sim_time: 1.5
vx_samples: 20
vy_samples: 0
vth_samples: 40
controller_frequency: 2.0
# Trajectory Scoring Parameters
path_distance_bias: 32.0
goal_distance_bias: 20.0
occdist_scale: 0.02
forward_point_distance: 0.325
stop_time_buffer: 0.2
scaling_speed: 0.25
max_scaling_factor: 0.2
# Oscillation Prevention Parameters
oscillation_reset_dist: 0.05
# Debugging
publish_traj_pc : true
publish_cost_grid_pc: true
global_planar:
global_costmap:
global_frame: map
robot_base_frame: base_link
update_frequency: 2.0
publish_frequency: 2.0
transform_tolerance: 0.5
static_map: true
local_costmap:
local_costmap:
global_frame: odom
robot_base_frame: base_link
update_frequency: 2.0
publish_frequency: 2.0
transform_tolerance: 0.3
static_map: false
rolling_window: true
width: 3.0
height: 3.0
resolution: 0.05
Could you share your move base configs (local, global costmap and local planner configs) and maybe a screenshot of why you think its not avoiding obstacles?
@hashirzahir i've edited the question and added the cofigs and screenshot
What you have provided so far is great. Could you also provide the local and global costmap layers as well as the paths generated by TrajectoryPlanner as a screenshot from RVIZ?
@hashirzahir i've added the RVIZ screenshot but i didn't bring the obstacle in this
It would be helpful if you added the screenshot with the obstacle in play. Otherwise it is difficult to debug as I am unaware of the path produced by DWAPlannerROS while you added this new obstacle. The gazebo screenshot does not tell me much since gazebo is just the physics simulator and all the path planning and obstacle avoidance components are done on the ROS end, which is nicely visualized in RVIZ.
Also, I note that the local costmap inflation cannot be seen in the RVIZ screenshot. It would be helpful if you could format your RVIZ local and global costmap to look like this: https://www.theconstructsim.com/wp-co...
@hashirzahir I've updated it
I still dont see your local costmap though. There should be 2 separate costmaps, a large global costmap (black and white) and a small local costmap (blue and pink). Configure the colour on RVIZ. If I had to guess, only the static_map is being loaded and your laser source is being ignored (or your laser source is not publishing to the right topic) and hence does not contribute to the costmap, resulting in DWA planner just plotting a path as if nothing were there.
@hashirzahir
/sk/laser/scan
this is my laser topic and I;m getting values in thiscan you please cross check it once in costmap is correct