In today’s space environment, the number of tumbling objects such as abandoned satellites, uncontrolled spacecraft, and space debris has increased dramatically. Therefore, in-orbit services such as maintenance, recovery, and capture of rolling targets is an urgent topic that needs to be explored. In this paper, for the mission of spacecraft approaching the tumbling target at close range, the trajectory planning method is studied by using the high-precision relative equation of motion as the orbital dynamic model. Firstly, the error of the relative equation of motion of the center of mass is analyzed, and a method to improve the accuracy of the C-W (Clohessy-Wiltshire) equation is considered to construct a higher-precision orbital dynamics model. The constraints such as attitude dynamics, line-of-sight range, control ability and keep-out zone are mathematically described, and the optimal control problem of pose synchronization is established. On this basis, this paper takes the traditional C-W equation and the improved C-W equation as the relative motion models of the centroids, and, based on the adaptive pseudospectral method and sequential convex optimization, solves the position and attitude synchronization planning problem. This article focuses on analyzing the errors of the C-W equation before and after improvement, as well as the impact of linearization on these errors, studies the accuracy improvement brought by the improved equation and the safe obstacle avoidance of position and attitude trajectories, and compares the advantages and disadvantages of the two methods. Simulations verify the accuracy and efficiency of this trajectory optimization algorithm and confirm the accuracy improvement of the improved C-W equation. The improved C-W equation has significant application potential in trajectory planning tasks in complex orbital environments with high-precision requirements.