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

Why does NavFn return a path that doesn't start from the robot location?

asked 2019-09-24 22:06:33 -0500

nightingale0131 gravatar image

updated 2019-09-26 10:57:44 -0500

The path is the cyan line, and the robot is in the lower right corner. As you can see, the path doesn't start from where the robot is, resulting in move_base aborting the goal. The map isn't that big (1000x1000 px at 0.02 m/px) or complicated. Is there a limit to the path length that navfn returns?

image description

The move_base package version is 1.14.4, on kinetic. I'm using the navigation stack configuration that comes with the jackal_navigation package (0.6.3):

Platform: Ubuntu 16.0 (64-bit)

I modified a few parameters in the AMCL launch file for localization, but I don't think that is relevant here. Here are my common (both global and local) costmap parameters:

map_type: costmap
origin_z: 0.0
z_resolution: 1
z_voxels: 2

obstacle_range: 6.0 
raytrace_range: 8.5 
always_send_full_costmap: True 

publish_voxel_map: false
transform_tolerance: 0.5
meter_scoring: true

footprint: [[-0.21, -0.165], [-0.21, 0.165], [0.21, 0.165], [0.21, -0.165]]
footprint_padding: 0.1

- {name: obstacles_layer, type: "costmap_2d::ObstacleLayer"}
- {name: inflater_layer, type: "costmap_2d::InflationLayer"}

  observation_sources: scan
  scan: {sensor_frame: front_laser, data_type: LaserScan, topic: front/scan, marking: true, clearing: true, min_obstacle_height: -2.0, max_obstacle_height: 2.0, obstacle_range: 6.0, raytrace_range: 8.5}

 inflation_radius: 1.75 
 cost_scaling_factor: 2.58
edit retag flag offensive close merge delete


Does this happen every path you attempt? Or just once?

David Lu gravatar image David Lu  ( 2019-09-25 15:07:38 -0500 )edit

It seems to always happen whenever the path gets too long. If I set a goal close to the robot, there's no problem, but as soon as the shortest path exceeds some threshold it returns the non-valid path. I tested this using the move_base client and setting the goal point via rviz, and the same happens in either case.

nightingale0131 gravatar image nightingale0131  ( 2019-09-25 16:14:35 -0500 )edit

1 Answer

Sort by ┬╗ oldest newest most voted

answered 2019-09-26 11:28:07 -0500

David Lu gravatar image

There is a semi-arbitrary limit of nx*ny/2 poses. I'm guessing you are seeing this problem whenever the path length is over 500,000 poses.

Solutions include

  • Changing the number on the linked line
  • Switch to another planner (global planner has a limit of nx * ny * 2
edit flag offensive delete link more


Oh, I see. I ended up switching to global planner and that solved the problem. Thank you for your help!

nightingale0131 gravatar image nightingale0131  ( 2019-09-26 14:29:35 -0500 )edit

Question Tools

1 follower


Asked: 2019-09-24 22:06:33 -0500

Seen: 429 times

Last updated: Sep 26 '19