Rocks and huge tree branches have been placed alongside a large city park in a bid to stop illegal Traveller encampments.