A robot, comprising an arm supporting part, a rotary arm rotatably supported by the arm supporting part, a gas balancer configured to reduce a rotational load of the rotary arm, a pressure sensor configured to measure a pressure of gas in the gas balancer, and a gas pressure detection device configured to detect a decrease in the pressure of the gas of the gas balancer,
- wherein the gas pressure detection device includes:
- a calculating part configured to calculate a parameter Rt(θ) indicating a magnitude relation between a reference pressure Pa(θ) at a rotational angle θ of the rotary arm and a measured pressure Pt(θ) measured at the rotational angle θ by the pressure sensor, calculate a plurality of parameters Rt(θ) based on a plurality of measured pressures Pt(θ) at different measurement times, and calculate a moving average Rtj(θ) of the parameter Rt(θ) at a measurement time tj that is a j-th measurement time of the measured pressure Pt(θ), j representing a natural number of 2 or above;
- a determining part configured to compare the moving average Rtj(θ) with a reference value R to detect the decrease in the pressure of the gas;
- and
- a stopping part configured to stop the robot when the moving average Rtj(θ) is below the reference value R.