Robotic tube for surgery autonomously navigates inside a beating heart