PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

Bot Is Moving SUPER-FAST

Open oralunal opened this issue 10 years ago • 33 comments

Expected Behavior

My speed should be between 2-4 km/h

Actual Behavior

It's like flying, He moved 270 meters in 5 secs :)

Your FULL config.json (remove your username, password, gmapkey and any other private info)

http://pastebin.com/Y3McgMeg

Output when issue occurred

http://pastebin.com/XkVLPfv1

Other Information

OS: Windows 10 Branch: dev Git Commit: 847c45bca3fa8244e00ab418308495b52b54436f

Python Version: Python 2.7.12

oralunal avatar Sep 04 '16 08:09 oralunal

https://github.com/PokemonGoF/PokemonGo-Bot/pull/5169

julienlavergne avatar Sep 04 '16 09:09 julienlavergne

@oralunal that is because the StepWalker does not sleep if

if (self.dLat == 0 and self.dLng == 0) or self.dist < self.speed:

i added sleep(1) to that in https://github.com/PokemonGoF/PokemonGo-Bot/pull/5169

th3w4y avatar Sep 04 '16 09:09 th3w4y

just worth mentioning not only the Polyline walker would have been affected by this... but all tasks.. at the last step....

(polyline was affected on each step...when random speed fetch by StepWalker from 2.16 to 4.15 would have been smaller then the calculated next pos on the poyline)

th3w4y avatar Sep 04 '16 09:09 th3w4y

This is occured in Polyline.. Now I passed to stepwalker and there is problem about speed calculation..

[2016-09-04 12:44:31] [MoveToFort] [INFO] Moving towards pokestop Vişnelik Küçük Park - 315.53m
[2016-09-04 12:44:37] [MoveToFort] [INFO] Moving towards pokestop Vişnelik Küçük Park - 300.66m
[2016-09-04 12:44:42] [MoveToFort] [INFO] Moving towards pokestop Vişnelik Küçük Park - 285.04m
[2016-09-04 12:44:48] [MoveToFort] [INFO] Moving towards pokestop Vişnelik Küçük Park - 270.33m

With this log my speed is 10 km/h.. But it should be max 4.16 km/h..

oralunal avatar Sep 04 '16 09:09 oralunal

values are in m/s not km/h

thus values are between 7.8-15Km/h

th3w4y avatar Sep 04 '16 10:09 th3w4y

4.16km/h= ~1.2m/s

macio525 avatar Sep 04 '16 10:09 macio525

@macio525: speed is calculated in m/s not km/h

th3w4y avatar Sep 04 '16 10:09 th3w4y

@th3w4y exactly. If you take a look to my config file you'll see this:

    "walk_max": 4.16,
    "walk_min": 2.16,

So, there is something wrong.

oralunal avatar Sep 04 '16 10:09 oralunal

4.16m/s in config, right?

macio525 avatar Sep 04 '16 10:09 macio525

No, walk_max and walk_min values are km/h

oralunal avatar Sep 04 '16 10:09 oralunal

"walk_max: 4.16: Set the maximum walking speed (1 is about 1.5km/hr)" "walk_min: 2.16: Set the minimum walking speed (1 is about 1.5km/hr)"

macio525 avatar Sep 04 '16 10:09 macio525

@oralunal where is this written? that the speed are in km/h? everywhere in the code calculations and all are in m/s

th3w4y avatar Sep 04 '16 10:09 th3w4y

@th3w4y as @macio525 mentioned it's written in configuration https://github.com/PokemonGoF/PokemonGo-Bot/blob/master/docs/configuration_files.md

oralunal avatar Sep 04 '16 10:09 oralunal

@oralunal documentation is incorrect then.. it always has been m/s check even the master code..

th3w4y avatar Sep 04 '16 10:09 th3w4y

@oralunal

Nr of steps was distance/speed

self.steps = (self.dist + 0.0) / (self.speed + 0.0)

we had steps of one second because of the sleep(1)

        sleep(1)  # sleep one second plus a random delta
        # self._work_at_position(
        #     self.initLat, self.initLng,
        #     alt, False)

th3w4y avatar Sep 04 '16 10:09 th3w4y

@oralunal this we have self.dist in meter decided per "self.speed" and step was one second this makes it m/s

th3w4y avatar Sep 04 '16 10:09 th3w4y

I will update the documentation https://github.com/PokemonGoF/PokemonGo-Bot/commit/3259fb660d19276ef26427435f655f85cc0ed61d

th3w4y avatar Sep 04 '16 10:09 th3w4y

Walking speed is an empirical number - not a real world unit.

mjmadsen avatar Sep 04 '16 10:09 mjmadsen

arbitrary is probably a better word.

Plus the distance between two coords using long/lat will vary depending on where in the world we're running the bot.

mjmadsen avatar Sep 04 '16 10:09 mjmadsen

@mjmadsen it kinda is a real unit is m/s

the distance variance depending on where in the world is very very small not even worth mentioning... will maybe cause more confusion...

th3w4y avatar Sep 04 '16 10:09 th3w4y