Skip to content

Commit

Permalink
Add more collision scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
aaravpandya committed Mar 14, 2024
1 parent 98b4b7a commit 74ccf65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/sim.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,24 @@ struct Sim : public madrona::WorldBase {
madrona::InlineArray<std::pair<EntityType, EntityType>, 64> collisionPairs;
collisionPairs.push_back({EntityType::Pedestrian, EntityType::Pedestrian});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::RoadEdge});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::Cyclist});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::RoadLine});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::RoadLane});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::CrossWalk});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::SpeedBump});
collisionPairs.push_back({EntityType::Pedestrian, EntityType::StopSign});
collisionPairs.push_back({EntityType::Cyclist, EntityType::Pedestrian});
collisionPairs.push_back({EntityType::Cyclist, EntityType::RoadEdge});
collisionPairs.push_back({EntityType::Cyclist, EntityType::Cyclist});
collisionPairs.push_back({EntityType::Cyclist, EntityType::RoadLine});
collisionPairs.push_back({EntityType::Cyclist, EntityType::RoadLane});
collisionPairs.push_back({EntityType::Cyclist, EntityType::CrossWalk});
collisionPairs.push_back({EntityType::Cyclist, EntityType::SpeedBump});
collisionPairs.push_back({EntityType::Cyclist, EntityType::StopSign});
collisionPairs.push_back({EntityType::Vehicle, EntityType::CrossWalk});
collisionPairs.push_back({EntityType::Vehicle, EntityType::SpeedBump});
collisionPairs.push_back({EntityType::Vehicle, EntityType::RoadLine});
collisionPairs.push_back({EntityType::Vehicle, EntityType::RoadLane});
// TODO: Break Cube into road types for better control over collisions
return collisionPairs;
}
Expand Down

0 comments on commit 74ccf65

Please sign in to comment.