# pypose.randn_RxSO3¶

class pypose.randn_RxSO3(*lsize, sigma=1.0, **kwargs)[source]

Returns RxSO3_type LieTensor filled with the Exponential map of the random rxso3_type LieTensor. The rxso3_type LieTensor is generated using randn_rxso3().

$\mathrm{data}[*, :] = \mathrm{Exp}([\delta_x, \delta_y, \delta_z, \log s]),$

where rotation $$[\delta_x, \delta_y, \delta_z]$$ is generated using pypose.randn_so3() with standard deviation $$\sigma_r$$, scale $$\log s$$ is generated from a normal distribution $$\mathcal{N}(0, \sigma_s)$$, and $$\mathrm{Exp}()$$ is the Exponential map. Note that standard deviations $$\sigma_r$$ and $$\sigma_s$$ are specified by sigma ($$\sigma$$), where $$\sigma = (\sigma_r, \sigma_s)$$.

Parameters
• lsize (int...) – a sequence of integers defining the lshape of the output tensor. Can be a variable number of arguments or a collection like a list or tuple.

• sigma (float or (float...), optional) – standard deviation ($$\sigma_r$$, and $$\sigma_s$$) for the two normal distribution. Default: 1.0.

• requires_grad (bool, optional) – If autograd should record operations on the returned tensor. Default: False.

• generator (torch.Generator, optional) – a pseudorandom number generator for sampling

• dtype (torch.dtype, optional) – the desired data type of returned tensor. Default: None. If None, uses a global default (see torch.set_default_tensor_type()).

• layout (torch.layout, optional) – the desired layout of returned Tensor. Default: torch.strided.

• device (torch.device, optional) – the desired device of returned tensor. Default: “None”. If None, uses the current device for the default tensor type (see torch.set_default_tensor_type()). Device will be the CPU for CPU tensor types and the current CUDA device for CUDA tensor types.

Returns

a RxSO3_type LieTensor

Return type

LieTensor

Note

The parameter $$\sigma$$ can either be:

• a single float – in which all the elements in the RxSO3_type share the same sigma, i.e., $$\sigma_{\rm{r}}$$ = $$\sigma_{\rm{s}}$$ = $$\sigma$$.

• a tuple of two floats – in which case, the specific sigmas for the two parts are assigned independently, i.e., $$\sigma$$ = ($$\sigma_{\rm{r}}$$, $$\sigma_{\rm{s}}$$).

Example

For $$\sigma = (\sigma_r, \sigma_s)$$

>>> pp.randn_RxSO3(2, sigma=(1.0, 2.0))
RxSO3Type LieTensor:
tensor([[-0.1929, -0.0141,  0.2859,  0.9385,  4.5562],
[-0.2871,  0.0134, -0.2903,  0.9128,  3.1044]])