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

Walk from A to B, but don't teleport #3920

Closed
yyoshii opened this issue Aug 14, 2016 · 13 comments
Closed

Walk from A to B, but don't teleport #3920

yyoshii opened this issue Aug 14, 2016 · 13 comments
Labels

Comments

@yyoshii
Copy link

yyoshii commented Aug 14, 2016

Expected Behavior

There are two entries in my path.json.
I expect that the bot run from A to B end then back to A and so one.
But there are all the time Teleported messages instead of walking.
How can i change it that the bot only walk?

I had a look to the config file, but doesn't found the correct setting:

Path Navigator Configuration

Setting the navigator.type setting to path allows you to specify waypoints which the bot will follow. The waypoints can be loaded from a GPX or JSON file.
By default the bot will walk along all specified waypoints and then move directly to the first waypoint again.

Actual Behavior

2016-08-14 12:10:43,641 [FollowPath] [INFO] [position_update] Teleported from (40.75413415061214, -73.98280514737512, 0) to (40.753451, -73.982872, 0) (76.1713177396 m)
2016-08-14 12:10:43,641 [FollowSpiral] [INFO] [position_update] Walking from (40.75411067861637, -73.9828219880316, 0) to (40.75413415061214, -73.98280514737512, 0) (2.97076386268 m)
2016-08-14 12:10:46,052 [FollowPath] [INFO] [position_update] Teleported from (40.75413415061214, -73.98280514737512, 0) to (40.753451, -73.982872, 0) (76.1713177396 m)
2016-08-14 12:10:46,052 [FollowSpiral] [INFO] [position_update] Walking from (40.754112611553595, -73.9828157626073, 0) to (40.75476411599625, -73.98280514737512, 0) (72.4495007415 m)
2016-08-14 12:10:49,391 [FollowPath] [INFO] [position_update] Teleported from (40.754170937134326, -73.98282198833653, 0) to (40.753451, -73.982872, 0) (80.1641234482 m)
2016-08-14 12:10:52,901 [FollowPath] [INFO] [position_update] Teleported from (40.754171997209646, -73.98282512200683, 0) to (40.753451, -73.982872, 0) (80.2684049293 m)
2016-08-14 12:10:55,721 [FollowPath] [INFO] [position_update] Teleported from (40.7541944229624, -73.98283852188709, 0) to (40.753451, -73.982872, 0) (82.7129777349 m)
2016-08-14 12:10:56,753 [IncubateEggs] [INFO] [next_egg_incubates] Next egg incubates in 3.73 km
2016-08-14 12:10:58,273 [FollowPath] [INFO] [position_update] Teleported from (40.75421530757311, -73.98282121356735, 0) to (40.753451, -73.982872, 0) (85.0947204355 m)
2016-08-14 12:11:01,056 [FollowPath] [INFO] [position_update] Teleported from (40.75418235009182, -73.98279747186821, 0) to (40.753451, -73.982872, 0) (81.5643755846 m)
2016-08-14 12:11:04,357 [FollowPath] [INFO] [position_update] Teleported from (40.75414681505159, -73.98278956866623, 0) to (40.753451, -73.982872, 0) (77.6820412094 m)

Your config.json (remove your credentials and any other private info)

{
"auth_service": "ptc",
"username": "xyz",
"password": "xyz",
"location": "40.753419, -73.9827662",
"gmapkey": "xyz",
"encrypt_location": "",
"tasks": [
{
"type": "HandleSoftBan",
"config": {
"enabled": true
}
},
{
"type": "SleepSchedule",
"config": {
"enabled": true,
"time": "22:03",
"duration":"7:01",
"time_random_offset": "00:24",
"duration_random_offset": "00:43"
}
},
{
"type": "CollectLevelUpReward",
"config": {
"enabled": true
}
},
{
"type": "IncubateEggs",
"config": {
"enabled": true,
"longer_eggs_first": true
}
},
{
"type": "UpdateLiveStats",
"config": {
"enabled": true,
"min_interval": 60,
"stats": ["level_stats", "stardust_earned", "xp_earned", "xp_per_hour", "stops_visited", "pokemon_caught", "uptime"],
"terminal_log": true,
"terminal_title": true
}
},
{
"type": "TransferPokemon",
"config": {
"enabled": true
}
},
{
"type": "NicknamePokemon",
"config": {
"enabled": false,
"nickname_template": "{iv_pct}_{iv_ads}"
}
},
{
"type": "EvolvePokemon",
"config": {
"enabled": true,
"evolve_all": "none",
"first_evolve_by": "iv",
"evolve_above_cp": 850,
"evolve_above_iv": 0.90,
"logic": "or",
"evolve_speed": 20,
"use_lucky_egg": false
}
},
{
"type": "RecycleItems",
"config": {
"enabled": true,
"min_empty_space": 25,
"item_filter": {
"Pokeball": { "keep" : 20 },
"Greatball": { "keep" : 20 },
"Ultraball": { "keep" : 100 },
"Masterball": { "keep" : 75 },
"Potion": { "keep" : 0 },
"Super Potion": { "keep" : 0 },
"Hyper Potion": { "keep" : 10 },
"Max Potion": { "keep" : 0 },
"Revive": { "keep" : 10 },
"Max Revive": { "keep" : 0 },
"Lucky Egg": { "keep" : 100 },
"Incense": { "keep" : 100 },
"Spicy Incense": { "keep" : 100 },
"Cool Incense": { "keep" : 100 },
"Floral Incense": { "keep" : 100 },
"Troy Disk": { "keep" : 90 },
"X Attack": { "keep" : 90 },
"X Defense": { "keep" : 90 },
"X Miracle": { "keep" : 90 },
"Razz Berry": { "keep" : 50 },
"Bluk Berry": { "keep" : 50 },
"Nanab Berry": { "keep" : 50 },
"Wepar Berry": { "keep" : 50 },
"Pinap Berry": { "keep" : 50 },
"Special Camera": { "keep" : 100 },
"Incubator (Unlimited)": { "keep" : 100 },
"Incubator": { "keep" : 100 },
"Pokemon Storage Upgrade": { "keep" : 100 },
"Item Storage Upgrade": { "keep" : 100 }
}
}
},
{
"type": "CatchVisiblePokemon",
"config": {
"enabled": true
}
},
{
"type": "CatchLuredPokemon",
"config": {
"enabled": true
}
},
{
"type": "SpinFort",
"config": {
"enabled": true
}
},
{
"type": "FollowPath",
"config": {
"enabled": true,
"max_distance": 200,
"snipe": false,
"path_mode": "loop",
"path_start_mode": "first",
"path_file": "configs/path.json"
}
},
{
"type": "MoveToFort",
"config": {
"enabled": false,
"lure_attraction": false,
"lure_max_distance": 200,
"output_interval_by": "distance",
"output_interval": 0.05
}
},
{
"type": "FollowSpiral",
"config": {
"enabled": true,
"diameter": 4,
"step_size": 70
}
}
],
"map_object_cache_time": 5,
"forts": {
"avoid_circles": true,
"max_circle_size": 50,
"cache_recent_forts": true
},
"websocket_server": false,
"walk": 4.36,
"action_wait_min": 2,
"action_wait_max": 6,
"debug": false,
"test": false,
"health_record": true,
"location_cache": true,
"distance_unit": "km",
"reconnecting_timeout": 15,
"min_ultraball_to_keep": 20,
"logging_color": true,
"catch": {
"any": {"catch_above_cp": 650, "catch_above_iv": 80, "logic": "or" }
},
"catch_throw_parameters": {
"excellent_rate": 0.1,
"great_rate": 0.5,
"nice_rate": 0.3,
"normal_rate": 0.1,
"spin_success_rate" : 0.6
},
"release": {
"//any": {"release_below_cp": 0, "release_below_iv": 0, "logic": "or"},
"any": {"keep_best_iv": 2, "release_below_iv": 0.8, "logic": "or"}
"// Example of always releasing Rattata:": {},
},
"vips" : {
"Any pokemon put here directly force to use Berry & Best Ball to capture, to secure the capture rate!": {},
"any": {"catch_above_cp": 1200, "catch_above_iv": 0.9, "logic": "or" },
"Lapras": {},
"Moltres": {},
"Zapdos": {},
"Articuno": {},

    "// S-Tier pokemons (if pokemon can be evolved into tier, list the representative)": {},
    "Mewtwo": {},
    "Dragonite": {},
    "Snorlax": {},
    "// Mew evolves to Mewtwo": {},
    "Mew": {},
    "Arcanine": {},
    "Vaporeon": {},
    "Gyarados": {},
    "Exeggutor": {},
    "Muk": {},
    "Weezing": {},
    "Flareon": {}

}

}

path.json
[
{"location": "40.753451, -73.982872"},
{"location": "40.753043, -73.983061"}
]

Steps to Reproduce

Other Information

OS:
Git Commit: (run 'git log -n 1 --pretty=format:"%H"' and paste it here)
Python Version: (run 'python -V' and paste it here)

@fari-99
Copy link

fari-99 commented Aug 14, 2016

if you want teleport feature, use MoveToMapPokemon task with PokemonGo-Map.

@yyoshii
Copy link
Author

yyoshii commented Aug 14, 2016

I don't want teleport.
But it always write the teleport message to console

@fari-99
Copy link

fari-99 commented Aug 14, 2016

@yyoshii opps, sorry, i think you want teleport, my bad. so it's the logging issue then.

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

Your FollowPath config seems a bit messed up

{
"type": "FollowPath",
"config": {
"enabled": true,
"max_distance": 200,
"snipe": false,
"path_mode": "loop",
"path_start_mode": "first",
"path_file": "configs/path.json"
}
},

  • enabled = true - this is not required unless you want to disable it, in which case it would be false. This wouldn't cause you any issues, it's just a FYI
  • max_distance = 200 & snipe = false - These are options for MoveToMapPokemon and aren't used by FollowPath at all, I'm not sure if this is messing your bot up because they arent valid config options (especially because you're not using MoveToMapPokemon).

Remove these 2 and see if it fixes your problem, let us know if it does because it might be a bug that needs fixing

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

If that doesn't fix it (still remove those 2 options though) - try setting path_mode to linear and see if that makes a difference. The documentation is vague so it might be logically reversed with the loop and linear config option.

Either way, report back what happens as both options may require some work to be done to the docs

@yyoshii
Copy link
Author

yyoshii commented Aug 14, 2016

Changed it to:
{
"type": "FollowPath",
"config": {
"path_mode": "linear",
"path_start_mode": "first",
"path_file": "configs/path.json"
}
},
{
"type": "FollowSpiral",
"config": {
"diameter": 4,
"step_size": 70
}
}
],

2016-08-14 14:44:02,096 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-14 14:44:02,096 [PokemonGoBot] [INFO] [x] Coordinates found in passed in location, not geocoding.
2016-08-14 14:44:02,331 [PokemonGoBot] [INFO] [bot_start] Starting bot...
2016-08-14 14:44:15,877 [FollowSpiral] [INFO] [position_update] Walking from (40.770454236376594, -73.9763929078857, 0) to (40.770397, -73.976346, 0) (7.49060185188 m)
2016-08-14 14:44:16,881 [TransferPokemon] [INFO] [pokemon_release] Exchanged Pinsir [CP 676] [IV 0.62] for candy.
2016-08-14 14:44:24,240 [FollowPath] [INFO] [position_update] Teleported from (40.770397, -73.976346, 0) to (40.77173, -73.978513, 0) (235.09705176 m)
2016-08-14 14:44:24,240 [FollowSpiral] [INFO] [position_update] Walking from (40.770427422685955, -73.97643520938601, 0) to (40.771027288547835, -73.976346, 0) (67.1237528562 m)
2016-08-14 14:44:27,260 [FollowPath] [INFO] [position_update] Teleported from (40.77047689327047, -73.9764478807323, 0) to (40.77173, -73.978513, 0) (222.841524853 m)

path.json
[
{"location": "40.771730, -73.978513"},
{"location": "40.768082, -73.970434"}
]

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

and path_mode = loop without those other options you have already removed? Same issue?

@yyoshii
Copy link
Author

yyoshii commented Aug 14, 2016

i tried it with loop, afterwards with linear
Then i removed it complete. But i still got this message:

2016-08-14 15:02:08,378 [FollowPath] [INFO] [position_update] Teleported from (40.757518950898415, -73.98528541813252, 0) to (40.758629, -73.985053, 0) (124.974538795 m)
2016-08-14 15:02:10,352 [FollowPath] [INFO] [position_update] Teleported from (40.75756498274049, -73.98525980524026, 0) to (40.758629, -73.985053, 0) (119.588654129 m)
2016-08-14 15:02:12,032 [FollowPath] [INFO] [position_update] Teleported from (40.75763132504724, -73.98524350400027, 0) to (40.758629, -73.985053, 0) (112.090793381 m)

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

Hang on, I just realised there was a recent commit that I wasn't aware of (should hit F5 more often). Your bug has been caused by #3819

@leanhdaovn
Copy link
Contributor

my bad for writing the wrong log message. created a new PR #3935

@yyoshii
Copy link
Author

yyoshii commented Aug 14, 2016

Thx for fixing it

@leadboots5
Copy link
Contributor

You shouldn't have followspiral and followpath. remove followspiral if you want it following a path.

@k4n30
Copy link
Contributor

k4n30 commented Aug 14, 2016

Fixed in #3935

@k4n30 k4n30 closed this as completed Aug 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants