Planning of arm movements