Skip to content

Quantum Optimization Algorithm (QOA) for 3D AUV path planning in obstacle environments, enabling fast and efficient trajectory optimization and real-time visualization in a virtual ocean scene.

Notifications You must be signed in to change notification settings

AIT-Research-Group/Path-Planning-Optimal-for-AUVs-Quantum-Optimization-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AUV Path Planning using QPSO with Unreal Engine Integration

This project utilizes the Quantum-behaved Particle Swarm Optimization (QPSO) algorithm in MATLAB to compute an optimal 3D path for an Autonomous Underwater Vehicle (AUV). This path enables the AUV to navigate from a starting point to a destination while avoiding obstacles. The entire environment, including the positions of the AUV, obstacles, and the final destination, is configured and transmitted from the Unreal Engine.


🎯 Features

  • 3D Path Planning: Searches for and optimizes a trajectory in a three-dimensional space.
  • QPSO Algorithm: Applies the QPSO algorithm to find the shortest and safest path.
  • Unreal Engine: Communicates bidirectionally with Unreal Engine via the UDP protocol to receive environment data and send back the calculated path.
  • Collision Avoidance: The calculated path is designed to avoid obstacles, which are defined by their Axis-Aligned Bounding Boxes (AABBs).
  • Visualization: Displays the 3D environment, obstacles, and the optimized path directly present combine MATLAB with Unreal Engine Software.

⚙️ Workflow

The system operates in a closed loop between Unreal Engine and MATLAB:

  1. Receive Data From Unreal Engine:

    • The user sets up a scenerio in Matlab, defining the start position (AUV), destination (Flag), and obstacles (Rocks).
    • Unreal receiver and feedback to Matlab which information operate AUV.
    • The unreal_receive_only.m script in MATLAB listens on UDP port 9010, receives this data, and saves it to a file named scene_note.txt.
  2. Calculate Path in MATLAB:

    • The main script, QOA.m, is executed. It can either read the environment data from scene_note.txt or use pre-defined values within the script.
    • The QPSO algorithm is run to find a sequence of waypoints that form the optimal path.
    • The resulting waypoints are written to the blue_points.txt file.
  3. Send Path to Unreal Engine:

    • The send_bluepoints_to_unreal.m script reads the blue_points.txt file.
    • It sends each waypoint coordinate to Unreal Engine via UDP port 3008.
    • Unreal receives these points and directs the AUV to follow the calculated path.

📁 Project Structure

  • QOA.m: Main execution file.
    • Initializes the 3D environment, including the start point, goal, and obstacles.
    • Implements the QPSO algorithm to optimize the path.
    • Visuale final patizes the results and saves thh to blue_points.txt.
  • send_bluepoints_to_unreal.m: Sends the path to Unreal.
    • Reads the blue_points.txt file.
    • Transmits the waypoint coordinates to Unreal via UDP.
  • unreal_receive_only.m: Receives scene information from Unreal.
    • Receive data from UDP port to achieve coordinates of the AUV, flag (goal), and rocks.
    • PSaves into scene_note.txt.
  • readObj.m: Utility function.
    • Reads and parses 3D model files in the .obj format to visualize obstacles.

🚀 How to Use

Prerequisites

  • MATLAB: Version R201a or newer.
  • Toolbox: Instrument Control Toolbox™ (required for the udpport function).
  • Unreal Engine: Version 4 or 5, with a project configured for UDP communication.

Steps

  1. Start the Unreal Engine Scene: Open your project in Unreal Engine and run the simulation. Ensure your setup is configured to send scene data (AUV, flag, rocks positions) via UDP to port 9010.

  2. Receive enviroment Data (in MATLAB):

    • Run the unreal_receive_only.m script.
    • The script will wait for incoming data. Upon successful reception, it will create the scene_note.txt file.
  3. Calculate the Optimal Path (in MATLAB):

    • Open and run the QOA.m script.
    • Note: Ensure QOA.m is configured to read from scene_note.txt if you are using live data from Unreal.
    • The optimization process will begin. A plot window will appear, visualizing the environment and the resulting path.
    • Once completed, a file named blue_points.txt containing the path's waypoints will be generated.
  4. Send the Path back to Unreal (in MATLAB):

    • Run the send_bluepoints_to_unreal.m script.
    • This script will send the waypoints from blue_points.txt to Unreal via port 3008.
    • Observe the AUV in Unreal Engine as it moves along the calculated path.

Customization

You can easily customize the algorithm's parameters in QOA.m:

  • start, goal: The start and end points of the path.
  • rocks: The coordinates and sizes of the obstacles.
  • num_waypoints: The number of intermediate points that make up the path.
  • num_particles, max_iter: QPSO algorithm parameters (number of particles and maximum iterations).
  • unrealIP, unrealPort: The IP address and port for the receiving Unreal Engine application (customizable in send_bluepoints_to_unreal.m).

About

Quantum Optimization Algorithm (QOA) for 3D AUV path planning in obstacle environments, enabling fast and efficient trajectory optimization and real-time visualization in a virtual ocean scene.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages