Path planned through unmapped region for goal present inside map.
could someone explain why sometines the global path planned by the robot for navigation ventures into the unmapped region?
Images of the path planned to the goal are attached below.
The planned path is in green.
Through normal understanding, the global planner plans the shortest path in the mapped region and wouldn't traverse the unmapped region even if the goal point appears much closer through this.
Is there a way to correct this apart from editing the map?
Global planner : NavfnROS
Local planner : TrajectoryPlannerROS
OS: Ubuntu 14.04. ROS: Indigo.
Thank you.
Edit:
Asked by spiritninja on 2019-11-26 07:20:23 UTC
Answers
Make sure you have set in navfn_global_planner_params.yaml
:
allow_unknown: false #Specifies whether or not to allow navfn to create plans that traverse unknown space, default true
I have observed that sometimes the first plan (after setting a goal) can still be wrong, but then it gets updated by the next plan (which is correct). If the planner frequency is high enough, then the robot does not have a chance to do anything undesirable.
Also, from:
https://answers.ros.org/question/215538/allow_unknown-parameter-ignored/
Are you using a layered costmap from costmap_2d with an obstacle or voxel layer? If so you have to set the param track_unknown_space
for that layer to true, otherwise it's converting your map's unknown space into free space (which navfn then correctly goes quite happily through).
So, make sure you have also set in costmap_common_params.yaml
:
track_unknown_space: true #true needed for disabling global path planning through unknown space
Asked by jordan on 2019-11-26 09:03:16 UTC
Comments
@Jordan Yeah you're right about the parameter. In-fact i had taken care of that earlier by changing the default value that's True
to False
. But the problem still persists and that is waht intrigued me. The presence of allow_unknown: false
is to prevent the planner in planning into unknown regions.
So, if planing into unknown regions still persists, what else could influsence it?
Also waht value of planner frequency do you think is generally good? I've tried with 0.0
and few values moderately greater than that.
Edited the question with another image of the wrong planning happening.
Asked by spiritninja on 2019-12-05 06:20:27 UTC
Check this...
https://answers.ros.org/question/215538/allow_unknown-parameter-ignored/
The above may solve your issue.
Robots around here use: planner_frequency: 1.0
(in move_base_params.yaml), which seems to be a reasonable balance between keeping the plan updated with respect to incoming data vs. CPU loading.
Asked by jordan on 2019-12-05 10:19:55 UTC
Exactly. This is what I was trying out the other day after checking about the global planner Here on the Wiki page.
https://answers.ros.org/question/198255/set-unknown_cost_value-in-costmap/
The above discussion is the one I was referring.
The robot costmap_common_params.yaml
is as follows
obstacle range: 2.5
raytrace_range: 3.0
footprint: [[0.35, -0.3], [0.35, 0.3], [-0.35, 0.3], [-0.35, 0.3]]
inflation_raduis: 0.05
obstacle_layer:
observation_sources: hokuyo_laser
hokuyo_laser: {sensor_frame: hokuyo_laser_link, data_type: LaserScan, topic: /hokuyo_base/scan, marking: true, clearing: true}
So, as the track_unknown_space
parameter wasn't present earlier, i thought adding it under the obstacle layer
would suffice. But it didn't change anything.
@jordan any suggestion on this? I appreciate the help provided.
Asked by spiritninja on 2019-12-06 01:16:57 UTC
Please attach the entire modified 'costmap_common_params.yaml'.
Asked by jordan on 2019-12-09 10:37:56 UTC
@spiritninja did you find the solution, I faced the same problem, even change allow_unknown or tracking_unknown_space
Asked by drtritm on 2021-02-17 21:35:19 UTC
I was also frustrated with this issue. For future reference see https://github.com/ros-planning/navigation/issues/261#issuecomment-885545451
Asked by li9i on 2021-07-23 05:26:54 UTC
Comments