An agricultural machine comprising: a traveling vehicle body to travel; a detector to detect objects in a surrounding area of the traveling vehicle body; a detection adjuster to adjust a detection direction of the detector; a positioning device to measure a position of the traveling vehicle body; and an information acquirer to acquire information relating to an entrance/exit of an agricultural field, wherein the detection adjuster performs: a first adjustment when the traveling vehicle body is traveling toward the entrance/exit and a distance from the position of the traveling vehicle body detected by the positioning device to a position of the entrance/exit contained in the information relating to the entrance/exit acquired by the information acquirer is equal to or less than a predetermined value, the first adjustment being an adjustment in which the detection adjuster orients the detection direction toward an end point (SLe) of the entrance/exit; and a second adjustment when the traveling vehicle body is traveling on the entrance/exit, the second adjustment being an adjustment in which the detection adjuster orients the detection direction toward the end point (SLe) of the entrance/exit or a space forward of the end point (SLe) in a direction of travel of the traveling vehicle body. a traveling vehicle body to travel; a detector to detect objects in a surrounding area of the traveling vehicle body; a detection adjuster to adjust a detection direction of the detector; a positioning device to measure a position of the traveling vehicle body; and an information acquirer to acquire information relating to an entrance/exit of an agricultural field, wherein the detection adjuster performs: a first adjustment when the traveling vehicle body is traveling toward the entrance/exit and a distance from the position of the traveling vehicle body detected by the positioning device to a position of the entrance/exit contained in the information relating to the entrance/exit acquired by the information acquirer is equal to or less than a predetermined value, the first adjustment being an adjustment in which the detection adjuster orients the detection direction toward an end point (SLe) of the entrance/exit; and a second adjustment when the traveling vehicle body is traveling on the entrance/exit, the second adjustment being an adjustment in which the detection adjuster orients the detection direction toward the end point (SLe) of the entrance/exit or a space forward of the end point (SLe) in a direction of travel of the traveling vehicle body. a first adjustment when the traveling vehicle body is traveling toward the entrance/exit and a distance from the position of the traveling vehicle body detected by the positioning device to a position of the entrance/exit contained in the information relating to the entrance/exit acquired by the information acquirer is equal to or less than a predetermined value, the first adjustment being an adjustment in which the detection adjuster orients the detection direction toward an end point (SLe) of the entrance/exit; and a second adjustment when the traveling vehicle body is traveling on the entrance/exit, the second adjustment being an adjustment in which the detection adjuster orients the detection direction toward the end point (SLe) of the entrance/exit or a space forward of the end point (SLe) in a direction of travel of the traveling vehicle body.