This article presents a dual-optimization trajectory planning algorithm, which consists of the optimal path planning and the optimal motion profile planning for robot manipulators, where the path planning is based on parametric curves. In path planning, a virtual-knot interpolation is proposed for the paths required to pass through all control points, so the common curves, such as Bézier curves ... [Show full abstract] and B-splines, can be incorporated into it. Besides, an optimal B-spline is proposed to generate a smoother and shorter path, and this scheme is especially suitable for closed paths. In motion profile planning, a generalized formulation of time-optimal velocity profiles is proposed, which can be implemented to any types of motion profiles with equality and inequality constraints. Also, a multisegment cubic velocity profile is proposed by solving a multiobjective optimization problem. Furthermore, a case study of a dispensing robot is investigated through the proposed dual-optimization algorithm applied to numerical simulations and experimental work.