zonopyrobots.OfflineJRS

zonopyrobots.OfflineJRS#

class zonopyrobots.OfflineJRS(device: torch.device = 'cpu', dtype: torch.dtype = torch.float)[source]#

Bases: object

Wrapper for preloading and processing ARMTD style JRS tensors generated offline

These tensors are generated offline using the MATLAB scripts in the jrs_trig/gen_jrs_trig folder. This provides a wrapper for some of the jrs_trig.load_jrs_trig and jrs_trig.process_jrs_trig functions to make it easier to use the JRS tensors. The JRS tensors are preloaded and processed in the __init__ function and then the __call__ function can be used to get the JRS and the corresponding rotatotopes for a given configuration and velocity.

This specifically loads the tensors from the jrs_trig/jrs_trig_tensor_saved folder

__init__(device: torch.device = 'cpu', dtype: torch.dtype = torch.float)[source]#

Wrapper for preloading and processing JRS tensors

Parameters:
  • device (torch.device, optional) – The device to use for the JRS tensors. Defaults to ‘cpu’.

  • dtype (torch.dtype, optional) – The dtype to use for the JRS tensors. Defaults to torch.float.

Methods

__init__([device, dtype])

Wrapper for preloading and processing JRS tensors