A control device for controlling a vehicle lamp mounted in a vehicle , the device comprising: a receiver configured to receive an output value from an inclination sensor mounted in the vehicle ; and a controller configured to control an optical axis (O) of the vehicle lamp based on a vehicle attitude angle (θv) that is an inclination angle of the vehicle with respect to a road surface, which is obtained from the output value, wherein the controller is configured to control the optical axis in a first optical axis control mode or a second optical axis mode, wherein an optical axis angle (θo) of the optical axis is adjusted in accordance with the obtained vehicle attitude angle (θv) in the first optical axis mode, and the second optical axis control mode is different from the first optical axis control mode, wherein the controller controls the optical axis in the second optical axis control mode, when the obtained vehicle attitude angle (θv) or the optical axis angle (θo) corresponding to the obtained vehicle attitude angle (θv) is not included in a predetermined range (R1, R1') or when a difference between the obtained vehicle attitude angle and a previous vehicle attitude angle used in previous optical axis control or a difference between a position of the optical axis corresponding to the obtained vehicle attitude angle and a current position of the optical axis is larger than a predetermined threshold value (R2, R2'), wherein a total angle (θ) that is an inclination angle of the vehicle with respect to a horizontal plane is obtained from the output value of the inclination sensor, wherein the total angle (θ) comprises: a road surface angle (θr) that is an inclination angle of the road surface with respect to the horizontal plane; and the vehicle attitude angle (θv), and wherein the controller is configured to calculate the vehicle attitude angle (θv) from the total angle (θ) and control the optical axis based on the obtained vehicle attitude angle. a receiver configured to receive an output value from an inclination sensor mounted in the vehicle ; and a controller configured to control an optical axis (O) of the vehicle lamp based on a vehicle attitude angle (θv) that is an inclination angle of the vehicle with respect to a road surface, which is obtained from the output value, wherein the controller is configured to control the optical axis in a first optical axis control mode or a second optical axis mode, wherein an optical axis angle (θo) of the optical axis is adjusted in accordance with the obtained vehicle attitude angle (θv) in the first optical axis mode, and the second optical axis control mode is different from the first optical axis control mode, wherein the controller controls the optical axis in the second optical axis control mode, when the obtained vehicle attitude angle (θv) or the optical axis angle (θo) corresponding to the obtained vehicle attitude angle (θv) is not included in a predetermined range (R1, R1') or when a difference between the obtained vehicle attitude angle and a previous vehicle attitude angle used in previous optical axis control or a difference between a position of the optical axis corresponding to the obtained vehicle attitude angle and a current position of the optical axis is larger than a predetermined threshold value (R2, R2'), wherein a total angle (θ) that is an inclination angle of the vehicle with respect to a horizontal plane is obtained from the output value of the inclination sensor, wherein the total angle (θ) comprises: a road surface angle (θr) that is an inclination angle of the road surface with respect to the horizontal plane; and the vehicle attitude angle (θv), and wherein the controller is configured to calculate the vehicle attitude angle (θv) from the total angle (θ) and control the optical axis based on the obtained vehicle attitude angle. <EOS>