Skip to content

Path Planning with Metaheuristic Algorithms in C++

Notifications You must be signed in to change notification settings

sippathamm/MTHPlanner

Repository files navigation

Path Planning with Metaheuristic Algorithms

This repository provides implementations of path planning using metaheuristic algorithms based-on cost map, including IPSO, IGWO, and ABC. It includes an example file Planner.cpp in the source directory.

Usages

Example

Run the example file Planner.cpp in the source directory. You can change the configurations of planner and path in the file. It outputs some useful information such as convergence, breakpoint and waypoint coordinates, and path length.

Helper Python Scripts

There are three helper Python scripts in the scripts directory:

  • create_costmap_from_image.py: This Python script converts an image file representing a map into a text-based cost map file. The cost map file contains information about the obstacles and traversable areas in the map. Darker areas in the image represent lethal or high-cost regions. The cost values range from 0 to 255, where 0 represents free areas and higher values signify avoidance areas.
  • create_image_from_costmap.py: This Python script performs the inverse operation of create_costmap_from_image.py. It takes a text-based cost map file and converts it into an image representation.
  • plot_waypoint.py: This Python script plots the waypoints generated by a path planning algorithm from Planner.cpp. The script provide options for customizing the appearance of the plotted waypoints, such as colors, markers, and labels.

Adjusting Lethal Area Cost

You can adjust the minimum cost for defining lethal areas by modifying the macro LETHAL_COST in the Utility.h file.

Animation

Author

This repository is maintained by Sippawit Thammawiset. You can contact the author at sippawit.t@kkumail.com