sensor-fusion

所属分类:雷达系统
开发工具:C++
文件大小:4633KB
下载次数:3
上传日期:2019-07-04 00:00:10
上 传 者sh-1993
说明:  过滤器:KF,EKF,UKF||过程模型:CV,CTRV||测量模型:雷达,激光雷达
(Filters: KF, EKF, UKF || Process Models: CV, CTRV || Measurement Models: Radar, Lidar)

文件列表:
.idea (0, 2019-05-23)
.idea\.name (13, 2019-05-23)
.idea\codeStyles (0, 2019-05-23)
.idea\codeStyles\codeStyleConfig.xml (149, 2019-05-23)
.idea\misc.xml (388, 2019-05-23)
.idea\modules.xml (278, 2019-05-23)
.idea\sensor-fusion.iml (97, 2019-05-23)
.idea\vcs.xml (180, 2019-05-23)
CMakeLists.txt (2162, 2019-05-23)
LICENSE (35149, 2019-05-23)
config (0, 2019-05-23)
config\ctrv_process_model_config.json (120, 2019-05-23)
config\cv_process_model_config.json (106, 2019-05-23)
config\lidar_measurement_model_config.json (119, 2019-05-23)
config\radar_measurement_model_config.json (206, 2019-05-23)
docs (0, 2019-05-23)
docs\pics (0, 2019-05-23)
docs\pics\Algorithm_Extended_Kalman_filter.png (34640, 2019-05-23)
docs\pics\Algorithm_Kalman_filter.png (34180, 2019-05-23)
docs\pics\Algorithm_Unscented_Kalman_filter.png (85885, 2019-05-23)
docs\pics\CTRV_process_model.png (19404, 2019-05-23)
docs\pics\CTRV_process_model_alpha.png (27049, 2019-05-23)
docs\pics\CTRV_process_model_beta.png (27019, 2019-05-23)
docs\pics\CV_process_model.png (17785, 2019-05-23)
docs\pics\Lidar_measurement_model.png (18122, 2019-05-23)
docs\pics\Lidar_measurement_model_H.png (21982, 2019-05-23)
docs\pics\Radar_measurement_model.png (21371, 2019-05-23)
docs\pics\Radar_measurement_model_h.png (17288, 2019-05-23)
docs\pics\demo.gif (993363, 2019-05-23)
docs\pics\graph.png (14024, 2019-05-23)
include (0, 2019-05-23)
include\beliefs.hpp (838, 2019-05-23)
include\definitions.hpp (5941, 2019-05-23)
include\filters.hpp (867, 2019-05-23)
include\fusion.hpp (2819, 2019-05-23)
include\measurement_models.hpp (847, 2019-05-23)
include\measurement_vector_views.hpp (869, 2019-05-23)
... ...

# Sensor Fusion with KF, EKF, and UKF for CV & CTRV Process Models and Lidar & Radar Measurements Models This repository contains implementations of Kalman filter, extended Kalman filter, and unscented Kalman filter for the selected process and measurement models. Process Models: - [CV (constant velocity)](https://github.com/ser94mor/sensor-fusion/blob/master/#cv-constant-velocity) - [CTRV (constant turn rate and velocity magnitude)](https://github.com/ser94mor/sensor-fusion/blob/master/#ctrv-constant-turn-rate-and-velocity-magnitude) Measurement Models: - [Radar](https://github.com/ser94mor/sensor-fusion/blob/master/#radar) - [Lidar](https://github.com/ser94mor/sensor-fusion/blob/master/#lidar) The project relies on the [Eigen library](https://github.com/ser94mor/sensor-fusion/blob/master/http://eigen.tuxfamily.org/index.php?title=Main_Page) for vector and matrix operations. A great effort has been put in designing abstractions of filter, process model, and measurement model. The code heavily relies on C++ templates and avoids dynamic memory allocations, which is crucial for embedded systems, such as, self-driving car's onboard computer. ## Configurations There are several files defining `int main(int, char**)` function. * [udacity_sim_main.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/src/mains/udacity_sim_main.cpp) * Use it in conjunction with the [Udacity Self-Driving Car Engineer Nanodegree Term 2 Simulator](https://github.com/ser94mor/sensor-fusion/blob/master/https://github.com/udacity/self-driving-car-sim/releases) for checking how the sensor fusion works on simulated measurement data. * [all_main.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/src/mains/all_main.cpp) * Use it to check that all possible configurations of filters, process models, and measurement models compile. * [test.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/test/test.cpp) * Use it to run unit tests. ## Demo One of the configurations works with the [Udacity Self-Driving Car Engineer Nanodegree Term 2 Simulator](https://github.com/ser94mor/sensor-fusion/blob/master/https://github.com/udacity/self-driving-car-sim/releases). ![demo](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/demo.gif) ## Dependencies * cmake >= 3.5 * gcc/g++ >= 6.0 Additional: * For [udacity_sim_main.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/src/mains/udacity_sim_main.cpp) * [uWebSocketIO](https://github.com/ser94mor/sensor-fusion/blob/master/https://github.com/uWebSockets/uWebSockets) with commit hash e94b6e1 * [Udacity Self-Driving Car Engineer Nanodegree Term 2 Simulator](https://github.com/ser94mor/sensor-fusion/blob/master/https://github.com/udacity/self-driving-car-sim/releases) ## Build The project can be built by doing the following from the project top directory. ```bash $> mkdir build $> cd build $> cmake .. $> make $> cd .. ``` ## Run * For [udacity_sim_main.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/src/mains/udacity_sim_main.cpp) run `build/sensor_fusion_udacity_sim` and then run [Udacity Self-Driving Car Engineer Nanodegree Term 2 Simulator](https://github.com/ser94mor/sensor-fusion/blob/master/https://github.com/udacity/self-driving-car-sim/releases). * For [all_main.cpp](https://github.com/ser94mor/sensor-fusion/blob/master/src/mains/all_main.cpp) run `build/sensor_fusion_all`. * For unit tests run `build/sensor_fusion_test`. ## Filters While implementing different variations of Kalman filters, the notation from the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press." was followed. ### Kalman Filter The equations below describe the Kalman filter and are implemented in the [KalmanFilter](https://github.com/ser94mor/sensor-fusion/blob/master/src/filters/KalmanFilter.hpp) class. ![Algorithm_Kalman_filter](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Algorithm_Kalman_filter.png) For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press." ### Extended Kalman Filter The equations below describe the extended Kalman filter and are implemented in the [ExtendedKalmanFilter](https://github.com/ser94mor/sensor-fusion/blob/master/src/filters/ExtendedKalmanFilter.hpp) class. ![Algorithm_Extended_Kalman_filter](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Algorithm_Extended_Kalman_filter.png) For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press." ### Unscented Kalman Filter The equations below describe the unscented Kalman filter and are implemented in the [UnscentedKalmanFilter](https://github.com/ser94mor/sensor-fusion/blob/master/src/filters/UnscentedKalmanFilter.hpp) class. ![Algorithm_Unscented_Kalman_filter](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Algorithm_Unscented_Kalman_filter.png) For explanations of what each variable means, please, refer to comments in the code in corresponding files or the book "Thrun, S., Burgard, W. and Fox, D., 2005. Probabilistic robotics. MIT press." ## Process Models The following illustration helps to understand what the state vector dimensions mean. ![graph](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/graph.png) ### CV (Constant Velocity) The CV process model is a process model where the object moves linearly with constant velocity. In this project, CV process model dials with a 2D world. The state vector consists of 4 components---px, py, vx, vy---where p\* represents the position and v\* represents the velocity. The leftmost column in the following equation represents the additive process noise; a\* represents acceleration. ![CV_process_model](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/CV_process_model.png) The CV process model is implemented as a [CVProcessModel](https://github.com/ser94mor/sensor-fusion/blob/master/src/process_models/CVProcessModel.hpp) class. ### CTRV (Constant Turn Rate and Velocity Magnitude) The CTRV process model is a process model where the object moves with a constant turn rate and velocity, that is, with zero longitudinal and yaw accelerations. CTRV process model dials with a 2D world. The state vector consists of 5 components---px, py, v, yaw, yaw_rate---where p\* represents the position, v represents the velocity module, yaw represents the [yaw angle](https://github.com/ser94mor/sensor-fusion/blob/master/https://en.wikipedia.org/wiki/Aircraft_principal_axes), and yaw_rate represents the yaw velocity. The leftmost column in the following equation represents the non-linear process noise; a_a represents longitudinal acceleration, and a_psi is yaw acceleration. ![CTRV_process_model](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/CTRV_process_model.png) where ![CTRV_process_model_alpha](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/CTRV_process_model_alpha.png) and ![CTRV_process_model_beta](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/CTRV_process_model_beta.png) The results of solving these integrals depends on the yaw_rate, see [CTRVProcessModel](https://github.com/ser94mor/sensor-fusion/blob/master/src/process_models/CTRVProcessModel.hpp). ## Measurement Models ### Lidar The Lidar measurement model is a linear measurement model. This project does not deal with the lidar point cloud. It assumes that the lidar point cloud has already been processed and a single measurement vector has been identified for the object under consideration. The measurement vector consists of 2 components---px, py---where p\* represents the position. The transformation from the state space to the Lidar measurement space is as follows ![Lidar_measurement_model](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Lidar_measurement_model.png) where ![Lidar_measurement_model_H](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Lidar_measurement_model_H.png) The Lidar measurement model is implemented as a [LidarMeasurementModel](https://github.com/ser94mor/sensor-fusion/blob/master/src/measurement_models/LidarMeasurementModel.hpp) class. ### Radar The Radar measurement model is a non-linear measurement model. The measurement vector consists of 3 components---range, bearing, range_rate---where the range is a radial distance from the origin, the bearing is an angle between range and X-axis which points into the direction of the heading of the vehicle, where sensors are installed, and range_rate is a radial velocity. The transformation from the state space to the Radar measurement space is as follows ![Radar_measurement_model](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Radar_measurement_model.png) where ![Radar_measurement_model_h](https://github.com/ser94mor/sensor-fusion/blob/master/docs/pics/Radar_measurement_model_h.png) The Radar measurement model is implemented as a [RadarMeasurementModel](https://github.com/ser94mor/sensor-fusion/blob/master/src/measurement_models/RadarMeasurementModel.hpp) class.

近期下载者

相关文件


收藏者