Efficient Collision Detection Framework for Enhancing Collision-Free Robot Motion