Most robot lawn mowers either have obstacle detection or bumpers, much like a Roomba. If they see or bump into a tree they will just pivot away and keep ongoing. If you do have trees, however, it's worth looking out for large roots protruding as there is a chance a mower could get stuck on one.