# pcd2pgm
**Repository Path**: hilbertw/pcd2pgm
## Basic Information
- **Project Name**: pcd2pgm
- **Description**: https://github.com/kzm784/pcd2pgm.git
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2025-06-23
- **Last Updated**: 2025-10-14
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# pcd2pgm
A tool based on ROS2 and the PCL library to convert `.pcd` point cloud files into `.pgm` grid maps for use in Navigation.
| pcd | pgm |
|:-:|:-:|
|
|
|
## 1. Features
- Read a specified `.pcd` file
- Create the `.pgm` file and `.yaml` file from `.pcd` file
## 2. Usage Guide
### 2.1 Clone the Repository
```sh
git clone https://github.com/kzm784/pcd2pgm.git
```
### 2.2 Install Dependencies
[ROS2 Humble](https://docs.ros.org/en/humble/Installation.html) (Has not been tested with other ROS versions)
```sh
rosdep install -r --from-paths src --ignore-src --rosdistro $ROS_DISTRO -y
```
### 2.3 Build
```sh
cd /path/to/your/ros2_ws/
colcon build --symlink-install
```
### 2.4 Launch the PCD2PGM
```sh
source install/setup.sh
ros2 launch pcd2pgm pcd2pgm.launch.py
```
## 3. Parameter Description
You can configure the node's parameters by modifying the `pcd2pgm/pcd2pgm.yaml` file.
```yaml
pcd2pgm_node:
ros__parameters:
resolution: 0.1
min_points_in_pix: 0
max_points_in_pix: 1
min_height: 0.5
max_height: 100.0
input_pcd: "/home/user/ros2_ws/src/pcd2pgm/map/test0312.pcd"
dest_directory: "/home/user/ros2_ws/src/pcd2pgm/map"
output_pgm_name: "test"
```