1. A carrier comprising: a carrier main body that travels on a pathway; a distance measuring sensor that is provided in or on the carrier main body, and measures an intensity of reflected light a plurality of times to obtain a plurality of pieces of measured data; a storage that stores map data in which structures provided along the pathway are recorded; and a controller programmed or configured to: calculate respective reference points corresponding to respective sets of measured data with a light intensity greater than or equal to a predetermined threshold among the plurality of pieces of measured data, calculate a position of the carrier main body by matching a straight line connecting a plurality of the respective sets of the measured data to a straight line of the map data, connect a plurality of the respective reference points that are adjacent to each other in order to create the straight line connecting the plurality of the respective sets of the measured data, and control the carrier main body to automatically travel on the pathway based on the calculated position of the carrier main body.