How to change the origin of local costmap?

asked 2017-11-15 00:04:07 -0500

vishnu gravatar image

updated 2017-11-15 05:40:53 -0500

Hello,

I am working on a project where I need an instantaneous occupancy grid. I managed to get the occupancy grid using costmap_2d package. Now the problem is that the occupancy grid generated has the robot exactly in the middle. But, I want the occupancy grid only in front of the robot. I tried changing origin_x and origin_y, but it doesn't have any effect.

max_obstacle_height: 0.60   
obstacle_range: 30 
raytrace_range: 30

footprint: [[0,-0.8], [0,0.8],[2.6,0.8],[2.6,-0.8],[0,-0.8]]  # if the robot is not circular 
inflation_radius: 0.50   
cost_scaling_factor: 5  

map_type: costmap transform_tolerance: 5 # seconds

# origin_x: -15.0
# origin_y: -30.0 
origin_z: 0.0 
z_resolution: 0.2 
z_voxels: 2
publish_voxel_map: false

global_frame: odom 
robot_base_frame: /base_footprint
# global_frame: azcar_sim/odom
# robot_base_frame: azcar_sim/base_link 
update_frequency: 5.0 
publish_frequency: 2.0 
static_map: false 
rolling_window: true 
width: 60 
height: 30 
resolution: 0.3 
transform_tolerance: 0.5 
plugins:
  - {name: obstacles, type: "costmap_2d::ObstacleLayer"} 
obstacles:   
   observation_sources: scan
# scan: {data_type: LaserScan, sensor_frame: azcar_sim/front_laser_link, topic: /azcar_sim/front_laser_points, marking:true, clearing: true, min_obstacle_height: 0.0, max_obstacle_height: 3}   scan: {data_type: LaserScan, sensor_frame: /base_laser_link, topic: /base_scan, marking: true, clearing: true, min_obstacle_height: 0.0, max_obstacle_height: 3}

Please refer to the images below.

The occupancy grid, I am getting using the above parameters. image description

The occupancy grid needed.

image description

edit retag flag offensive close merge delete

Comments

Please refer to the images below.

Your images are not visible.

Please attach them directly to your post. I've given you enough karma to be able to do that.

gvdhoorn gravatar image gvdhoorn  ( 2017-11-15 03:43:08 -0500 )edit

@gvdhoorn Thanks. I have added the images.

vishnu gravatar image vishnu  ( 2017-11-15 05:42:35 -0500 )edit