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

Dont init invalid agents at first time step. #130

Merged
merged 4 commits into from
May 23, 2024
Merged

Conversation

aaravpandya
Copy link
Collaborator

@aaravpandya aaravpandya commented May 22, 2024

We dont init agents that are invalid at the first time step.

@aaravpandya aaravpandya reopened this May 23, 2024
@aaravpandya aaravpandya removed the request for review from eugenevinitsky May 23, 2024 00:50
@aaravpandya aaravpandya changed the title Check the first valid state against goal Dont init invalid agents at first time step. May 23, 2024
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);
Copy link
Contributor

@eugenevinitsky eugenevinitsky May 23, 2024

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

Copy link
Contributor

@eugenevinitsky eugenevinitsky left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default is true?

Copy link
Collaborator Author

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.

@aaravpandya aaravpandya merged commit 22d2db1 into main May 23, 2024
1 check passed
@aaravpandya aaravpandya deleted the ap_FixStaticInit branch October 4, 2024 03:20
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

Successfully merging this pull request may close these issues.

2 participants