The paper is aimed at generating optimal swing motions during the single-su
pport phase of sagittal gait. Unlike the previous Part 1 which deals with p
assive motions, all joints of the biped are assumed to be active in the pre
sent Part 2. The final conditions specify an impactless heel-touch in order
to avoid a destabilizing effect on the biped motion. As the biped is essen
tially submitted to gravity forces, the motion is generated by minimizing t
he joint actuating torques. Feasible motions are defined by state inequalit
y constraints limiting joint motions, and defining foot clearance and obsta
cle avoidance during the swing. The optimization problem is dealt with usin
g Pontryagin's Maximum Principle. A final two-point boundary value problem
is solved by implementing a shooting method. The approach presented is illu
strated by various numerical simulations applying to a seven-body planar bi
ped which has four or five active joints during the swing phase.