datasets.robotics package
Submodules
datasets.robotics.MultimodalManipulationDataset module
Implements dataset for MultiModal Manipulation Task.
- class datasets.robotics.MultimodalManipulationDataset.MultimodalManipulationDataset(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='')
Bases:
DatasetMultimodal Manipulation dataset.
- __init__(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='')
Initialize dataset.
- Parameters:
filename_list (str) – List of files to get data from
transform (fn, optional) – Optional function to transform data. Defaults to None.
episode_length (int, optional) – Length of each episode. Defaults to 50.
training_type (str, optional) – Type of training. Defaults to “selfsupervised”.
n_time_steps (int, optional) – Number of time steps. Defaults to 1.
action_dim (int, optional) – Action dimension. Defaults to 4.
pairing_tolerance (float, optional) – Pairing tolerance. Defaults to 0.06.
filedirprefix (str, optional) – File directory prefix (unused). Defaults to “”.
- class datasets.robotics.MultimodalManipulationDataset.MultimodalManipulationDataset_robust(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='', noise_level=0, image_noise=False, force_noise=False, prop_noise=False)
Bases:
DatasetMultimodal Manipulation dataset.
- __init__(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='', noise_level=0, image_noise=False, force_noise=False, prop_noise=False)
- Parameters:
hdf5_file (handle) – h5py handle of the hdf5 file with annotations.
transform (callable, optional) – Optional transform to be applied on a sample.
datasets.robotics.MultimodalManipulationDataset_robust module
Implements MultimodalManipulationDataset with robustness transforms.
- class datasets.robotics.MultimodalManipulationDataset_robust.MultimodalManipulationDataset_robust(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='', noise_level=0, image_noise=False, force_noise=False, prop_noise=False)
Bases:
DatasetMultimodal Manipulation dataset.
- __init__(filename_list, transform=None, episode_length=50, training_type='selfsupervised', n_time_steps=1, action_dim=4, pairing_tolerance=0.06, filedirprefix='', noise_level=0, image_noise=False, force_noise=False, prop_noise=False)
- Parameters:
hdf5_file (handle) – h5py handle of the hdf5 file with annotations.
transform (callable, optional) – Optional transform to be applied on a sample.
datasets.robotics.ProcessForce module
Implements processforce, which truncates force readings to a window size.
- class datasets.robotics.ProcessForce.ProcessForce(window_size, key='force', tanh=False)
Bases:
objectTruncate a time series of force readings with a window size. :param window_size: Length of the history window that is
used to truncate the force readings
- __init__(window_size, key='force', tanh=False)
Initialize ProcessForce object.
- Parameters:
window_size (int) – Windows size
key (str, optional) – Key where data is stored. Defaults to ‘force’.
tanh (bool, optional) – Whether to apply tanh to output or not. Defaults to False.
datasets.robotics.ToTensor module
Implements another utility for this dataset.
datasets.robotics.get_data module
Implements dataloaders for robotics data.
- datasets.robotics.get_data.combine_modalitiesbuilder(unimodal, output)
Create a function data combines modalities given the type of input.
- Parameters:
unimodal (str) – Input type as a string. Can be ‘force’, ‘proprio’, ‘image’. Defaults to using all modalities otherwise
output (int) – Index of output modality.
- datasets.robotics.get_data.get_data(device, configs, filedirprefix='', unimodal=None, output='contact_next')
Get dataloaders for robotics dataset.
- Parameters:
device (torch.utils.device) – Device to load data to.
configs (dict) – Configuration dictionary
filedirprefix (str, optional) – File directory prefix path. Defaults to “”.
unimodal (str, optional) – Input modality as a string. Defaults to None. Can be ‘force’, ‘proprio’, ‘image’. Defaults to using all modalities otherwise.
output (str, optional) – Output format. Defaults to ‘contact_next’.
- Returns:
_description_
- Return type:
_type_
datasets.robotics.utils module
Extraneous methods for robotics dataset work.
- datasets.robotics.utils.augment_val(val_filename_list, filename_list)
Augment lists of filenames so that they match the current directory.
Module contents
Package that implements dataloaders for robotics data on Multibench.