DelftMercurians / cotix

Continuous-time, differentiable RL environments
MIT License
0 stars 1 forks source link

Support for composite shape #34

Closed knyazer closed 1 year ago

knyazer commented 1 year ago

So, now there is a mega-class that incorporates into itself all the logic about shapes: UniversalShape. The point is that now Body does not care about transformation/etc (well, only a tiny bit), and UniversalShape does everything else: effectively UniversalShape is just a bunch (possibly a single one) of convex shapes, and it allows to check whether there is a collision with another universal shape, find penetration depth from the collision metadata (simplex + particular convex shapes that had the collision), and apply transforms between local and global coordinate systems

knyazer commented 1 year ago

There might be issues if we have a collision between multiple convex parts of two UniversalShapes: then we are effectively dead anyway, since we are not resolving constraints explicitly, thus we cannot 'correctly' resolve multiple-collision of the same shape. I don't really know what to do, maybe randomization could help, but I think we need experiments with real simulation to see what works best

knyazer commented 1 year ago

Btw, there is a really high chance that we gonna have issues with static PyTrees: but that is an issue for later, it can be resolved when it appears...