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

Does Max_Step work? #281

Open
ch333 opened this issue Aug 11, 2016 · 8 comments
Open

Does Max_Step work? #281

ch333 opened this issue Aug 11, 2016 · 8 comments
Assignees

Comments

@ch333
Copy link

ch333 commented Aug 11, 2016

Expected Behavior

Setting max step to 0 or 1 has the bot stay in the same general location. Setting to 100 allows it to roam large distances.

Actual Behavior

The bot roams about the same distance regardless of max step value.

Steps to Reproduce

Run bot

Other Information

OS: OS X
Git Commit: 5c681f0

Also, is waypoint and campsite currently not supported? I can't get either to work. When I try campsite, I use "-n campsite" and sometimes I add "-camp lat,long". Both ways gives me errors:

Traceback (most recent call last):
File "pokecli.py", line 380, in
main()
File "pokecli.py", line 373, in main
bot.run()
File "/Users/username/Desktop/POGO/OpenPoGoBot/pokemongo_bot/init.py", line 108, in run
for destination in self.navigator.navigate(map_cells):
AttributeError: 'NoneType' object has no attribute 'navigate'

@xasdf
Copy link

xasdf commented Aug 12, 2016

Try -n camper. I think documentation is wrong.
waypoint works just fine. It has a minor bug that got introduced in #254 (it doesn't walk all the way to waypoint).

@wchill
Copy link
Contributor

wchill commented Aug 12, 2016

Actually, seems like max_steps parameter is no longer used.

@ch333
Copy link
Author

ch333 commented Aug 12, 2016

@kristskrilovs, can you give me an example of the waypoint input?
-l <start_lat,start_long> -wp <dest_lat,dest_long>

And is it possible to use multiple waypoints with this?
-wp or --waypoint [NAVIGATOR_WAYPOINT [NAVIGATOR_WAYPOINT ...]]

@xasdf
Copy link

xasdf commented Aug 12, 2016

@ch333 not sure about command line option but if you use config file, waypoints syntax is:
"navigator": "waypoint",
"navigator_waypoints": [
[lat1,lng1,alt1],
[lat2,lng2,alt2],
...
[latN,lngN,altN]
]
Altitudes are optional - if you don't specify altitude, bot will set it to 0. With current codebase altitude is meaningless anyway because pgoapi always overwrites it with 8.

@ch333
Copy link
Author

ch333 commented Aug 12, 2016

@kristskrilovs Thanks!

@ch333
Copy link
Author

ch333 commented Aug 12, 2016

It looks like when you pass in coordinates via command line, it gets assigned to 'navigator_waypoint': ['[[lat1,lng1],[[lat2,lng2]'],, which is separate from u'navigator_waypoints': [[lat1,lng1],[[lat2,lng2]], (from the config.json file). These variables appear to not be linked.

@meyer9
Copy link
Contributor

meyer9 commented Aug 16, 2016

Reopen if still an issue.

@meyer9 meyer9 closed this as completed Aug 16, 2016
@meyer9 meyer9 reopened this Aug 16, 2016
@andythorne
Copy link
Collaborator

#332 introduced the concept of a max distance, which replaces max_steps in a way.

Setting mapping.cell_radius will directly impact what you can 'see' and thus where you can travel using the fort navigator.

However, due to the way that navigators work, once the full navigation has completed, it will start again.

For example:

  • bot starts
  • bot gets cells in X radius at origin location
  • fort navigator builds route from nearest -> furthest fort
  • bot walks to all points
  • bot reaches end of navigator's points (thus ending up the furthest distance from origin location)
  • bot restarts, using current location as the new origin

We could modify the fort navigator to return to the original position, or implement geofencing as in #178 (preferred).

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

5 participants