This is an implementation of paper Efficient Global Navigational Planning in 3-D Structures Based on Point Cloud Tomography (accepted by TMECH). It provides a highly efficient and extensible global navigation framework based on a tomographic understanding of the environment to navigate ground robots in multi-layer structures.
Demonstrations: pct_planner
If you use PCT Planner, please cite the following paper:
Efficient Global Navigational Planning in 3-D Structures Based on Point Cloud Tomography
@ARTICLE{yang2024efficient,
author={Yang, Bowen and Cheng, Jie and Xue, Bohuan and Jiao, Jianhao and Liu, Ming},
journal={IEEE/ASME Transactions on Mechatronics},
title={Efficient Global Navigational Planning in 3-D Structures Based on Point Cloud Tomography},
year={2024},
volume={},
number={},
pages={1-12}
}- Ubuntu >= 20.04
- ROS2 Humble with desktop-full installation (
ros-humble-desktop) - CUDA >= 11.7
- Python >= 3.10 (bundled with Ubuntu 22.04)
- CuPy matching your CUDA version
- Open3d
Add this to your ~/.bashrc (run once):
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrcROS2 Humble requires Python 3.10. The venv must use --system-site-packages so that ROS2 Python packages (rclpy, sensor_msgs_py, etc.) remain accessible:
python3.10 -m venv pct_env --system-site-packages
source pct_env/bin/activateTo activate the environment in future sessions:
source pct_env/bin/activatepip install open3d numpy
# Install CuPy matching your CUDA version (check with: nvidia-smi)
# CUDA 12.x:
# pip install cupy-cuda12x
# CUDA 13.x:
pip install cupy-cuda13xInside the package, there are two modules: the point cloud tomography module for tomogram reconstruction (in tomography/) and the planner module for path planning and optimization (in planner/). You only need to build the planner module before use. In planner/, run build_thirdparty.sh first and then run build.sh.
cd planner/
./build_thirdparty.sh
./build.shThree example scenarios are provided: "Spiral", "Building", and "Plaza".
- "Spiral": A spiral overpass scenario released in the 3D2M planner.
- "Building": A multi-layer indoor scenario with various stairs, slopes, overhangs and obstacles.
- "Plaza": A complex outdoor plaza for repeated trajectory generation evaluation.
To plan in a scenario, first you need to construct the scene tomogram using the pcd file.
- Unzip the pcd files in rsc/pcd/pcd_files.zip to rsc/pcd/.
- For scene "Spiral", you can download the pcd file from 3D2M planner spiral0.3_2.pcd.
- Start RViz2 with the provided config:
rviz2 -d rsc/rviz/pct_ros.rviz- Activate your virtual environment and, in tomography/scripts/, run tomography.py with the --scene argument:
source pct_env/bin/activate
cd tomography/scripts/
python3 tomography.py --scene Spiral- The generated tomogram is visualized as ROS2 PointCloud2 message in RViz2 and saved in rsc/tomogram/.
After the tomogram is constructed, you can run the trajectory generation example.
- In planner/scripts/, run plan.py with the --scene argument:
source pct_env/bin/activate
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/YOUR/DIRECTORY/TO/PCT_planner/planner/lib/3rdparty/gtsam-4.1.1/install/lib:/YOUR/DIRECTORY/TO/PCT_planner/planner/lib/build/src/common/smoothing
cd planner/scripts/
python3 plan.py --scene Spiral- The generated trajectory is visualized as ROS2 Path message in RViz2.
The source code is released under GPLv2 license.
For commercial use, please contact Bowen Yang byangar@connect.ust.hk.
Open three terminals. In each, first run:
source ~/.bashrc
source /path/to/PCT_planner/pct_env/bin/activatecd tomography/scripts/
python3 tomography.py --scene Spiralcd /path/to/PCT_planner
rviz2 -d rsc/rviz/pct_ros.rvizexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/PCT_planner/planner/lib/3rdparty/gtsam-4.1.1/install/lib:/path/to/PCT_planner/planner/lib/build/src/common/smoothing
cd planner/scripts/
python3 plan.py --scene Spiral| Parameter | Description |
|---|---|
start_pos |
Start position in meters [x, y] (map frame) |
end_pos |
Goal position in meters [x, y] (map frame) |
start_layer |
Start layer index (0 = ground floor) |
end_layer |
Goal layer index |
The Z coordinate (height) is automatically determined by the tomogram layer. You only specify the 2D position and which layer to start/end on.
| Parameter | Description | Default |
|---|---|---|
map.resolution |
Grid cell size in meters | 0.20 |
map.slice_dh |
Height per initial slice (meters) | 0.5 |
map.ground_h |
Ground plane height | 0.0 |
The number of final layers is automatically determined by layer simplification: initial slices that don't contain unique traversable surfaces are merged. Smaller slice_dh → more initial slices → potentially more final layers.
| Parameter | Description |
|---|---|
trav.slope_max |
Maximum traversable slope (radians) |
trav.step_max |
Maximum step height (meters) |
trav.safe_margin |
Obstacle clearance distance (meters) |
trav.inflation |
Cost inflation radius (meters) |
| Issue | Fix |
|---|---|
cudaErrorUnknown / cuInit() = 999 |
GPU driver in bad state. Run sudo reboot |
CycloneDDS enp130s0 does not match |
Set CYCLONEDDS_URI in ~/.bashrc to use loopback: export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces><NetworkInterface name="lo"/></Interfaces></General></Domain></CycloneDDS>' |
| RViz2 shows empty topics | Start RViz2 before or at the same time as the publisher nodes (QoS: TRANSIENT_LOCAL) |
Segmentation fault in planner |
Ensure libcommon_smoothing.so path is in LD_LIBRARY_PATH |
source ~/.bashrc deactivates venv |
Re-activate with source pct_env/bin/activate after sourcing bashrc |
