Core Python library for reading, processing, and analyzing sensor data from the MOSEP (Modular Hardware and Software System for Multi-Sensor Environment Perception) measurement setup. Provides tools to extract point cloud and weather station data from ROS2 bag files and convert them into analysis-ready formats.
- ROS2 bag file reading — Extract point cloud (LiDAR/radar) and weather station data from
.mcapbag files, including support for custom Lufft WSX weather station message types. - Point cloud processing — Convert raw point clouds to
pointcloudsetdatasets stored as Parquet files. Resample, subset, and aggregate by configurable time periods and spatial regions. - Weather time series — Deserialize Lufft weather station messages into structured pandas DataFrames with multi-level columns (category × parameter). Resample and combine data from multiple weather stations.
- Spatial filtering —
Limitsutility for defining 3D bounding boxes and applying inclusion/exclusion filters to point cloud data. - Statistics — Per-frame point cloud statistics (point count, mean/sum intensity).
- Metadata extraction — CLI tool to extract bag file metadata (topics, duration, precipitation stats) and generate Markdown reports with embedded precipitation plots.
- Image extraction — Decode
CompressedImagemessages from bag files to RGB images.
Requires Python ≥ 3.9, < 3.12.
pip install moseplibOr as part of the mosep-analysis workspace (recommended):
# From the mosep-analysis root
uv syncExtract metadata and precipitation plots from ROS2 bag files:
extract_metadata <path_to_bagfile> [--output_dir <dir>]Generates a Markdown file with YAML frontmatter containing bag metadata (topics, timestamps, duration, precipitation statistics) and an embedded precipitation plot.
src/moseplib/
├── cli/
│ ├── get_metadata_from_bagfiles.py <- extract_metadata CLI entry point
│ └── sensor_setup.yaml <- Sensor configuration (Ouster LiDAR, Smartmicro radar)
├── config/
│ ├── precipitation_codes.py <- WMO Synop Code 4680 weather type definitions
│ └── custom_ros_msgs/
│ └── lufft_wsx_interfaces/msg/ <- Custom ROS2 message definitions for Lufft weather station
├── data/
│ ├── config.py <- Package-level config (topics, field names, paths)
│ ├── utils.py <- Limits (3D bounding box), spatial filtering utilities
│ ├── read_rosbag.py <- ROS2 bag file reading and message deserialization
│ ├── pointcloud_processing.py <- Point cloud extraction, loading, resampling, aggregation
│ ├── timeseries_processing.py <- Weather time series loading, deserialization, resampling
│ ├── pc_statistics.py <- Point cloud statistics (n_points, mean/sum intensity)
│ └── extract_pcs_from_bagfile.py <- Standalone script for batch point cloud extraction
└── tools/
├── fix_ros2_metadata_file.py <- Fix timestamp ordering in ROS2 bag metadata files
└── create_parquet_files_from_pc.py <- Batch convert bag files to parquet
| Sensor | Type | Details |
|---|---|---|
| Ouster OS-1-64-U02 | LiDAR | 1024×10 mode, RNG19_RFL8_SIG16_NIR16_DUAL profile |
| Smartmicro UMRR-11 Type 132 | Radar | — |
| Lufft WSX-series | Weather station | Temperature, humidity, wind, precipitation, radiation, air pressure |
pandas— DataFrames and time seriespointcloudset— Point cloud dataset managementrosbags— ROS2 bag file readingpyarrow— Parquet I/Orich— Terminal output formattingtqdm— Progress barskaleido— Static image export for Plotly figures