Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 2.41 KB

README.md

File metadata and controls

63 lines (43 loc) · 2.41 KB

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.