Optimal Proactive Path Planning for Collaborative Robots in Industrial Contexts