Localization-of-an-Autonomous-Vehicle

所属分类:自动驾驶
开发工具:Python
文件大小:0KB
下载次数:0
上传日期:2021-07-12 10:31:51
上 传 者sh-1993
说明:  本项目是一个用于定位给定传感器数据(GPS和IMU)的自主车辆的无中心卡尔曼滤波器的实现,
(This project is an implementation of Unscented Kalman Filter for Localization of an Autonomous Vehicle given sensor data (GPS and IMU),)

文件列表:
GPS.csv (1024779, 2021-07-12)
Results/ (0, 2021-07-12)
Results/Pitch.png (44368, 2021-07-12)
Results/Pos_3D.png (93851, 2021-07-12)
Results/Pos_x.png (28015, 2021-07-12)
Results/Pos_y.png (30375, 2021-07-12)
Results/Pos_z.png (32782, 2021-07-12)
Results/Roll.png (35135, 2021-07-12)
Results/Vel_x.png (22630, 2021-07-12)
Results/Vel_y.png (25519, 2021-07-12)
Results/Vel_z.png (27738, 2021-07-12)
Results/Yaw.png (19705, 2021-07-12)
USEKF.py (5764, 2021-07-12)
pos_v_acc.csv (36468, 2021-07-12)
requirements.txt (5870, 2021-07-12)

# Localization || Autonomous Vehicle This project implements Unscented Kalman Filter for localization of an Autonomous Vehicle given sensors GPS and IMU. This project was initially developed for the competition Indy Autonomous Competition in which I participated under the Team Abhiyaan from IIT Madras. The example data given here is extracted from a simulation of the vehicle performing a lap around the track. Given an sensor error rate of over **6 meters** (GPS in this case) the localization module can predict the **position** of the vehicle within an error of **2.3 meters** and the **orientation** of the vehicle within an error of **0.01 radians**. The module built here is just a framework for using Unscented Kalman Filter and can be coupled with other data too. ## Localization In a self-driving car car, GPS (Global Positioning Systems) use trilateration to locate our position. In these measurements, there may be an error of 10 meters. This error is too important and can potentially be fatal for the passengers or the environment of the autonomous vehicle. We therefore include a step called **localization**. Localization is a step implemented in the majority of robots and vehicles to locate with a really small margin of error. If we want to make decisions like overtaking a vehicle or simply defining a route, we need to know what’s around us (sensor fusion) and where we are (localization). Only with this information we can define a trajectory. ## Unscented Kalman Filter The UKF addresses the approximation issues of the EKF. The state distribution is again represented by a GRV, but is now specified using a minimal set of carefully chosen sample points. These sample points completely capture the true mean and covariance of the GRV, and when propagated through the true non-linear system, captures the posterior mean and covariance accurately to the 3rd order (Taylor series expansion) for any non-linearity. To read more about UKF and how it works refer: [The Unscented Kalman Filter for Nonlinear Estimation](https://groups.seas.harvard.edu/courses/cs281/papers/unscented.pdf). Here I used the Unscented Kalman Filter package provided by [filterpy](https://filterpy.readthedocs.io/en/latest/kalman/UnscentedKalmanFilter.html) as a base to implement the localization module. ## Module ### Input and Output The module gets the following data as it's sensor input: - GPS - Position X, Y, Z - IMU - Acceleration X, Y, Z - Angular Velocity X, Y, Z - Angular Acceleration X, Y, Z The module then uses this input to predict the state of the vehicle which is a 9-dimensional vector given by: - Position X, Y, Z - Velocity X, Y, Z - Yaw, Pitch and Roll ### Results Seen below are the actual versus estimated state of the vehicle. ![3D Position](./Results/Pos_3D.png) ![Pos X](./Results/Pos_x.png) ![Pos Y](./Results/Pos_y.png) ![Pos Z](./Results/Pos_z.png) ![Vel X](./Results/Vel_x.png) ![Vel Y](./Results/Vel_y.png) ![Vel Z](./Results/Vel_z.png) ![Yaw](./Results/Yaw.png) ![Pitch](./Results/Pitch.png) ![Roll](./Results/Roll.png) As seen above the localization moule very accurately preditcs the state of the vehicle. ## Usage - `GPS.csv` contains the sennsor data and the real data. Replace this incase you want to use your own data for this module - To install all dependencies run `pip install -r requirements.txt` - To run the main module: `python USEKF.py`

近期下载者

相关文件


收藏者