Skip to content

Commit

Permalink
working release
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinPHR committed Mar 11, 2020
1 parent 032b774 commit a6e80bf
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 28 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ env/
.ipynb_checkpoints/
.idea/
dist/
MANIFEST
MANIFEST
build/
test.py
space_time_astar.egg-info/
23 changes: 9 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
from distutils.core import setup
import setuptools

# read the contents of your README file
from os import path
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
with open("README.md", "r") as fh:
long_description = fh.read()

setup(
setuptools.setup(
name = 'space-time-astar', # How you named your package folder (MyLib)
packages = ['stastar'], # Chose the same as "name"
version = '0.2', # Start with a small number and increase it with every change you make
packages=setuptools.find_packages(),
version = '0.3.4', # Start with a small number and increase it with every change you make
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
description = 'A* search algorithm with an added time dimension to deal with dynamic obstacles.', # Give a short description about your library
author = 'Haoran Peng', # Type in your name
author_email = '[email protected]', # Type in your E-Mail
url = 'https://github.com/GavinPHR/Space-Time-AStar', # Provide either the link to your github or to your website
download_url = 'https://github.com/GavinPHR/Space-Time-AStar/archive/v0.1-alpha.tar.gz', # I explain this later on
keywords = ['astar-algorithm', 'obstacle-avoidance', 'time-dimension'], # Keywords that define your package best
install_requires=[ # I get to this in a second
'numpy',
Expand All @@ -26,14 +23,12 @@
'Intended Audience :: Developers', # Define that your audience are developers
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License', # Again, pick a license
'Programming Language :: Python :: 3', #Specify which pyhton versions that you want to support
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
python_requires='>=3.5',
long_description=long_description,
long_description_content_type='text/markdown'
)

# python3 setup.py sdist bdist_wheel
# twine upload dist/*
# Tutorial at https://medium.com/@joel.barmettler/how-to-upload-your-python-package-to-pypi-65edc5fe9c56
10 changes: 9 additions & 1 deletion stastar/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
from space-time-astar.planner import Planner
#!/usr/bin/env python3
'''
Author: Haoran Peng
Email: [email protected]
'''
from . import planner
from . import neighbour_table
from . import grid
from . import state
16 changes: 4 additions & 12 deletions stastar/planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import numpy as np
from scipy.spatial import KDTree

from neighbour_table import NeighbourTable
from grid import Grid
from state import State
from .neighbour_table import NeighbourTable
from .grid import Grid
from .state import State


# static obstacles must include the boundary
Expand Down Expand Up @@ -120,12 +120,4 @@ def reconstruct_path(self, came_from: Dict[State, State], current: State) -> np.
return np.array(total_path[::-1])


if __name__ == '__main__':
grid_size = 1
robot_radius = 2
start = (2, 2)
goal = (50, 50)
static_obstacles = [(0, 0), (60, 70)]
dynamic_obstacles = {0: [(5, 16)], 1: [(5, 17)], 2: [(5, 18), (11, 20)]}
planner = Planner(grid_size, robot_radius, start, goal, static_obstacles, dynamic_obstacles)
print(planner.plan())

0 comments on commit a6e80bf

Please sign in to comment.