Skip to content

Remove rescaling of agent coordinates#101

Merged
aaravpandya merged 1 commit into
mainfrom
ap_RemoveCenteringAgents
May 6, 2024
Merged

Remove rescaling of agent coordinates#101
aaravpandya merged 1 commit into
mainfrom
ap_RemoveCenteringAgents

Conversation

@aaravpandya

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread src/level_gen.cpp
Comment on lines +80 to 81
trajectory.positions[i] = Vector2{.x = agentInit.position[i].x - ctx.data().mean.x, .y = agentInit.position[i].y - ctx.data().mean.y};
trajectory.velocities[i] = Vector2{.x = agentInit.velocity[i].x, .y = agentInit.velocity[i].y};

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.

what's happening here?

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.

For each position in the trajectory, we subtract the precomputed means. The mean is computed over all the positions of all the trajectories while ignoring the invalid positions.

We also subtract the same means from road object positions and goal positions. So everything is translated by the same amount.

@aaravpandya aaravpandya merged commit 870252a into main May 6, 2024
@aaravpandya aaravpandya deleted the ap_RemoveCenteringAgents branch October 4, 2024 03:19
wangbingke0 pushed a commit to wangbingke0/gpudrive that referenced this pull request Feb 13, 2026
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.

3 participants