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

loitering #5416

Closed
ukos-git opened this issue Sep 12, 2016 · 19 comments
Closed

loitering #5416

ukos-git opened this issue Sep 12, 2016 · 19 comments

Comments

@ukos-git
Copy link
Contributor

ukos-git commented Sep 12, 2016

hi there.
i have an understanding issue. read the docs and tried a lot but I don't get it.
I have a point-path file with loitering points. So far everything works. The bot walks to the points and loiters at some stops for 0s and at some for 500s (as specified in the file). So far so good.

my initial standard tasks are set like in the standard config and are all beeing executed when in loitering mode. But I can not get the MovetoFort-Task after the FollowPath-Task to Work.
tasks: ... --> spinFort --> FollowPath --> FollowSpiral --> MovetoFort

can someone post a working task-list for me, please?

@alexyaoyang
Copy link
Contributor

Remove the FollowSpiral task, and it should work.

@ukos-git
Copy link
Contributor Author

I removed the Spiral. still no walking around when loitering.
Maybe I missed sth else in the config or path file. so here it is:

http://paste2.org/yFjcd4W0
http://paste2.org/DB1xepZ1

@julienlavergne
Copy link
Contributor

still no walking around when loitering

Isn't it the point ?

@ukos-git
Copy link
Contributor Author

Ah. Ok. That was my understanding issue.
I was in the impression, i could do other walking tasks when loitering at a point.
I want the bot to wander a bit around at certain points of the city. Then after this return to the next waypoint.

@alexyaoyang
Copy link
Contributor

What do you mean by walking 'around'? If you are asking will it execute the MoveToFort task while loitering, yes it will.

@julienlavergne
Copy link
Contributor

I never used it but according to the code, it should not run the MoveToFort while loitering:

if self.status == STATUS_LOITERING and time.time() < self.loiter_end_time:
            return WorkerResult.RUNNING

@ukos-git
Copy link
Contributor Author

@alexyaoyang maybe you are on master. In current dev it is changed. sorry. should have added the branch.
@anakin5 I took a quick look in the cell_workers.py (line 144). Why is the task returning a running status when loitering (imho) should not be a running task at all? I dig into the blame here and saw that you changed it in 3c1b0f5

@julienlavergne
Copy link
Contributor

I understood loitering means stay there according to another discussion in another issue. Now if we agree it means to potenrially handover movement to another task, we have to return Success.

@alexyaoyang
Copy link
Contributor

alexyaoyang commented Sep 13, 2016

@ukos-git I have a few bots running, some on latest dev and some on old dev, which explains why I can still see some loitering movements :)

@anakin5 Ah I see that you've submitted a PR and changed it a couple of days ago. Sorry I didn't saw that PR before. Let me correct myself that the code right now doesn't allow you to move while loiter.

However the intended behavior of loiter is tasks that are placed under FollowPath will be executed. This was the behavior prior to the change in my logs, also quote @janpascal from his PR #4660

[2016-09-09 15:29:19] Loitering for 60 seconds...
[2016-09-09 15:29:19] Moving towards pokestop The Big Strike - 150.78m
[2016-09-09 15:29:23] Moving towards pokestop The Big Strike - 145.83m
[2016-09-09 15:29:27] Moving towards pokestop The Big Strike - 131.08m

'loiter' in the json file will cause the bot pause following the path for a while, and instead execute the next task. E.g. if a MoveToFort task is next, the bot will chase pokestops for the indicated number of seconds, and the resume the path

What's your opinion on this?

@ukos-git
Copy link
Contributor Author

@alexyaoyang maybe we should add an option like allow_walk_while_loitering in the config so everyone is happy

@reigelgallarde
Copy link

@ukos-git, I get your point but won't make sense if you enabled some task that needs the bot to walk but then you will not allow the bot to walk 😄

@ukos-git
Copy link
Contributor Author

what a mess. now the new posts from yesterday are also gone. feeling like sisiphos.
@reigelgallarde you're right.

the line is already reverted in current dev

As the term "LOITER" is fairly uncommon to non-naitive speakers it would also be great to change the constant to WANDER to avoid subsequent misunderstandings.

@janpascal
Copy link
Contributor

Unfortunately, reverting return WorkerResult.RUNNING to return WorkerResult.SUCCESS seems to have missed the update to master. Could someone please fix it?

@Gobberwart
Copy link
Contributor

Nothing's missed anything. Pull to master will happen in due course.

@Gobberwart
Copy link
Contributor

Gobberwart commented Sep 22, 2016

What a disaster this issue is. Logically, if you're loitering you're staying in one location. Walking around is the exact opposite of this.

If you want to wait at a pokestop, set loiter. If not, don't. You can't have both.

@janpascal
Copy link
Contributor

It's not in the dev branch either. And I agree with @ukos-git that we should change to name to wander, since loiter creates too many misunderstandings. My bad since I came up with the term.

@ukos-git
Copy link
Contributor Author

@Gobberwart you missed the point:

If you want to wait at a pokestop, set loiter. If not, don't. You can't have both.

It is sure that you can not stand still and walk at the same time. That's not the issue.
I have some POI in the path of my city and I want to allow doing other tasks like camping or spinning pokestops when near to those POIs.
Setting a time limit for doing other tasks along the way was a great idea. The only thing that is a mess is the misunderstandings it caused along some devs but everything should be clear now.
@janpascal If we all agree then let's change the name of the constant. I would be happy.

@reigelgallarde
Copy link

I missed this this "loiter" thing.. when can we have "wander" then?

@reigelgallarde
Copy link

why I want this back? is mainly because in my scenario, the spawn area has only one pokestop. I need to have a combination of both FollowPath and MoveToFort... FollowPath will scan the spawn area... and after scanning, do MoveToFort to get some pokeballs..

Is there any config that can do this without loiter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants