Skip to content

Fix collision behaviours#111

Merged
aaravpandya merged 4 commits into
mainfrom
ap_collisionBehaviours
May 12, 2024
Merged

Fix collision behaviours#111
aaravpandya merged 4 commits into
mainfrom
ap_collisionBehaviours

Conversation

@aaravpandya

@aaravpandya aaravpandya commented May 9, 2024

Copy link
Copy Markdown
Collaborator

This PR intends to ignore collisions when objects are teleported away and they are NON VALID EXPERTS. That is they are not padding entities or teleported away because of prior collision.

Also, smaller changes included here adds a return statement to the teleport condition and zeroes out the velocity of the agent in the agent stop condition (This happens anyways due to the zerovel system but is now explicitly done.)

Also, adds a small condition to the info tensor if its not updated in the tracking system.

@aaravpandya aaravpandya marked this pull request as ready for review May 9, 2024 16:47
Comment thread src/sim.cpp
void collisionDetectionSystem(Engine &ctx,
const CandidateCollision &candidateCollision) {

// Technically there would never be a collision between (non valid expert) and (non expert). So one of the below checks would always be false.

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.

Emphasis on NON VALID expert here.

Comment thread src/sim.cpp Outdated
if(e.data().params.collisionBehaviour == CollisionBehaviour::AgentStop) {
velocity.linear.x = 0;
velocity.linear.y = 0;
velocity.linear.z = fminf(velocity.linear.z, 0);

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.

why would we want to possibly return negative z velocity?

@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.

LGTM except for comment!

@aaravpandya aaravpandya merged commit 351e6a4 into main May 12, 2024
@aaravpandya aaravpandya deleted the ap_collisionBehaviours branch May 12, 2024 17:07
wangbingke0 pushed a commit to wangbingke0/gpudrive that referenced this pull request Feb 13, 2026
* init

* Make vel zero on agent stop

* Make sure info is updated

* Dont allow negative z vel
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