Giter Site home page Giter Site logo

gennav's Introduction

GenNav

License: MIT Build Status Language grade: Python Total alerts Documentation Status

Status: Under Development

A python package for robot navigation algorithms.

Installation

The package is currently under development so we suggest installing from source.

From Source (Recommended)

git clone https://github.com/ERC-BPGC/gennav.git
cd gennav
python -m pip install .

Using pip

pip install gennav

Usage

To plan a path using the Rapidly-exploring random tree algorithm in a polygon based environment representation.

from gennav.planners import RRT
from gennav.envs import PolygonEnv
from gennav.utils import RobotState
from gennav.utils.geometry import Point
from gennav.utils.samplers import UniformRectSampler

obstacles = []  # obstacles can be added here
env = PolygonEnv()  # polygon environment to keep track of obstacles
env.update(obstacles)  # updating environment with obstacles

sampler = UniformRectSampler(-5, 15, -5, 15)  # for sampling random states
planner = RRT(sampler=sampler, expand_dis=0.1)  # creating the planner

start = RobotState(position=Point(1, 1))  # starting state
goal = RobotState(position=Point(10, 10))  # goal state

path, info_dict = planner.plan(start, goal, env)  # planning path through obstacles

Note that the environment have been left blank empty here, they should be updated as per use case.

For more details you can refer to our documentation.

ROS Integration

If you wish to use gennav in a ROS based stack, check out gennav_ros.

Contributions

Contributions are always welcome. We reccomend you check out contribution guidelines and view the docs beforehand.

gennav's People

Contributors

archit2604 avatar hardesh avatar harsh336 avatar jarvis-bits avatar mihirdharmadhikari avatar ojitmehta123 avatar pranavgo avatar srujan-d avatar suhrudhsarathy avatar sushant1212 avatar threewisemonkeys-as avatar veds12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gennav's Issues

Add nearest_obstacle_distance method to scan environment

The nearest_obstacle_distance method returns the distance to the nearest obstacle. Check the base.py file in envs to know about the general implementation of the method. As an example you can also take a look at the method implemented in the PolygonEnv.

Improve docs

  1. Organise docs into logical sections
  2. Add intro text
  3. Add examples
  4. Fix minor formatting issues in docstrings (good first issue)

We are using this style guide

Adding odometry simulator

A class for an odometry simulator would be very useful for testing controllers. SInce our courrent controllers output a velocity, the simulator would take the velocity command at each step and numerically integrate (basically add) it to get distance travelled.

Now to simulate real life conditions, instead of giving back the position derived directly by integrating (the true position) the class will add gaussian noise (using np.random.randn) to it and then return it back to controller. The simulator would be added in /utils

Basic structure would be

class Simulator
    def __init__(controller)
        ...
    def run(parameters)
        ...

Fix bug in RRT

There is a bug in RRT which is causing tests to fail randomly. Sometimes the planned path is correct while sometimes it isnt.

Path Post Processing

Implement the following path post processing algorithms

  1. Interpolation based path smoothening
  2. Bezeir Curves
  3. B-splines
  4. Cubic-Splines

Add example for rrg

In /examples/rrt.py add a short example of how PRM can be used by an external user

Add examples for prm

In /examples/prm.py add a short example of how PRM can be used by an external user

Add wavefront planner

https://www.youtube.com/watch?v=Ls8EBoG_SEQ&t=1694s

This lecture is a good starting point to understand apf planning algorithms. A unique requirement in wavefront planner is that you need to represent the planning area in the form of a grid world. Asking the user for the coordinates of the points enclosing the grid environment(for eg. the coordinates of end points in case of a polygonal grid world) would be the preferable way to go about this. The dimension of each cell in the grid depends upon the intended resolution

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.