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

Remove rescaling of agent coordinates #101

Merged
merged 1 commit into from
May 6, 2024
Merged

Conversation

aaravpandya
Copy link
Collaborator

No description provided.

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
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
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
1 check passed
@aaravpandya aaravpandya deleted the ap_RemoveCenteringAgents branch October 4, 2024 03:19
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