Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Walking improvements: Directions API, Elevations API #413

Closed
th3w4y opened this issue Jul 23, 2016 · 12 comments
Closed

Walking improvements: Directions API, Elevations API #413

th3w4y opened this issue Jul 23, 2016 · 12 comments

Comments

@th3w4y
Copy link
Contributor

th3w4y commented Jul 23, 2016

is there anything in your TODO list for this?

Was thinking to add a new walk logic to use the map generated by the Directions API for generating a polyline that would need to be walked with the speed that is set.

Additionally for the generated point we could fetch the alt from the Elevations API

this can improve the self.set_position(lat, lng, alt)

maybe this will make the bot walk more natural.

What are your opinions on this?

@solderzzc
Copy link
Contributor

solderzzc commented Jul 23, 2016

I like the idea, I placed a google API there to simulate people walk. Use google direction Walk mode would generate human walk logic.

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 23, 2016

add I already have some basic working code
#484

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 23, 2016

there will be some integration work needed, please take a look then rewrite if needed
#484 is just a proof of concept.

I wrote it with the logic in mind that when we initiate a walk we know from were to where we want to go, thus I would initialise an object current_walk = PolylineWalker([polylines_points_list], speed) object with the fetched polylines points from Google Directions API
(check polyline_tester.py)

When we need to know the coordinates we are on before the heartbeat we just call current_walk.walk(), this method would return our current position on the polyline at the time of the method call.

Pause/Unpause (Not sure if needed)
If we are busy catching pokemon on the way, we can call current_walk.pause(), then when we're done working at that location we can call current_walk.unpause().

once the polylines was walked current_walk.walk() will return a empty tuple (None, None) that you can use to trigger your next logic.

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 24, 2016

got rid of the .walk() concept..
the PolylineWalker() object has now a .get_pos() method that returns the current position at call time on the polyline.

the are no methods anymore that update the .points content, the points remain the same during the life of the object with the initial points initialized from the Google Direction API fetched points.
#667

if the polyline walk was finished the .get_pos() continues to return the position of the last point.
not sure what would be the best way to go...

any proposals/preferences what should the object return?

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 24, 2016

more improvements #697

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 24, 2016

more improvements #721

@Naramsim
Copy link

Maybe change sometime a little bit the movements speed. So the bot will look more natural

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 25, 2016

Good suggestion!

Posible solutions:

  • one could use the .pause() .unpause() methods to achieve a small speed modulation
  • I also think one should stop the counter while working on a cell

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 25, 2016

I did a PR #835 to push some fixes to master branch

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 25, 2016

Will need to rewrite some code due to the big refactor to Stepper class #737

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 26, 2016

routing the generated point to 5 digits precision ensure we are around ~50 cm around the point proposed by the Google Direction API.

I that good enough as a jitter?

@th3w4y
Copy link
Contributor Author

th3w4y commented Jul 26, 2016

fixes in PR #990 #1467

Proposing a new Interface for the StepWalker configuration https://github.com/th3w4y/PokemonGo-Bot/pull/24

@gregtampa gregtampa added this to the 2.0 - stable release milestone Jul 30, 2016
hoanghuynh pushed a commit to hoanghuynh/PokemonGo-Bot that referenced this issue Sep 28, 2016
* hotfix for pokemon spawn disappearing

* replace marker if disappear_time is different (different item)

* better fix

* removed disappear time thing... time will always be different

* pokemon were flashing... this is prob the problem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants