PointCloud-PyUsage
提供点云处理的Python实现,本仓库正在进行大幅度地迭代,暂不建议使用
安装
安装依赖
- ROS1 / ROS2(如需要用到ROS的相关插件)
- Open3D(如果Python版本为
3.10,需自行安装Open3D@ref)
# pip 版本需要大于等于20.3
$ pip3 install -U pip
$ pip3 install --user --pre https://storage.googleapis.com/open3d-releases-master/python-wheels/open3d-0.16.0-cp310-cp310-manylinux_2_27_x86_64.whl"
- 构建工具
$ pip3 install -U build
构建安装和安装包
$ git clone https://github.com/Natsu-Akatsuki/PointCloud-PyUsage --depth=1
$ cd PointCloud-PyUsage
# (推荐)非开发模式
$ bash install.sh
# 开发模式
$ pip3 install -e .
Note
非虚拟环境下,使用开发模式可能出现
its build backend is missing the 'build_editable' hook的报错,则可能是系统级别的setuptools的版本覆盖了高版本的setuptools。通过如下命令行可查询当前的版本python3 -c "import setuptools; print(setuptools.__version__)"
程序
| 包名 | 作用 |
|---|---|
io |
导入和导出点云文件 |
visualization |
点云可视化 |
ros-utils |
动态调参,ROS消息类型和numpy类型的相互转换 |
IO
- 支持
npy,pcd,bin点云文件的读取 - 目前支持读取的字段包括
xyz,xyzi
# >>> import usage >>>
from pointcloud_utils.io import load_pointcloud
# low-level API
pointcloud = load_npy("../data/pointcloud.npy")
pointcloud = load_txt("../data/pointcloud.txt")
pointcloud = load_pcd("../data/pointcloud_ascii.pcd")
# high-level API(支持npy, pcd, bin文件)
pointcloud = load_pointcloud("pointcloud_utils/data/pointcloud.pcd")
# >>> export usage >>>
save_pointcloud(pointcloud, "pointcloud.pcd")
Visualization
- 可视化激光点云
- 基于强度实现点云伪彩色增强
from pointcloud_utils.io import load_pointcloud
from pointcloud_utils.visualization import o3d_viewer_from_pointcloud
pointcloud = load_pointcloud("pointcloud_utils/data/pointcloud_ascii.pcd")
with print_durations(unit='ms'):
o3d_viewer_from_pointcloud(pointcloud)
命令行
可视化点云
- 基于
Open3D的点云可视化,支持npy,pcd,bin点云文件的可视化 - 目前支持的字段包括
xyz,xyzi - 强度字段使用伪彩色增强
$ o3d_viewer <pointcloud_file>
# 如遇到KITTI数据集这种将强度进行过归一化的则需要加上-n选项
$ o3d_viewer -n <pointcloud_file>
TODO
- 用开发模式安装的包无法被
Pycharm智能识别而不能实现补全(不论是否处于虚拟环境) - 使用
github来构建安装包
规范
- 遵从
pep660(setuptools至少需要v64.0才支持单个toml下的develop模式)(@ref)
参考资料
| 仓库 | 参考 |
|---|---|
| ros_numpy | ROS1 点云数据和numpy数据相互转换 |
| ros2_numpy | ROS1 点云数据和numpy数据相互转换 |
| ddynamic_reconfigure_python | ROS1 动态调参 |
| OpenPCDet | 神经网络算子和标定 |
| pykitti | KITTI数据集读取 |
| livox_mapping | 基于强度值的伪彩色 |
Metadata
Release files for ampcl 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ampcl-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for ampcl-0.0.1-py3-none-any.whl |
Release files / ampcl-0.0.1-py3-none-any.whl
| Download URL | ampcl-0.0.1-py3-none-any.whl |
|---|---|
| Size | 35.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae92d22ff5c0f4d14423e922ffaec49f284bcc85f1e262e9372508eec7c259b7
|
|
BLAKE2b-256 checksum How to use checksums |
1f7ad7a071b77fb3c0695e7d086b39ce87c43fd04175010214350394193d373e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for ampcl 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.