Robotics StackExchange | Archived questions

Bias costmap values to avoid zones

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.

Asked by harshal on 2018-11-05 10:24:29 UTC

Comments

Answers

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"

Asked by stevemacenski on 2018-11-05 14:44:25 UTC

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?

Asked by harshal on 2018-11-06 09:26:50 UTC

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

Asked by stevemacenski on 2018-11-07 14:15:32 UTC