Real-time Collision Avoidance for Robot Manipulators by Braking Trajectory Prediction