erwincoumans / tiny-differentiable-simulator

Tiny Differentiable Simulator is a header-only C++ and CUDA physics library for reinforcement learning and robotics with zero dependencies.
Apache License 2.0
1.2k stars 129 forks source link

Capsule-sphere collides at closest point on segment. #201

Open jotix16 opened 2 years ago

jotix16 commented 2 years ago

Computes collision by first getting the point on the capsule-segment that is closest to the sphere-center. Uses clamp to avoid branches.

Secondary: tiny_vector3.h: change API according to Eigen geometry.hpp: Capsule can compute the position of tip & base given the pose