Giter VIP home page Giter VIP logo

accelerated-rrt-star-with-ldv's Introduction

Accelerated RRT* with LDV

Implementation of the Accelerated RRT* with Local Directional Visibility (LDV) Algorithm

Authors

Vikram Setty ([email protected])

Vinay Lanka ([email protected])

Algorithm visualised

This Python script (grid_world/main.py) demonstrates the Accelerated RRT* with LDV algorithm (based on the paper linked here) for pathfinding in a 2D grid environment using PyGame for visualization. The script generates a map with obstacles and walls, allows the user to input a start and goal position, and then visualizes the process of finding the shortest path from the start to the goal using the algorithm.

Dependencies

The dependencies for this Python 3 project include the following:

  • NumPy
  • PyGame
  • ImageIO
They can be installed using the following commands.
    pip3 install numpy
    pip3 install pygame
    pip3 install opencv-python
    pip3 install imageio
    pip3 install imageio-ffmpeg

Running the Script

To run the script, use the following commands:

    cd grid_world/
    python3 main.py

Once the animation window opens, do the following:

  • Click any area (except obstacles) to mark the start node
  • Click on another point (except obstacles) to mark the target/goal node
  • Click on the space key to start the RRT* Simulation.

Do note that the map type being run on and other parametets specific to the algorithm can be changed inside grid_world/main.py.

ROS and Gazebo Implementation

The second part of the project replicates the algorithm devised in a Gazebo simulation environment using ROS 2. An appropriate conversion to the linear and angular velocity input to the non-holonoimic differential-drive Turtlebot 3 Waffle-Pi robot is given to enable the robot to follow the same trajectory in the same map in Gazebo (scaled by 1mm/pixel).

Dependencies

This package is tested to run in a ROS 2 Galactic setup on Ubuntu 20.04. Please prefer this environment specification before proceeding. In addition, a couple more dependencies needed to run the package can be installed using the commands below.

Building the Package

To build the package, execute.

    # Navigate to the src directory of your ROS 2 workspace
    cd acc_rrt_star_ws/
    # Install all dependencies
    rosdep install --from-paths src -y --ignore-src
    # Build the package and source the setup file
    colcon build && source install/setup.bash

To launch the environment, execute the following commands.

    # Navigate to the src directory of your ROS 2 workspace
    cd acc_rrt_star_ws/
    # Source the workspace
    source install/setup.bash
    # Export TURTLEBOT3_MODEL
    export TURTLEBOT3_MODEL=waffle
    # Run the launch file to start the gazebo environment
    ros2 launch acc_rrt_star competition_world.launch.py

To run a sample trajectory, execute the following commands. You will also be prompted to input only the goal node position (in a way similar to part 1). The start position and other parameters are fixed. A sample goal position is (5750,1000) i.e. the same coordinates used in Part 1.

    # Navigate to the src directory of your ROS 2 workspace
    cd ros2_ws
    # Source the workspace
    source install/setup.bash
    # Run the file to start the sample trajectory
    ros2 run acc_rrt_star main.py

Simulation Video

The YouTube link to a sample simulation video of this project is embedded below. The link to the same can also be found here.

Video

accelerated-rrt-star-with-ldv's People

Contributors

vikrams169 avatar vinay-lanka 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.