Skip to main content

PointCloud2 lib for non ROS environments

Project description

PointCloud2

PointCloud2 lib for non ROS environment.

PyPI version PyPI license PyPI download month

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.2.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

pointcloud2-0.2.3-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file pointcloud2-0.2.3.tar.gz.

File metadata

  • Download URL: pointcloud2-0.2.3.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.19

File hashes

Hashes for pointcloud2-0.2.3.tar.gz
Algorithm Hash digest
SHA256 54d1031a5aabfc63c5d77a3f9b1ca92979864038156d4264329444fdefef3571
MD5 cd89e34bab621635ab1eb7fc1fe0862c
BLAKE2b-256 0b4f550f7283f6205fe4adb63a430204d78d2196b4b93ff6528ff9d14787b936

See more details on using hashes here.

File details

Details for the file pointcloud2-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pointcloud2-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4de290981ac437528ef2ec4280a2048ec1641cfc8e437d8892882f7702ac10
MD5 1d5c6f90e3b94499071b4187f3e77934
BLAKE2b-256 b7124b322d0fc8ec88966b232db3883d52fc5bb2c70ad691affa10f68d7ca000

See more details on using hashes here.

Supported by

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