Dataset Tools
Dataset tools convert live OceanSim runs into offline artifacts for mapping, evaluation, robotics integration, replay, and publication figures.
Recording
- class OceanSimPklRecorder
Collect OceanSim frames into a pickle dataset for offline replay and figures.
- scenario
Scenario label stored in the dataset metadata.
- voxel_size
Point-cloud voxel size used when compacting frames.
- max_points_per_frame
Maximum number of points stored for each frame.
- add_frame(state, point_cloud=None, dvl=None, imaging_sonar=None, lidar_2d=None, rgbd_dense=None, agents=None, planning=None, sim_time=None)
Append one compact simulation frame.
- to_dataset()
Return a serializable dataset dictionary.
- save(path)
Write the dataset to a PKL file.
- load(path)
Load a PKL dataset dictionary.
- dataset_to_mapper(dataset, voxel_size=None)
Build an
OceanSimPointCloudMapfrom a PKL dataset, preserving trajectory and point-cloud frames.
- load_pkl_dataset(path)
Load a PKL dataset through
OceanSimPklRecorder.load.
Replay
- class OceanSimRunReplay
Read an exported OceanSim run for deterministic offline inspection.
- open(run_dir)
Open an exported run directory.
- frame_count()
Return number of replay frames.
- iter_frames()
Iterate exported frame dictionaries.
- trajectory()
Return trajectory as a NumPy array.
- sensor_frames(sensor_name)
Iterate frames for one sensor.
- summary()
Return high-level run metadata.
- tum_trajectory_rows()
Export trajectory rows for TUM-style benchmark tools.
- euroc_trajectory_rows()
Export trajectory rows for EuRoC-style benchmark tools.
Camera images
Function |
Description |
|---|---|
|
Convert an OceanSim camera payload to RGB, depth, and segmentation arrays. |
|
Save camera payload arrays as PNG files. |
|
Fetch current camera payload and save images in one call. |
Robotics exports
Function |
Description |
|---|---|
|
Write ROS2-bridge-friendly JSONL topics from an exported OceanSim run. |
|
Write an MCAP-ready sidecar dataset without requiring the MCAP Python package. |
|
Reconstruct an OBJ mesh from an OceanSim point-cloud PKL dataset. |