In cruise ship manufacturing, it is common practice for prefabricated modular cabin units (PMCU) to be assembled in the workshop and transported to a designated installation location on board the ship. This paper proposed a Radau pseudospectral method based on a probabilistic roadmap (PRM) for PMCU path planning in complex deck environments. Firstly, a kinematic model is constructed, and the continuous-time optimal control path planning problem is established. Among them, an area-based obstacle avoidance constraint is applied to the approach. Then, the continuous-time optimal control problem is discretized into a nonlinear programming (NLP) problem using the orthogonal collocation method. For the initial value-sensitive NLP problem solving, a strategy using PRM combined with a heuristic rule is used to obtain a high-quality initial guess. Finally, experiments under two operating scenarios of PMCU pushing demonstrate that the method is capable of generating a better path while ensuring that the whole process is collision-free. The results show that the algorithm proposed in this paper can effectively solve the PMCU pushing path planning problem in the complex deck environment, and the path considering kinematic characteristics can be used for cabin installation, which has strong operability and applicability.