srobo / competition-simulator

A simulator for Student Robotics Virtual Competitions
https://studentrobotics.org/docs/simulator/
MIT License
8 stars 2 forks source link

Disable physics on markers so things can't get stuck to tokens #434

Closed PeterJCLaw closed 9 months ago

PeterJCLaw commented 9 months ago

This prevents an issue where parts of the robot grabber could get stuck on the side of tokens, we believe due to the grabber getting "between" the marker and the token physics objects. Disabling the physics on the marker means we can't have a bounding box there, which in turn means the visible bounds of the recognition objects are quite a bit wider than they ought to be.

Happily that doesn't affect the parts of the vision data that we present to competitors. It does affect our occlusion logic though, meaning that we need to disable that. From what I can recall our inclusion of that was a workaround for recognition objects being visible through other recognition objects, which is not an issue now that we have distinct entities for the recognition objects (i.e: markers) and the things they're attached to (tokens, props, etc.).

Builds on #433.

Adimote commented 9 months ago

I verified that this works, I cannot reproduce the issue of markers getting stuck, and it looks like the marker IDs do still follow occlusion rules