Efficient and user-friendly point cloud data loader for the WILD Dataset, supporting multiple coordinate systems and numpy compatibility.
Project description
Note: This is an English translation of the original documentation in
README_CN.md.
Wild-Places Point Cloud Data Loader
Easily read point cloud data and pose information from the Wild-Places dataset.
Dataset Homepage: Wild-Places Dataset
Project Overview
This project provides an efficient and user-friendly point cloud data loader for the Wild-Places dataset, supporting multiple coordinate system conversions, iteration, slicing, and more. It is suitable for autonomous driving, SLAM, 3D reconstruction, and similar scenarios.
Features
- Multiple Coordinate Systems Supported
BASE_LINK: Vehicle local coordinate systemWORLD: World coordinate system
- Iterator & Slicing: Supports iteration, slicing, and random access
- Numpy Compatible: Can read directly from numpy arrays
- Dataset Length: Supports the
len()method
Installation
It is recommended to use uv or pip to install dependencies:
uv pip install -e .
Or use pip directly:
pip install wild-dataloader
Quick Start
from wild_dataloader import PointCloudLoader, FrameID
loader = PointCloudLoader("/path/to/wild/Karawatha")
pc, pose = loader[0] # Read the first point cloud and its pose
# Iterate over the first 10 frames
for pc, pose in loader[:10]:
# Process point cloud and pose
pass
# Get dataset length
print(len(loader))
C++/pybind11 Example
This project supports direct invocation of the Python loader from C++ via pybind11, suitable for integration with C++ projects.
See example code in example/cpp/main.cc. Ensure the root path points to a valid Wild-Places dataset directory.
Build & Run Steps
- Activate Python virtual environment (ensure wild-dataloader and pybind11 are installed)
- Edit line 18 in
main.ccto set therootvariable to your dataset path, e.g./ws/data/wild/Karawatha/K-01 - Build the project:
cd example/cpp cmake -S . -B build cmake --build build
- Run the example:
./build/embed_loader
After running, it will print the dataset length, and the shapes of the point cloud and pose.
Main Code Logic
- Start Python interpreter
#include <pybind11/embed.h> namespace py = pybind11; py::scoped_interpreter guard{};
- Import
wild_dataloadermodulepy::module_ kd = py::module_::import("wild_dataloader"); py::object PointCloudLoader = kd.attr("PointCloudLoader"); py::object FrameID = kd.attr("FrameID");
- Create
PointCloudLoaderinstanceconst char* root = "/ws/data/wild/Karawatha/K-01"; py::object loader = PointCloudLoader(root, py::arg("frame_id") = FrameID.attr("WORLD"));
- Read dataset length
std::size_t n = loader.attr("__len__")().cast<std::size_t>(); std::cout << "dataset length = " << n << "\n";
- Read point cloud and pose, print shape
py::tuple item0 = loader[py::int_(0)]; py::array_t<float> cld = item0[0].cast<py::array_t<float>>(); py::array_t<double> pose = item0[1].cast<py::array_t<double>>(); std::cout << "points shape = (" << cld.shape(0) << ", " << cld.shape(1) << ")\n"; std::cout << "pose shape = (" << pose.shape(0) << ", " << pose.shape(1) << ")\n";
- Iterate first 10 frames (optional)
for (py::size_t i = 0; i < 10 && i < n; ++i) { py::tuple it = loader[py::int_(i)]; // Process point cloud and pose here }
See example/cpp/main.cc for details.
Coordinate System Description
BASE_LINK: LiDAR local coordinate systemWORLD: World coordinate system
You can switch coordinate systems via the frame_id parameter or property:
loader.frame_id = FrameID.WORLD
pc, pose = loader[0]
API Description
PointCloudLoader: Main loader class, supports indexing, slicing, iteration, etc.FrameID: Coordinate system enum type
Data Format
- Point cloud shape:
[N, 3], representing[x, y, z] - Pose matrix shape:
[4, 4]
Dependencies
- numpy
- pypcd4
- scipy
Development/testing dependencies (see pyproject.toml):
- matplotlib
- pybind11
- pytest
- ipykernel
- ruff
Testing
Unit tests are included. Run:
uv pip install .[dev]
uv run pytest
Changelog
- v0.1.0: Initial version with basic functionality
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wild_dataloader-0.1.1.tar.gz.
File metadata
- Download URL: wild_dataloader-0.1.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a23e8ac3caa9bdb5f41a1bed098f1683d4cdbfc89e69f1f749b0978afd73b5
|
|
| MD5 |
c044dc49281e1abb85d0872e74b65218
|
|
| BLAKE2b-256 |
7ec5771fb63d18091e47ee7e66aa4c778809388d17b3de619cc24bce6a5542ca
|
File details
Details for the file wild_dataloader-0.1.1-py3-none-any.whl.
File metadata
- Download URL: wild_dataloader-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a054de359cbf67cdd1e2b9cb9f5b55cae34dec561430f710af913ed6843d2512
|
|
| MD5 |
cceee72338cb23f1842c7ec99c32998c
|
|
| BLAKE2b-256 |
ffbe850aaf91f724e799a4e7fc01f023b53df57738745eaacc38fb73c0f483dc
|