0
$\begingroup$

Rosanswers logo

Hi. I was using Groovy, now using Hydro on Ubuntu 12.04LTS.

Navigation stack worked fine in Groovy, but in Hydro, robot can't avoid obstacles...(Laser is working fine!) I try the following refference. However, the problem isn't solved yet.

http://answers.ros.org/question/83031/move_base-and-costmap_layers/

http://answers.ros.org/question/90501/no-local-costmap-published-after-hydro-migration/

Here is my yaml files.

---------common_params-------------
    obstacle_range: 2.5
    raytrace_range: 3.0
    robot_radius: 0.20
    inflation_radius: 0.35
    obstacles:
       observation_sources: laser_scan_sensor
    
laser_scan_sensor: {sensor_frame: laser, data_type: LaserScan, topic: scan, marking: true, clearing: true}
plugins:
  - {name: static_map, type: "costmap_2d::StaticLayer"}
#  - {name: footprint, type: "costmap_2d::FootprintLayer"}
  - {name: obstacles, type: "costmap_2d::ObstacleLayer"}
  - {name: inflater, type: "costmap_2d::InflationLayer"}

--------------------------------base_local_planner---------------------------------------
    TrajectoryPlannerROS:
      max_vel_x: 0.3
      min_vel_x: 0.1
      max_rotational_vel: 1.0
      min_in_place_rotational_vel: 0.4
    
      acc_lim_th: 3.2
      acc_lim_x: 2.5
      acc_lim_y: 2.5
    
      holonomic_robot: false

---------------------------global_costmap------------------------------------
    global_costmap:
      global_frame: /map
      robot_base_frame: /base_link
      update_frequency: 10.0
      static_map: true
    plugins:
      - {name: static_map, type: "costmap_2d::StaticLayer"}

---------------------------local_costmap-----------------------------------
    local_costmap:
      global_frame: /map
      robot_base_frame: /base_link
      update_frequency: 10.0
      publish_frequency: 2.0
      static_map: false
      rolling_window: true
      width: 6.0
      height: 6.0
      resolution: 0.05
    plugins:
      - {name: obstacles, type: "costmap_2d::ObstacleLayer"}
    #  - {name: footprint, type: "costmap_2d::FootprintLayer"}
      - {name: inflater, type: "costmap_2d::InflationLayer"}

Please advise me.

update:1 "can't avoid obstacles" is that my robot can move from "initial_pose" to "goal", but can't avoid obstacles. Global costmap works.(Map is covered in Rviz). Local costmap probably doesn't work.(Map doesn't change.) I don't know why local costmap doesn't work...


Originally posted by rosuke on ROS Answers with karma: 11 on 2014-02-11

Post score: 1


Original comments

Comment by Tirjen on 2014-02-11:
What do you mean by "can't avoid obstacles"? Are both global and local costmaps ok on rviz?

Comment by rosuke on 2014-02-12:
Dear Tirjin Thank you for your reply. "can't avoid obstacles" is that my robot can move from "initial_pose" to "goal", but can't avoid obstacles. Global costmap works.(Map is covered in Rviz). Local costmap probably doesn't work.(Map doesn't change.) I don't know why local costmap doesn't work...

Comment by ahendrix on 2014-02-12:
You should be able to use rviz to visualize the local costmap. When you do, do obstacles from your laser scanner show up on the local costmap? Do they agree with your laser scans?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think the issue here is that you need to define "laser_scan_sensor" under obstacles, not at the top-level, so your costmap_common.yaml would become:

obstacles:
   observation_sources: laser_scan_sensor
   laser_scan_sensor: {sensor_frame: laser, data_type: LaserSc...}

Originally posted by fergs with karma: 13902 on 2014-02-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by Charles Yan on 2014-05-15:
I was puzzled by a similar problem for days. I have tried many methods, and your answer is the last change before the local costmap works fine. Thanks very much.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.