Planning and optimization of collaborative robot motions for collision resolution in a limited operating space | Synapse