In the free-floating mode, there is intense dynamic coupling existing between the space manipulator and the base, and the base attitude may change while performing a motion with its manipulator. Therefore, it is necessary to reduce the interference that resulted from the manipulator movement. For planning trajectories of the space manipulator with 7 degrees of freedom (7-DOF), simulated annealing particle swarm optimization (SAPSO) algorithm is presented in the paper. Firstly, kinematics equations are setup. Secondly, the joint functions are parameterized by sinusoidal functions, and the objective function is defined according to the motion constraints of manipulator and accuracy requirements of the base attitude. Finally, SAPSO algorithm is used to search the optimal trajectory. The simulation results verify the proposed method.