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

Navigation stack can't avoid obstacles in Hydro

asked 2014-02-11 16:39:19 -0600

rosuke gravatar image

updated 2014-02-12 19:11:41 -0600

ahendrix gravatar image

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...

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

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...

edit retag flag offensive close merge delete

Comments

2

What do you mean by "can't avoid obstacles"? Are both global and local costmaps ok on rviz?

Tirjen gravatar image Tirjen  ( 2014-02-11 20:44:47 -0600 )edit

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...

rosuke gravatar image rosuke  ( 2014-02-12 13:02:05 -0600 )edit

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?

ahendrix gravatar image ahendrix  ( 2014-02-12 19:13:34 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
2

answered 2014-02-13 10:49:09 -0600

fergs gravatar image

updated 2014-02-13 10:49:29 -0600

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...}
edit flag offensive delete link more

Comments

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.

Charles Yan gravatar image Charles Yan  ( 2014-05-15 07:00:29 -0600 )edit
0

answered 2015-03-24 11:55:28 -0600

sophye_turtlebot gravatar image

I work on the same task (ros hydro Ubunto 12.04) can you give me the steps that you followed? I'm following this tutorial http://wiki.ros.org/navigation/Tutori... But I had a problem with transformations how many transformations did you made ?

thank you in advance

edit flag offensive delete link more

Comments

Please ask this as a new question.

ahendrix gravatar image ahendrix  ( 2015-03-24 22:54:00 -0600 )edit
0

answered 2014-02-12 19:45:28 -0600

Tirjen gravatar image

If you can see only the global costmap, probably is because it is initialized from the map_server and your laser scan doesn't get to the costmaps.

If is this the problem try to modify the laser's parameters in the common parameters. Use this link for the complete list. As a first try I would check if the tf of your laser_base is between min_obstacle_height and max_obstacle_height (default 0 and 2).

edit flag offensive delete link more
0

answered 2014-02-21 02:40:03 -0600

I faced the same problem before. It was because the [sensor_frame:] in the [observation_sources] is not the same as the laser frame name. also check the [topic: scan] in the [observation_sources] is it the same published name! Maybe you have the same problem!

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2014-02-11 16:39:19 -0600

Seen: 2,015 times

Last updated: Mar 24 '15