Abstract: We propose two novel motion planners for a robotic manipulator with a passive end-effector that is free to sway during and after the robot’s motion. The planners utilize Dynamic Programming to generate trajectories that damp the end-effector’s residual sway while ensuring that the boom tip—the point to which the end-effector is attached—follows a collision-free path or time-dependent waypoints. Our use case is a crane of a forwarder machine, a log-loading machine in the forestry industry, with a passive grapple. In the cluttered forest environment, accurate path following and grapple sway damping are critical to increase the operation efficiency and avoid harming the machine and environment. The results of the simulation in a high-fidelity multibody-dynamics simulator showcase the effectiveness of our methodology in achieving exact path following or timed waypoints following and the residual sway damping. In particular, an average reduction of 75% in the residual sway is demonstrated, as compared to fifth, sixth, and tenth order polynomial trajectories, in six test cases, including common paths used by operators to pick and place logs. Other merits of our Dynamic Programming trajectories are that they are smooth, computationally inexpensive, and result in reduced residual sway even for nonzero initial sway conditions. Moreover, the generality of our methodology opens a new way to design anti-sway motion planners for construction cranes or quadrotors with a slung payload, in addition to serial manipulators with passive end-effectors. Note to Practicioners: This work was motivated by the problems arising in the operation of log-loading cranes in the forestry industry: the problems of the end-effectorâ\euro™s large sway during crane reconfiguration and the collision between the crane and obstacles, which are detrimental to the efficiency of the operation. Similar issues arise, for example, in construction cranes transporting large hanging objects. We propose a novel methodology to address both problems by generating smooth and computationally inexpensive trajectories for joint motion of the crane. The approach begins with the model of the sway motion and the definition of the collision-free path. Then, our Dynamic Programming algorithm generates anti-sway trajectories that satisfy the joint constraints. The results in a high-fidelity simulator show that our motion planners lead to precise path following and significant sway damping, and also confirm its superiority compared to polynomial trajectories, commonly used in industries. Our methodology is also applicable to other dynamic systems with freely hanging objects, such as multi-degree-of-freedom robotic manipulators, construction cranes, and quadrotors carrying a slung payload. A possible limitation is that the methodology necessitates finding the sway dynamics model and payload properties of these systems.