Permalink
Browse files

Split files into FSlam1, FSlam2, Core

  • Loading branch information...
1 parent 6422128 commit 14f0a3d3c362eab233161650e1bd64a96d8d9ad3 @yglee committed Aug 27, 2012
Showing with 195 additions and 1,318 deletions.
  1. +7 −1 .gitignore
  2. +4 −2 CMakeLists.txt
  3. +0 −13 README.md
  4. +0 −5 cpp/.gitignore
  5. +0 −37 cpp/CMakeLists.txt
  6. +0 −13 cpp/README.md
  7. +29 −0 cpp/core/CMakeLists.txt
  8. 0 cpp/{ → core}/KF_cholesky_update.cpp
  9. 0 cpp/{ → core}/KF_cholesky_update.h
  10. 0 cpp/{ → core}/KF_joseph_update.cpp
  11. 0 cpp/{ → core}/KF_joseph_update.h
  12. 0 cpp/{ → core}/TransformToGlobal.cpp
  13. 0 cpp/{ → core}/TransformToGlobal.h
  14. 0 cpp/{ → core}/add_control_noise.cpp
  15. 0 cpp/{ → core}/add_control_noise.h
  16. 0 cpp/{ → core}/add_feature.cpp
  17. 0 cpp/{ → core}/add_feature.h
  18. 0 cpp/{ → core}/add_observation_noise.cpp
  19. 0 cpp/{ → core}/add_observation_noise.h
  20. 0 cpp/{ → core}/compute_jacobians.cpp
  21. 0 cpp/{ → core}/compute_jacobians.h
  22. 0 cpp/{ → core}/compute_steering.cpp
  23. 0 cpp/{ → core}/compute_steering.h
  24. 0 cpp/{ → core}/configfile.cpp
  25. 0 cpp/{ → core}/configfile.h
  26. 0 cpp/{ → core}/data_associate_known.cpp
  27. 0 cpp/{ → core}/data_associate_known.h
  28. 0 cpp/{ → core}/example_webmap.mat
  29. 0 cpp/{ → core}/feature_update.cpp
  30. 0 cpp/{ → core}/feature_update.h
  31. 0 cpp/{ → core}/get_observations.cpp
  32. 0 cpp/{ → core}/get_observations.h
  33. 0 cpp/{ → core}/line_plot_conversion.cpp
  34. 0 cpp/{ → core}/line_plot_conversion.h
  35. 0 cpp/{ → core}/multivariate_gauss.cpp
  36. 0 cpp/{ → core}/multivariate_gauss.h
  37. 0 cpp/{ → core}/particle.cpp
  38. 0 cpp/{ → core}/particle.h
  39. 0 cpp/{ → core}/pi_to_pi.cpp
  40. 0 cpp/{ → core}/pi_to_pi.h
  41. 0 cpp/{ → core}/predict_true.cpp
  42. 0 cpp/{ → core}/predict_true.h
  43. 0 cpp/{ → core}/printMat.h
  44. 0 cpp/{ → core}/resample_particles.cpp
  45. 0 cpp/{ → core}/resample_particles.h
  46. 0 cpp/{ → core}/stratified_random.cpp
  47. 0 cpp/{ → core}/stratified_random.h
  48. 0 cpp/{ → core}/stratified_resample.cpp
  49. 0 cpp/{ → core}/stratified_resample.h
  50. 0 cpp/fastslam1/CMakeLists.txt
  51. 0 cpp/{ → fastslam1}/predict.cpp
  52. 0 cpp/{ → fastslam1}/predict.h
  53. +24 −0 cpp/fastslam2/CMakeLists.txt
  54. +9 −9 cpp/fastslam2/fastslam2_sim.cpp
  55. +4 −4 cpp/fastslam2/fastslam2_sim.h
  56. +1 −1 cpp/{ → fastslam2}/main.cpp
  57. +2 −2 cpp/fastslam2/observe_heading.cpp
  58. +1 −1 cpp/fastslam2/observe_heading.h
  59. +2 −2 cpp/fastslam2/predict.h
  60. +0 −9 cpp/fastslam2/predict_true.cpp
  61. +0 −13 cpp/fastslam2/predict_true.h
  62. +4 −4 cpp/fastslam2/sample_proposal.h
  63. +0 −277 cpp/fastslam2_sim.cpp
  64. +0 −22 cpp/fastslam2_sim.h
  65. +0 −79 cpp/gauss_evaluate.cpp
  66. +0 −26 cpp/gauss_evaluate.h
  67. +0 −39 cpp/observe_heading.cpp
  68. +0 −9 cpp/observe_heading.h
  69. +0 −110 cpp/sample_proposal.cpp
  70. +0 −27 cpp/sample_proposal.h
  71. BIN matlab/.add_control_noise.m.swp
  72. +2 −1 matlab/compute_jacobians.m
  73. +1 −1 matlab/fastslam1/predict.m
  74. +4 −1 matlab/fastslam2/fastslam2_sim.m
  75. +67 −36 testcode/add_feature.cpp
  76. +0 −44 testcode/compute_jacobians.cpp
  77. +33 −58 testcode/data_associate_known.cpp
  78. +1 −1 testcode/makefile
  79. +0 −12 testcode/pi_to_pi.cpp
  80. +0 −234 testcode/temp/main.cpp
  81. +0 −225 testcode/temp/old_main.cpp
View
@@ -1 +1,7 @@
-*~
+*.swp
+test/**/*
+*~
+*.o
+exec
+build
+.DS_Store
View
@@ -65,6 +65,8 @@ include_directories(${FSLAM_SOURCE_DIR}/cpp)
include_directories(${FSLAM_BINARY_DIR}/cpp)
# Adding build directories
-add_subdirectory(cpp)
+add_subdirectory(cpp/core)
+add_subdirectory(cpp/fastslam1)
+add_subdirectory(cpp/fastslam2)
-# Adding test directories
+# Adding test directories
View
@@ -1,13 +0,0 @@
-FastSLAM
-========
-
-Retrieval
-
-Prediction
-
-Measurement Update
-
-Importance Weight
-
-Resampling
-
View
@@ -1,5 +0,0 @@
-*.swp
-test/**/*
-*~
-*.o
-.DS_Store
View
@@ -1,37 +0,0 @@
-include_directories(${EIGEN3_INCLUDE_DIR})
-
-include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
-
-# Produce a FastSLAM shared library. (For re-use of executables)
-add_library(FastSLAM
- KF_cholesky_update.cpp add_observation_noise.cpp fastslam2_sim.cpp predict.cpp stratified_resample.cpp
- KF_joseph_update.cpp compute_jacobians.cpp feature_update.cpp multivariate_gauss.cpp predict_true.cpp
- TransformToGlobal.cpp compute_steering.cpp gauss_evaluate.cpp observe_heading.cpp resample_particles.cpp
- add_control_noise.cpp configfile.cpp get_observations.cpp particle.cpp sample_proposal.cpp
- add_feature.cpp data_associate_known.cpp line_plot_conversion.cpp pi_to_pi.cpp stratified_random.cpp
- )
-target_link_libraries(FastSLAM) # We don't depend on anything
-
-install(FILES
- KF_cholesky_update.h compute_jacobians.h gauss_evaluate.h pi_to_pi.h stratified_random.h
- KF_joseph_update.h compute_steering.h get_observations.h predict.h stratified_resample.h
- TransformToGlobal.h configfile.h line_plot_conversion.h predict_true.h
- add_control_noise.h data_associate_known.h multivariate_gauss.h printMat.h
- add_feature.h fastslam2_sim.h observe_heading.h resample_particles.h
- add_observation_noise.h feature_update.h particle.h sample_proposal.h
- DESTINATION include/fslam
- )
-
-install(TARGETS
- FastSLAM
- DESTINATION lib
- )
-
-# Add an executable that currently runs the simulator
-set(FSLAM_USED_LIBS FastSLAM)
-add_fslam_tool(fastslam_simulation main.cpp)
-
-# Add files that are just example data
-install( FILES example_webmap.mat
- PERMISSIONS GROUP_READ OWNER_READ
- DESTINATION bin )
View
@@ -1,13 +0,0 @@
-FastSLAM
-========
-
-Retrieval
-
-Prediction
-
-Measurement Update
-
-Importance Weight
-
-Resampling
-
@@ -0,0 +1,29 @@
+include_directories(${EIGEN3_INCLUDE_DIR})
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
+
+# Produce a FastSLAM shared library. (For re-use of executables)
+add_library(FastSLAM_core
+ add_control_noise.cpp compute_steering.cpp get_observations.cpp stratified_resample.cpp
+ add_feature.cpp configfile.cpp KF_cholesky_update.cpp multivariate_gauss.cpp resample_particles.cpp TransformToGlobal.cpp
+ add_observation_noise.cpp data_associate_known.cpp KF_joseph_update.cpp particle.cpp predict_true.cpp
+ compute_jacobians.cpp feature_update.cpp line_plot_conversion.cpp pi_to_pi.cpp stratified_random.cpp
+ )
+target_link_libraries(FastSLAM_core) # We don't depend on anything
+
+install(FILES
+ add_control_noise.h compute_jacobians.h data_associate_known.h KF_cholesky_update.h multivariate_gauss.h stratified_random.h predict_true.h
+ add_feature.h compute_steering.h feature_update.h KF_joseph_update.h particle.h printMat.h stratified_resample.h
+ add_observation_noise.h configfile.h get_observations.h line_plot_conversion.h pi_to_pi.h resample_particles.h TransformToGlobal.h
+ DESTINATION include/fslam/core
+ )
+
+install(TARGETS
+ FastSLAM_core
+ DESTINATION lib
+ )
+
+# Add files that are just example data
+install( FILES example_webmap.mat
+ PERMISSIONS GROUP_READ OWNER_READ
+ DESTINATION bin )
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
No changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,24 @@
+include_directories(${EIGEN3_INCLUDE_DIR})
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR}/..)
+
+# Produce a FastSLAM shared library. (For re-use of executables)
+add_library(FastSLAM2
+ fastslam2_sim.cpp gauss_evaluate.cpp observe_heading.cpp predict.cpp sample_proposal.cpp
+)
+target_link_libraries(FastSLAM2 FastSLAM_core) # We don't depend on anything
+
+install(FILES
+ fastslam2_sim.h gauss_evaluate.h observe_heading.h predict.h sample_proposal.h
+ DESTINATION include/fslam/fastslam2
+ )
+
+install(TARGETS
+ FastSLAM2
+ DESTINATION lib
+ )
+
+# Add an executable that currentlyi runs the simulator
+set(FSLAM_USED_LIBS FastSLAM2)
+add_fslam_tool(fastslam2_simulation main.cpp)
+
@@ -3,18 +3,18 @@
#include <vector>
#include "fastslam2_sim.h"
-#include "add_control_noise.h"
+#include "core/add_control_noise.h"
#include "predict.h"
#include "observe_heading.h"
-#include "get_observations.h"
-#include "add_observation_noise.h"
-#include "TransformToGlobal.h"
-#include "line_plot_conversion.h"
-#include "data_associate_known.h"
+#include "core/get_observations.h"
+#include "core/add_observation_noise.h"
+#include "core/TransformToGlobal.h"
+#include "core/line_plot_conversion.h"
+#include "core/data_associate_known.h"
#include "sample_proposal.h"
-#include "feature_update.h"
-#include "resample_particles.h"
-#include "add_feature.h"
+#include "core/feature_update.h"
+#include "core/resample_particles.h"
+#include "core/add_feature.h"
using namespace config;
using namespace std;
@@ -8,10 +8,10 @@
#include <vector>
#include <Eigen/Dense>
-#include "configfile.h"
-#include "compute_steering.h"
-#include "predict_true.h"
-#include "particle.h"
+#include "core/configfile.h"
+#include "core/compute_steering.h"
+#include "core/predict_true.h"
+#include "core/particle.h"
using namespace std;
using namespace Eigen;
@@ -8,7 +8,7 @@
#include <Eigen/Dense>
#include "fastslam2_sim.h"
-#include "particle.h"
+#include "core/particle.h"
using namespace Eigen;
using namespace std;
@@ -1,6 +1,6 @@
#include "observe_heading.h"
-#include "pi_to_pi.h"
-#include "KF_joseph_update.h"
+#include "core/pi_to_pi.h"
+#include "core/KF_joseph_update.h"
#include <iostream>
#include <vector>
@@ -2,7 +2,7 @@
#define OBSERVE_HEADING_H
#include<Eigen/Dense>
-#include "particle.h"
+#include "core/particle.h"
void observe_heading(Particle &particle, float phi, int useheading);
@@ -2,8 +2,8 @@
#define PREDICT_H
#include <Eigen/Dense>
-#include "particle.h"
-#include "multivariate_gauss.h"
+#include "core/particle.h"
+#include "core/multivariate_gauss.h"
using namespace Eigen;
@@ -1,9 +0,0 @@
-#include "predict_true.h"
-#include "pi_to_pi.h"
-
-void predict_true(VectorXf &xv, float V, float G, int WB, float dt)
-{
- xv(0) = xv(0) + V*dt*cos(G+xv(2));
- xv(1) = xv(1) + V*dt*sin(G+xv(2));
- xv(2) = pi_to_pi(xv(2) + V*dt*sin(G)/WB);
-}
@@ -1,13 +0,0 @@
-#ifndef PREDICT_TRUE_H
-#define PREDICT_TRUE_H
-
-#include <Eigen/Dense>
-
-using namespace Eigen;
-
-void predict_true(VectorXf &xv,float V,float G,int WB,float dt);
-//V is m/s
-// G is steering angle
-//WB = WHEELBASE
-
-#endif //PREDICT_TRUE_H
@@ -4,11 +4,11 @@
#include <vector>
#include <Eigen/Dense>
-#include "particle.h"
-#include "compute_jacobians.h"
-#include "multivariate_gauss.h"
+#include "core/particle.h"
+#include "core/compute_jacobians.h"
+#include "core/multivariate_gauss.h"
#include "gauss_evaluate.h"
-#include "pi_to_pi.h"
+#include "core/pi_to_pi.h"
using namespace Eigen;
using namespace std;
Oops, something went wrong.

0 comments on commit 14f0a3d

Please sign in to comment.