Ros shared lib base class

As its only 3 locations we might get away with it in this case.