Ask Your Question
0

Local costmap not visible

asked 2019-03-27 03:07:55 -0500

IvyKK gravatar image

Hi there, I used navigation stack wit move base on my lidar. It could generate path to the goal, and display global costmap, However, the local costmap is empty with zeros, while the lidar has data generated (non-zeros). I searched around and people suggesting that the min. obstacle height and max. obstacle height of the laser scan is the problem, I tried it out, but it still doesn't work, could anyone kindly advise what I could change?

base_local_planner_params.yaml:

TrajectoryPlannerROS:
  max_vel_x: 0.45
  min_vel_x: 0.1
  max_vel_theta: 1.0
  min_in_place_vel_theta: 0.4

  acc_lim_theta: 3.2
  acc_lim_x: 2.5
  acc_lim_y: 2.5

  holonomic_robot: false

costmap_common_params.yaml:

obstacle_range: 2.5
raytrace_range: 3.0
footprint: [[-0.305, -0.18], [-0.305, 0.18], [0.305, 0.18], [0.305, -0.18]]
#robot_radius: ir_of_robot
inflation_radius: 0.55

observation_sources: laser_scan_sensor #point_cloud_sensor

laser_scan_sensor: {sensor_frame: frame_name, data_type: LaserScan, topic: topic_name, marking: true, clearing: true}

#point_cloud_sensor: {sensor_frame: frame_name, data_type: PointCloud, topic: topic_name, marking: true, clearing: true}

global_costmap_params.yaml:

global_costmap:
    footprint: [[-0.305, -0.18], [-0.305, 0.18], [0.305, 0.18], [0.305, -0.18]]
    footprint_padding: 0.01
    transform_tolerance: 1.0
    update_frequency: 5.0
    publish_frequency: 5.0

    global_frame: map
    robot_base_frame: base_footprint
    resolution: 0.05

    rolling_window: false
    track_unknown_space: true

    plugins: 
        - {name: static,    type: "costmap_2d::StaticLayer"}            
        - {name: sensor,    type: "costmap_2d::ObstacleLayer"}
        - {name: inflation, type: "costmap_2d::InflationLayer"}

    static:        
        map_topic: /map 
        subscribe_to_updates: true

    sensor:
        observation_sources: laser_scan_sensor
        laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}

    inflation:
        inflation_radius: 2.5
        cost_scaling_factor: 6.0

local_costmap_params.yaml:

local_costmap:
    footprint: [[-0.305, -0.18], [-0.305, 0.18], [0.305, 0.18], [0.305, -0.18]]
    footprint_padding: 0.01
    transform_tolerance: 1.0
    update_frequency: 10.0
    publish_frequency: 10.0

    global_frame: /odom
    robot_base_frame: /base_footprint
    resolution: 0.05
    static_map: false
    rolling_window: true
    width: 2.0
    height: 2.0
    resolution: 0.1

    plugins:            
        - {name: sensor,    type: "costmap_2d::ObstacleLayer"}
        - {name: inflation, type: "costmap_2d::InflationLayer"}

    sensor:
        observation_sources: laser_scan_sensor
        laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true, max_obstacle_height: 2.0, min_obstacle_height: 0.0, inf_is_valid: true}

    inflation:
        inflation_radius: 2.5
        cost_scaling_factor: 8.0
edit retag flag offensive close merge delete

Comments

An inflation_radius of 2.5 is very high, the unit is meter you should have something equivalent to the size of your robot

Or the robot is just really big and clunky, and 2.5m is really needed to avoid it running into things .. ;)

gvdhoorn gravatar imagegvdhoorn ( 2019-03-27 04:33:01 -0500 )edit

That would be a really clunky robot indeed, and I wouldn't get one :)

Delb gravatar imageDelb ( 2019-03-27 04:55:04 -0500 )edit

Yes. Thanks!! that's the problem.. I reorganized the code and it works okay now!

IvyKK gravatar imageIvyKK ( 2019-03-28 04:26:38 -0500 )edit

Can you answer your own question specifying what exactly solved the issue ? Was it the code organization or just the inflation radius (or both) ?

Delb gravatar imageDelb ( 2019-03-28 08:12:23 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-03-27 04:15:38 -0500

Delb gravatar image

updated 2019-03-27 04:17:01 -0500

There are few things to say (not sure if they are causing the issue though but that would improve your code):

  • You should reorganize your files to actually have the common params only in the costmap_commons_param.yaml. For example the footprint doesn't have to be in your 3 files.
  • An inflation_radius of 2.5 is very high, the unit is meter you should have something equivalent to the size of your robot (in your case it should be around 0,35 if you allow the robot to be close to the obstacles).
  • You have defined the resolution twice with different values in the local_costmap file.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-03-27 03:07:55 -0500

Seen: 179 times

Last updated: Mar 27