PointCloud2 lib for non ROS environments
Project description
PointCloud2
PointCloud2 lib for non ROS environment.
Usage
>>> import numpy as np
>>> from pointcloud2 import create_cloud, read_points, PointField
>>> fields = [
... PointField('x', 0, PointField.FLOAT32, 1),
... PointField('y', 4, PointField.FLOAT32, 1),
... PointField('z', 8, PointField.FLOAT32, 1),
... PointField('rgb', 12, PointField.UINT32, 1),
... ]
>>> points = np.array([
... [1, 0, 0, 255],
... [0, 1, 0, 255],
... [0, 0, 1, 255],
... ], dtype=np.float32)
>>> cloud = create_cloud(header=None, fields=fields, points=points)
>>> cloud.height, cloud.width, cloud.point_step, cloud.row_step, len(cloud.data)
(1, 3, 16, 48, 48)
>>> read_points(cloud)
array([(1., 0., 0., 255), (0., 1., 0., 255), (0., 0., 1., 255)],
dtype=[('x', '<f4'), ('y', '<f4'), ('z', '<f4'), ('rgb', '<u4')])
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
pointcloud2-0.4.0.tar.gz
(6.3 kB
view details)
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 pointcloud2-0.4.0.tar.gz.
File metadata
- Download URL: pointcloud2-0.4.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
159f49eff3b7954bd48fcaeb73f39e08c8c5655195b94638a8f034fe65b8e1fc
|
|
| MD5 |
50b5ec038c6dfe70c7fefb075d878748
|
|
| BLAKE2b-256 |
5e0d29a4fb540218f9e4a7c9eda1959027ebaa2f265f722b2647002ba1bf4ef5
|
File details
Details for the file pointcloud2-0.4.0-py3-none-any.whl.
File metadata
- Download URL: pointcloud2-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1aeec3d582da6747528c62ddd92a48edb3a841027a6dffdb5b57d6d7fff2fc7
|
|
| MD5 |
5964117b551ac2cc5f85029a236fa3d2
|
|
| BLAKE2b-256 |
30f895a2480e98689d56b6b8f2832d6d50ab456ebe542c75e65f59c4d123e663
|