curobo.util.sample_lib module¶
- class SampleConfig(
- horizon: int,
- d_action: int,
- tensor_args: curobo.types.base.TensorDeviceType,
- fixed_samples: bool = True,
- sample_ratio: Dict[str,
- float] = <factory>,
- seed: int = 0,
- filter_coeffs: Optional[List[float]] = <factory>,
- n_knots: int = 3,
- scale_tril: Optional[float] = None,
- covariance_matrix: Optional[<built-in method tensor of type object at 0x7fd954a6f200>] = None,
- sample_method: str = 'halton',
- cov_mode: str = 'vel',
- sine_period: int = 2,
- degree: int = 3,
Bases:
object
- tensor_args: TensorDeviceType¶
- class BaseSampleLib(sample_config)¶
Bases:
SampleConfig
- get_samples(
- sample_shape,
- base_seed,
- current_state=None,
- **kwargs,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- class HaltonSampleLib(
- sample_config: SampleConfig,
Bases:
BaseSampleLib
- get_samples(
- sample_shape,
- base_seed=None,
- filter_smooth=False,
- **kwargs,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- class KnotSampleLib(
- sample_config: SampleConfig,
Bases:
SampleConfig
- get_samples(
- sample_shape,
- **kwargs,
- tensor_args: TensorDeviceType¶
- class RandomSampleLib(
- sample_config: SampleConfig,
Bases:
BaseSampleLib
- get_samples(
- sample_shape,
- base_seed=None,
- filter_smooth=False,
- **kwargs,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- class SineSampleLib(
- sample_config: SampleConfig,
Bases:
BaseSampleLib
- get_samples(
- sample_shape,
- base_seed=None,
- **kwargs,
- generate_sine_wave(
- horizon=None,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- class StompSampleLib(
- sample_config: SampleConfig,
Bases:
BaseSampleLib
- get_samples(
- sample_shape,
- base_seed=None,
- **kwargs,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- class SampleLib(
- sample_config: SampleConfig,
Bases:
BaseSampleLib
- get_samples(
- sample_shape,
- base_seed=None,
- **kwargs,
- filter_samples(eps)¶
- filter_smooth(samples)¶
- tensor_args: TensorDeviceType¶
- get_ranged_halton_samples(
- dof,
- up_bounds,
- low_bounds,
- num_particles,
- tensor_args: TensorDeviceType = TensorDeviceType(device='cpu', dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),
- seed=123,
- class HaltonGenerator(
- ndims,
- tensor_args: TensorDeviceType = TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),
- up_bounds=[1],
- low_bounds=[0],
- seed=123,
- store_buffer: int | None = 2000,
Bases:
object
- reset()¶
- get_samples(
- num_samples,
- bounded=False,
- get_gaussian_samples(
- num_samples,
- variance=1.0,
- gaussian_transform( )¶
Compute a guassian transform of uniform samples.
- Parameters:
uniform_samples (torch.Tensor) – uniform samples in the range [0,1].
proj_mat (torch.Tensor) – _description_
i_mat (torch.Tensor) – _description_
variance (float) – _description_
- Returns:
_description_
- Return type:
_type_
- generate_noise(
- cov,
- shape,
- base_seed,
- filter_coeffs=None,
- device=device(type='cpu'),
Generate correlated Gaussian samples using autoregressive process
- generate_noise_np(
- cov,
- shape,
- base_seed,
- filter_coeffs=None,
Generate correlated noisy samples using autoregressive process
- generate_prime_numbers(num)¶
- generate_van_der_corput_sample(
- idx,
- base,
- generate_van_der_corput_samples_batch(
- idx_batch,
- base,
- generate_halton_samples(
- num_samples,
- ndims,
- bases=None,
- use_scipy_halton=True,
- seed=123,
- tensor_args: TensorDeviceType = TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),
- generate_gaussian_halton_samples(
- num_samples,
- ndims,
- bases=None,
- use_scipy_halton=True,
- seed=123,
- tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),
- variance=1.0,
- generate_gaussian_sobol_samples(
- num_samples,
- ndims,
- seed,
- tensor_args=TensorDeviceType(device=device(type='cuda', index=0), dtype=torch.float32, collision_geometry_dtype=torch.float32, collision_gradient_dtype=torch.float32, collision_distance_dtype=torch.float32),