Fence Generation - TomHulme/306-Swarm-Robotics-Project GitHub Wiki

Overview

Fences in the world file are generated by a variety of well-placed blocks, dynamically arranged to form boxes. They are z-deep enough to be sensed by both sheepdog and farmer lasers, so they form boundaries around fields of different sheep.

The problem was that world files using the boundary of a floorplan model to create the fence did not cater for gaps in the fence.

World Generator

The python script used to generate world files is explained here. The following is the workflow of generating fences:

  1. Iterate through each field.
  2. Build the horizontal and vertical edges of the fence on each side.
  3. Proceed to create corners out of half-length pieces.
  4. Skip out gaps for gates.
  5. Create bottom alleyway.