#NEWLINE# def loadRigidBodyTree( urdfFile ) : #NEWLINE# #INDENT# assert os . path . isfile ( urdfFile ) #NEWLINE# packageMap = pydrake . rbtree . mapStringString ( ) #NEWLINE# for path in roboturdf . getBuiltinPackagePaths ( ) : #NEWLINE# #INDENT# packageMap [ os . path . basename ( urdfString ) ] = path #NEWLINE# #UNINDENT# urdfString = open ( urdfFile , 'r' ) . read ( ) #NEWLINE# rigidBodyTree = pydrake . rbtree . RigidBodyTree ( ) #NEWLINE# rigidBodyTree . addRobotFromURDFString ( urdfString , packageMap ) #NEWLINE# return rigidBodyTree