Skip to content

Commit

Permalink
edit README.md and installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
hungpham2511 committed Aug 4, 2019
1 parent aef91cd commit 37bad3c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 19 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ In general, given the inputs:
TOPP-RA returns the time-optimal path parameterization: `s_dot (s)`, from which the fastest trajectory `q(t)` that satisfies the given
constraints can be found.

## Quick-start

To install toppra, simple clone the repo and install with pip

``` shell
git clone https://github.com/hungpham2511/toppra
cd toppra && pip install .
```

To install depencidencies for development, replace the second command with:
``` shell
cd toppra && pip install -e .[dev]
```

## Citing TOPP-RA
If you use this library for your research, we encourage you to

Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
if __name__ == "__main__":
setup(install_requires=REQUIRES,
setup_requires=["numpy", "cython"],
extras_require={
'dev': [
'pytest',
'pytest-pep8',
'pytest-cov',
'tabulate',
'cvxpy'
]
},
packages=PACKAGES,
zip_safe=False,
name=NAME,
Expand Down
30 changes: 11 additions & 19 deletions toppra/interpolator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Implementations of interpolators, which representgeometric paths.
"""This module implements interpolators for representing geometric paths and trajectories.
"""
import logging
import warnings
Expand All @@ -21,13 +20,11 @@ def normalize(gridpoints):
# type: (np.ndarray) -> np.ndarray
"""Normalize the path discretization.
Parameters
----------
gridpoints: Path position array.
Args:
gridpoints: Path position array.
Returns
-------
out: Normalized path position array.
Returns:
out: Normalized path position array.
"""
return np.array(gridpoints) / gridpoints[-1]

Expand All @@ -36,17 +33,12 @@ def _find_left_index(gridpoints, s):
# type: (np.ndarray, float) -> int
"""Find the least lowest entry that is larger or equal.
Parameters
----------
gridpoints:
Array of path positions.
s:
A path position.
Returns
-------
out:
The desired index.
Args:
gridpoints: Array of path positions.
s: A path position.
Returns:
out: The desired index.
"""
for i in range(1, len(gridpoints)):
Expand Down

0 comments on commit 37bad3c

Please sign in to comment.