Repository Summary
Description | Based on ROS2 and PCL libraries, used to convert pcd point cloud files into raster maps for navigation |
Checkout URI | https://github.com/lihanchen2004/pcd2pgm.git |
VCS Type | git |
VCS Version | master |
Last Updated | 2025-02-08 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
pcd2pgm | 0.0.0 |
README
pcd2pgm
基于 ROS2 和 PCL 库,用于将 .pcd
点云文件转换为用于 Navigation 的 pgm
栅格地图
pcd | pgm |
---|---|
![]() |
![]() |
1. Overview
-
读取指定的
.pcd
文件 -
使用 Pass Through 滤波器过滤点云
-
使用 Radius Outlier 滤波器进一步处理点云
-
将处理后的点云转换为占据栅格地图(Occupancy Grid Map)
-
将转换后的地图发布到指定 ROS 话题上
2. Quick Start
2.1 Setup Environment
- Ubuntu 22.04
- ROS: Humble
2.2 Create Workspace
mkdir -p ~/ros_ws
cd ~/ros_ws
git clone https://github.com/LihanChen2004/pcd2pgm.git
2.3 Build
rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=release
2.4 Running
启动 pcd2pgm 节点,可在 RViz 中预览滤波后点云和栅格地图:
ros2 launch pcd2pgm pcd2pgm_launch.py
保存栅格地图:
ros2 run nav2_map_server map_saver_cli -f <YOUR_MAP_NAME>
三. Node Parameters
可以通过修改 pcd2pgm/pcd2pgm.yaml
文件来配置节点的参数。
pcd2pgm:
ros__parameters:
pcd_file: /home/lihanchen/NAVIGATION_WS/pcd2pgm/rmuc_2025.pcd # pcd 文件所在目录
odom_to_lidar_odom: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] # [x, y, z, r, p, y] 里程计到激光雷达的坐标变换(用于变换点云)
flag_pass_through: false # 是否使用 Pass Through 滤波器
map_resolution: 0.05 # 地图分辨率
map_topic_name: map # 发布地图的 ROS 话题名
thre_radius: 0.1 # Radius Outlier 滤波器半径
thre_z_max: 2.0 # Z轴最大值(用于 Pass Through 滤波器)
thre_z_min: 0.1 # Z轴最小值(用于 Pass Through 滤波器)
thres_point_count: 10 # 最小点数阈值(用于 Radius Outlier 滤波器)
CONTRIBUTING
Contributing Guidelines
Thank you for your interest in contributing to pcd2pgm
.
Whether it’s a bug report, new feature, correction, or additional
documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
Reporting Bugs/Feature Requests
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn’t already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you’ve made relevant to the bug
- Anything unusual about your environment or deployment
Contributing via Pull Requests
To send us a pull request, please:
- Fork the repository.
- Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
- Ensure local tests pass. (
colcon test
andpre-commit run
(requires you to install pre-commit bypip3 install pre-commit
) - Commit to your fork using clear commit messages.
- Send a pull request, answering any default questions in the pull request interface.
- Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional documentation on forking a repository and creating a pull request.
Finding contributions to work on
Looking at the existing issues is a great way to find something to contribute on. As this project, by default, uses the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ‘help wanted’ issues is a great place to start.
Licensing
Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.