Imported from https://github.com/rrahmati/roboinstruct-2