Skip to content

msight_core.nodes.source_local_pointcloud_player

msight_core.nodes.source_local_pointcloud_player

LocalPointCloudPlayerSourceNode

Bases: SourceNode

Replay point-cloud data previously dumped to disk.

Expected directory layout (output of :class:PointCloudLocalDumperSinkNode)::

root/
    <sensor_A>/          ← one immediate sub-folder per sensor
        <date>/<hour>/
            <timestamp>.pcd
    <sensor_B>/
        ...

Pass the folder that sits directly above the sensor-name folders as root (e.g. output_folder_path/<date>/<hour>/).

Multiple sensors are synchronized to the primary sensor: for each primary frame the closest frame from every other sensor (within 1 s) is queued and emitted in subsequent :meth:get_data calls, so replay appears smooth.

Parameters:

Name Type Description Default
configs NodeConfig

Node configuration.

required
root str

Path to the folder containing per-sensor sub-folders.

required
fps float

Target replay frame-rate. Default is 10 Hz.

10.0
primary_sensor str | None

Name of the sensor that drives timing. Defaults to the first sensor found alphabetically.

None
loop bool

Whether to loop back to the beginning when the recording ends. Default is True.

True

create(name, publish_topic_name, root, fps=10.0, primary_sensor=None, loop=True) classmethod

Convenience factory that mirrors the pattern used by other nodes.

Parameters:

Name Type Description Default
name str

Node name.

required
publish_topic_name str

Topic to publish point clouds to.

required
root str

Folder directly above sensor sub-directories.

required
fps float

Replay frame-rate in Hz. Default 10.

10.0
primary_sensor str | None

Primary sensor name. Defaults to first sensor alphabetically.

None
loop bool

Loop when the recording ends. Default True.

True