Remove vehicles with invalid positions and invalid goals from controlled vehicles #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem description
In the
env.reset()
function, vehicles in invalid positions are removed from the scene but are still added toself.controlled_vehicles
. This leads to invalid samples (invalid observations) that cause three issues:env.step(.)
is called.This fix (details below) reduces the number of invalid samples from 4.62% to 0.34% (the total number of scenes is 1000). The variable "self.invalid_samples" tracks the number of invalid samples.
Steps to reproduce
data_path: ./data_full/train
inenv_config
Code:
Logs
Solution
Added booleans to make sure vehicles at invalid positions and with invalid goals are not included in
self.controlled_vehicles
Questions
env.step()
function, where a vehicle's position is sometimes invalid (the position is -10,000), but then becomes normal again in the next step. Do you have any idea where this issue could be coming from?