mani_skill.envs.utils.randomization.samplers ============================================ .. py:module:: mani_skill.envs.utils.randomization.samplers .. autoapi-nested-parse:: Various sampling functions/classes for fast, vectorized sampling of e.g. object poses Classes ------- .. autoapisummary:: mani_skill.envs.utils.randomization.samplers.UniformPlacementSampler Module Contents --------------- .. py:class:: UniformPlacementSampler(bounds, batch_size, device = None) Uniform placement sampler that lets you sequentially sample data such that the data is within given bounds and not too close to previously sampled data. This sampler is also batched so you can use this easily for GPU simulated tasks :param bounds: ((low1, low2, ...), (high1, high2, ...)) :param batch_size: The number of points to sample with each call to sample(...) :type batch_size: int .. py:method:: sample(radius, max_trials, append=True, verbose=False) Sample a position. :param radius: collision radius. :type radius: float :param max_trials: maximal trials to sample. :type max_trials: int :param append: whether to append the new sample to fixtures. Defaults to True. :type append: bool, optional :param verbose: whether to print verbosely. Defaults to False. :type verbose: bool, optional :returns: a sampled position. :rtype: torch.Tensor .. py:attribute:: _bounds .. py:attribute:: _ranges .. py:attribute:: batch_size .. py:attribute:: fixture_positions :value: None .. py:attribute:: fixtures_radii :value: None