Have you tried:
wp_set_object_terms( $postId, array( 'obrazek'), 'rodzaj' );
wp_set_object_terms
and wp_set_post_terms
take the same arguments. wp_set_post_terms
even uses wp_set_object_terms internally. The main difference being that you used an array in the one that worked, and you didn’t use an array in the one that didn’t work.