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

[costmap] costmap doesnt rotate to align the static map

asked 2016-09-08 21:56:37 -0500

Jam gravatar image

Dear all,
I am using frontier_exploration+rtabmap slam+move_base for my robot autonomous exploration.

I have question about how costmap work?
Because when the slam algorithm do some mapping job.
(means map-> odom tf will be changed, and static map will rotate / shift I guess...)

( https://drive.google.com/file/d/0Bw2w... )
The static will rotate in the above picture.
But the costmap doesn't rotate to match the static.
It just add new inflation to costmap.
Does anyone how to make the costmap rotate with static map , or make the "old" costmap disappear?

common_costmap_params.yaml

# robot shape
robot_radius: 0.17

static_layer:
    map_topic: /map
    # first_map_only: false
    # subscribe_to_updates: false
    # track_unknown_space: true
    # use_maximum: false
    # lethal_cost_threshold: 100
    # unknown_cost_value: -1
    # trinary_costmap: true

obstacle_layer:
    track_unknown_space: true
    # transform_tolerance: 0.2
    observation_sources: laser_scan_sensor
    laser_scan_sensor: 
        topic:                      /center/laser_scan
        # sensor_frame:               "" # leave empty to read from sensor data
        # observation_persistence:    0.0
        # expected_update_rate:       0.0
        data_type:                  LaserScan
        # min_obstacle_height:        0.0
        # max_obstacle_height:        2.0
        inf_is_valid:               true
        clearing:                   true
        marking:                    true
        obstacle_range:             3.0 # laser_max_range
        raytrace_range:             3.0 # laser_max_range

inflation_layer:
    inflation_radius: 0.25
    cost_scaling_factor: 0.0

global_costmap_params.yaml

global_costmap:
    # global_frame: map
    # robot_base_frame: base_link

    # rolling_window: false
    # track_unknown_space: false
    # always_send_full_costmap: false

    # pose_update_frequency: 10.0

    update_frequency: 1.0 # 5
    publish_frequency: 0.5 # 0
    transform_tolerance: 0.5 # 0.3

    # width: 10.0
    # height: 10.0
    # resolution: 0.05
    # origin_x: 0
    # origin_y: 0

    plugins: 
        # WARNING!! This order of layers (s->o->i) cant not be change
        - {name: static_layer,     type: "costmap_2d::StaticLayer"}
        - {name: obstacle_layer,   type: "costmap_2d::ObstacleLayer"}
        - {name: inflation_layer,  type: "costmap_2d::InflationLayer"}

local_costmap_params.yaml

local_costmap:
    global_frame: odom
    # robot_base_frame: base_link

    rolling_window: true
    # track_unknown_space: false
    # always_send_full_costmap: false

    # pose_update_frequency: 10.0

    update_frequency: 5.0 # 5
    publish_frequency: 2.0 # 0
    transform_tolerance: 0.5 # 0.3

    width: 3.0 
    height: 3.0 
    resolution: 0.05
    # origin_x: 0
    # origin_y: 0

    plugins: 
        - {name: obstacle_layer,   type: "costmap_2d::ObstacleLayer"}
        - {name: inflation_layer,  type: "costmap_2d::InflationLayer"}

    inscribed_radius: 0.17
    circumscribed_radius: 0.17
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-09-19 01:49:17 -0500

Jam gravatar image

http://answers.ros.org/question/22452...

using the move_base/clear_costmaps service of move_base solve my problem!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-09-08 21:56:37 -0500

Seen: 1,277 times

Last updated: Sep 19 '16