robin charles scherbatsky jr. is a fictional character created by carter bays and craig thomas for the cbs television series "how i met your mother", portrayed by actress cobie smulders. robin is the on-again, off-again love interest of barney stinson (neil patrick harris) and ted mosby (josh radnor), and a close friend to lily aldrin (alyson hannigan) and marshall eriksen (jason segel).