rofunc.utils.datalab.data_sampler.holders#

Data processing class for synchronisation and re-sampling of data. /!This is very much a work in progress. /! /!Unstable when accessing the data in funkyway because all the data holders are designed to keep as little data as possible in memory /! Known limitations: - The re-sampling is only done by ignoring or copying samples. It would be nice to add interpolation methods - The re-sampling is done in a for loop. A bit slow, can be improved.

Code structure: - MultiModalDataHandler: class to handle multiple data streams. Interface with the data.

MultiModalDataHandler is ‘fed’ DataHolders. DataHolders deal with the specificities of each data sources. DataHolders must inherit from DataHolder.

  • XSensorDataHolder: class to handle data from XSens sensor.

  • OptitrackDataHolder: class to handle data from Optitrack.

  • RGBDDatasetDataHolder: class to handle data from Zed2i.

Author: Donatien Delehelle (donatien.delehelle[at]iit.it)

1.  Module Contents#

1.1.  Classes#

DataHolder

Class to hold data for each frame

RGBDDataHolder

XsensDataHolder

OptitrackDataHolder

MultimodalDataHandler

Class to handle multimodal data collection.

1.2.  API#

class rofunc.utils.datalab.data_sampler.holders.DataHolder[source]#

Bases: object

Class to hold data for each frame

Initialization

property sampled_data#
abstract to_pcd(frame_number)[source]#
lin_trans(data, inv=False)[source]#
class rofunc.utils.datalab.data_sampler.holders.RGBDDataHolder(root_path, show_color=True, stat_clean=True, depth_trunc=3500, size=(1920, 1080), tshift=0)[source]#

Bases: rofunc.utils.datalab.data_sampler.holders.DataHolder

to_pcd(frame_number)[source]#
orig_fn_to_sampled(frame_number)[source]#
class rofunc.utils.datalab.data_sampler.holders.XsensDataHolder(root_path, transform=None)[source]#

Bases: rofunc.utils.datalab.data_sampler.holders.DataHolder

property sampled_data#
sampled_match(label, pos_array, fnb=0, bnds=None)[source]#
to_pcd(frame_number)[source]#
class rofunc.utils.datalab.data_sampler.holders.OptitrackDataHolder(meta=None, labels=None, data=None)[source]#

Bases: rofunc.utils.datalab.data_sampler.holders.DataHolder

property sampled_data#
to_pcd(frame_number)[source]#
orig_fn_to_sampled(frame_number)[source]#
class rofunc.utils.datalab.data_sampler.holders.MultimodalDataHandler(tstep: int = None, tstart: int = None, tstop: int = None, data_holders: List[rofunc.utils.datalab.data_sampler.holders.DataHolder] = None, interpolate: str = 'repeat')[source]#

Bases: object

Class to handle multimodal data collection.

Attributes:

tstep (int): Time step between each data point. tstart (int): Start time of the shared data time serie. tstop (int): Stop time of the shared data time serie.

Initialization

property sampled_data#
update_bounds()[source]#

Update the ticks attribute of the handler.

Args:

force (bool, optional): Force the update of the ticks. Defaults to False.

add_data()[source]#

Add new data series to the handler. Adding a data serie will update the time boundaries of the handler. You can set custom boundaries when loading the data.

sample(bounds: Tuple[int, int] = None, tstep=None, interpolate: str = None)[source]#

Get the data from the data series.

Args:

bounds (Tuple[int, int], optional): Time bounds of the data to load. Defaults to None, which means all the data will be loaded.

Returns:

get_slice(bounds)[source]#

Get a slice of the data handler.

Args:

bounds (Tuple[int, int]): Time bounds of the data to load.

Returns:

MultiModalDataHandler: A new data handler with the same time step and the same data holders.

to_pcd(frame_number, show_holder=None)[source]#

Generate a list of open3d point clouds from data holders

Returns:

List[open3d.geometry.PointCloud]: List of point clouds.