Skip to content

The author's implementation of the OPCD (OkayPlan-ColorDynamic) navigation system.

License

Notifications You must be signed in to change notification settings

XinJingHao/OPCD-Navigation

Repository files navigation



The OPCD (OkayPlan & ColorDynamic) Navigation System
for Unstructured & Dynamic Environments


Gallery

                                                                            The video can be found here.

Installation

Tested on ubuntu 20.04 LTS with ROS Noetic.

  1. Install ROS (Desktop-Full Install Recommended).

  2. Install git:

    sudo apt install git
  3. Install Anaconda

  4. Clone this repo:

    cd ~/
    git clone https://github.com/XinJingHao/OPCD-Navigation.git
    mv OPCD-Navigation ros_motion_planning # rename this repo, very important!
    
  5. Create a conda virtual environment:

    conda create -n opcd python=3.8.3
  6. Install python dependence:

    cd ~/ros_motion_planning
    conda activate opcd
    pip3 install -r requirements.txt

    If you are in China, you can use the following command to speed up installation:

    cd ~/ros_motion_planning
    conda activate opcd
    pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/
  7. Install ROS packages:

    sudo apt update
    sudo apt install python-is-python3 \
    ros-noetic-gazebo-plugins \
    ros-noetic-gazebo-ros \
    ros-noetic-gazebo-ros-control \
    ros-noetic-geometry-msgs \
    ros-noetic-move-base \
    ros-noetic-roscpp \
    ros-noetic-rospy \
    ros-noetic-std-msgs \
    ros-noetic-tf2 \
    ros-noetic-tf2-geometry-msgs \
    ros-noetic-tf2-ros \
    ros-noetic-urdf \
    ros-noetic-xacro \
    ros-noetic-amcl \
    ros-noetic-base-local-planner \
    ros-noetic-map-server \
    ros-noetic-navfn \
    libgoogle-glog-dev
  8. Compile the code:

    cd ~/ros_motion_planning/scripts/
    conda activate opcd
    ./build.sh  # you may need to install catkin-tools using: sudo apt install python-catkin-tools

    NOTE: Please refer to #48 if you meet libignition dependency error.

Quick Start

  1. Launch the simulation environments:

    cd ~/ros_motion_planning/scripts/
    ./ColorDynamic.sh # wait for the Gazebo and Rviz to get ready
  2. Start the OkayPlan global planner:

    cd ~/ros_motion_planning/src/sim_env/scripts/OkayPlan_ColorDynamic/Play/OkayPlan/
    conda activate opcd
    python OkayPlan_main.py
  3. Start the ColorDynamic local planner:

    cd ~/ros_motion_planning/src/sim_env/scripts/OkayPlan_ColorDynamic/Play/ColorDynamic/
    conda activate opcd
    python ColorDynamic_main.py
  4. Wait for about 5 seconds until the OkayPlan and ColorDynamic are ready

  5. Use 2D Nav Goal in Rviz to set the navigation goal.

  6. Moving!

  7. You can use the other script to shutdown them rapidly.

    cd ~/ros_motion_planning/scripts/
    ./killpro.sh

Remarks

System Information:

    Ubuntu=20.04
    ROS=Noetic
    gazebo=11.11.0
    rviz=1.14.20
    python=3.8.3
    CUDA Driver=550.120
    CUDA Version=12.4

File structure:

~/ros_motion_planner
├── 3rd
├── docs
├── docker
├── assets
├── scripts # .sh scripts for start simulation
└── src
    ├── core
    │   ├── common
    │   ├── path_planner # Classical global planner
    │   └── controller # Classical local planner
    ├── pgm_map_creator # Occupancy grid map generator
    ├── sim_env             # simulation environment
    │   ├── config
    │   ├── launch # Launch files for OPCD and Classical Planners
    │   ├── maps
    │   ├── meshes
    │   ├── models
    │   ├── rviz
    │   ├── scripts # Python scripts of OkayPlan and ColorDynamic
    │   ├── urdf # urdf files for Gazebo robot simulation
    │   └── worlds
    ├── plugins
    │   ├── dynamic_rviz_config
    │   ├── dynamic_xml_config
    │   ├── gazebo_plugins
    │   ├── map_plugins
    │   └── rviz_plugins
    └── user_config         # user configure file for Classical Planner

Related Repos:


Citing this Project

To cite this repository in publications:

@article{ColorDynamic,
  title={ColorDynamic: Generalizable, Scalable, Real-time, End-to-end Local Planner for Unstructured and Dynamic Environments},
  author={Jinghao Xin, Zhichao Liang, Zihuan Zhang, Peng Wang, and Ning Li},
  journal={arXiv preprint arXiv:2502.19892},
  year={2025}
}

Important Notes:

The ROS simulation environment is built on ai-winter/ros_motion_planning.

About

The author's implementation of the OPCD (OkayPlan-ColorDynamic) navigation system.

Resources

License

Stars

Watchers

Forks