Motion planning for manipulator handling sheet metal profiles