Robot Trajectory Direct Collocation with Conditional Constraints for Optimal Phase Transitions | Synapse