Ask Your Question
0

Bias costmap values to avoid zones

asked 2018-11-05 09:24:29 -0500

harshal gravatar image

updated 2018-11-05 09:35:57 -0500

Hi, I am using the navigation stack on ros kinetic (Ubuntu 16.04) and wanted to create regions of lower preference for the robot.

Basically what I am looking for, is having a path/zone, that remains accessible to the bot(holonomic), but is only chosen as a last resort for navigation...something like a very high cost path, that would only be better than a 'no path' scenario.

I have tried biasing the costs of the cells in the static costmap of this zone to different values (cost<=251) or (cost = 252).

When cost<=251 is set, the navigation stack returns returns a path around this 'zone' only if the path through is of comparable length. However, if the path around is way longer than the path through this zone, it still picks the through path. I understand that the cost through still turns out lower than along the much longer route.

When I set 252, in no case does it plan through the zone and shows failure if for example the goal lies within this zone.

Hence, neither of these cases meet my requirement of 'last resort path'.

Alternatively, I could mark these zones as 'prohibited zones' (cost > 251) and switch them off in a recovery behaviour (and toggle back on once planned through..). However, I was wondering if anyone could guide me to something less 'hacky' in this regard.

P.S.: Please let me know in case I am missing crucial specifics on the question.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-05 13:44:25 -0500

You could "costmap schedule" your avoiding areas such that after you hit a recovery, you enable more of the costmap that was previously marked as "no go"

edit flag offensive delete link more

Comments

yes, i was thinking along the same lines by 'switching' the zones on and off.

However, is it not feasible to have the planner plan around the zones (yet have the zones navigable) by just rewriting the costmap costs, instead of needing additional recovery/nodes behaviour?

harshal gravatar imageharshal ( 2018-11-06 08:26:50 -0500 )edit

Its up to you and your systems how you would like to implement such a thing.

stevemacenski gravatar imagestevemacenski ( 2018-11-07 13:15:32 -0500 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-11-05 09:24:29 -0500

Seen: 61 times

Last updated: Nov 05 '18