Skip to content

the-jojo/SpiderBUG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpiderBUG

Mobile Robot Navigation using Dynamic Webs

Summary

The problem addressed is that of an autonomous robotic agent navigating an unknown and dynamically changing 2-D environment without the use of a global map. The particular focus is the scenario of a winewaiter robot desiring smooth but short paths. An adaptive obstacle navigation algorithm (SpiderBUG) is presented overcoming perceptual limitations of sensors and real-time requirements. The Tangent-BUG algorithm is adapted to compensate for obstacles moving with unknown velocities. Also, dynamic webs are used and introduced in a way to span through space-time, reducing the problem in free-space to graph traversal. Smoothness in our new algorithm is guaranteed both through the nature of the incorporated Tangent-BUG algorithm as well as through the use of shift-curves. The simulation results are shown to support the theoretical design's intentions. Guarantees persist in the face of cluttered, static and dynamic environments.

[J. Weck, “Mobile robot navigation using dynamic webs.” 2019.]

This Project

This project code accompanies a dissertation presented in part fulfilment of the requirements of the Master of Science Computing Science of the University of Glasgow

The SpiderBUG path-planner is implemented in Python using the Pybullet physics library and tested against a range of static and dynamic environments.

This following document explains how to run the code to reproduce results from the dissertation. Also, an overview of the code is presented, explaining how the designed algorithm maps onto the included code.

Licence

All work presented in this repository is available under the MIT licence.

Requirements

The code was only tested on a Windows 10 machine. Problems may arise on other operating systems. A dedicated graphics card and higher-spec multicore CPU is recommended, since each module and PyBullet itself runs on a different thread.

Quickstart Guide

To run the simulation environment, first make sure all the required python packages are installed:

> pip install Cython numpy
> pip install git+git:https://github.com/the-jojo/pydubins.git
> python setup.py install

Then run each of the commands below in a new shell window/tab:

> python src/sbPlanner.py
> python src/sbRobot.py
> python src/sbPerception.py
> python src/sbGUI.py

Example Run

Example run of app (sped up 150%)

Manual

Once READY is printed by each module to their console, use the GUI interface to start a scenario. Select "Setup Simulation", then select the robot model and scenario from the dropdown lists. The image below explains the interface options.

Setup interface page explanation

Live View

Click "Start" to start the simulation. "Pause" can be used to pause all modules and "Step" to run one iteration of each module, including the PyBullet simulation.

Click "View Robot Live State" to view a graphical representation of the planner's internal state. The image below explains the available elements of this interface page. Please note that elements of the 3D plot of the dynamic web and the obstacle may overlap when they should be underlapping, thus making it hard to interpret.

Live view interface page explanation

Live View

The robot can be either a Turtebot 2 model or a Spherebot and the PyBullet OpenGL simulation environment is depicted and explained in the image below.

Pybullet Simulation explanation

Simulation View

Documentation

File Structure:

├── data  # experiment data and jupyter notebook to explore data
|   ├── exp_data    # raw experiment data
|   |   ├── control     # control paths as seen in figure 4.2; TurtleBot model run once on all scenarios
|   |   ├── models      # data for section 4.3 Applicability to other Vehicular Movement Models
|   |   ├── obstacles   # data for section 4.4 Applicability to other Dynamic Environments
|   |   ├── resolutions # data for section 4.1 Algorithm Hyper-parameters - h_tolerance, d_tolerance
|   |   └── tolerances  # data for section 4.1 Algorithm Hyper-parameters - h_resolution
|   |       |   ... each of the above folders contains subfolders similar to the structure below ...
|   |       └── S_x       # 1 folder per scenario
|   |           └── i_x     # 1 folder per iteration
|   |               ├── py_objs     # folder containing python objects of the executed path and update intervals 
|   |               └── TOL_x.csv   # csv of the parameter values tested, corresponding python object files and final state
|   ├── pics        # pictures used in the thesis
|   ├── py_data     # pybullet data such as urdf files
|   └── sbAnalysis.ipynb  # Juypter Notebook used for data exploration 
|                           and to generate the graphs in the thesis
├── md_files # images embedded in this readme
├── src      # python source code
|    ├── bot                      # code relating to the robot in the simulation and the setup of the scenarios
|    ├── geom                     # code relating to geometrical operations (SpiderBUG's MTG mode)
|    ├── nav                      # code used by the sbPlanner for both the MTG and BF modes
|    ├── utils                    # configuration files, utility functions and Dubins path code
|    ├── intersection_profiler.py # code used to profile the obstacleSegment.get_intersect_with_path_3d() function for section 3.3.3 of the thesis
|    ├── sbExp.py                 # code used to collect the raw data for all the experiments
|    ├── sbGUI.py                 # GUI module
|    ├── sbPerception.py          # Perception module
|    ├── sbPlanner.py             # Planner module
|    └── sbRobot.py               # robot module
├── README.md # this readme file 
└── setup.py  # setup python file includes pip package requirements

In-depth description of the source code can be found in the documentation of each file.

Future Work

More testing is required to ensure compatibility with future versions of numpy and pybullet and with other operating systems and systems specs. The GUI could be improved and modules could be made more resilient to unexpected errors.

SpiderBUG run on all Scenarios

Scenario 1

Scenario 1

Scenario 2

Scenario 2

Scenario 3

Scenario 3

Scenario 4

Scenario 4

Scenario 5

Scenario 5

Scenario 6

Scenario 6