forked from vatsl/ParticleFilter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5a99989
Showing
2,458 changed files
with
22,551 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
reviewer | ||
submission_instructions.* | ||
build | ||
cmake-build-debug/ | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 2.8.11) | ||
project(PARTICLE_FILTER) | ||
|
||
|
||
# Build the particle filter project and solution. | ||
# Use C++11 | ||
set(SRCS src/main.cpp src/particle_filter.cpp) | ||
set_source_files_properties(${SRCS} PROPERTIES COMPILE_FLAGS -std=c++0x) | ||
|
||
# Create the executable | ||
add_executable(particle_filter ${SRCS}) | ||
|
||
# Use C++11 | ||
#if [ ! -f ./src/particle_filter_sol.cpp]; then | ||
# echo "No solution file." | ||
#else | ||
# echo "Solution file exists" | ||
#fi | ||
|
||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/src/particle_filter_sol.cpp") | ||
set(SRCS src/main.cpp src/particle_filter_sol.cpp) | ||
set_source_files_properties(${SRCS} PROPERTIES COMPILE_FLAGS -std=c++0x) | ||
|
||
# Create the executable | ||
add_executable(particle_filter_solution ${SRCS}) | ||
endif() | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## Project Introduction | ||
Your robot has been kidnapped and transported to a new location! Luckily it has a map of this location, a (noisy) GPS estimate of its initial location, and lots of (noisy) sensor and control data. | ||
|
||
In this project we implement a 2 dimensional particle filter in C++. The particle filter will be given a map and some initial localization information (analogous to what a GPS would provide). At each time step the filter will also get observation and control data. | ||
|
||
## Running the Code | ||
Once you have this repository on your machine, `cd` into the repository's root directory and run the following commands from the command line: | ||
|
||
``` | ||
> ./clean.sh | ||
> ./build.sh | ||
> ./run.sh | ||
``` | ||
|
||
## Inputs to the Particle Filter | ||
You can find the inputs to the particle filter in the `data` directory. | ||
|
||
#### The Map* | ||
`map_data.txt` includes the position of landmarks (in meters) on an arbitrary Cartesian coordinate system. Each row has three columns | ||
1. x position | ||
2. y position | ||
3. landmark id | ||
|
||
> * Map data provided by 3D Mapping Solutions GmbH. | ||
|
||
#### Control Data | ||
`control_data.txt` contains rows of control data. Each row corresponds to the control data for the corresponding time step. The two columns represent | ||
1. vehicle speed (in meters per second) | ||
2. vehicle yaw rate (in radians per second) | ||
|
||
#### Observation Data | ||
The `observation` directory includes around 2000 files. Each file is numbered according to the timestep in which that observation takes place. | ||
|
||
These files contain observation data for all "observable" landmarks. Here observable means the landmark is sufficiently close to the vehicle. Each row in these files corresponds to a single landmark. The two columns represent: | ||
1. x distance to the landmark in meters (right is positive) RELATIVE TO THE VEHICLE. | ||
2. y distance to the landmark in meters (forward is positive) RELATIVE TO THE VEHICLE. | ||
|
||
> **NOTE** | ||
> The vehicle's coordinate system is NOT the map coordinate system. | ||
> The code will handle this transformation. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
# Script to build all components from scratch, using the maximum available CPU power | ||
# | ||
# Given parameters are passed over to CMake. | ||
# Examples: | ||
# * ./build_all.sh -DCMAKE_BUILD_TYPE=Debug | ||
# * ./build_all.sh VERBOSE=1 | ||
# | ||
# Written by Tiffany Huang, 12/14/2016 | ||
# | ||
|
||
# Go into the directory where this bash script is contained. | ||
cd `dirname $0` | ||
|
||
# Compile code. | ||
mkdir -p build | ||
cd build | ||
cmake .. | ||
make -j `nproc` $* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# Script to clean the tree from all compiled files. | ||
# You can rebuild them afterwards using "build.sh". | ||
# | ||
# Written by Tiffany Huang, 12/14/2016 | ||
# | ||
|
||
# Remove the dedicated output directories | ||
cd `dirname $0` | ||
|
||
rm -rf build | ||
|
||
# We're done! | ||
echo Cleaned up the project! |
Oops, something went wrong.