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

Pedestrians ignore traffic lights if road only has pedestrian lane on one side #1207

Open
originalfoo opened this issue Nov 28, 2021 · 12 comments
Labels
BUG Defect detected PATHFINDER Pathfinding tweaks or issues TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc

Comments

@originalfoo
Copy link
Member

Describe the problem

Steam used Elesbaan noted:

I would like to see this mod include a fix for an issue with pedestrian traffic.

If a road only has a pedestrian lane on one side, pedestrians at intersections ignore traffic lights when crossing the road to access that lane. This CSL's default behavior, and it would be nice if TM:PE could fix it. I have created road assets that really should only allow pedestrian traffic on one side, but I could not configure them that way because of this limitation in CSL's traffic AI.

Steps to reproduce

I've asked user for links to assets which exhibit the problem.

Log files

n/a

Savegame?

I've asked user to provide a savegame.

Screenshots?

n/a

@originalfoo originalfoo added BUG Defect detected triage Awaiting issue categorisation TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc PATHFINDER Pathfinding tweaks or issues labels Nov 28, 2021
@krzychu124
Copy link
Member

Pedestrian crossing detection for segments with pavement on one side is not supported in our PathFinding (nor in vanilla), might be related to #786

@Elesbaan70
Copy link
Contributor

Here is an asset that reproduces the problem:
https://steamcommunity.com/sharedfiles/filedetails/?id=2668761312

a small-ish savegame that uses it:
https://steamcommunity.com/sharedfiles/filedetails/?id=2668762129

a video of it happening:
https://www.youtube.com/watch?v=lJDRIjEk458

@Elesbaan70
Copy link
Contributor

In my limited testing, pedestrians seem to mostly do what I expect them to when there is only a pedestrian lane on one side. I just want them to stop jaywalking. ;-)

@Elesbaan70
Copy link
Contributor

Elesbaan70 commented Dec 1, 2021

On a hunch, I placed my test road in a developed area to see what would happen. As I suspected, pedestrians follow their designated lane to their destination, then just walk right across the street. Maybe the logic that makes this possible needs to check and make sure it's not happening at an intersection.

@Elesbaan70
Copy link
Contributor

Elesbaan70 commented Dec 1, 2021

To put it another way, only allow this uncontrolled crossing on segments. On nodes, follow the normal rules for crossing the street.

@krzychu124
Copy link
Member

To put it another way, only allow this uncontrolled crossing on segments

What do you mean? It's impossible for pedestrian to cross road/segment without a node. pedestrian crossing are always created on the node, there is no exception from that rule.

@Elesbaan70
Copy link
Contributor

there is no exception from that rule.

Apparently there is:

https://youtu.be/57zW6VazONc

@originalfoo
Copy link
Member Author

Is there a node at the location when they were crossing? IIRC pedestrians can cross at bend nodes as well as junction nodes.

@Elesbaan70
Copy link
Contributor

The nearest nodes are the highlighted rectangles on the left and right.

@krzychu124
Copy link
Member

OK, I know where is the problem. How they suppose to get to that building if road connected to is has pavement on one side?
I'm pretty sure that pathfinding fall back to default behavior as it uses for pavement/bike paths - they don't need to be connected and cim selects the shortest gap between two lanes, which in this case means crossing the segment because continuing the walk to the node would be pointless - there is no pavement path on the other side anyways (that variant will have worse overall pathfinding score).

@Elesbaan70
Copy link
Contributor

Elesbaan70 commented Dec 3, 2021

Yes, this was all my conclusion as well, minus the implementation details that I'm not familiar with.

So what if the logic that handles this is also in control when they cross at an intersection? That's my theory. But since I don't actually know how the code works..... 🤷‍♂️

@Elesbaan70
Copy link
Contributor

Another interesting behavior that might be related is that when the pedestrian lane on one side ends, forcing pedestrians to cross to the other side, their movement suggests to me that it's being treated like a lane change rather than a street crossing.

https://youtu.be/r7YbRYxOBrk

But when a cross street is added at the node, newly spawned pedestrians cross at the crosswalk as expected (still ignoring the light).

@originalfoo originalfoo removed the triage Awaiting issue categorisation label Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected PATHFINDER Pathfinding tweaks or issues TRAFFIC LIGHTS Feature: Traffic lights - toggle, timed, etc
Projects
None yet
Development

No branches or pull requests

3 participants