-
Notifications
You must be signed in to change notification settings - Fork 20
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
Dont init invalid agents at first time step. #130
Conversation
a1bca91
to
02fff3b
Compare
src/bindings.cpp
Outdated
@@ -51,7 +51,8 @@ namespace gpudrive | |||
.def_rw("collisionBehaviour", &Parameters::collisionBehaviour) | |||
.def_rw("maxNumControlledVehicles", &Parameters::maxNumControlledVehicles) | |||
.def_rw("IgnoreNonVehicles", &Parameters::IgnoreNonVehicles) | |||
.def_rw("roadObservationAlgorithm", &Parameters::roadObservationAlgorithm); | |||
.def_rw("roadObservationAlgorithm", &Parameters::roadObservationAlgorithm) | |||
.def_rw("initInvalidAgentsAtFirstStep", &Parameters::initInvalidAgentsAtFirstStep); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think I'd call this initOnlyValidAgentsAtFirstStep (though you have to flip true->False, false->true to match the semantics of this name change). The reason is that you can't initInvalidAgents at the first step, they don't exist until later to the user even if they exist inside the sim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion to reverse the semantics but otherwise sg
src/init.hpp
Outdated
@@ -111,6 +111,7 @@ namespace gpudrive | |||
bool IgnoreNonVehicles = false; // Default: false | |||
FindRoadObservationsWith roadObservationAlgorithm{ | |||
FindRoadObservationsWith::KNearestEntitiesWithRadiusFiltering}; | |||
bool initOnlyValidAgentsAtFirstStep = true; // Default: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default is true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you are right :D Missed the comment.
We dont init agents that are invalid at the first time step.