Octree-based hierarchical distance maps for collision detection