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)
MutualGuide is a compact object detector specially designed for embedded devices

Introduction MutualGuide is a compact object detector specially designed for embedded devices. Comparing to existing detectors, this repo contains two

ZHANG Heng 103 Dec 13, 2022
Official PyTorch implementation of the paper "Deep Constrained Least Squares for Blind Image Super-Resolution", CVPR 2022.

Deep Constrained Least Squares for Blind Image Super-Resolution [Paper] This is the official implementation of 'Deep Constrained Least Squares for Bli

MEGVII Research 141 Dec 30, 2022
I explore rock vs. mine prediction using a SONAR dataset

I explore rock vs. mine prediction using a SONAR dataset. Using a Logistic Regression Model for my prediction algorithm, I intend on predicting what an object is based on supervised learning.

Jeff Shen 1 Jan 11, 2022
Bridging Composite and Real: Towards End-to-end Deep Image Matting

Bridging Composite and Real: Towards End-to-end Deep Image Matting Please note that the official repository of the paper Bridging Composite and Real:

Jizhizi_Li 30 Oct 31, 2022
This is an example implementation of the paper "Cross Domain Robot Imitation with Invariant Representation".

IR-GAIL This is an example implementation of the paper "Cross Domain Robot Imitation with Invariant Representation". Dependency The experiments are de

Zhao-Heng Yin 1 Jul 14, 2022
Install alphafold on the local machine, get out of docker.

AlphaFold This package provides an implementation of the inference pipeline of AlphaFold v2.0. This is a completely new model that was entered in CASP

Kui Xu 73 Dec 13, 2022
Pytorch implementation of the paper DocEnTr: An End-to-End Document Image Enhancement Transformer.

DocEnTR Description Pytorch implementation of the paper DocEnTr: An End-to-End Document Image Enhancement Transformer. This model is implemented on to

Mohamed Ali Souibgui 74 Jan 07, 2023
Deep Markov Factor Analysis (NeurIPS2021)

Deep Markov Factor Analysis (DMFA) Codes and experiments for deep Markov factor analysis (DMFA) model accepted for publication at NeurIPS2021: A. Farn

Sarah Ostadabbas 2 Dec 16, 2022
NBEATSx: Neural basis expansion analysis with exogenous variables

NBEATSx: Neural basis expansion analysis with exogenous variables We extend the NBEATS model to incorporate exogenous factors. The resulting method, c

Cristian Challu 100 Dec 31, 2022
Caffe models in TensorFlow

Caffe to TensorFlow Convert Caffe models to TensorFlow. Usage Run convert.py to convert an existing Caffe model to TensorFlow. Make sure you're using

Saumitro Dasgupta 2.8k Dec 31, 2022
Official repository for Few-shot Image Generation via Cross-domain Correspondence (CVPR '21)

Few-shot Image Generation via Cross-domain Correspondence Utkarsh Ojha, Yijun Li, Jingwan Lu, Alexei A. Efros, Yong Jae Lee, Eli Shechtman, Richard Zh

Utkarsh Ojha 251 Dec 11, 2022
DeepLab-ResNet rebuilt in TensorFlow

DeepLab-ResNet-TensorFlow This is an (re-)implementation of DeepLab-ResNet in TensorFlow for semantic image segmentation on the PASCAL VOC dataset. Fr

Vladimir 1.2k Nov 04, 2022
A BaSiC Tool for Background and Shading Correction of Optical Microscopy Images

BaSiC Matlab code accompanying A BaSiC Tool for Background and Shading Correction of Optical Microscopy Images by Tingying Peng, Kurt Thorn, Timm Schr

Marr Lab 34 Dec 18, 2022
Breaking Shortcut: Exploring Fully Convolutional Cycle-Consistency for Video Correspondence Learning

Breaking Shortcut: Exploring Fully Convolutional Cycle-Consistency for Video Correspondence Learning Yansong Tang *, Zhenyu Jiang *, Zhenda Xie *, Yue

Zhenyu Jiang 12 Nov 16, 2022
A lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look At CoefficienTs)

Real-time Instance Segmentation and Lane Detection This is a lane detection integrated Real-time Instance Segmentation based on YOLACT (You Only Look

Jin 4 Dec 30, 2022
Automatic Calibration for Non-repetitive Scanning Solid-State LiDAR and Camera Systems

ACSC Automatic extrinsic calibration for non-repetitive scanning solid-state LiDAR and camera systems. System Architecture 1. Dependency Tested with U

KINO 192 Dec 13, 2022
Bayesian Neural Networks in PyTorch

We present the new scheme to compute Monte Carlo estimator in Bayesian VI settings with almost no memory cost in GPU, regardles of the number of sampl

Jurijs Nazarovs 7 May 03, 2022
A Transformer-Based Feature Segmentation and Region Alignment Method For UAV-View Geo-Localization

University1652-Baseline [Paper] [Slide] [Explore Drone-view Data] [Explore Satellite-view Data] [Explore Street-view Data] [Video Sample] [中文介绍] This

Zhedong Zheng 335 Jan 06, 2023
HyperSeg: Patch-wise Hypernetwork for Real-time Semantic Segmentation Official PyTorch Implementation

: We present a novel, real-time, semantic segmentation network in which the encoder both encodes and generates the parameters (weights) of the decoder. Furthermore, to allow maximal adaptivity, the w

Yuval Nirkin 182 Dec 14, 2022
Research code of ICCV 2021 paper "Mesh Graphormer"

MeshGraphormer ✨ ✨ This is our research code of Mesh Graphormer. Mesh Graphormer is a new transformer-based method for human pose and mesh reconsructi

Microsoft 251 Jan 08, 2023