Today’s invention is a mobile fort.
In the middle is a green tank. This carries an outer, almost-circular wall, with a hollow interior and a chisel-pointed scoop at one point (red).
At a chosen location, the tank spins (anti-clockwise) around its vertical axis. This causes the chisel to scoop up a shallow trench of earth into the wall. Repeated circling part-fills the wall and embeds it into the ground. Further filling of the wall, manually or by bulldozer, would reinforce this barrier.
Thus a circular wall is created which can accommodate the tank as a gun emplacement. A wider gap in the wall would allow the tank to withdraw and the fort could be filled with field guns or troops.
A version of this might use the rotation of the tank’s turret only.