Giter Club home page Giter Club logo

3d-a-star-path-planning-simulated-with-coppeliasim's Introduction

3D A* Path Planning

This repository contains a 3D A* path planning algorithm that is simulated using ROS and CoppeliaSim.

Table of Contents

Prerequisites

Before you can run this code, make sure you have the following installed on your Ubuntu system:

  1. ROS (Robot Operating System)
  2. CoppeliaSim - Download the appropriate version for your system.
  3. Python libraries: numpy, math

Getting Started

Follow these steps to set up and run the code:

  1. Clone this repository and navigate to your workspace:

    mkdir -p ~/pathplanning/src
    cd ~/pathplanning
    catkin_init_workspace
    cd pathplanning/src
    catkin_create_pkg a_star_pathplanning std_msgs rospy
    cd pathplanning
    catkin build a_star_pathplanning
    source devel/setup.bash
    cd pathplanning/src/a_star_pathplanning
    mkdir scripts
    cd scripts
  2. Paste the a_star.py file in the scripts directory and make it executable:

    sudo chmod +x a_star.py
  3. Open a new terminal and add the following line to your ~/.bashrc to avoid sourcing the workspace every time:

    echo "source ~/pathplanning/devel/setup.bash" >> ~/.bashrc
  4. Start a ROS core in a new terminal:

    roscore
  5. Open CoppeliaSim using the following commands:

    cd CoppeliaSim_Edu_V4_3_0_Ubuntu20_04/
    ./coppeliaSim.sh

    CoppeliaSim should open.

  6. Load the scene A_star_simulation_map.ttt in CoppeliaSim.

  7. Run the scene in CoppeliaSim.

  8. Open a new terminal and run the following command to execute the Python script:

    rosrun a_star_pathplanning a_star.py

How the Code Works

The code works by creating a 3D array map to represent walkable and non-walkable areas (e.g., map[x, y, z] = 0 or 1). After defining the map, two random points are chosen as start and end points. The algorithm follows this flowchart:

Algorithm Flowchart

Results

Here are some visual results of the path planning algorithm:

Result 1

Result 2

3d-a-star-path-planning-simulated-with-coppeliasim's People

Contributors

mostafaelfeel avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.