Skip to content

Project invalid trajectories inside walkable area #213

@schroedtert

Description

@schroedtert

When dealing with head trajectories, it may happen that the participants lean over the obstacles. This means that their trjajectory will leave the walkable area at some frames, these data than can not be processed with PedPy. In JPSreport we provided a helper script which moves points outside the obstacles and away from walls, this could be an inspiration and may need some minor changes:
https://github.com/JuPedSim/jpsreport/blob/develop/scripts/correct_trajectories.py

From #464:

Is your feature request related to a problem? Please describe.
Sometimes some points are outside the walkable area.
PedPy can flag trajectories as invalid. If the user goes on and tried to calculate, say Voronoi Diagrams, then there will be a cryptic error message.

Image

Describe the solution you'd like
Maybe it would be nice, in this case to find these points and project them back in the walkable area.

Describe alternatives you've considered
Another solution may be to remove these points. This is not ideal, but probably worth it, especially if only a few points are involved.

Additional context
Attached is a script that implements the proposed solution.

trajectory_bender_obstacles.zip

Metadata

Metadata

Assignees

Labels

pre-processingAnything related to pre-processing the datausabilityAnything increasing the usablity

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions