Numerical ``direct'' approaches to time-optimal control often fail to find solutions that are singular in the sense of the Pontryagin Maximum Principle. These approaches behave better when searching for saturated (bang-bang) solutions. In previous work by one of the authors, singular solutions were theoretically shown to exist for the time-optimal problem for two-link manipulators under hard torque constraints. The theoretical results gave explicit formulas, based on Lie theory, for singular segments of trajectories, but the global structure of solutions remains unknown. In this work, we show how to effectively combine these theoretically found formulas with the use of general-purpose optimal control softwares. By using the explicit formula given by theory in the intervals where the numerical solution enters a singular arcs, we not only obtain an algebraic expression for the control in that interval, but we are also able to remove artifacts present in the numerical solution. In this way, the best features of numerical algorithms and theory complement each other and provide a better picture of the global optimal structure. We showcase the technique on a 2 degrees of freedom robotic arm example, and also propose a way of extending the analyzed method to robotic arms with higher degrees of freedom through partial feedback linearization, assuming the desired task can be mostly performed by a few of the degrees of freedom of the robot and imposing some prespecified trajectory on the remaining joints. |