Embedded solutions for a class of highly unstable, underactuated and self-balancing robotic systems