## 1 Introduction
However, in the prefabricated cabin pushing process, the passable space is already small, using the obstacle expansion method will lead to the original passable path which cannot be passed, and the spatial corridor method cannot fully describe the attitude; the planned path is likely to be impassable. Therefore, the above conventional methods cannot be applied to the path planning of PMCU pushing. In order to take the external contour collision constraints and kinematic constraints into account in path planning, we use optimal control techniques to describe the PMCU path planning problem. Optimal control techniques describe the path planning problem and constraints as a mathematical model to obtain a path that satisfies the state and control constraints and meets the corresponding performance indexes in continuous time [28]. The method has achieved applications in the field of path planning for intelligent robot motion [29], autonomous driving [30], UAV [31], USV [32], and carrier aircraft routing [26; 33]. Generally, it is difficult to obtain the optimal solution of the optimal control problem [34]. The common methods for solving continuous-time optimal control with constraints are the direct method  
Figure 1: A PMCU and transfer device. (**A**) A prefabricated manufactured modular cabin unit. (**B**) Transfer device of PMCU. (**C**) PMCU transportation. and the indirect method [35]. The indirect method is usually used to determine the optimal solution indirectly by using the necessary condition for obtaining the extreme value combined with the sufficiency condition. The indirect method mainly includes Pontryagin's maximum principle as well as the variational method. Although the indirect method has relatively high accuracy, it is computationally inefficient and difficult to converge when solving complex problems [36; 37]. In contrast, the direct method has stronger applicability by discretizing the time variables of the continuous optimal control problem and then transforming the NLP problem for solving. Among many methods, the pseudospectral method has been widely used in the field of path planning and trajectory optimization [38; 39; 40]. The method uses a global polynomial function as the basis function to interpolate the control and state over a series of discrete configuration points to approximate them, and then satisfies the path constraints and boundary conditions at each collocation point and solves for the cost function. Typically, the optimal solution obtained by this method is close to the analytical solution of the optimal control problem. [PERSON] et al. [41] designed a vehicle fast steering obstacle avoidance planning method based on the pseudospectral method to solve the optimal control problem of intelligent vehicle obstacle avoidance, which takes obstacle avoidance time as the optimal control objective. [PERSON] et al. [42] used the adaptive pseudospectral method to realize the obstacle avoidance of AUV docking operations by considering the dynamic interference factors in the AUV motion environment. [PERSON] et al. [43] proposed a pseudospectral hair-based UAV cluster path planning method for the cooperative flight path planning problem of multiple UAVs and realized the optimization of multiple performance targets for a UAV cluster flight. However, most of the obstacle collision constraints considered in the above study can be summarized as center distance constraints, which are more applicable to circular, cylindrical, or spherical obstacles but are not applicable in the cruise ship deck space with a complex multi-obstacle environment. However, most obstacles in the process of PMCU pushing are rectangular in shape. In addition, the pseudospectral method is sensitive to the initial value. In the complex deck environment of PMCU pushing, the low-quality initial value will greatly affect the path accessibility. Therefore, the existing method cannot be directly applied to the solution of the PMCU pushing path planning problem, in fact.