Skip to main content

Analyze large datasets of point clouds recorded over time in an efficient way

Project description

Analyze large datasets of point clouds recorded over time in an efficient way.

test status test coverage https://github.com/virtual-vehicle/pointcloudset/actions/workflows/doc.yml/badge.svg Docker PyPi badge PyPi badge JOSS badge code style ruff

Code | Documentation

Features

  • Handles point clouds over time

  • Directly read ROS files and many pointcloud file formats.

  • Generate a dataset from multiple pointclouds. For example from thousands of .las files.

  • Building complex pipelines with a clean and maintainable code

newpointcloud = pointcloud.limit("x",-5,5).filter("quantile","reflectivity", ">",0.5)
  • Apply arbitrary functions to datasets of point clouds

def isolate_target(frame: PointCloud) -> PointCloud:
   return frame.limit("x",0,1).limit("y",0,1)

def diff_to_pointcloud(pointcloud: PointCloud, to_compare: PointCloud) -> PointCloud:
   return pointcloud.diff("pointcloud", to_compare)

result = dataset.apply(isolate_target).apply(diff_to_pointcloud, to_compare=dataset[0])
  • Includes powerful aggregation method agg similar to pandas

dataset.agg(["min","max","mean","std"])
  • Support for large files with lazy evaluation and parallel processing

https://raw.githubusercontent.com/virtual-vehicle/pointcloudset/master/images/dask.gif
  • Support for numerical data per point (intensity, range, noise …)

  • Interactive 3D visualisation

https://raw.githubusercontent.com/virtual-vehicle/pointcloudset/master/images/tree.gif
  • High level processing based on dask, pandas, open3D and pyntcloud

  • Docker image is available

  • Optimised - but not limited to - automotive lidar

  • A command line tool to convert ROS 1 & 2 files

Use case examples

  • Post processing and analytics of a lidar dataset recorded by ROS

  • A collection of multiple lidar scans from a terrestrial laser scanner

  • Comparison of multiple point clouds to a ground truth

  • Analytics of point clouds over time

  • Developing algorithms on a single frame and then applying them to huge datasets

Installation with pip

Install python package with pip:

pip install pointcloudset

Installation with Docker

The easiest way to get started is to use the pre-build docker tgoelles/pointcloudset.

Quickstart

Reading ROS1 or ROS2 files:

import pointcloudset as pcs
from pathlib import Path
import urllib.request

urllib.request.urlretrieve(
   "https://github.com/virtual-vehicle/pointcloudset/raw/master/tests/testdata/test.bag", "test.bag"
)

dataset = pcs.Dataset.from_file(Path("test.bag"), topic="/os1_cloud_node/points", keep_zeros=False)
pointcloud = dataset[1]
pointcloud.plot("x", hover_data=True)

You can also generate a dataset from multiple pointclouds form a large variety or formats like las, pcd, csv and more.

import pointcloudset as pcs
from pathlib import Path
import urllib.request

urllib.request.urlretrieve(
   "https://github.com/virtual-vehicle/pointcloudset/raw/master/tests/testdata/las_files/test_tree.las",
   "test_tree.las",
)
urllib.request.urlretrieve(
   "https://github.com/virtual-vehicle/pointcloudset/raw/master/tests/testdata/las_files/test_tree.pcd",
   "test_tree.pcd",
)

las_pc = pcs.PointCloud.from_file(Path("test_tree.las"))
pcd_pc = pcs.PointCloud.from_file(Path("test_tree.pcd"))
dataset = pcs.Dataset.from_instance("pointclouds", [las_pc, pcd_pc])
pointcloud = dataset[1]

pointcloud.plot("z", hover_data=True)

CLI to convert ROS1 and ROS2 files: pointcloudset convert

The package includes a powerful CLI to convert pointclouds in ROS1 & 2 files into formats like pointcloudset and a folder with csv or las. It is capable of handling both mcap and db3 ROS2 files.

pointcloudset convert test.bag --output-format las --output-dir converted_las
https://raw.githubusercontent.com/virtual-vehicle/pointcloudset/master/images/cli_demo.gif

You can view PointCloud2 messages with

pointcloudset topics test.bag

Tipp: If you have uv installed you can simply run:

uvx pointcloudset --help

Citation and contact

orcid Thomas Gölles email: thomas.goelles@v2c2.at

Please cite our JOSS paper if you use pointcloudset.

@article{Goelles2021,
  doi = {10.21105/joss.03471},
  url = {https://doi.org/10.21105/joss.03471},
  year = {2021},
  publisher = {The Open Journal},
  volume = {6},
  number = {65},
  pages = {3471},
  author = {Thomas Goelles and Birgit Schlager and Stefan Muckenhuber and Sarah Haas and Tobias Hammer},
  title = {`pointcloudset`: Efficient Analysis of Large Datasets of Point Clouds Recorded Over Time},
  journal = {Journal of Open Source Software}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pointcloudset-0.12.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pointcloudset-0.12.0-py3-none-any.whl (44.5 kB view details)

Uploaded Python 3

File details

Details for the file pointcloudset-0.12.0.tar.gz.

File metadata

  • Download URL: pointcloudset-0.12.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pointcloudset-0.12.0.tar.gz
Algorithm Hash digest
SHA256 3389a672fe6f351b347f446bb150b7a22878763124d5bf6cf3c849d8665f5c0a
MD5 e2ea57d7ed6a3c30102cd0af8971d714
BLAKE2b-256 75d4d30977115b92313be9a478cfb8a1f18629aeccf04ae4f0be84688e0d6afc

See more details on using hashes here.

File details

Details for the file pointcloudset-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pointcloudset-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 44.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pointcloudset-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4418037015c81a92c617682f560c1d2355fd3d233636a6ee1be8fb05b01ead91
MD5 a1f92f74efff73ee3542cb1b8794e272
BLAKE2b-256 0babc61273b97a77fba9ac1d30ae34f61e43ef0b9cc03990e0ebcf1a9eb1fd2d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page