Skip to content

OkayPlan: A real-time global path palnning algorithm for dynamic environments

License

Notifications You must be signed in to change notification settings

XinJingHao/OkayPlan

Repository files navigation

OkayPlan: A real-time path planning algorithm for dynamic environments

This is the authors' implementation of OkayPlan.

Dependencies:

torch >= 2.1.1
pygame >= 2.5.2
numpy >= 1.26.2

python >= 3.11.5

You can install torch by following the guidance from its official website. We strongly suggest you install the CUDA 12.1 version, though CPU version or lower CUDA version are also supported.


How to use:

After installation, you can run OkayPlan via:

python Application_Phase.py

Then you will see:

where the red point is our robot, the green point is the target, and the blue curve is the path generated by OkayPlan.

Play with Keyboard:

You can also play with OkayPlan using your Keyboard (UP/DOWN/LEFT/RIGHT) :

python Application_Phase.py --Playmode True --FPS 30

Basic parameters:

There are 6 parameters that could be configured when running OkayPlan:

  • dvc (string; default 'dvc'):

    • The device that runs the OkayPlan

    • Should be one of 'cpu'/'cuda'. We suggest using 'cuda' (GPU) to accelerate the simulation

  • RO (bool; default 'True'):

    • True = random obstacles; False = consistent obstacles
  • DPI (bool; default 'True'):

    • True = Dynamic Prioritized Initialization; False = Prioritized Initialization
  • KP (bool; default 'True'):

    • True = Use Kinematics Penalty; False = Not use Kinematics Penalty
  • FPS (int; default '0'):

    • The FPS when rendering
    • '0' means render at the maximum speed
  • Playmode (bool; default 'False'):

    • True = Control the target point with your keyboard (UP/DOWN/LEFT/RIGHT); False = Target point moves by itself

Comparison with other methods (real-time rendering):


Decoupled Implementation:

The decoupled implementation of OkayPlan can be found in folder 'Decoupled Implementation', where the L_SEPSO.py is decoupled into Planner.py, Env.py, and mian.py.

ROS Implementation:

Link: https://github.com/XinJingHao/okayplan_ros okayplan_ros

Citing this Project:

To cite this repository in publications:

@article{XinOkayPlan,
title = {OkayPlan: Obstacle Kinematics Augmented Dynamic real-time path Planning via particle swarm optimization},
journal = {Ocean Engineering},
volume = {303},
pages = {117841},
year = {2024},
issn = {0029-8018},
doi = {https://doi.org/10.1016/j.oceaneng.2024.117841},
url = {https://www.sciencedirect.com/science/article/pii/S002980182401179X},
author = {Jinghao Xin and Jinwoo Kim and Shengjia Chu and Ning Li},
}

About

OkayPlan: A real-time global path palnning algorithm for dynamic environments

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages