Motion planning environment for Sampling-based Planners

Overview

Sampling-Based Motion Planners' Testing Environment

Python version CI Build docs Code style: black License DOI

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.

Installation

Optional

I recommend first creates a virtual environment with

# assumes python3 and bash shell
python -m venv sbp_env
source sbp_env/bin/activate

Install dependencies

You can install all the needed packages with pip.

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

python main.py --help

but the basic syntax is

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

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*

python main.py rrdt maps/room1.png -vv

RRdT* Planner

RRT*

python main.py rrt maps/room1.png -vv

RRT* Planner

Bi-RRT*

python main.py birrt maps/room1.png -vv

Bi-RRT* Planner

Informed RRT*

python main.py informedrrt maps/room1.png -vv

Informed RRT* Planner

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

@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}
}
Comments
  • question on (example) usage

    question on (example) usage

    According to the submitted paper, with sbp-env "one can quickly swap out different components to test novel ideas" and "validate ... hypothesis rapidly". However, from the examples in the documentation, it is unclear to me how I can obtain performance metrics on the planners when a run a test.

    Is there a way to save such metrics to a file or print them when running planners in sbp-env? If not, this might be a nice feature to implement in a future version. Otherwise, you could consider adding an example to the documentation on how to compare different planners in the same scenario.

    (this question is part of the JOSS review openjournals/joss-reviews#3782)

    opened by OlgerSiebinga 5
  • Path recognition issue

    Path recognition issue

    I tried some source, destination positions with the following command and there seems some issue in recognition of the path. python main.py rrt maps/4d.png --engine 4d

    Attaching screenshot below: Screenshot from 2021-10-07 00-43-15

    (Part of the JOSS review openjournals/joss-reviews#3782)

    opened by KanishAnand 3
  • Python version compatibility with scipy

    Python version compatibility with scipy

    Mentioning the requirement of python version >= 3.8 in README would also help users the way it's done over here. Python versions < 3.8 are not compatible with scipy 1.6

    (Part of the JOSS review openjournals/joss-reviews#3782)

    opened by KanishAnand 3
  • Suggestion to make installation easier

    Suggestion to make installation easier

    I was wondering why you have the following remark block in your installation instructions: image

    I think it would be easier to add those two packages to the file requirements_klampt.txt. That way they'll be installed automatically, it saves the user an extra action. Or is there any reason I'm missing why that shouldn't be done?

    opened by OlgerSiebinga 3
  • Exception after running the example from the documentation

    Exception after running the example from the documentation

    When I run the example from the quick start page in the documentation, an exception occurs.

    The command: python main.py rrt maps/room1.png

    The exception:

    Traceback (most recent call last):
      File "main.py", line 287, in <module>
        environment.run()
      File "C:\Users\Olger\PycharmProjects\sbp-env\env.py", line 198, in run
        self.visualiser.terminates_hook()
      File "C:\Users\Olger\PycharmProjects\sbp-env\visualiser.py", line 148, in terminates_hook
        self.env_instance.sampler.visualiser.terminates_hook()
      File "C:\Users\Olger\PycharmProjects\sbp-env\env.py", line 126, in __getattr__
        return object.__getattribute__(self.visualiser, attr)
    AttributeError: 'PygameEnvVisualiser' object has no attribute 'sampler'
    

    The exception only occurs after the simulation has finished so it seems like a minor problem. Although I'm not really sure what happens at env.py, line 126, in __getattr__ and why. So, I don't have a proposed fix.

    opened by OlgerSiebinga 2
  • invalid start and goal point can be specified with command-line interface

    invalid start and goal point can be specified with command-line interface

    When specifying a goal and start point in the commands line, it is possible to specify invalid points. Specifying an invalid start and goal will result in an infinite loop.

    For example, running: python main.py rrt maps\room1.png start 10,10 goal 15,15, will result in an infinite loop with the following GUI:

    image

    Expected behavior when supplying an invalid option would be an exception.

    opened by OlgerSiebinga 1
  • Test Instructions

    Test Instructions

    Though it's standard, adding instruction to run tests in the documentation might be helpful for users wanting to contribute.

    (Part of the JOSS review openjournals/joss-reviews#3782)

    opened by KanishAnand 1
  • Graph building of prm planner without user information

    Graph building of prm planner without user information

    The graph building method in the prm planner (build_graph() in prmPlanner.py) can take quite some time when a large number of nodes is used. However, the user is not notified that the planner is still processing data. The first time I encountered this, I suspected the software got stuck in an infinite loop because the window was not responding anymore. I think this can be easily fixed by adding a tqdm bar in the build_graph() method (at line 83)

    (this suggestion is part of the JOSS review openjournals/joss-reviews#3782)

    opened by OlgerSiebinga 1
  • Skip-optimality Problem

    Skip-optimality Problem

    Hi 1.I am wonderingt that the parameter (use_rtree)in choose_least_cost_parent() function and rewire() funtion (RRT). Is it no longer necessary because we use numpy's calculation method? 2. When i run the informedrrt algorithm, the ellipse display of the graphic drawing does not appear as shown in the document. How can it be displayed? I'm sorry to interrupt you from your busy schedule.

    opened by Jiawei-00 7
Releases(v2.0.1)
Exploring Versatile Prior for Human Motion via Motion Frequency Guidance (3DV2021)

Exploring Versatile Prior for Human Motion via Motion Frequency Guidance This is the codebase for video-based human motion reconstruction in human-mot

Jiachen Xu 5 Jul 14, 2022
codes for "Scheduled Sampling Based on Decoding Steps for Neural Machine Translation" (long paper of EMNLP-2022)

Scheduled Sampling Based on Decoding Steps for Neural Machine Translation (EMNLP-2021 main conference) Contents Overview Background Quick to Use Furth

Adaxry 13 Jul 25, 2022
Official repository for "PAIR: Planning and Iterative Refinement in Pre-trained Transformers for Long Text Generation"

pair-emnlp2020 Official repository for the paper: Xinyu Hua and Lu Wang: PAIR: Planning and Iterative Refinement in Pre-trained Transformers for Long

Xinyu Hua 31 Oct 13, 2022
Simple streamlit app to demonstrate HERE Tour Planning

Table of Contents About the Project Built With Getting Started Prerequisites Installation Usage Roadmap Contributing License Acknowledgements About Th

Amol 8 Sep 5, 2022
An all-in-one application to visualize multiple different local path planning algorithms

Table of Contents Table of Contents Local Planner Visualization Project (LPVP) Features Installation/Usage Local Planners Probabilistic Roadmap (PRM)

Abdur Javaid 47 Dec 30, 2022
Related resources for our EMNLP 2021 paper

Plan-then-Generate: Controlled Data-to-Text Generation via Planning Authors: Yixuan Su, David Vandyke, Sihui Wang, Yimai Fang, and Nigel Collier Code

Yixuan Su 61 Jan 3, 2023
GNPy: Optical Route Planning and DWDM Network Optimization

GNPy is an open-source, community-developed library for building route planning and optimization tools in real-world mesh optical networks

Telecom Infra Project 140 Dec 19, 2022
Memory-efficient optimum einsum using opt_einsum planning and PyTorch kernels.

opt-einsum-torch There have been many implementations of Einstein's summation. numpy's numpy.einsum is the least efficient one as it only runs in sing

Haoyan Huo 9 Nov 18, 2022
(CVPR 2022) A minimalistic mapless end-to-end stack for joint perception, prediction, planning and control for self driving.

LAV Learning from All Vehicles Dian Chen, Philipp Krähenbühl CVPR 2022 (also arXiV 2203.11934) This repo contains code for paper Learning from all veh

Dian Chen 300 Dec 15, 2022
Little Ball of Fur - A graph sampling extension library for NetworKit and NetworkX (CIKM 2020)

Little Ball of Fur is a graph sampling extension library for Python. Please look at the Documentation, relevant Paper, Promo video and External Resour

Benedek Rozemberczki 619 Dec 14, 2022
The Python ensemble sampling toolkit for affine-invariant MCMC

emcee The Python ensemble sampling toolkit for affine-invariant MCMC emcee is a stable, well tested Python implementation of the affine-invariant ense

Dan Foreman-Mackey 1.3k Dec 31, 2022
Code for ICLR 2021 Paper, "Anytime Sampling for Autoregressive Models via Ordered Autoencoding"

Anytime Autoregressive Model Anytime Sampling for Autoregressive Models via Ordered Autoencoding , ICLR 21 Yilun Xu, Yang Song, Sahaj Gara, Linyuan Go

Yilun Xu 22 Sep 8, 2022
《LightXML: Transformer with dynamic negative sampling for High-Performance Extreme Multi-label Text Classification》(AAAI 2021) GitHub:

LightXML: Transformer with dynamic negative sampling for High-Performance Extreme Multi-label Text Classification

null 76 Dec 5, 2022
Symbolic Parallel Adaptive Importance Sampling for Probabilistic Program Analysis in JAX

SYMPAIS: Symbolic Parallel Adaptive Importance Sampling for Probabilistic Program Analysis Overview | Installation | Documentation | Examples | Notebo

Yicheng Luo 4 Sep 13, 2022
Official PyTorch implementation for FastDPM, a fast sampling algorithm for diffusion probabilistic models

Official PyTorch implementation for "On Fast Sampling of Diffusion Probabilistic Models". FastDPM generation on CIFAR-10, CelebA, and LSUN datasets. S

Zhifeng Kong 68 Dec 26, 2022
NAS Benchmark in "Prioritized Architecture Sampling with Monto-Carlo Tree Search", CVPR2021

NAS-Bench-Macro This repository includes the benchmark and code for NAS-Bench-Macro in paper "Prioritized Architecture Sampling with Monto-Carlo Tree

null 35 Jan 3, 2023
code for "AttentiveNAS Improving Neural Architecture Search via Attentive Sampling"

code for "AttentiveNAS Improving Neural Architecture Search via Attentive Sampling"

Facebook Research 94 Oct 26, 2022
Official implementation of the paper Vision Transformer with Progressive Sampling, ICCV 2021.

Vision Transformer with Progressive Sampling This is the official implementation of the paper Vision Transformer with Progressive Sampling, ICCV 2021.

yuexy 123 Jan 1, 2023