convex_sweep_test() collision detection

Hi there,
I’m still working on my bachelor thesis with the Blender part. I got a collision detection working in Python with convex_sweep_test. At the moment the ‘head’(Messkopf) of the robot is checked for collision with the floor. The collisions with the floor are correctly detected but it also detects a collision with him self(3d Cursor jumps to detected collision) and I don’t know why. I tested constraints and every option I found but still the same problem.

Hopefully someone can help. For testing the collisions you have to run the script first for the handler and than play the animation.
robot-testing.blend (3.96 MB)