tehp / OpenPoGoBot

A PokemonGo Python bot - NO LONGER MAINTAINED
MIT License
123 stars 53 forks source link

Implement geofencing restriction #178

Open Saturate opened 7 years ago

Saturate commented 7 years ago

Would be nice you could restrict the bots movement, other than max_steps, as it's a little bit hard to know, what it does, and how much it restricts.

The restriction could even be printed to the interactive google maps, for a more visual confirmation.

Granted it's not a urgent matter and should have low priority, but maybe someone (or even me) want's to try this out, and implement it.

I'm thinking the config.json could be changed to:

Current max_steps configuration:

restriction: {
  'max_steps': 5
}

Radius configuration

restriction: {
  'geofence': {
      'type': 'radius',
      'center': 'start', // 'start' (same as location) or 'lot,long' or 'city'
      'size': '500m' // 500m or 0.5km, would be nice to parse units here otherwise just default to something like meters.
   }
}

Polygon configuration

restriction: {
  'geofence': {
      'type': 'polygon',
      'center': 'start', // 'start' (same as location) or 'lot,long' or 'city'
      'points': [ // Should be cordinats that draw a shape, if the shape is unfinished, just autocomplete the last two points.
           '55.324245,12.45255',
           '55.324245,12.45255',
           '55.324245,12.45255',
           '55.324245,12.45255'
      ]
   }
}
andythorne commented 7 years ago

I like this idea and i don't think it will be too difficult (seems we can use matplotlib)!

I may be able to have a go at it tonight if i have time.

Saturate commented 7 years ago

I agree, it seems to be pretty standart for libs. Sounds awesome :-)

dbmurphy commented 7 years ago

Is this where navigator_waypoints in the config could be used. To plot to say a path, you would want a virtual person to take. Aka walk from the London Eye to Buckingham place, to hide park, to paddington, to Kings Cross, to the Tower of London, to the London eye.

Or do you want more a wall like "Don't leave london zone 1 or zone 2"

andythorne commented 7 years ago

A geofence is a virtual barrier, so "Don't leave london zone 1 or zone 2".

niicojs commented 7 years ago

I think the current issue is that the bot tends to stay at the same place all the time turning around, at least where I live (there is lots of pokestops)

andythorne commented 7 years ago

it's not very intelligent in deciding where it wants to go, that's for sure. I tend to use waypoints as a result.