An attitude algorithm method based on improved particle filtering is proposed in the study of robot inertial navigation.The method is aiming at the problem that there is large error when the traditional filters works in nonlinear systems. Compared with the traditional extended Kalman filter,particle filtering has a huge advantage that it is not affected by the the level of nonlinear system model and it has high accuracy in nonlinear system. Extended Kalman filter is used to update the state, so that the particles can move to the high likelihood area. A improved resampling method is proposed to improve the efficiency. The system noise will change when the robot run at different ground conditions. The parameter is modified according to the ground conditions to obtain higher precision.The results of experiments show that the attitude reached high precision and performed well.