Conversation
We now have a: - StepWalker class, responsible for walking a small distance towards a final destination. - SpiralNavigator class, which around an area in a spiral. It determines points to walk to and uses to StepWalker to slowly go from one point to another. This architecture enables us to have different Navigators, although it doesn’t implement a nice Navigator configuration YET.
|
Going to have to rebase and update your branch my friend :). Out of date with dev |
pokemongo_bot/__init__.py
Outdated
| self.stepper.take_step() | ||
| location = self.navigator.take_step() | ||
| cells = self.find_close_cells(*location) | ||
| self.work_on_cell(cells[0], location, False) |
There was a problem hiding this comment.
What's the plan to have this look at more than just the first cell? Could we change find_close_cells to get_current_metacell or something and have that merge the cells?
|
This looks right to me except for my comments |
|
@jtdroste yeah, I will. But I'm afraid of ugly merge conflict, so I'm taking a deep breath first. |
|
👍 |
|
Don't merge, I found problem. |
|
@jtdroste need help! My code is not doing small steps like I want it to, but I'm not a geometry guy and you are! :( |
|
Fixed the merge conflicts. Fixed the branch to successfully catch pokemon, spin forts, and walk around. It also doesn't spam the log with walking info. |
|
@tejado how do you think about this commit? Should we merge? |
|
Works well in dev branch. |
| self.config.mode == "farm"): | ||
| if 'forts' in cell: | ||
| # Only include those with a lat/long | ||
| forts = [fort |
There was a problem hiding this comment.
Am i missing something or is this missing a ]
There was a problem hiding this comment.
It's on the next line:
forts = [fort
for fort in cell['forts']
if 'latitude' in fort and 'type' in fort]
|
@douglascamata I made a lot of comments but make sure you dont have two things primarily
Also in the SpiralWalker class could you explain why need position and x and y as two seperate things |
| status = map_objects.get('status', None) | ||
|
|
||
| map_cells = [] | ||
| if status and status == 1: |
There was a problem hiding this comment.
just do map_objects.get('status') and if status == 1: the second change isnt needed
|
Looking forward to seeing this merged so I can have a go at implementing tsp for pokestops within the walk radius |
|
This seems to be structurally working now. I've been running through a bunch of the situations locally and it's been working great. |
|
@ProjectBarks I'd like to fix most of the style errors for the stepper refactor in a follow up PR where we fix travis and can actually fix all these issues. And get the change in so we don't block all the other stepper changes that want to happen since this is a big PR that will be problematic with merge conflicts. |
|
I will need to rewrite some of the code that was merge in #721 because of this refactoring. I had class PolylineStepper(Stepper): in polyline_stepper.py I need to rewrite it to a navigator. |
|
@solderzzc do you mean me? |
* big refactor to Stepper class We now have a: - StepWalker class, responsible for walking a small distance towards a final destination. - SpiralNavigator class, which around an area in a spiral. It determines points to walk to and uses to StepWalker to slowly go from one point to another. This architecture enables us to have different Navigators, although it doesn’t implement a nice Navigator configuration YET. * small fixes to workers * Merging * Fixing arguments * Moving the distance log line
We now have a:
final destination.
determines points to walk to and uses to StepWalker to slowly go from
one point to another.
This architecture enables us to have different Navigators, although it
doesn’t implement a nice Navigator configuration YET.
Implementing #717