Abstract: A method for controlling a boom of a crane in proximity of obstacles at a worksite by defining a forbidden volume is disclosed. In the method a distance from the boom to an outer surface of the forbidden volume is determined and a computing device limits movement of the boom based on the distance from the boom to the outer surface of the forbidden volume to avoid entering the forbidden volume with the boom while the crane is in operation.