Skip to content

Dont init invalid agents at first time step. - #130

Merged
aaravpandya merged 4 commits into
mainfrom
ap_FixStaticInit
May 23, 2024
Merged

aaravpandya merged 4 commits into
mainfrom
ap_FixStaticInit

Conversation

@aaravpandya

@aaravpandya aaravpandya commented May 22, 2024

Copy link
Copy Markdown
Collaborator

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
Comment thread src/bindings.cpp Outdated
.def_rw("IgnoreNonVehicles", &Parameters::IgnoreNonVehicles)
.def_rw("roadObservationAlgorithm", &Parameters::roadObservationAlgorithm);
.def_rw("roadObservationAlgorithm", &Parameters::roadObservationAlgorithm)
.def_rw("initInvalidAgentsAtFirstStep", &Parameters::initInvalidAgentsAtFirstStep);

@eugenevinitsky eugenevinitsky May 23, 2024

Copy link
Copy Markdown
Contributor

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

@eugenevinitsky eugenevinitsky left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread src/init.hpp Outdated
bool IgnoreNonVehicles = false; // Default: false
FindRoadObservationsWith roadObservationAlgorithm{
FindRoadObservationsWith::KNearestEntitiesWithRadiusFiltering};
bool initOnlyValidAgentsAtFirstStep = true; // Default: false

Copy link
Copy Markdown
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
Copy Markdown
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
@aaravpandya
aaravpandya deleted the ap_FixStaticInit branch October 4, 2024 03:20
wangbingke0 pushed a commit to wangbingke0/gpudrive that referenced this pull request Feb 13, 2026
* Dont init agents if not valid on first timestep

* Add param

* Change name and fix test

* Change comment
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