A small example package
Project description
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 | 基于强度值的伪彩色 |
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
ampcl-0.0.1-py3-none-any.whl
(35.6 kB
view details)
File details
Details for the file ampcl-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: ampcl-0.0.1-py3-none-any.whl
- Upload date:
- Size: 35.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae92d22ff5c0f4d14423e922ffaec49f284bcc85f1e262e9372508eec7c259b7 |
|
MD5 | ceb756640cd6a1de6623c3363712d5b4 |
|
BLAKE2b-256 | 1f7ad7a071b77fb3c0695e7d086b39ce87c43fd04175010214350394193d373e |