ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Local costmap not centered on robot [closed]

asked 2015-07-16 10:38:25 -0500

updated 2015-07-16 16:11:35 -0500

David Lu gravatar image

Hello,

I'm trying to get move_base to work on my robot. I am using dwa_local_planner and global_planner. When I give the robot nav goals it keeps telling me that none of the points of the global plan were in the local costmap and free. When I added the global and local costmaps to RVIZ, I got the image below. The white square to the upper left is the local costmap. It should be centered around the robot and I don't know why it is not. Any ideas why this is?

image description

costmap_common_params.yaml

    obstacle_range: 2.5
    raytrace_range: 3.0
    footprint: [[0.6096, -0.5969], [-0.6096, -0.5969], [-0.6096, 0.5969], [0.6096, 0.5969]]
    inflation_radius: 0.25
    observation_sources: front_scan kinect #rear_scan 
    front_scan: {topic: scan, sensor_frame: front_laser, observation_persistence: 0.0, expected_update_rate: 0.1, data_type: LaserScan, clearing: true, marking: true, obstacle_range: 2.5, raytrace_range: 3.0, inf_is_valid: false}
    kinect: {topic: scan, sensor_frame: "", observation_persistence: 0.0, expected_update_rate: 0.0, data_type: LaserScan, clearing: true, marking: true, obstacle_range: 2.5, raytrace_range: 3.0, inf_is_valid: false}
    #rear_scan: {topic: scan, sensor_frame: rear_laser, observation_persistence: 0.0, expected_update_rate: 0.1, data_type: LaserScan, clearing: true, marking: true, obstacle_range: 2.5, raytrace_range: 3.0, inf_is_valid: false}

local_costmap_params.yaml

    local_costmap:
    #Coordinate frame and tf parameters
    global_frame: /odom
    robot_base_frame: base_footprint
    transform_tolerance: 0.2

    #Rate parameters
    update_frequency: 10.0
    publish_frequency: 10.0

    #Map management parameters
    static_map: false
    rolling_window: true
      width:4.0
      height:4.0
      resolution:0.05
      origin_x:0.0
      origin_y:0.0

EDIT: I've added the results of rosparam get /move_base/local_costmap/. I have used a variety of origin_x and origin_y values but that does nothing at all. Is it possible that this is a problem arising from ros converting the old format params to the new plugin style?

    footprint: '[[0.6096,-0.5969],[-0.6096,-0.5969],[-0.6096,0.5969],[0.6096,0.5969]]'
    footprint_padding: 0.01
    global_frame: /odom
    height: 10
    inflation_layer: {cost_scaling_factor: 10.0, enabled: true, inflation_radius: 0.25}
    obstacle_layer:
      combination_method: 1
      enabled: true
      front_scan: {clearing: true, data_type: LaserScan, expected_update_rate: 0.1, inf_is_valid: false,
    marking: true, observation_persistence: 0.0, obstacle_range: 2.5, raytrace_range: 3.0,
    sensor_frame: front_laser, topic: scan}
      kinect: {clearing: true, data_type: LaserScan, expected_update_rate: 0.0, inf_is_valid: false,
    marking: true, observation_persistence: 0.0, obstacle_range: 2.5, raytrace_range: 3.0,
    sensor_frame: '', topic: kinect_scan}
      max_obstacle_height: 2.0
      observation_sources: front_scan kinect
      obstacle_range: 2.5
      raytrace_range: 3.0
    obstacle_layer_footprint: {enabled: true}
    origin_x: 0.0
    origin_y: 0.0
    plugins:
    - {name: obstacle_layer, type: 'costmap_2d::ObstacleLayer'}
    - {name: inflation_layer, type: 'costmap_2d::InflationLayer'}
    publish_frequency: 10.0
    resolution: 0.05
    robot_base_frame: base_footprint
    robot_radius: 0.46
    rolling_window: true width:4.0 height:4.0 resolution:0.05 origin_x:-2.0 origin_y:-2.0
    static_map: false
    transform_tolerance: 0.2
    update_frequency: 10.0
    width: 10
edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Icehawk101
close date 2015-07-17 08:38:38.040108

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-07-16 10:59:08 -0500

David Lu gravatar image

updated 2015-07-16 16:12:30 -0500

origin_x and origin_y should be -2

Edit: Can you make sure the tabbing is correct in your parameter file. What you've copied and pasted has extra spaces before where you specify the width/origin parameters.

edit flag offensive delete link more

Comments

I've used a variety of origin x and y values and the square never moves. I've edited the question to show the results of rosparam get /move_base/local_costmap/

Icehawk101 gravatar image Icehawk101  ( 2015-07-16 14:37:03 -0500 )edit

Changing the spacing fixed it. Thanks for the help!

Icehawk101 gravatar image Icehawk101  ( 2015-07-17 08:39:34 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-16 10:38:25 -0500

Seen: 2,411 times

Last updated: Jul 16 '15