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

How to filter vehicles? #8

Closed
123yu456 opened this issue Apr 16, 2024 · 2 comments
Closed

How to filter vehicles? #8

123yu456 opened this issue Apr 16, 2024 · 2 comments

Comments

@123yu456
Copy link

If I want to filter the vehicle trajectories in the dataset to only include lane-changing trajectory data, how should I proceed? Could you give me some advice? 1. If I want to filter the vehicles in the dataset to only study those with lane-changing behavior, what code modifications would be involved in the data processing part? 2. I want to narrow down the selection range of surrounding vehicles, changing the original range of 50 meters to the preceding and following vehicles before and after the target vehicle changes lanes. Where should I make these modifications? I tried to change it myself but failed. I would greatly appreciate your advice. Thank you!

@MCZhi
Copy link
Owner

MCZhi commented Apr 17, 2024

I guess you can just run the dump_data.py and use ngsim = ngsim_data('us-101'); ngsim.load('processed/us-101') to load the data as scenarios. This will allow you to access the trajectory data of all vehicles, including the ability to filter vehicles with lane-changing actions or select preceding and following vehicles.

@123yu456
Copy link
Author

Sorry, I'm having a hard time understanding your question. My coding skills are very basic, and I'm struggling to modify the code to focus only on vehicles with lane-changing behavior and to narrow down the range of surrounding vehicles. After looking through the code, I'm not sure where to find the relevant content to make these modifications. Feeling helpless, I turned to you for help. Additionally, I found some code online that others used to filter the NGSIM dataset, but I'm unsure how to integrate it into your code or where to add it.

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

2 participants