Made the populate_grid.m function check to make sure that obstacle padding doens't exceed indexing.