sbp-env
sbp-env: A Python Package for Sampling-based Motion Planner and Samplers - Published in JOSS (2021)
Science Score: 95.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 7 DOI reference(s) in README and JOSS metadata -
✓Academic publication links
Links to: joss.theoj.org -
✓Committers with academic emails
3 of 4 committers (75.0%) from academic institutions -
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Keywords
Scientific Fields
Repository
Motion planning environment for Sampling-based Planners
Basic Info
- Host: GitHub
- Owner: soraxas
- License: mit
- Language: Python
- Default Branch: master
- Homepage: http://cs.tinyiu.com/sbp-env
- Size: 16.1 MB
Statistics
- Stars: 31
- Watchers: 0
- Forks: 14
- Open Issues: 1
- Releases: 5
Topics
Metadata Files
README.md
Sampling-Based Motion Planners' Testing Environment
Sampling-based motion planners' testing environment (sbp-env) is a full feature framework to quickly test different sampling-based algorithms for motion planning. sbp-env focuses on the flexibility of tinkering with different aspects of the framework, and had divided the main planning components into two categories (i) samplers and (ii) planners.
The focus of motion planning research had been mainly on (i) improving the sampling efficiency (with methods such as heuristic or learned distribution) and (ii) the algorithmic aspect of the planner using different routines to build a connected graph. Therefore, by separating the two components one can quickly swap out different components to test novel ideas.
Have a look at the documentations for more detail information. If you are looking for the previous code for the RRdT* paper it is now archived at soraxas/rrdt.
Quick start with custom arbitrary environments
sh
pip install sbp-env
```python import sbp_env
from math import exp, sin, cos
for functor in [ # simple inequality lambda x: (x[1] < x[0] + 1) and (x[1] > x[0] - 1), # equation adopted from https://au.mathworks.com/help/matlab/ref/peaks.html lambda x: 0 < ( 3 * (1 - x[0]) ** 2.0 * exp(-(x[0] ** 2) - (x[1] + 1) ** 2) - 10 * (x[0] / 5 - x[0] ** 3 - x[1] ** 5) * exp(-x[0] ** 2 - x[1] ** 2) - 1 / 3 * exp(-((x[0] + 1) ** 2) - x[1] ** 2) ), lambda x: -0.22 < (cos(x[0]) * sin(x[1])), lambda x: 0.05 < (cos(x[0] ** 2 + x[1] ** 2)), ]: engine = sbpenv.engine.BlackBoxEngine( collisioncheckingfunctor=functor, lowerlimits=[-5, -5], upperlimits=[5, 5], ccepsilon=0.1, # collision check resolution ) planningargs = sbpenv.generateargs( plannerid="rrt", engine=engine, startpt=[-3, -3], goalpt=[3, 3], display=True, first_solution=True, )
env = sbp_env.env.Env(args=planning_args)
env.run()
print(env.get_solution_path(as_array=True))
```
Installation
Optional
I recommend first create a virtual environment with
```sh
assumes python3 and bash shell
python -m venv sbpenv source sbpenv/bin/activate ```
Install dependencies
You can install all the needed packages with pip.
sh
pip install -r requirements.txt
There is also an optional dependency on klampt if you want to use the 3D simulator. Refer to its installation guide for details.

Quick Guide
You can get a detailed help message with
sh
python main.py --help
but the basic syntax is
sh
python main.py <PLANNER> <MAP> [options]
It will open a new window that display a map on it. Every white pixel is assumed to be free, and non-white pixels are obstacles. You will need to use your mouse to select two points on the map, the first will be set as the starting point and the second as the goal point.
Demos
Run maps with different available Planners
This repository contains a framework to performs quick experiments for Sampling-Based Planners (SBPs) that are implemented in Python. The followings are planners that had implemented and experimented in this framework.
Note that the commands shown in the respective demos can be customised with additional options. In fact, the actual command format used for the demonstrations is
sh
python main.py <PLANNER> maps/room1.png start <sx>,<sy> goal <sx>,<sy> -vv
to have a fix set of starting and goal points for consistent visualisation, but we omitted the start/goal options in the following commands for clarity.
RRdT*
sh
python main.py rrdt maps/room1.png -vv
RRT*
sh
python main.py rrt maps/room1.png -vv
Bi-RRT*
sh
python main.py birrt maps/room1.png -vv
Informed RRT*
sh
python main.py informedrrt maps/room1.png -vv
The red ellipse shown is the dynamic sampling area for Informed RRT*
Others
There are also some other planners included in this repository. Some are preliminary planner that inspired RRdT*, some are planners with preliminary ideas, and some are useful for debugging.
Reference to this repository
You can use the following citation if you use this repository for your research
bibtex
@article{lai2021SbpEnv,
doi = {10.21105/joss.03782},
url = {https://doi.org/10.21105/joss.03782},
year = {2021},
publisher = {The Open Journal},
volume = {6},
number = {66},
pages = {3782},
author = {Tin Lai},
title = {sbp-env: A Python Package for Sampling-based Motion Planner and Samplers},
journal = {Journal of Open Source Software}
}
Owner
- Name: Tin Lai
- Login: soraxas
- Kind: user
- Website: https://cs.tinyiu.com
- Repositories: 237
- Profile: https://github.com/soraxas
Crafting code to simplify life.
JOSS Publication
sbp-env: A Python Package for Sampling-based Motion Planner and Samplers
Tags
motion planning sampling-based planner roboticsGitHub Events
Total
Last Year
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Oscar Lai | t****8@u****u | 262 |
| Tin Lai | t****i@s****u | 9 |
| Daniel S. Katz | d****z@i****g | 2 |
| Edoardo Fusa | 8****a | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 9
- Total pull requests: 10
- Average time to close issues: 4 days
- Average time to close pull requests: about 3 hours
- Total issue authors: 3
- Total pull request authors: 3
- Average comments per issue: 2.89
- Average comments per pull request: 0.4
- Merged pull requests: 10
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- OlgerSiebinga (5)
- KanishAnand (3)
- Jiawei-00 (1)
Pull Request Authors
- soraxas (8)
- danielskatz (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 11 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: sbp-env
Motion planning environment for Sampling-based Planners
- Homepage: https://github.com/soraxas/sbp-env
- Documentation: https://sbp-env.readthedocs.io/
- License: MIT
-
Latest release: 2.0.2
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- sphinx-autoapi *
- sphinx-autodoc-defaultargs *
- sphinx-autodoc-typehints *
- sphinx-prompt *
- sphinx-rtd-theme *
- sphinxcontrib-katex *
- SALib *
- docopt *
- networkx *
- overrides *
- pillow *
- pygame *
- rtree *
- tqdm *
- ghalton *
- klampt ==0.8.7
- actions/checkout v2 composite
- actions/setup-python v2 composite
- jpetrucciani/black-check master composite
- actions/checkout v1 composite
- ad-m/github-push-action master composite
- ammaraskar/sphinx-action master composite
- for *
