Motor temperature limitation by joint torque