Skip to content

Commit

Permalink
added the UKF and the ekf to the readme and added table of contents
Browse files Browse the repository at this point in the history
  • Loading branch information
Marius-Juston committed Mar 3, 2021
1 parent ef8655b commit fff5482
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 5 deletions.
73 changes: 68 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,26 @@
<img alt="GitHub" src="https://img.shields.io/github/license/Marius-Juston/UWB-Localization"></a>
</p>

# Project Description
## 1. Table of contents

- [Jackal Ad-Hoc Ultra-wideband localization](#jackal-ad-hoc-ultra-wideband-localization)
- [1. Table of contents](#1-table-of-contents)
- [2. Project Description](#2-project-description)
- [3. Installation](#3-installation)
- [4. Files](#4-files)
- [4.1. ukf_uwb_localization.py](#41-ukf_uwb_localizationpy)
- [4.2. ekf_uwb_localization.py](#42-ekf_uwb_localizationpy)
- [4.3. csv_creator.py](#43-csv_creatorpy)
- [4.4. live_plotter.py](#44-live_plotterpy)
- [4.5. location_drawer.py](#45-location_drawerpy)
- [4.6. range_drawer.py](#46-range_drawerpy)
- [4.7. actual_robot_position.py](#47-actual_robot_positionpy)

## 2. Project Description

This project is meant to implement a localization algorithm where a [Jackal](https://clearpathrobotics.com/jackal-small-unmanned-ground-vehicle/) is combined with [Decawave Ultra-widebands](https://www.decawave.com/product/mdek1001-deployment-kit/) and is meant to be able to localize itself with both mobile and stationary anchors in the world.

# Installation
## 3. Installation

This project uses [`ROS Melodic`](http://wiki.ros.org/melodic) as its ROS backend.

Expand All @@ -42,9 +57,37 @@ To setup:
- `echo "source ~/catkin_ws/devel/setup.bash" > ~/.bashrc`
- This will allow you to not have to run the source command every time.

# Files
## 4. Files

## csv_creator.py
### 4.1. ukf_uwb_localization.py

This runs an Unscented Kalman Filter based on a "Constant turn rate and velocity magnitude" (CTRV) non linear process model.

This is the program that you should run for the more accurate localization estimations and is what this project is focussing on.

The CTRV assumes that the acceleration is the noise and that the velocity and the turn rate is constant. This is better suited to mobile robots who turn following the bycicle model.

This unscented kalman filter outputs with a rate of 60HZ and takes in the Jackal's Odometry and the UWB range with its associated anchor point location.

For a better explanation of the process model and how this UKF works in general:
- https://fevemania.github.io/blog/mathematic-formula-note-of-unscented-kalman-filter/

To use this:

- `rosrun uwb_localization ukf_uwb_localization.py`


### 4.2. ekf_uwb_localization.py

This runs an Kalman Filter with a linear process model for the x, y, and z dimensions. This model however is more suited to UAV which are unconstrained in their motion and is thus discontinued for this project.

This kalman filter outputs with a rate of 60HZ and takes in the Jackal's Odometry and the UWB range with its associated anchor point location.

To use this:

- `rosrun uwb_localization ekf_uwb_localization.py`

### 4.3. csv_creator.py

This converts a rosbag with the format:

Expand All @@ -58,7 +101,12 @@ To use this:
2. Run the rosbag you want to convert (i.e. `rosbag play *.bag`)
- Be carefull because this csv_creator assumes that the anchors are currently stationary

## location_drawer.py
### 4.4. live_plotter.py

This is an interface to create live matplotlib plots. Use the `LivePlotter` class to create the live plots.
Ignore the warnings or errors that apprear when running this.

### 4.5. location_drawer.py

This plots in real-time the location of the robot's positions in a matplotlib graph.

Expand All @@ -75,3 +123,18 @@ To use:
- `rosrun uwb_localization location_drawer.py /jackal/uwb/odom`
- Custom odometry message


### 4.6. range_drawer.py

This plots in real-time the range measurements of the worlds anchor points as they reach the tags in a matplotlib graph.

For these plots it is normal to have range measurements that come and go due to the nature of UWB sensors being obstructed by line of sight.

![Range Plotter Example](images/range_drawer.png)

To use:
- `rosrun uwb_localization range_drawer.py`

### 4.7. actual_robot_position.py

This is a deprecated program that used to output the robot's position based on its base_link tf.
Binary file added images/range_drawer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fff5482

Please sign in to comment.