This is a ROS 2 port of the iPlanner package, integrated into the Autonomous Exploration Development Environment.
iPlanner is a deep learning-based path planner that generates local paths from depth images. This package migrates the original ROS 1 functionality to ROS 2 Humble.
- ROS 2 Humble
- Python 3.10+
- PyTorch (tested with 2.5.1+cu124)
- Torchvision
- NumPy (<2.0)
- OpenCV
- cv_bridge
-
Clone specific branch (if applicable) or copy to your
srcfolder.Note: This repository uses Git LFS for large model files. Ensure you have
git-lfsinstalled:sudo apt-get install git-lfs git lfs install
-
Install dependencies:
rosdep install --from-paths src --ignore-src -r -y
-
Build the package:
colcon build --symlink-install --packages-select iplanner_ros2
Download the pre-trained network weights plannernet.pt here and put it into the models folder. Noted this pre-trained network has not been adapted to real-world data.
First, launch the vehicle_simulator with the desired environment:
ros2 launch vehicle_simulator system_garage.launchIn a separate terminal, source the workspace and launch the planner:
source install/setup.bash
ros2 launch iplanner_ros2 iplanner.launch.pyYou can check iplanner_node status via:
ros2 topic echo /ip_planner_statusSend a goal using Rviz "2D Nav Goal" or publish to /way_point (PointStamped).
-
Subscribed:
/camera/depth/image_raw(sensor_msgs/Image): Depth image input/way_point(geometry_msgs/PointStamped): Goal point/joy(sensor_msgs/Joy): Joystick input (optional)
-
Published:
/path(nav_msgs/Path): Generated path/path_fear(nav_msgs/Path): Alternative path when "fear" (obstacle) is detected/ip_planner_status(std_msgs/Int16): Planning status (0: Planning, 1: Success, -1: Fail)
- Visualization: The original
iplanner_viznode has not been ported. Use Rviz to visualize the/pathand/camera/depth/image_rawtopics. - Model File: The pre-trained model
plannernet.ptis loaded fromsrc/iplanner_ros2/iplanner_ros2/models/.
If you use this work, please cite the original paper:
@article{yang2023iplanner,
title={iPlanner: perception-aware path planning for autonomous navigation in complex environments},
author={Yang, Fan and Zhang, Tingrui and Hutter, Marco},
journal={arXiv preprint arXiv:2309.02700},
year={2023}
}