def __init__(self, filename, package_dirs=None, root_joint=None, verbose=False): if root_joint is None: self.model = se3.buildModelFromUrdf(filename) else: self.model = se3.buildModelFromUrdf(filename, root_joint) self.data = self.model.createData() self.model_filename = filename if "buildGeomFromUrdf" not in dir(se3): self.collision_model = None self.visual_model = None self.collision_data = None self.visual_data = None if verbose: print 'Info: the Geometry Module has not been compiled with Pinocchio. No geometry model and data have been built.' else: if package_dirs is None: self.collision_model = se3.buildGeomFromUrdf(self.model, filename) self.visual_model = se3.buildGeomFromUrdf(self.model, filename) else: if not all(isinstance(item, basestring) for item in package_dirs): raise Exception('The list of package directories is wrong. At least one is not a string') else: self.collision_model = se3.buildGeomFromUrdf(self.model, filename, utils.fromListToVectorOfString(package_dirs), se3.GeometryType.COLLISION) self.visual_model = se3.buildGeomFromUrdf(self.model, filename, utils.fromListToVectorOfString(package_dirs), se3.GeometryType.VISUAL) self.collision_data = se3.GeometryData(self.collision_model) self.visual_data = se3.GeometryData(self.visual_model) self.v0 = utils.zero(self.nv) self.q0 = utils.zero(self.nq)
def __init__(self, filename, package_dirs=None, root_joint=None): if root_joint is None: self.model = se3.buildModelFromUrdf(filename) else: self.model = se3.buildModelFromUrdf(filename, root_joint) self.data = self.model.createData() if "buildGeomFromUrdf" not in dir(se3): raise Exception( 'the Geometry Module has not been compiled with Pinocchio. No geometry model' ) else: if package_dirs is None: self.geometry_model = se3.buildGeomFromUrdf( self.model, filename) self.geometry_data = se3.GeometryData(self.data, self.geometry_model) else: if not all( isinstance(item, basestring) for item in package_dirs): raise Exception( 'The list of package directories is wrong. At least one is not a string' ) else: self.geometry_model = se3.buildGeomFromUrdf( self.model, filename, utils.fromListToVectorOfString(package_dirs)) self.geometry_data = se3.GeometryData( self.data, self.geometry_model) self.v0 = utils.zero(self.nv) self.q0 = utils.zero(self.nq)
def __init__(self,filename, root_joint = None): self.modelFileName = filename if(root_joint is None): self.model = se3.buildModelFromUrdf(filename) else: self.model = se3.buildModelFromUrdfWithRoot(filename, root_joint) self.data = self.model.createData() self.v0 = utils.zero(self.nv) self.q0 = utils.zero(self.nq)
def __init__(self, filename, package_dirs=None, root_joint=None): if root_joint is None: self.model = se3.buildModelFromUrdf(filename) else: self.model = se3.buildModelFromUrdf(filename, root_joint) self.data = self.model.createData() if "buildGeomFromUrdf" not in dir(se3): raise Exception('the Geometry Module has not been compiled with Pinocchio. No geometry model') else: if package_dirs is None: self.geometry_model = se3.buildGeomFromUrdf(self.model, filename) self.geometry_data = se3.GeometryData(self.data, self.geometry_model) else: if not all(isinstance(item, basestring) for item in package_dirs): raise Exception('The list of package directories is wrong. At least one is not a string') else: self.geometry_model = se3.buildGeomFromUrdf(self.model, filename, utils.fromListToVectorOfString(package_dirs)) self.geometry_data = se3.GeometryData(self.data, self.geometry_model) self.v0 = utils.zero(self.nv) self.q0 = utils.zero(self.nq)
def __init__(self,filename): self.modelFileName = filename self.model = se3.buildModelFromUrdf(filename,True) self.data = self.model.createData() self.v0 = utils.zero(self.nv) self.q0 = utils.zero(self.nq)
max(func=lambda x: 1.0 / x, search_region=( -4.0, -0.0, ), population_size=300, generations=50) inflection_point(func=lambda x: (x - 1.5)**3 + 3, search_region=( -10.0, 10.0, ), population_size=300, generations=50) zero(func=lambda x: log(x + 1) - 2.25, search_region=( -0.5, 15.0, ), population_size=300, generations=50) generate_word(list('МИР'), letters=list('АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ'), population_size=40) generate_word([96, 96, 159], letters=list(range(0, 256)), population_size=40)